@akad/sdk 1.0.21 → 1.0.22
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/base.d.ts +4 -3
- package/helpers/TokenRefreshManager.d.ts +0 -1
- package/package.json +1 -1
- package/ts-lib.js +822 -797
- package/ts-lib.umd.cjs +6 -6
package/ts-lib.js
CHANGED
|
@@ -4,8 +4,8 @@ function Be(e, t) {
|
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
6
|
const { toString: nt } = Object.prototype, { getPrototypeOf: le } = Object, K = /* @__PURE__ */ ((e) => (t) => {
|
|
7
|
-
const
|
|
8
|
-
return e[
|
|
7
|
+
const r = nt.call(t);
|
|
8
|
+
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
9
9
|
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => K(t) === e), v = (e) => (t) => typeof t === e, { isArray: F } = 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);
|
|
@@ -25,60 +25,60 @@ const ot = v("string"), R = v("function"), qe = v("number"), W = (e) => e !== nu
|
|
|
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
27
|
}, ht = P("URLSearchParams"), [pt, mt, yt, gt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), wt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
28
|
-
function I(e, t, { allOwnKeys:
|
|
28
|
+
function I(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
29
29
|
if (e === null || typeof e > "u")
|
|
30
30
|
return;
|
|
31
|
-
let
|
|
31
|
+
let n, s;
|
|
32
32
|
if (typeof e != "object" && (e = [e]), F(e))
|
|
33
|
-
for (
|
|
34
|
-
t.call(null, e[
|
|
33
|
+
for (n = 0, s = e.length; n < s; n++)
|
|
34
|
+
t.call(null, e[n], n, e);
|
|
35
35
|
else {
|
|
36
|
-
const
|
|
37
|
-
let
|
|
38
|
-
for (
|
|
39
|
-
|
|
36
|
+
const i = r ? Object.getOwnPropertyNames(e) : Object.keys(e), o = i.length;
|
|
37
|
+
let c;
|
|
38
|
+
for (n = 0; n < o; n++)
|
|
39
|
+
c = i[n], t.call(null, e[c], c, e);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
function Fe(e, t) {
|
|
43
43
|
t = t.toLowerCase();
|
|
44
|
-
const
|
|
45
|
-
let
|
|
46
|
-
for (;
|
|
47
|
-
if (s = n
|
|
44
|
+
const r = Object.keys(e);
|
|
45
|
+
let n = r.length, s;
|
|
46
|
+
for (; n-- > 0; )
|
|
47
|
+
if (s = r[n], t === s.toLowerCase())
|
|
48
48
|
return s;
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
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
|
-
const { caseless: e } = _e(this) && this || {}, t = {},
|
|
54
|
-
const
|
|
55
|
-
M(t[
|
|
53
|
+
const { caseless: e } = _e(this) && this || {}, t = {}, r = (n, s) => {
|
|
54
|
+
const i = e && Fe(t, s) || s;
|
|
55
|
+
M(t[i]) && M(n) ? t[i] = re(t[i], n) : M(n) ? t[i] = re({}, n) : F(n) ? t[i] = n.slice() : t[i] = n;
|
|
56
56
|
};
|
|
57
|
-
for (let
|
|
58
|
-
arguments[
|
|
57
|
+
for (let n = 0, s = arguments.length; n < s; n++)
|
|
58
|
+
arguments[n] && I(arguments[n], r);
|
|
59
59
|
return t;
|
|
60
60
|
}
|
|
61
|
-
const bt = (e, t,
|
|
62
|
-
|
|
63
|
-
}, { allOwnKeys:
|
|
64
|
-
e.prototype = Object.create(t.prototype,
|
|
61
|
+
const bt = (e, t, r, { allOwnKeys: n } = {}) => (I(t, (s, i) => {
|
|
62
|
+
r && R(s) ? e[i] = Be(s, r) : e[i] = s;
|
|
63
|
+
}, { allOwnKeys: n }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Tt = (e, t, r, n) => {
|
|
64
|
+
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
65
65
|
value: t.prototype
|
|
66
|
-
}),
|
|
67
|
-
}, Et = (e, t,
|
|
68
|
-
let s,
|
|
69
|
-
const
|
|
66
|
+
}), r && Object.assign(e.prototype, r);
|
|
67
|
+
}, Et = (e, t, r, n) => {
|
|
68
|
+
let s, i, o;
|
|
69
|
+
const c = {};
|
|
70
70
|
if (t = t || {}, e == null)
|
|
71
71
|
return t;
|
|
72
72
|
do {
|
|
73
|
-
for (s = Object.getOwnPropertyNames(e),
|
|
74
|
-
|
|
75
|
-
e =
|
|
76
|
-
} while (e && (!
|
|
73
|
+
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
74
|
+
o = s[i], (!n || n(o, e, t)) && !c[o] && (t[o] = e[o], c[o] = !0);
|
|
75
|
+
e = r !== !1 && le(e);
|
|
76
|
+
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
77
77
|
return t;
|
|
78
|
-
}, Rt = (e, t,
|
|
79
|
-
e = String(e), (
|
|
80
|
-
const
|
|
81
|
-
return
|
|
78
|
+
}, Rt = (e, t, r) => {
|
|
79
|
+
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
80
|
+
const n = e.indexOf(t, r);
|
|
81
|
+
return n !== -1 && n === r;
|
|
82
82
|
}, Ot = (e) => {
|
|
83
83
|
if (!e)
|
|
84
84
|
return null;
|
|
@@ -87,89 +87,89 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
|
87
87
|
let t = e.length;
|
|
88
88
|
if (!qe(t))
|
|
89
89
|
return null;
|
|
90
|
-
const
|
|
90
|
+
const r = new Array(t);
|
|
91
91
|
for (; t-- > 0; )
|
|
92
|
-
|
|
93
|
-
return
|
|
92
|
+
r[t] = e[t];
|
|
93
|
+
return r;
|
|
94
94
|
}, At = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), Pt = (e, t) => {
|
|
95
|
-
const
|
|
95
|
+
const n = (e && e[Symbol.iterator]).call(e);
|
|
96
96
|
let s;
|
|
97
|
-
for (; (s =
|
|
98
|
-
const
|
|
99
|
-
t.call(e,
|
|
97
|
+
for (; (s = n.next()) && !s.done; ) {
|
|
98
|
+
const i = s.value;
|
|
99
|
+
t.call(e, i[0], i[1]);
|
|
100
100
|
}
|
|
101
101
|
}, Nt = (e, t) => {
|
|
102
|
-
let
|
|
103
|
-
const
|
|
104
|
-
for (; (
|
|
105
|
-
|
|
106
|
-
return
|
|
107
|
-
},
|
|
102
|
+
let r;
|
|
103
|
+
const n = [];
|
|
104
|
+
for (; (r = e.exec(t)) !== null; )
|
|
105
|
+
n.push(r);
|
|
106
|
+
return n;
|
|
107
|
+
}, kt = P("HTMLFormElement"), Ct = (e) => e.toLowerCase().replace(
|
|
108
108
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
109
|
-
function(
|
|
110
|
-
return
|
|
109
|
+
function(r, n, s) {
|
|
110
|
+
return n.toUpperCase() + s;
|
|
111
111
|
}
|
|
112
|
-
), me = (({ hasOwnProperty: e }) => (t,
|
|
113
|
-
const
|
|
114
|
-
I(
|
|
115
|
-
let
|
|
116
|
-
(
|
|
117
|
-
}), Object.defineProperties(e,
|
|
112
|
+
), me = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), xt = P("RegExp"), De = (e, t) => {
|
|
113
|
+
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
114
|
+
I(r, (s, i) => {
|
|
115
|
+
let o;
|
|
116
|
+
(o = t(s, i, e)) !== !1 && (n[i] = o || s);
|
|
117
|
+
}), Object.defineProperties(e, n);
|
|
118
118
|
}, Bt = (e) => {
|
|
119
|
-
De(e, (t,
|
|
120
|
-
if (R(e) && ["arguments", "caller", "callee"].indexOf(
|
|
119
|
+
De(e, (t, r) => {
|
|
120
|
+
if (R(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
121
121
|
return !1;
|
|
122
|
-
const
|
|
123
|
-
if (R(
|
|
122
|
+
const n = e[r];
|
|
123
|
+
if (R(n)) {
|
|
124
124
|
if (t.enumerable = !1, "writable" in t) {
|
|
125
125
|
t.writable = !1;
|
|
126
126
|
return;
|
|
127
127
|
}
|
|
128
128
|
t.set || (t.set = () => {
|
|
129
|
-
throw Error("Can not rewrite read-only method '" +
|
|
129
|
+
throw Error("Can not rewrite read-only method '" + r + "'");
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
133
|
}, Ut = (e, t) => {
|
|
134
|
-
const
|
|
135
|
-
s.forEach((
|
|
136
|
-
|
|
134
|
+
const r = {}, n = (s) => {
|
|
135
|
+
s.forEach((i) => {
|
|
136
|
+
r[i] = !0;
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
-
return F(e) ?
|
|
139
|
+
return F(e) ? n(e) : n(String(e).split(t)), r;
|
|
140
140
|
}, qt = () => {
|
|
141
141
|
}, Ft = (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
|
-
let
|
|
147
|
-
const { length:
|
|
146
|
+
let r = "";
|
|
147
|
+
const { length: n } = t;
|
|
148
148
|
for (; e--; )
|
|
149
|
-
|
|
150
|
-
return
|
|
149
|
+
r += t[Math.random() * n | 0];
|
|
150
|
+
return r;
|
|
151
151
|
};
|
|
152
152
|
function _t(e) {
|
|
153
153
|
return !!(e && R(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
154
154
|
}
|
|
155
155
|
const Dt = (e) => {
|
|
156
|
-
const t = new Array(10),
|
|
157
|
-
if (W(
|
|
158
|
-
if (t.indexOf(
|
|
156
|
+
const t = new Array(10), r = (n, s) => {
|
|
157
|
+
if (W(n)) {
|
|
158
|
+
if (t.indexOf(n) >= 0)
|
|
159
159
|
return;
|
|
160
|
-
if (!("toJSON" in
|
|
161
|
-
t[s] =
|
|
162
|
-
const
|
|
163
|
-
return I(
|
|
164
|
-
const f =
|
|
165
|
-
!$(f) && (
|
|
166
|
-
}), t[s] = void 0,
|
|
160
|
+
if (!("toJSON" in n)) {
|
|
161
|
+
t[s] = n;
|
|
162
|
+
const i = F(n) ? [] : {};
|
|
163
|
+
return I(n, (o, c) => {
|
|
164
|
+
const f = r(o, s + 1);
|
|
165
|
+
!$(f) && (i[c] = f);
|
|
166
|
+
}), t[s] = void 0, i;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
return
|
|
169
|
+
return n;
|
|
170
170
|
};
|
|
171
|
-
return
|
|
172
|
-
}, $t = P("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch),
|
|
171
|
+
return r(e, 0);
|
|
172
|
+
}, $t = P("AsyncFunction"), It = (e) => e && (W(e) || R(e)) && R(e.then) && R(e.catch), u = {
|
|
173
173
|
isArray: F,
|
|
174
174
|
isArrayBuffer: Ue,
|
|
175
175
|
isBuffer: rt,
|
|
@@ -207,14 +207,14 @@ const Dt = (e) => {
|
|
|
207
207
|
toArray: Ot,
|
|
208
208
|
forEachEntry: Pt,
|
|
209
209
|
matchAll: Nt,
|
|
210
|
-
isHTMLForm:
|
|
210
|
+
isHTMLForm: kt,
|
|
211
211
|
hasOwnProperty: me,
|
|
212
212
|
hasOwnProp: me,
|
|
213
213
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
214
214
|
reduceDescriptors: De,
|
|
215
215
|
freezeMethods: Bt,
|
|
216
216
|
toObjectSet: Ut,
|
|
217
|
-
toCamelCase:
|
|
217
|
+
toCamelCase: Ct,
|
|
218
218
|
noop: qt,
|
|
219
219
|
toFiniteNumber: Ft,
|
|
220
220
|
findKey: Fe,
|
|
@@ -227,10 +227,10 @@ const Dt = (e) => {
|
|
|
227
227
|
isAsyncFn: $t,
|
|
228
228
|
isThenable: It
|
|
229
229
|
};
|
|
230
|
-
function
|
|
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),
|
|
230
|
+
function m(e, t, r, n, s) {
|
|
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), r && (this.config = r), n && (this.request = n), s && (this.response = s);
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
u.inherits(m, Error, {
|
|
234
234
|
toJSON: function() {
|
|
235
235
|
return {
|
|
236
236
|
// Standard
|
|
@@ -245,13 +245,13 @@ c.inherits(y, Error, {
|
|
|
245
245
|
columnNumber: this.columnNumber,
|
|
246
246
|
stack: this.stack,
|
|
247
247
|
// Axios
|
|
248
|
-
config:
|
|
248
|
+
config: u.toJSONObject(this.config),
|
|
249
249
|
code: this.code,
|
|
250
250
|
status: this.response && this.response.status ? this.response.status : null
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
|
-
const Ie =
|
|
254
|
+
const Ie = m.prototype, je = {};
|
|
255
255
|
[
|
|
256
256
|
"ERR_BAD_OPTION_VALUE",
|
|
257
257
|
"ERR_BAD_OPTION",
|
|
@@ -269,91 +269,91 @@ const Ie = y.prototype, je = {};
|
|
|
269
269
|
].forEach((e) => {
|
|
270
270
|
je[e] = { value: e };
|
|
271
271
|
});
|
|
272
|
-
Object.defineProperties(
|
|
272
|
+
Object.defineProperties(m, je);
|
|
273
273
|
Object.defineProperty(Ie, "isAxiosError", { value: !0 });
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
return
|
|
274
|
+
m.from = (e, t, r, n, s, i) => {
|
|
275
|
+
const o = Object.create(Ie);
|
|
276
|
+
return u.toFlatObject(e, o, function(f) {
|
|
277
277
|
return f !== Error.prototype;
|
|
278
|
-
}, (
|
|
278
|
+
}, (c) => c !== "isAxiosError"), m.call(o, e.message, t, r, n, s), o.cause = e, o.name = e.name, i && Object.assign(o, i), o;
|
|
279
279
|
};
|
|
280
280
|
const jt = null;
|
|
281
281
|
function se(e) {
|
|
282
|
-
return
|
|
282
|
+
return u.isPlainObject(e) || u.isArray(e);
|
|
283
283
|
}
|
|
284
284
|
function He(e) {
|
|
285
|
-
return
|
|
285
|
+
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
286
286
|
}
|
|
287
|
-
function ge(e, t,
|
|
288
|
-
return e ? e.concat(t).map(function(s,
|
|
289
|
-
return s = He(s), !
|
|
290
|
-
}).join(
|
|
287
|
+
function ge(e, t, r) {
|
|
288
|
+
return e ? e.concat(t).map(function(s, i) {
|
|
289
|
+
return s = He(s), !r && i ? "[" + s + "]" : s;
|
|
290
|
+
}).join(r ? "." : "") : t;
|
|
291
291
|
}
|
|
292
292
|
function Ht(e) {
|
|
293
|
-
return
|
|
293
|
+
return u.isArray(e) && !e.some(se);
|
|
294
294
|
}
|
|
295
|
-
const Jt =
|
|
295
|
+
const Jt = u.toFlatObject(u, {}, null, function(t) {
|
|
296
296
|
return /^is[A-Z]/.test(t);
|
|
297
297
|
});
|
|
298
|
-
function Q(e, t,
|
|
299
|
-
if (!
|
|
298
|
+
function Q(e, t, r) {
|
|
299
|
+
if (!u.isObject(e))
|
|
300
300
|
throw new TypeError("target must be an object");
|
|
301
|
-
t = t || new FormData(),
|
|
301
|
+
t = t || new FormData(), r = u.toFlatObject(r, {
|
|
302
302
|
metaTokens: !0,
|
|
303
303
|
dots: !1,
|
|
304
304
|
indexes: !1
|
|
305
305
|
}, !1, function(p, w) {
|
|
306
|
-
return !
|
|
306
|
+
return !u.isUndefined(w[p]);
|
|
307
307
|
});
|
|
308
|
-
const
|
|
309
|
-
if (!
|
|
308
|
+
const n = r.metaTokens, s = r.visitor || a, i = r.dots, o = r.indexes, f = (r.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
309
|
+
if (!u.isFunction(s))
|
|
310
310
|
throw new TypeError("visitor must be a function");
|
|
311
|
-
function
|
|
311
|
+
function d(h) {
|
|
312
312
|
if (h === null)
|
|
313
313
|
return "";
|
|
314
|
-
if (
|
|
314
|
+
if (u.isDate(h))
|
|
315
315
|
return h.toISOString();
|
|
316
|
-
if (!f &&
|
|
317
|
-
throw new
|
|
318
|
-
return
|
|
316
|
+
if (!f && u.isBlob(h))
|
|
317
|
+
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
318
|
+
return u.isArrayBuffer(h) || u.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
319
319
|
}
|
|
320
320
|
function a(h, p, w) {
|
|
321
321
|
let T = h;
|
|
322
322
|
if (h && !w && typeof h == "object") {
|
|
323
|
-
if (
|
|
324
|
-
p =
|
|
325
|
-
else if (
|
|
323
|
+
if (u.endsWith(p, "{}"))
|
|
324
|
+
p = n ? p : p.slice(0, -2), h = JSON.stringify(h);
|
|
325
|
+
else if (u.isArray(h) && Ht(h) || (u.isFileList(h) || u.endsWith(p, "[]")) && (T = u.toArray(h)))
|
|
326
326
|
return p = He(p), T.forEach(function(b, _) {
|
|
327
|
-
!(
|
|
327
|
+
!(u.isUndefined(b) || b === null) && t.append(
|
|
328
328
|
// eslint-disable-next-line no-nested-ternary
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
o === !0 ? ge([p], _, i) : o === null ? p : p + "[]",
|
|
330
|
+
d(b)
|
|
331
331
|
);
|
|
332
332
|
}), !1;
|
|
333
333
|
}
|
|
334
|
-
return se(h) ? !0 : (t.append(ge(w, p,
|
|
334
|
+
return se(h) ? !0 : (t.append(ge(w, p, i), d(h)), !1);
|
|
335
335
|
}
|
|
336
|
-
const
|
|
336
|
+
const l = [], y = Object.assign(Jt, {
|
|
337
337
|
defaultVisitor: a,
|
|
338
|
-
convertValue:
|
|
338
|
+
convertValue: d,
|
|
339
339
|
isVisitable: se
|
|
340
340
|
});
|
|
341
341
|
function g(h, p) {
|
|
342
|
-
if (!
|
|
343
|
-
if (
|
|
342
|
+
if (!u.isUndefined(h)) {
|
|
343
|
+
if (l.indexOf(h) !== -1)
|
|
344
344
|
throw Error("Circular reference detected in " + p.join("."));
|
|
345
|
-
|
|
346
|
-
(!(
|
|
345
|
+
l.push(h), u.forEach(h, function(T, N) {
|
|
346
|
+
(!(u.isUndefined(T) || T === null) && s.call(
|
|
347
347
|
t,
|
|
348
348
|
T,
|
|
349
|
-
|
|
349
|
+
u.isString(N) ? N.trim() : N,
|
|
350
350
|
p,
|
|
351
|
-
|
|
351
|
+
y
|
|
352
352
|
)) === !0 && g(T, p ? p.concat(N) : [N]);
|
|
353
|
-
}),
|
|
353
|
+
}), l.pop();
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
if (!
|
|
356
|
+
if (!u.isObject(e))
|
|
357
357
|
throw new TypeError("data must be an object");
|
|
358
358
|
return g(e), t;
|
|
359
359
|
}
|
|
@@ -367,36 +367,36 @@ function we(e) {
|
|
|
367
367
|
"%20": "+",
|
|
368
368
|
"%00": "\0"
|
|
369
369
|
};
|
|
370
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(
|
|
371
|
-
return t[
|
|
370
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(n) {
|
|
371
|
+
return t[n];
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
374
|
function fe(e, t) {
|
|
375
375
|
this._pairs = [], e && Q(e, this, t);
|
|
376
376
|
}
|
|
377
377
|
const Je = fe.prototype;
|
|
378
|
-
Je.append = function(t,
|
|
379
|
-
this._pairs.push([t,
|
|
378
|
+
Je.append = function(t, r) {
|
|
379
|
+
this._pairs.push([t, r]);
|
|
380
380
|
};
|
|
381
381
|
Je.toString = function(t) {
|
|
382
|
-
const
|
|
383
|
-
return t.call(this,
|
|
382
|
+
const r = t ? function(n) {
|
|
383
|
+
return t.call(this, n, we);
|
|
384
384
|
} : we;
|
|
385
385
|
return this._pairs.map(function(s) {
|
|
386
|
-
return
|
|
386
|
+
return r(s[0]) + "=" + r(s[1]);
|
|
387
387
|
}, "").join("&");
|
|
388
388
|
};
|
|
389
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 Me(e, t,
|
|
392
|
+
function Me(e, t, r) {
|
|
393
393
|
if (!t)
|
|
394
394
|
return e;
|
|
395
|
-
const
|
|
396
|
-
let
|
|
397
|
-
if (s ?
|
|
398
|
-
const
|
|
399
|
-
|
|
395
|
+
const n = r && r.encode || Mt, s = r && r.serialize;
|
|
396
|
+
let i;
|
|
397
|
+
if (s ? i = s(t, r) : i = u.isURLSearchParams(t) ? t.toString() : new fe(t, r).toString(n), i) {
|
|
398
|
+
const o = e.indexOf("#");
|
|
399
|
+
o !== -1 && (e = e.slice(0, o)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
400
400
|
}
|
|
401
401
|
return e;
|
|
402
402
|
}
|
|
@@ -412,12 +412,12 @@ class be {
|
|
|
412
412
|
*
|
|
413
413
|
* @return {Number} An ID used to remove interceptor later
|
|
414
414
|
*/
|
|
415
|
-
use(t,
|
|
415
|
+
use(t, r, n) {
|
|
416
416
|
return this.handlers.push({
|
|
417
417
|
fulfilled: t,
|
|
418
|
-
rejected:
|
|
419
|
-
synchronous:
|
|
420
|
-
runWhen:
|
|
418
|
+
rejected: r,
|
|
419
|
+
synchronous: n ? n.synchronous : !1,
|
|
420
|
+
runWhen: n ? n.runWhen : null
|
|
421
421
|
}), this.handlers.length - 1;
|
|
422
422
|
}
|
|
423
423
|
/**
|
|
@@ -449,8 +449,8 @@ class be {
|
|
|
449
449
|
* @returns {void}
|
|
450
450
|
*/
|
|
451
451
|
forEach(t) {
|
|
452
|
-
|
|
453
|
-
|
|
452
|
+
u.forEach(this.handlers, function(n) {
|
|
453
|
+
n !== null && t(n);
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
}
|
|
@@ -479,88 +479,88 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Qt
|
|
|
479
479
|
};
|
|
480
480
|
function Zt(e, t) {
|
|
481
481
|
return Q(e, new A.classes.URLSearchParams(), Object.assign({
|
|
482
|
-
visitor: function(
|
|
483
|
-
return A.isNode &&
|
|
482
|
+
visitor: function(r, n, s, i) {
|
|
483
|
+
return A.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : i.defaultVisitor.apply(this, arguments);
|
|
484
484
|
}
|
|
485
485
|
}, t));
|
|
486
486
|
}
|
|
487
487
|
function Yt(e) {
|
|
488
|
-
return
|
|
488
|
+
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
489
489
|
}
|
|
490
490
|
function en(e) {
|
|
491
|
-
const t = {},
|
|
492
|
-
let
|
|
493
|
-
const s =
|
|
494
|
-
let
|
|
495
|
-
for (
|
|
496
|
-
|
|
491
|
+
const t = {}, r = Object.keys(e);
|
|
492
|
+
let n;
|
|
493
|
+
const s = r.length;
|
|
494
|
+
let i;
|
|
495
|
+
for (n = 0; n < s; n++)
|
|
496
|
+
i = r[n], t[i] = e[i];
|
|
497
497
|
return t;
|
|
498
498
|
}
|
|
499
499
|
function Ve(e) {
|
|
500
|
-
function t(
|
|
501
|
-
let
|
|
502
|
-
if (
|
|
500
|
+
function t(r, n, s, i) {
|
|
501
|
+
let o = r[i++];
|
|
502
|
+
if (o === "__proto__")
|
|
503
503
|
return !0;
|
|
504
|
-
const
|
|
505
|
-
return
|
|
504
|
+
const c = Number.isFinite(+o), f = i >= r.length;
|
|
505
|
+
return o = !o && u.isArray(s) ? s.length : o, f ? (u.hasOwnProp(s, o) ? s[o] = [s[o], n] : s[o] = n, !c) : ((!s[o] || !u.isObject(s[o])) && (s[o] = []), t(r, n, s[o], i) && u.isArray(s[o]) && (s[o] = en(s[o])), !c);
|
|
506
506
|
}
|
|
507
|
-
if (
|
|
508
|
-
const
|
|
509
|
-
return
|
|
510
|
-
t(Yt(
|
|
511
|
-
}),
|
|
507
|
+
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
508
|
+
const r = {};
|
|
509
|
+
return u.forEachEntry(e, (n, s) => {
|
|
510
|
+
t(Yt(n), s, r, 0);
|
|
511
|
+
}), r;
|
|
512
512
|
}
|
|
513
513
|
return null;
|
|
514
514
|
}
|
|
515
|
-
function tn(e, t,
|
|
516
|
-
if (
|
|
515
|
+
function tn(e, t, r) {
|
|
516
|
+
if (u.isString(e))
|
|
517
517
|
try {
|
|
518
|
-
return (t || JSON.parse)(e),
|
|
519
|
-
} catch (
|
|
520
|
-
if (
|
|
521
|
-
throw
|
|
518
|
+
return (t || JSON.parse)(e), u.trim(e);
|
|
519
|
+
} catch (n) {
|
|
520
|
+
if (n.name !== "SyntaxError")
|
|
521
|
+
throw n;
|
|
522
522
|
}
|
|
523
|
-
return (
|
|
523
|
+
return (r || JSON.stringify)(e);
|
|
524
524
|
}
|
|
525
525
|
const j = {
|
|
526
526
|
transitional: ze,
|
|
527
527
|
adapter: ["xhr", "http", "fetch"],
|
|
528
|
-
transformRequest: [function(t,
|
|
529
|
-
const
|
|
530
|
-
if (
|
|
528
|
+
transformRequest: [function(t, r) {
|
|
529
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, i = u.isObject(t);
|
|
530
|
+
if (i && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
531
531
|
return s ? JSON.stringify(Ve(t)) : t;
|
|
532
|
-
if (
|
|
532
|
+
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
|
|
533
533
|
return t;
|
|
534
|
-
if (
|
|
534
|
+
if (u.isArrayBufferView(t))
|
|
535
535
|
return t.buffer;
|
|
536
|
-
if (
|
|
537
|
-
return
|
|
538
|
-
let
|
|
539
|
-
if (
|
|
540
|
-
if (
|
|
536
|
+
if (u.isURLSearchParams(t))
|
|
537
|
+
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
538
|
+
let c;
|
|
539
|
+
if (i) {
|
|
540
|
+
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
541
541
|
return Zt(t, this.formSerializer).toString();
|
|
542
|
-
if ((
|
|
542
|
+
if ((c = u.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
543
543
|
const f = this.env && this.env.FormData;
|
|
544
544
|
return Q(
|
|
545
|
-
|
|
545
|
+
c ? { "files[]": t } : t,
|
|
546
546
|
f && new f(),
|
|
547
547
|
this.formSerializer
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
return
|
|
551
|
+
return i || s ? (r.setContentType("application/json", !1), tn(t)) : t;
|
|
552
552
|
}],
|
|
553
553
|
transformResponse: [function(t) {
|
|
554
|
-
const
|
|
555
|
-
if (
|
|
554
|
+
const r = this.transitional || j.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
555
|
+
if (u.isResponse(t) || u.isReadableStream(t))
|
|
556
556
|
return t;
|
|
557
|
-
if (t &&
|
|
558
|
-
const
|
|
557
|
+
if (t && u.isString(t) && (n && !this.responseType || s)) {
|
|
558
|
+
const o = !(r && r.silentJSONParsing) && s;
|
|
559
559
|
try {
|
|
560
560
|
return JSON.parse(t);
|
|
561
|
-
} catch (
|
|
562
|
-
if (
|
|
563
|
-
throw
|
|
561
|
+
} catch (c) {
|
|
562
|
+
if (o)
|
|
563
|
+
throw c.name === "SyntaxError" ? m.from(c, m.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return t;
|
|
@@ -588,10 +588,10 @@ const j = {
|
|
|
588
588
|
}
|
|
589
589
|
}
|
|
590
590
|
};
|
|
591
|
-
|
|
591
|
+
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
592
592
|
j.headers[e] = {};
|
|
593
593
|
});
|
|
594
|
-
const nn =
|
|
594
|
+
const nn = u.toObjectSet([
|
|
595
595
|
"age",
|
|
596
596
|
"authorization",
|
|
597
597
|
"content-length",
|
|
@@ -611,45 +611,45 @@ const nn = c.toObjectSet([
|
|
|
611
611
|
"user-agent"
|
|
612
612
|
]), rn = (e) => {
|
|
613
613
|
const t = {};
|
|
614
|
-
let
|
|
614
|
+
let r, n, s;
|
|
615
615
|
return e && e.split(`
|
|
616
|
-
`).forEach(function(
|
|
617
|
-
s =
|
|
616
|
+
`).forEach(function(o) {
|
|
617
|
+
s = o.indexOf(":"), r = o.substring(0, s).trim().toLowerCase(), n = o.substring(s + 1).trim(), !(!r || t[r] && nn[r]) && (r === "set-cookie" ? t[r] ? t[r].push(n) : t[r] = [n] : t[r] = t[r] ? t[r] + ", " + n : n);
|
|
618
618
|
}), t;
|
|
619
619
|
}, Se = Symbol("internals");
|
|
620
620
|
function D(e) {
|
|
621
621
|
return e && String(e).trim().toLowerCase();
|
|
622
622
|
}
|
|
623
623
|
function z(e) {
|
|
624
|
-
return e === !1 || e == null ? e :
|
|
624
|
+
return e === !1 || e == null ? e : u.isArray(e) ? e.map(z) : String(e);
|
|
625
625
|
}
|
|
626
626
|
function sn(e) {
|
|
627
|
-
const t = /* @__PURE__ */ Object.create(null),
|
|
628
|
-
let
|
|
629
|
-
for (;
|
|
630
|
-
t[
|
|
627
|
+
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
628
|
+
let n;
|
|
629
|
+
for (; n = r.exec(e); )
|
|
630
|
+
t[n[1]] = n[2];
|
|
631
631
|
return t;
|
|
632
632
|
}
|
|
633
633
|
const on = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
634
|
-
function Y(e, t,
|
|
635
|
-
if (
|
|
636
|
-
return
|
|
637
|
-
if (s && (t =
|
|
638
|
-
if (
|
|
639
|
-
return t.indexOf(
|
|
640
|
-
if (
|
|
641
|
-
return
|
|
634
|
+
function Y(e, t, r, n, s) {
|
|
635
|
+
if (u.isFunction(n))
|
|
636
|
+
return n.call(this, t, r);
|
|
637
|
+
if (s && (t = r), !!u.isString(t)) {
|
|
638
|
+
if (u.isString(n))
|
|
639
|
+
return t.indexOf(n) !== -1;
|
|
640
|
+
if (u.isRegExp(n))
|
|
641
|
+
return n.test(t);
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
function an(e) {
|
|
645
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t,
|
|
645
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
646
646
|
}
|
|
647
647
|
function cn(e, t) {
|
|
648
|
-
const
|
|
649
|
-
["get", "set", "has"].forEach((
|
|
650
|
-
Object.defineProperty(e,
|
|
651
|
-
value: function(s,
|
|
652
|
-
return this[
|
|
648
|
+
const r = u.toCamelCase(" " + t);
|
|
649
|
+
["get", "set", "has"].forEach((n) => {
|
|
650
|
+
Object.defineProperty(e, n + r, {
|
|
651
|
+
value: function(s, i, o) {
|
|
652
|
+
return this[n].call(this, t, s, i, o);
|
|
653
653
|
},
|
|
654
654
|
configurable: !0
|
|
655
655
|
});
|
|
@@ -659,97 +659,97 @@ let E = class {
|
|
|
659
659
|
constructor(t) {
|
|
660
660
|
t && this.set(t);
|
|
661
661
|
}
|
|
662
|
-
set(t,
|
|
662
|
+
set(t, r, n) {
|
|
663
663
|
const s = this;
|
|
664
|
-
function
|
|
664
|
+
function i(c, f, d) {
|
|
665
665
|
const a = D(f);
|
|
666
666
|
if (!a)
|
|
667
667
|
throw new Error("header name must be a non-empty string");
|
|
668
|
-
const
|
|
669
|
-
(!
|
|
668
|
+
const l = u.findKey(s, a);
|
|
669
|
+
(!l || s[l] === void 0 || d === !0 || d === void 0 && s[l] !== !1) && (s[l || f] = z(c));
|
|
670
670
|
}
|
|
671
|
-
const
|
|
672
|
-
if (
|
|
673
|
-
|
|
674
|
-
else if (
|
|
675
|
-
|
|
676
|
-
else if (
|
|
677
|
-
for (const [
|
|
678
|
-
|
|
671
|
+
const o = (c, f) => u.forEach(c, (d, a) => i(d, a, f));
|
|
672
|
+
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
673
|
+
o(t, r);
|
|
674
|
+
else if (u.isString(t) && (t = t.trim()) && !on(t))
|
|
675
|
+
o(rn(t), r);
|
|
676
|
+
else if (u.isHeaders(t))
|
|
677
|
+
for (const [c, f] of t.entries())
|
|
678
|
+
i(f, c, n);
|
|
679
679
|
else
|
|
680
|
-
t != null &&
|
|
680
|
+
t != null && i(r, t, n);
|
|
681
681
|
return this;
|
|
682
682
|
}
|
|
683
|
-
get(t,
|
|
683
|
+
get(t, r) {
|
|
684
684
|
if (t = D(t), t) {
|
|
685
|
-
const
|
|
686
|
-
if (
|
|
687
|
-
const s = this[
|
|
688
|
-
if (!
|
|
685
|
+
const n = u.findKey(this, t);
|
|
686
|
+
if (n) {
|
|
687
|
+
const s = this[n];
|
|
688
|
+
if (!r)
|
|
689
689
|
return s;
|
|
690
|
-
if (
|
|
690
|
+
if (r === !0)
|
|
691
691
|
return sn(s);
|
|
692
|
-
if (
|
|
693
|
-
return
|
|
694
|
-
if (
|
|
695
|
-
return
|
|
692
|
+
if (u.isFunction(r))
|
|
693
|
+
return r.call(this, s, n);
|
|
694
|
+
if (u.isRegExp(r))
|
|
695
|
+
return r.exec(s);
|
|
696
696
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
}
|
|
700
|
-
has(t,
|
|
700
|
+
has(t, r) {
|
|
701
701
|
if (t = D(t), t) {
|
|
702
|
-
const
|
|
703
|
-
return !!(
|
|
702
|
+
const n = u.findKey(this, t);
|
|
703
|
+
return !!(n && this[n] !== void 0 && (!r || Y(this, this[n], n, r)));
|
|
704
704
|
}
|
|
705
705
|
return !1;
|
|
706
706
|
}
|
|
707
|
-
delete(t,
|
|
708
|
-
const
|
|
707
|
+
delete(t, r) {
|
|
708
|
+
const n = this;
|
|
709
709
|
let s = !1;
|
|
710
|
-
function o
|
|
711
|
-
if (
|
|
712
|
-
const
|
|
713
|
-
|
|
710
|
+
function i(o) {
|
|
711
|
+
if (o = D(o), o) {
|
|
712
|
+
const c = u.findKey(n, o);
|
|
713
|
+
c && (!r || Y(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
return
|
|
716
|
+
return u.isArray(t) ? t.forEach(i) : i(t), s;
|
|
717
717
|
}
|
|
718
718
|
clear(t) {
|
|
719
|
-
const
|
|
720
|
-
let
|
|
721
|
-
for (;
|
|
722
|
-
const
|
|
723
|
-
(!t || Y(this, this[
|
|
719
|
+
const r = Object.keys(this);
|
|
720
|
+
let n = r.length, s = !1;
|
|
721
|
+
for (; n--; ) {
|
|
722
|
+
const i = r[n];
|
|
723
|
+
(!t || Y(this, this[i], i, t, !0)) && (delete this[i], s = !0);
|
|
724
724
|
}
|
|
725
725
|
return s;
|
|
726
726
|
}
|
|
727
727
|
normalize(t) {
|
|
728
|
-
const
|
|
729
|
-
return
|
|
730
|
-
const
|
|
731
|
-
if (
|
|
732
|
-
|
|
728
|
+
const r = this, n = {};
|
|
729
|
+
return u.forEach(this, (s, i) => {
|
|
730
|
+
const o = u.findKey(n, i);
|
|
731
|
+
if (o) {
|
|
732
|
+
r[o] = z(s), delete r[i];
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
|
-
const
|
|
736
|
-
|
|
735
|
+
const c = t ? an(i) : String(i).trim();
|
|
736
|
+
c !== i && delete r[i], r[c] = z(s), n[c] = !0;
|
|
737
737
|
}), this;
|
|
738
738
|
}
|
|
739
739
|
concat(...t) {
|
|
740
740
|
return this.constructor.concat(this, ...t);
|
|
741
741
|
}
|
|
742
742
|
toJSON(t) {
|
|
743
|
-
const
|
|
744
|
-
return
|
|
745
|
-
|
|
746
|
-
}),
|
|
743
|
+
const r = /* @__PURE__ */ Object.create(null);
|
|
744
|
+
return u.forEach(this, (n, s) => {
|
|
745
|
+
n != null && n !== !1 && (r[s] = t && u.isArray(n) ? n.join(", ") : n);
|
|
746
|
+
}), r;
|
|
747
747
|
}
|
|
748
748
|
[Symbol.iterator]() {
|
|
749
749
|
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
750
750
|
}
|
|
751
751
|
toString() {
|
|
752
|
-
return Object.entries(this.toJSON()).map(([t,
|
|
752
|
+
return Object.entries(this.toJSON()).map(([t, r]) => t + ": " + r).join(`
|
|
753
753
|
`);
|
|
754
754
|
}
|
|
755
755
|
get [Symbol.toStringTag]() {
|
|
@@ -758,56 +758,56 @@ let E = class {
|
|
|
758
758
|
static from(t) {
|
|
759
759
|
return t instanceof this ? t : new this(t);
|
|
760
760
|
}
|
|
761
|
-
static concat(t, ...
|
|
762
|
-
const
|
|
763
|
-
return
|
|
761
|
+
static concat(t, ...r) {
|
|
762
|
+
const n = new this(t);
|
|
763
|
+
return r.forEach((s) => n.set(s)), n;
|
|
764
764
|
}
|
|
765
765
|
static accessor(t) {
|
|
766
|
-
const
|
|
766
|
+
const n = (this[Se] = this[Se] = {
|
|
767
767
|
accessors: {}
|
|
768
768
|
}).accessors, s = this.prototype;
|
|
769
|
-
function o
|
|
770
|
-
const
|
|
771
|
-
|
|
769
|
+
function i(o) {
|
|
770
|
+
const c = D(o);
|
|
771
|
+
n[c] || (cn(s, o), n[c] = !0);
|
|
772
772
|
}
|
|
773
|
-
return
|
|
773
|
+
return u.isArray(t) ? t.forEach(i) : i(t), this;
|
|
774
774
|
}
|
|
775
775
|
};
|
|
776
776
|
E.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
777
|
-
|
|
778
|
-
let
|
|
777
|
+
u.reduceDescriptors(E.prototype, ({ value: e }, t) => {
|
|
778
|
+
let r = t[0].toUpperCase() + t.slice(1);
|
|
779
779
|
return {
|
|
780
780
|
get: () => e,
|
|
781
|
-
set(
|
|
782
|
-
this[
|
|
781
|
+
set(n) {
|
|
782
|
+
this[r] = n;
|
|
783
783
|
}
|
|
784
784
|
};
|
|
785
785
|
});
|
|
786
|
-
|
|
786
|
+
u.freezeMethods(E);
|
|
787
787
|
function ee(e, t) {
|
|
788
|
-
const
|
|
789
|
-
let
|
|
790
|
-
return
|
|
791
|
-
|
|
792
|
-
}), s.normalize(),
|
|
788
|
+
const r = this || j, n = t || r, s = E.from(n.headers);
|
|
789
|
+
let i = n.data;
|
|
790
|
+
return u.forEach(e, function(c) {
|
|
791
|
+
i = c.call(r, i, s.normalize(), t ? t.status : void 0);
|
|
792
|
+
}), s.normalize(), i;
|
|
793
793
|
}
|
|
794
794
|
function Ge(e) {
|
|
795
795
|
return !!(e && e.__CANCEL__);
|
|
796
796
|
}
|
|
797
|
-
function L(e, t,
|
|
798
|
-
|
|
797
|
+
function L(e, t, r) {
|
|
798
|
+
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
799
799
|
}
|
|
800
|
-
|
|
800
|
+
u.inherits(L, m, {
|
|
801
801
|
__CANCEL__: !0
|
|
802
802
|
});
|
|
803
|
-
function Ke(e, t,
|
|
804
|
-
const
|
|
805
|
-
!
|
|
806
|
-
"Request failed with status code " +
|
|
807
|
-
[
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
803
|
+
function Ke(e, t, r) {
|
|
804
|
+
const n = r.config.validateStatus;
|
|
805
|
+
!r.status || !n || n(r.status) ? e(r) : t(new m(
|
|
806
|
+
"Request failed with status code " + r.status,
|
|
807
|
+
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
808
|
+
r.config,
|
|
809
|
+
r.request,
|
|
810
|
+
r
|
|
811
811
|
));
|
|
812
812
|
}
|
|
813
813
|
function un(e) {
|
|
@@ -816,71 +816,71 @@ function un(e) {
|
|
|
816
816
|
}
|
|
817
817
|
function ln(e, t) {
|
|
818
818
|
e = e || 10;
|
|
819
|
-
const
|
|
820
|
-
let s = 0,
|
|
819
|
+
const r = new Array(e), n = new Array(e);
|
|
820
|
+
let s = 0, i = 0, o;
|
|
821
821
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
let
|
|
825
|
-
for (;
|
|
826
|
-
|
|
827
|
-
if (s = (s + 1) % e, s ===
|
|
822
|
+
const d = Date.now(), a = n[i];
|
|
823
|
+
o || (o = d), r[s] = f, n[s] = d;
|
|
824
|
+
let l = i, y = 0;
|
|
825
|
+
for (; l !== s; )
|
|
826
|
+
y += r[l++], l = l % e;
|
|
827
|
+
if (s = (s + 1) % e, s === i && (i = (i + 1) % e), d - o < t)
|
|
828
828
|
return;
|
|
829
|
-
const g = a &&
|
|
830
|
-
return g ? Math.round(
|
|
829
|
+
const g = a && d - a;
|
|
830
|
+
return g ? Math.round(y * 1e3 / g) : void 0;
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
833
|
function fn(e, t) {
|
|
834
|
-
let
|
|
835
|
-
const
|
|
834
|
+
let r = 0;
|
|
835
|
+
const n = 1e3 / t;
|
|
836
836
|
let s = null;
|
|
837
837
|
return function() {
|
|
838
|
-
const
|
|
839
|
-
if (
|
|
840
|
-
return s && (clearTimeout(s), s = null),
|
|
841
|
-
s || (s = setTimeout(() => (s = null,
|
|
838
|
+
const o = this === !0, c = Date.now();
|
|
839
|
+
if (o || c - r > n)
|
|
840
|
+
return s && (clearTimeout(s), s = null), r = c, e.apply(null, arguments);
|
|
841
|
+
s || (s = setTimeout(() => (s = null, r = Date.now(), e.apply(null, arguments)), n - (c - r)));
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
|
-
const V = (e, t,
|
|
845
|
-
let
|
|
844
|
+
const V = (e, t, r = 3) => {
|
|
845
|
+
let n = 0;
|
|
846
846
|
const s = ln(50, 250);
|
|
847
|
-
return fn((
|
|
848
|
-
const
|
|
849
|
-
|
|
850
|
-
const
|
|
851
|
-
loaded:
|
|
852
|
-
total:
|
|
853
|
-
progress:
|
|
847
|
+
return fn((i) => {
|
|
848
|
+
const o = i.loaded, c = i.lengthComputable ? i.total : void 0, f = o - n, d = s(f), a = o <= c;
|
|
849
|
+
n = o;
|
|
850
|
+
const l = {
|
|
851
|
+
loaded: o,
|
|
852
|
+
total: c,
|
|
853
|
+
progress: c ? o / c : void 0,
|
|
854
854
|
bytes: f,
|
|
855
|
-
rate:
|
|
856
|
-
estimated:
|
|
857
|
-
event:
|
|
858
|
-
lengthComputable:
|
|
855
|
+
rate: d || void 0,
|
|
856
|
+
estimated: d && c && a ? (c - o) / d : void 0,
|
|
857
|
+
event: i,
|
|
858
|
+
lengthComputable: c != null
|
|
859
859
|
};
|
|
860
|
-
|
|
861
|
-
},
|
|
860
|
+
l[t ? "download" : "upload"] = !0, e(l);
|
|
861
|
+
}, r);
|
|
862
862
|
}, dn = A.hasStandardBrowserEnv ? (
|
|
863
863
|
// Standard browser envs have full support of the APIs needed to test
|
|
864
864
|
// whether the request URL is of the same origin as current location.
|
|
865
865
|
function() {
|
|
866
|
-
const t = /(msie|trident)/i.test(navigator.userAgent),
|
|
867
|
-
let
|
|
868
|
-
function s(
|
|
869
|
-
let
|
|
870
|
-
return t && (
|
|
871
|
-
href:
|
|
872
|
-
protocol:
|
|
873
|
-
host:
|
|
874
|
-
search:
|
|
875
|
-
hash:
|
|
876
|
-
hostname:
|
|
877
|
-
port:
|
|
878
|
-
pathname:
|
|
866
|
+
const t = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
|
|
867
|
+
let n;
|
|
868
|
+
function s(i) {
|
|
869
|
+
let o = i;
|
|
870
|
+
return t && (r.setAttribute("href", o), o = r.href), r.setAttribute("href", o), {
|
|
871
|
+
href: r.href,
|
|
872
|
+
protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
|
|
873
|
+
host: r.host,
|
|
874
|
+
search: r.search ? r.search.replace(/^\?/, "") : "",
|
|
875
|
+
hash: r.hash ? r.hash.replace(/^#/, "") : "",
|
|
876
|
+
hostname: r.hostname,
|
|
877
|
+
port: r.port,
|
|
878
|
+
pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
return
|
|
882
|
-
const
|
|
883
|
-
return
|
|
881
|
+
return n = s(window.location.href), function(o) {
|
|
882
|
+
const c = u.isString(o) ? s(o) : o;
|
|
883
|
+
return c.protocol === n.protocol && c.host === n.host;
|
|
884
884
|
};
|
|
885
885
|
}()
|
|
886
886
|
) : (
|
|
@@ -893,9 +893,9 @@ const V = (e, t, n = 3) => {
|
|
|
893
893
|
), hn = A.hasStandardBrowserEnv ? (
|
|
894
894
|
// Standard browser envs support document.cookie
|
|
895
895
|
{
|
|
896
|
-
write(e, t,
|
|
897
|
-
const
|
|
898
|
-
|
|
896
|
+
write(e, t, r, n, s, i) {
|
|
897
|
+
const o = [e + "=" + encodeURIComponent(t)];
|
|
898
|
+
u.isNumber(r) && o.push("expires=" + new Date(r).toGMTString()), u.isString(n) && o.push("path=" + n), u.isString(s) && o.push("domain=" + s), i === !0 && o.push("secure"), document.cookie = o.join("; ");
|
|
899
899
|
},
|
|
900
900
|
read(e) {
|
|
901
901
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -929,109 +929,109 @@ function ve(e, t) {
|
|
|
929
929
|
const Te = (e) => e instanceof E ? { ...e } : e;
|
|
930
930
|
function U(e, t) {
|
|
931
931
|
t = t || {};
|
|
932
|
-
const
|
|
933
|
-
function
|
|
934
|
-
return
|
|
932
|
+
const r = {};
|
|
933
|
+
function n(d, a, l) {
|
|
934
|
+
return u.isPlainObject(d) && u.isPlainObject(a) ? u.merge.call({ caseless: l }, d, a) : u.isPlainObject(a) ? u.merge({}, a) : u.isArray(a) ? a.slice() : a;
|
|
935
935
|
}
|
|
936
|
-
function s(
|
|
937
|
-
if (
|
|
938
|
-
if (!
|
|
939
|
-
return
|
|
936
|
+
function s(d, a, l) {
|
|
937
|
+
if (u.isUndefined(a)) {
|
|
938
|
+
if (!u.isUndefined(d))
|
|
939
|
+
return n(void 0, d, l);
|
|
940
940
|
} else
|
|
941
|
-
return
|
|
941
|
+
return n(d, a, l);
|
|
942
942
|
}
|
|
943
|
-
function
|
|
944
|
-
if (!
|
|
945
|
-
return
|
|
943
|
+
function i(d, a) {
|
|
944
|
+
if (!u.isUndefined(a))
|
|
945
|
+
return n(void 0, a);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
948
|
-
if (
|
|
949
|
-
if (!
|
|
950
|
-
return
|
|
947
|
+
function o(d, a) {
|
|
948
|
+
if (u.isUndefined(a)) {
|
|
949
|
+
if (!u.isUndefined(d))
|
|
950
|
+
return n(void 0, d);
|
|
951
951
|
} else
|
|
952
|
-
return
|
|
952
|
+
return n(void 0, a);
|
|
953
953
|
}
|
|
954
|
-
function
|
|
955
|
-
if (
|
|
956
|
-
return
|
|
957
|
-
if (
|
|
958
|
-
return
|
|
954
|
+
function c(d, a, l) {
|
|
955
|
+
if (l in t)
|
|
956
|
+
return n(d, a);
|
|
957
|
+
if (l in e)
|
|
958
|
+
return n(void 0, d);
|
|
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:
|
|
988
|
-
validateStatus:
|
|
989
|
-
headers: (
|
|
961
|
+
url: i,
|
|
962
|
+
method: i,
|
|
963
|
+
data: i,
|
|
964
|
+
baseURL: o,
|
|
965
|
+
transformRequest: o,
|
|
966
|
+
transformResponse: o,
|
|
967
|
+
paramsSerializer: o,
|
|
968
|
+
timeout: o,
|
|
969
|
+
timeoutMessage: o,
|
|
970
|
+
withCredentials: o,
|
|
971
|
+
withXSRFToken: o,
|
|
972
|
+
adapter: o,
|
|
973
|
+
responseType: o,
|
|
974
|
+
xsrfCookieName: o,
|
|
975
|
+
xsrfHeaderName: o,
|
|
976
|
+
onUploadProgress: o,
|
|
977
|
+
onDownloadProgress: o,
|
|
978
|
+
decompress: o,
|
|
979
|
+
maxContentLength: o,
|
|
980
|
+
maxBodyLength: o,
|
|
981
|
+
beforeRedirect: o,
|
|
982
|
+
transport: o,
|
|
983
|
+
httpAgent: o,
|
|
984
|
+
httpsAgent: o,
|
|
985
|
+
cancelToken: o,
|
|
986
|
+
socketPath: o,
|
|
987
|
+
responseEncoding: o,
|
|
988
|
+
validateStatus: c,
|
|
989
|
+
headers: (d, a) => s(Te(d), Te(a), !0)
|
|
990
990
|
};
|
|
991
|
-
return
|
|
992
|
-
const
|
|
993
|
-
|
|
994
|
-
}),
|
|
991
|
+
return u.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
|
|
992
|
+
const l = f[a] || s, y = l(e[a], t[a], a);
|
|
993
|
+
u.isUndefined(y) && l !== c || (r[a] = y);
|
|
994
|
+
}), r;
|
|
995
995
|
}
|
|
996
996
|
const We = (e) => {
|
|
997
997
|
const t = U({}, e);
|
|
998
|
-
let { data:
|
|
999
|
-
t.headers =
|
|
998
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: i, headers: o, auth: c } = t;
|
|
999
|
+
t.headers = o = E.from(o), t.url = Me(ve(t.baseURL, t.url), e.params, e.paramsSerializer), c && o.set(
|
|
1000
1000
|
"Authorization",
|
|
1001
|
-
"Basic " + btoa((
|
|
1001
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1002
1002
|
);
|
|
1003
1003
|
let f;
|
|
1004
|
-
if (
|
|
1004
|
+
if (u.isFormData(r)) {
|
|
1005
1005
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1006
|
-
|
|
1007
|
-
else if ((f =
|
|
1008
|
-
const [
|
|
1009
|
-
|
|
1006
|
+
o.setContentType(void 0);
|
|
1007
|
+
else if ((f = o.getContentType()) !== !1) {
|
|
1008
|
+
const [d, ...a] = f ? f.split(";").map((l) => l.trim()).filter(Boolean) : [];
|
|
1009
|
+
o.setContentType([d || "multipart/form-data", ...a].join("; "));
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
if (A.hasStandardBrowserEnv && (
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1012
|
+
if (A.hasStandardBrowserEnv && (n && u.isFunction(n) && (n = n(t)), n || n !== !1 && dn(t.url))) {
|
|
1013
|
+
const d = s && i && hn.read(i);
|
|
1014
|
+
d && o.set(s, d);
|
|
1015
1015
|
}
|
|
1016
1016
|
return t;
|
|
1017
1017
|
}, yn = typeof XMLHttpRequest < "u", gn = yn && function(e) {
|
|
1018
|
-
return new Promise(function(
|
|
1018
|
+
return new Promise(function(r, n) {
|
|
1019
1019
|
const s = We(e);
|
|
1020
|
-
let
|
|
1021
|
-
const
|
|
1022
|
-
let { responseType:
|
|
1023
|
-
function
|
|
1020
|
+
let i = s.data;
|
|
1021
|
+
const o = E.from(s.headers).normalize();
|
|
1022
|
+
let { responseType: c } = s, f;
|
|
1023
|
+
function d() {
|
|
1024
1024
|
s.cancelToken && s.cancelToken.unsubscribe(f), s.signal && s.signal.removeEventListener("abort", f);
|
|
1025
1025
|
}
|
|
1026
1026
|
let a = new XMLHttpRequest();
|
|
1027
1027
|
a.open(s.method.toUpperCase(), s.url, !0), a.timeout = s.timeout;
|
|
1028
|
-
function
|
|
1028
|
+
function l() {
|
|
1029
1029
|
if (!a)
|
|
1030
1030
|
return;
|
|
1031
1031
|
const g = E.from(
|
|
1032
1032
|
"getAllResponseHeaders" in a && a.getAllResponseHeaders()
|
|
1033
1033
|
), p = {
|
|
1034
|
-
data: !
|
|
1034
|
+
data: !c || c === "text" || c === "json" ? a.responseText : a.response,
|
|
1035
1035
|
status: a.status,
|
|
1036
1036
|
statusText: a.statusText,
|
|
1037
1037
|
headers: g,
|
|
@@ -1039,98 +1039,98 @@ const We = (e) => {
|
|
|
1039
1039
|
request: a
|
|
1040
1040
|
};
|
|
1041
1041
|
Ke(function(T) {
|
|
1042
|
-
|
|
1042
|
+
r(T), d();
|
|
1043
1043
|
}, function(T) {
|
|
1044
|
-
|
|
1044
|
+
n(T), d();
|
|
1045
1045
|
}, p), a = null;
|
|
1046
1046
|
}
|
|
1047
|
-
"onloadend" in a ? a.onloadend =
|
|
1048
|
-
!a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1047
|
+
"onloadend" in a ? a.onloadend = l : a.onreadystatechange = function() {
|
|
1048
|
+
!a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(l);
|
|
1049
1049
|
}, a.onabort = function() {
|
|
1050
|
-
a && (
|
|
1050
|
+
a && (n(new m("Request aborted", m.ECONNABORTED, s, a)), a = null);
|
|
1051
1051
|
}, a.onerror = function() {
|
|
1052
|
-
|
|
1052
|
+
n(new m("Network Error", m.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
1055
|
const p = s.transitional || ze;
|
|
1056
|
-
s.timeoutErrorMessage && (h = s.timeoutErrorMessage),
|
|
1056
|
+
s.timeoutErrorMessage && (h = s.timeoutErrorMessage), n(new m(
|
|
1057
1057
|
h,
|
|
1058
|
-
p.clarifyTimeoutError ?
|
|
1058
|
+
p.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1059
1059
|
s,
|
|
1060
1060
|
a
|
|
1061
1061
|
)), a = null;
|
|
1062
|
-
},
|
|
1062
|
+
}, i === void 0 && o.setContentType(null), "setRequestHeader" in a && u.forEach(o.toJSON(), function(h, p) {
|
|
1063
1063
|
a.setRequestHeader(p, h);
|
|
1064
|
-
}),
|
|
1065
|
-
a && (
|
|
1064
|
+
}), u.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), c && c !== "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 && (n(!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
|
-
|
|
1067
|
+
const y = un(s.url);
|
|
1068
|
+
if (y && A.protocols.indexOf(y) === -1) {
|
|
1069
|
+
n(new m("Unsupported protocol " + y + ":", m.ERR_BAD_REQUEST, e));
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
|
-
a.send(
|
|
1072
|
+
a.send(i || null);
|
|
1073
1073
|
});
|
|
1074
1074
|
}, wn = (e, t) => {
|
|
1075
|
-
let
|
|
1075
|
+
let r = new AbortController(), n;
|
|
1076
1076
|
const s = function(f) {
|
|
1077
|
-
if (!
|
|
1078
|
-
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1077
|
+
if (!n) {
|
|
1078
|
+
n = !0, o();
|
|
1079
|
+
const d = f instanceof Error ? f : this.reason;
|
|
1080
|
+
r.abort(d instanceof m ? d : new L(d instanceof Error ? d.message : d));
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
1083
|
-
let
|
|
1084
|
-
s(new
|
|
1083
|
+
let i = t && setTimeout(() => {
|
|
1084
|
+
s(new m(`timeout ${t} of ms exceeded`, m.ETIMEDOUT));
|
|
1085
1085
|
}, t);
|
|
1086
|
-
const
|
|
1087
|
-
e && (
|
|
1086
|
+
const o = () => {
|
|
1087
|
+
e && (i && clearTimeout(i), i = 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
|
-
const { signal:
|
|
1093
|
-
return
|
|
1094
|
-
|
|
1092
|
+
const { signal: c } = r;
|
|
1093
|
+
return c.unsubscribe = o, [c, () => {
|
|
1094
|
+
i && clearTimeout(i), i = null;
|
|
1095
1095
|
}];
|
|
1096
1096
|
}, bn = function* (e, t) {
|
|
1097
|
-
let
|
|
1098
|
-
if (!t ||
|
|
1097
|
+
let r = e.byteLength;
|
|
1098
|
+
if (!t || r < t) {
|
|
1099
1099
|
yield e;
|
|
1100
1100
|
return;
|
|
1101
1101
|
}
|
|
1102
|
-
let
|
|
1103
|
-
for (;
|
|
1104
|
-
s =
|
|
1105
|
-
}, Sn = async function* (e, t,
|
|
1106
|
-
for await (const
|
|
1107
|
-
yield* bn(ArrayBuffer.isView(
|
|
1108
|
-
}, Ee = (e, t,
|
|
1109
|
-
const
|
|
1110
|
-
let
|
|
1102
|
+
let n = 0, s;
|
|
1103
|
+
for (; n < r; )
|
|
1104
|
+
s = n + t, yield e.slice(n, s), n = s;
|
|
1105
|
+
}, Sn = async function* (e, t, r) {
|
|
1106
|
+
for await (const n of e)
|
|
1107
|
+
yield* bn(ArrayBuffer.isView(n) ? n : await r(String(n)), t);
|
|
1108
|
+
}, Ee = (e, t, r, n, s) => {
|
|
1109
|
+
const i = Sn(e, t, s);
|
|
1110
|
+
let o = 0;
|
|
1111
1111
|
return new ReadableStream({
|
|
1112
1112
|
type: "bytes",
|
|
1113
|
-
async pull(
|
|
1114
|
-
const { done: f, value:
|
|
1113
|
+
async pull(c) {
|
|
1114
|
+
const { done: f, value: d } = await i.next();
|
|
1115
1115
|
if (f) {
|
|
1116
|
-
|
|
1116
|
+
c.close(), n();
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
let a =
|
|
1120
|
-
|
|
1119
|
+
let a = d.byteLength;
|
|
1120
|
+
r && r(o += a), c.enqueue(new Uint8Array(d));
|
|
1121
1121
|
},
|
|
1122
|
-
cancel(
|
|
1123
|
-
return
|
|
1122
|
+
cancel(c) {
|
|
1123
|
+
return n(c), i.return();
|
|
1124
1124
|
}
|
|
1125
1125
|
}, {
|
|
1126
1126
|
highWaterMark: 2
|
|
1127
1127
|
});
|
|
1128
1128
|
}, Re = (e, t) => {
|
|
1129
|
-
const
|
|
1130
|
-
return (
|
|
1131
|
-
lengthComputable:
|
|
1129
|
+
const r = e != null;
|
|
1130
|
+
return (n) => setTimeout(() => t({
|
|
1131
|
+
lengthComputable: r,
|
|
1132
1132
|
total: e,
|
|
1133
|
-
loaded:
|
|
1133
|
+
loaded: n
|
|
1134
1134
|
}));
|
|
1135
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())), Tn = Qe && (() => {
|
|
1136
1136
|
let e = !1;
|
|
@@ -1144,7 +1144,7 @@ const We = (e) => {
|
|
|
1144
1144
|
return e && !t;
|
|
1145
1145
|
})(), Oe = 64 * 1024, ie = Qe && !!(() => {
|
|
1146
1146
|
try {
|
|
1147
|
-
return
|
|
1147
|
+
return u.isReadableStream(new Response("").body);
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
}
|
|
1150
1150
|
})(), G = {
|
|
@@ -1152,42 +1152,42 @@ const We = (e) => {
|
|
|
1152
1152
|
};
|
|
1153
1153
|
X && ((e) => {
|
|
1154
1154
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1155
|
-
!G[t] && (G[t] =
|
|
1156
|
-
throw new
|
|
1155
|
+
!G[t] && (G[t] = u.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1156
|
+
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, n);
|
|
1157
1157
|
});
|
|
1158
1158
|
});
|
|
1159
1159
|
})(new Response());
|
|
1160
1160
|
const En = async (e) => {
|
|
1161
1161
|
if (e == null)
|
|
1162
1162
|
return 0;
|
|
1163
|
-
if (
|
|
1163
|
+
if (u.isBlob(e))
|
|
1164
1164
|
return e.size;
|
|
1165
|
-
if (
|
|
1165
|
+
if (u.isSpecCompliantForm(e))
|
|
1166
1166
|
return (await new Request(e).arrayBuffer()).byteLength;
|
|
1167
|
-
if (
|
|
1167
|
+
if (u.isArrayBufferView(e))
|
|
1168
1168
|
return e.byteLength;
|
|
1169
|
-
if (
|
|
1169
|
+
if (u.isURLSearchParams(e) && (e = e + ""), u.isString(e))
|
|
1170
1170
|
return (await oe(e)).byteLength;
|
|
1171
1171
|
}, Rn = async (e, t) => {
|
|
1172
|
-
const
|
|
1173
|
-
return
|
|
1172
|
+
const r = u.toFiniteNumber(e.getContentLength());
|
|
1173
|
+
return r ?? En(t);
|
|
1174
1174
|
}, On = X && (async (e) => {
|
|
1175
1175
|
let {
|
|
1176
1176
|
url: t,
|
|
1177
|
-
method:
|
|
1178
|
-
data:
|
|
1177
|
+
method: r,
|
|
1178
|
+
data: n,
|
|
1179
1179
|
signal: s,
|
|
1180
|
-
cancelToken:
|
|
1181
|
-
timeout:
|
|
1182
|
-
onDownloadProgress:
|
|
1180
|
+
cancelToken: i,
|
|
1181
|
+
timeout: o,
|
|
1182
|
+
onDownloadProgress: c,
|
|
1183
1183
|
onUploadProgress: f,
|
|
1184
|
-
responseType:
|
|
1184
|
+
responseType: d,
|
|
1185
1185
|
headers: a,
|
|
1186
|
-
withCredentials:
|
|
1187
|
-
fetchOptions:
|
|
1186
|
+
withCredentials: l = "same-origin",
|
|
1187
|
+
fetchOptions: y
|
|
1188
1188
|
} = We(e);
|
|
1189
|
-
|
|
1190
|
-
let [g, h] = s ||
|
|
1189
|
+
d = d ? (d + "").toLowerCase() : "text";
|
|
1190
|
+
let [g, h] = s || i || o ? wn([s, i], o) : [], p, w;
|
|
1191
1191
|
const T = () => {
|
|
1192
1192
|
!p && setTimeout(() => {
|
|
1193
1193
|
g && g.unsubscribe();
|
|
@@ -1195,46 +1195,46 @@ const En = async (e) => {
|
|
|
1195
1195
|
};
|
|
1196
1196
|
let N;
|
|
1197
1197
|
try {
|
|
1198
|
-
if (f && Tn &&
|
|
1199
|
-
let
|
|
1198
|
+
if (f && Tn && r !== "get" && r !== "head" && (N = await Rn(a, n)) !== 0) {
|
|
1199
|
+
let k = new Request(t, {
|
|
1200
1200
|
method: "POST",
|
|
1201
|
-
body:
|
|
1201
|
+
body: n,
|
|
1202
1202
|
duplex: "half"
|
|
1203
1203
|
}), q;
|
|
1204
|
-
|
|
1204
|
+
u.isFormData(n) && (q = k.headers.get("content-type")) && a.setContentType(q), k.body && (n = Ee(k.body, Oe, Re(
|
|
1205
1205
|
N,
|
|
1206
1206
|
V(f)
|
|
1207
1207
|
), null, oe));
|
|
1208
1208
|
}
|
|
1209
|
-
|
|
1210
|
-
...
|
|
1209
|
+
u.isString(l) || (l = l ? "cors" : "omit"), w = new Request(t, {
|
|
1210
|
+
...y,
|
|
1211
1211
|
signal: g,
|
|
1212
|
-
method:
|
|
1212
|
+
method: r.toUpperCase(),
|
|
1213
1213
|
headers: a.normalize().toJSON(),
|
|
1214
|
-
body:
|
|
1214
|
+
body: n,
|
|
1215
1215
|
duplex: "half",
|
|
1216
|
-
withCredentials:
|
|
1216
|
+
withCredentials: l
|
|
1217
1217
|
});
|
|
1218
1218
|
let b = await fetch(w);
|
|
1219
|
-
const _ = ie && (
|
|
1220
|
-
if (ie && (
|
|
1221
|
-
const
|
|
1219
|
+
const _ = ie && (d === "stream" || d === "response");
|
|
1220
|
+
if (ie && (c || _)) {
|
|
1221
|
+
const k = {};
|
|
1222
1222
|
["status", "statusText", "headers"].forEach((pe) => {
|
|
1223
|
-
|
|
1223
|
+
k[pe] = b[pe];
|
|
1224
1224
|
});
|
|
1225
|
-
const q =
|
|
1225
|
+
const q = u.toFiniteNumber(b.headers.get("content-length"));
|
|
1226
1226
|
b = new Response(
|
|
1227
|
-
Ee(b.body, Oe,
|
|
1227
|
+
Ee(b.body, Oe, c && Re(
|
|
1228
1228
|
q,
|
|
1229
|
-
V(
|
|
1229
|
+
V(c, !0)
|
|
1230
1230
|
), _ && T, oe),
|
|
1231
|
-
|
|
1231
|
+
k
|
|
1232
1232
|
);
|
|
1233
1233
|
}
|
|
1234
|
-
|
|
1235
|
-
let tt = await G[
|
|
1236
|
-
return !_ && T(), h && h(), await new Promise((
|
|
1237
|
-
Ke(
|
|
1234
|
+
d = d || "text";
|
|
1235
|
+
let tt = await G[u.findKey(G, d) || "text"](b, e);
|
|
1236
|
+
return !_ && T(), h && h(), await new Promise((k, q) => {
|
|
1237
|
+
Ke(k, q, {
|
|
1238
1238
|
data: tt,
|
|
1239
1239
|
headers: E.from(b.headers),
|
|
1240
1240
|
status: b.status,
|
|
@@ -1245,18 +1245,18 @@ const En = async (e) => {
|
|
|
1245
1245
|
});
|
|
1246
1246
|
} catch (b) {
|
|
1247
1247
|
throw T(), b && b.name === "TypeError" && /fetch/i.test(b.message) ? Object.assign(
|
|
1248
|
-
new
|
|
1248
|
+
new m("Network Error", m.ERR_NETWORK, e, w),
|
|
1249
1249
|
{
|
|
1250
1250
|
cause: b.cause || b
|
|
1251
1251
|
}
|
|
1252
|
-
) :
|
|
1252
|
+
) : m.from(b, b && b.code, e, w);
|
|
1253
1253
|
}
|
|
1254
1254
|
}), ae = {
|
|
1255
1255
|
http: jt,
|
|
1256
1256
|
xhr: gn,
|
|
1257
1257
|
fetch: On
|
|
1258
1258
|
};
|
|
1259
|
-
|
|
1259
|
+
u.forEach(ae, (e, t) => {
|
|
1260
1260
|
if (e) {
|
|
1261
1261
|
try {
|
|
1262
1262
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1265,34 +1265,34 @@ c.forEach(ae, (e, t) => {
|
|
|
1265
1265
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1266
1266
|
}
|
|
1267
1267
|
});
|
|
1268
|
-
const Ae = (e) => `- ${e}`, An = (e) =>
|
|
1268
|
+
const Ae = (e) => `- ${e}`, An = (e) => u.isFunction(e) || e === null || e === !1, Xe = {
|
|
1269
1269
|
getAdapter: (e) => {
|
|
1270
|
-
e =
|
|
1270
|
+
e = u.isArray(e) ? e : [e];
|
|
1271
1271
|
const { length: t } = e;
|
|
1272
|
-
let
|
|
1272
|
+
let r, n;
|
|
1273
1273
|
const s = {};
|
|
1274
|
-
for (let
|
|
1275
|
-
|
|
1276
|
-
let
|
|
1277
|
-
if (
|
|
1278
|
-
throw new
|
|
1279
|
-
if (
|
|
1274
|
+
for (let i = 0; i < t; i++) {
|
|
1275
|
+
r = e[i];
|
|
1276
|
+
let o;
|
|
1277
|
+
if (n = r, !An(r) && (n = ae[(o = String(r)).toLowerCase()], n === void 0))
|
|
1278
|
+
throw new m(`Unknown adapter '${o}'`);
|
|
1279
|
+
if (n)
|
|
1280
1280
|
break;
|
|
1281
|
-
s[
|
|
1281
|
+
s[o || "#" + i] = n;
|
|
1282
1282
|
}
|
|
1283
|
-
if (!
|
|
1284
|
-
const
|
|
1285
|
-
([
|
|
1283
|
+
if (!n) {
|
|
1284
|
+
const i = Object.entries(s).map(
|
|
1285
|
+
([c, f]) => `adapter ${c} ` + (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 o = t ? i.length > 1 ? `since :
|
|
1288
|
+
` + i.map(Ae).join(`
|
|
1289
|
+
`) : " " + Ae(i[0]) : "as no adapter specified";
|
|
1290
|
+
throw new m(
|
|
1291
|
+
"There is no suitable adapter to dispatch the request " + o,
|
|
1292
1292
|
"ERR_NOT_SUPPORT"
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
|
-
return
|
|
1295
|
+
return n;
|
|
1296
1296
|
},
|
|
1297
1297
|
adapters: ae
|
|
1298
1298
|
};
|
|
@@ -1304,66 +1304,66 @@ function Pe(e) {
|
|
|
1304
1304
|
return te(e), e.headers = E.from(e.headers), e.data = ee.call(
|
|
1305
1305
|
e,
|
|
1306
1306
|
e.transformRequest
|
|
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(
|
|
1308
|
-
return te(e),
|
|
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(n) {
|
|
1308
|
+
return te(e), n.data = ee.call(
|
|
1309
1309
|
e,
|
|
1310
1310
|
e.transformResponse,
|
|
1311
|
-
|
|
1312
|
-
),
|
|
1313
|
-
}, function(
|
|
1314
|
-
return Ge(
|
|
1311
|
+
n
|
|
1312
|
+
), n.headers = E.from(n.headers), n;
|
|
1313
|
+
}, function(n) {
|
|
1314
|
+
return Ge(n) || (te(e), n && n.response && (n.response.data = ee.call(
|
|
1315
1315
|
e,
|
|
1316
1316
|
e.transformResponse,
|
|
1317
|
-
|
|
1318
|
-
),
|
|
1317
|
+
n.response
|
|
1318
|
+
), n.response.headers = E.from(n.response.headers))), Promise.reject(n);
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
1321
|
const Ze = "1.7.2", he = {};
|
|
1322
1322
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1323
|
-
he[e] = function(
|
|
1324
|
-
return typeof
|
|
1323
|
+
he[e] = function(n) {
|
|
1324
|
+
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1325
1325
|
};
|
|
1326
1326
|
});
|
|
1327
1327
|
const Ne = {};
|
|
1328
|
-
he.transitional = function(t,
|
|
1329
|
-
function s(
|
|
1330
|
-
return "[Axios v" + Ze + "] Transitional option '" +
|
|
1328
|
+
he.transitional = function(t, r, n) {
|
|
1329
|
+
function s(i, o) {
|
|
1330
|
+
return "[Axios v" + Ze + "] Transitional option '" + i + "'" + o + (n ? ". " + n : "");
|
|
1331
1331
|
}
|
|
1332
|
-
return (
|
|
1332
|
+
return (i, o, c) => {
|
|
1333
1333
|
if (t === !1)
|
|
1334
|
-
throw new
|
|
1335
|
-
s(
|
|
1336
|
-
|
|
1334
|
+
throw new m(
|
|
1335
|
+
s(o, " has been removed" + (r ? " in " + r : "")),
|
|
1336
|
+
m.ERR_DEPRECATED
|
|
1337
1337
|
);
|
|
1338
|
-
return
|
|
1338
|
+
return r && !Ne[o] && (Ne[o] = !0, console.warn(
|
|
1339
1339
|
s(
|
|
1340
|
-
|
|
1341
|
-
" has been deprecated since v" +
|
|
1340
|
+
o,
|
|
1341
|
+
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1342
1342
|
)
|
|
1343
|
-
)), t ? t(
|
|
1343
|
+
)), t ? t(i, o, c) : !0;
|
|
1344
1344
|
};
|
|
1345
1345
|
};
|
|
1346
|
-
function Pn(e, t,
|
|
1346
|
+
function Pn(e, t, r) {
|
|
1347
1347
|
if (typeof e != "object")
|
|
1348
|
-
throw new
|
|
1349
|
-
const
|
|
1350
|
-
let s =
|
|
1348
|
+
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1349
|
+
const n = Object.keys(e);
|
|
1350
|
+
let s = n.length;
|
|
1351
1351
|
for (; s-- > 0; ) {
|
|
1352
|
-
const
|
|
1353
|
-
if (
|
|
1354
|
-
const
|
|
1352
|
+
const i = n[s], o = t[i];
|
|
1353
|
+
if (o) {
|
|
1354
|
+
const c = e[i], f = c === void 0 || o(c, i, e);
|
|
1355
1355
|
if (f !== !0)
|
|
1356
|
-
throw new
|
|
1356
|
+
throw new m("option " + i + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1357
1357
|
continue;
|
|
1358
1358
|
}
|
|
1359
|
-
if (
|
|
1360
|
-
throw new
|
|
1359
|
+
if (r !== !0)
|
|
1360
|
+
throw new m("Unknown option " + i, m.ERR_BAD_OPTION);
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
1363
|
const ce = {
|
|
1364
1364
|
assertOptions: Pn,
|
|
1365
1365
|
validators: he
|
|
1366
|
-
},
|
|
1366
|
+
}, C = ce.validators;
|
|
1367
1367
|
let B = class {
|
|
1368
1368
|
constructor(t) {
|
|
1369
1369
|
this.defaults = t, this.interceptors = {
|
|
@@ -1379,66 +1379,66 @@ let B = class {
|
|
|
1379
1379
|
*
|
|
1380
1380
|
* @returns {Promise} The Promise to be fulfilled
|
|
1381
1381
|
*/
|
|
1382
|
-
async request(t,
|
|
1382
|
+
async request(t, r) {
|
|
1383
1383
|
try {
|
|
1384
|
-
return await this._request(t,
|
|
1385
|
-
} catch (
|
|
1386
|
-
if (
|
|
1384
|
+
return await this._request(t, r);
|
|
1385
|
+
} catch (n) {
|
|
1386
|
+
if (n instanceof Error) {
|
|
1387
1387
|
let s;
|
|
1388
1388
|
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1389
|
-
const
|
|
1389
|
+
const i = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1390
1390
|
try {
|
|
1391
|
-
|
|
1392
|
-
` +
|
|
1391
|
+
n.stack ? i && !String(n.stack).endsWith(i.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1392
|
+
` + i) : n.stack = i;
|
|
1393
1393
|
} catch {
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
1396
|
-
throw
|
|
1396
|
+
throw n;
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
|
-
_request(t,
|
|
1400
|
-
typeof t == "string" ? (
|
|
1401
|
-
const { transitional:
|
|
1402
|
-
|
|
1403
|
-
silentJSONParsing:
|
|
1404
|
-
forcedJSONParsing:
|
|
1405
|
-
clarifyTimeoutError:
|
|
1406
|
-
}, !1), s != null && (
|
|
1399
|
+
_request(t, r) {
|
|
1400
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = U(this.defaults, r);
|
|
1401
|
+
const { transitional: n, paramsSerializer: s, headers: i } = r;
|
|
1402
|
+
n !== void 0 && ce.assertOptions(n, {
|
|
1403
|
+
silentJSONParsing: C.transitional(C.boolean),
|
|
1404
|
+
forcedJSONParsing: C.transitional(C.boolean),
|
|
1405
|
+
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1406
|
+
}, !1), s != null && (u.isFunction(s) ? r.paramsSerializer = {
|
|
1407
1407
|
serialize: s
|
|
1408
1408
|
} : ce.assertOptions(s, {
|
|
1409
|
-
encode:
|
|
1410
|
-
serialize:
|
|
1411
|
-
}, !0)),
|
|
1412
|
-
let
|
|
1413
|
-
|
|
1414
|
-
|
|
1409
|
+
encode: C.function,
|
|
1410
|
+
serialize: C.function
|
|
1411
|
+
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1412
|
+
let o = i && u.merge(
|
|
1413
|
+
i.common,
|
|
1414
|
+
i[r.method]
|
|
1415
1415
|
);
|
|
1416
|
-
|
|
1416
|
+
i && u.forEach(
|
|
1417
1417
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1418
1418
|
(h) => {
|
|
1419
|
-
delete
|
|
1419
|
+
delete i[h];
|
|
1420
1420
|
}
|
|
1421
|
-
),
|
|
1422
|
-
const
|
|
1421
|
+
), r.headers = E.concat(o, i);
|
|
1422
|
+
const c = [];
|
|
1423
1423
|
let f = !0;
|
|
1424
1424
|
this.interceptors.request.forEach(function(p) {
|
|
1425
|
-
typeof p.runWhen == "function" && p.runWhen(
|
|
1425
|
+
typeof p.runWhen == "function" && p.runWhen(r) === !1 || (f = f && p.synchronous, c.unshift(p.fulfilled, p.rejected));
|
|
1426
1426
|
});
|
|
1427
|
-
const
|
|
1427
|
+
const d = [];
|
|
1428
1428
|
this.interceptors.response.forEach(function(p) {
|
|
1429
|
-
|
|
1429
|
+
d.push(p.fulfilled, p.rejected);
|
|
1430
1430
|
});
|
|
1431
|
-
let a,
|
|
1431
|
+
let a, l = 0, y;
|
|
1432
1432
|
if (!f) {
|
|
1433
1433
|
const h = [Pe.bind(this), void 0];
|
|
1434
|
-
for (h.unshift.apply(h,
|
|
1435
|
-
a = a.then(h[
|
|
1434
|
+
for (h.unshift.apply(h, c), h.push.apply(h, d), y = h.length, a = Promise.resolve(r); l < y; )
|
|
1435
|
+
a = a.then(h[l++], h[l++]);
|
|
1436
1436
|
return a;
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1439
|
-
let g =
|
|
1440
|
-
for (
|
|
1441
|
-
const h =
|
|
1438
|
+
y = c.length;
|
|
1439
|
+
let g = r;
|
|
1440
|
+
for (l = 0; l < y; ) {
|
|
1441
|
+
const h = c[l++], p = c[l++];
|
|
1442
1442
|
try {
|
|
1443
1443
|
g = h(g);
|
|
1444
1444
|
} catch (w) {
|
|
@@ -1451,66 +1451,66 @@ let B = class {
|
|
|
1451
1451
|
} catch (h) {
|
|
1452
1452
|
return Promise.reject(h);
|
|
1453
1453
|
}
|
|
1454
|
-
for (
|
|
1455
|
-
a = a.then(l
|
|
1454
|
+
for (l = 0, y = d.length; l < y; )
|
|
1455
|
+
a = a.then(d[l++], d[l++]);
|
|
1456
1456
|
return a;
|
|
1457
1457
|
}
|
|
1458
1458
|
getUri(t) {
|
|
1459
1459
|
t = U(this.defaults, t);
|
|
1460
|
-
const
|
|
1461
|
-
return Me(
|
|
1460
|
+
const r = ve(t.baseURL, t.url);
|
|
1461
|
+
return Me(r, t.params, t.paramsSerializer);
|
|
1462
1462
|
}
|
|
1463
1463
|
};
|
|
1464
|
-
|
|
1465
|
-
B.prototype[t] = function(
|
|
1466
|
-
return this.request(U(
|
|
1464
|
+
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1465
|
+
B.prototype[t] = function(r, n) {
|
|
1466
|
+
return this.request(U(n || {}, {
|
|
1467
1467
|
method: t,
|
|
1468
|
-
url:
|
|
1469
|
-
data: (
|
|
1468
|
+
url: r,
|
|
1469
|
+
data: (n || {}).data
|
|
1470
1470
|
}));
|
|
1471
1471
|
};
|
|
1472
1472
|
});
|
|
1473
|
-
|
|
1474
|
-
function n
|
|
1475
|
-
return function(
|
|
1476
|
-
return this.request(U(
|
|
1473
|
+
u.forEach(["post", "put", "patch"], function(t) {
|
|
1474
|
+
function r(n) {
|
|
1475
|
+
return function(i, o, c) {
|
|
1476
|
+
return this.request(U(c || {}, {
|
|
1477
1477
|
method: t,
|
|
1478
|
-
headers:
|
|
1478
|
+
headers: n ? {
|
|
1479
1479
|
"Content-Type": "multipart/form-data"
|
|
1480
1480
|
} : {},
|
|
1481
|
-
url:
|
|
1482
|
-
data:
|
|
1481
|
+
url: i,
|
|
1482
|
+
data: o
|
|
1483
1483
|
}));
|
|
1484
1484
|
};
|
|
1485
1485
|
}
|
|
1486
|
-
B.prototype[t] =
|
|
1486
|
+
B.prototype[t] = r(), B.prototype[t + "Form"] = r(!0);
|
|
1487
1487
|
});
|
|
1488
1488
|
let Nn = class Ye {
|
|
1489
1489
|
constructor(t) {
|
|
1490
1490
|
if (typeof t != "function")
|
|
1491
1491
|
throw new TypeError("executor must be a function.");
|
|
1492
|
-
let
|
|
1493
|
-
this.promise = new Promise(function(
|
|
1494
|
-
|
|
1492
|
+
let r;
|
|
1493
|
+
this.promise = new Promise(function(i) {
|
|
1494
|
+
r = i;
|
|
1495
1495
|
});
|
|
1496
|
-
const
|
|
1496
|
+
const n = this;
|
|
1497
1497
|
this.promise.then((s) => {
|
|
1498
|
-
if (!
|
|
1498
|
+
if (!n._listeners)
|
|
1499
1499
|
return;
|
|
1500
|
-
let
|
|
1501
|
-
for (;
|
|
1502
|
-
|
|
1503
|
-
|
|
1500
|
+
let i = n._listeners.length;
|
|
1501
|
+
for (; i-- > 0; )
|
|
1502
|
+
n._listeners[i](s);
|
|
1503
|
+
n._listeners = null;
|
|
1504
1504
|
}), this.promise.then = (s) => {
|
|
1505
|
-
let
|
|
1506
|
-
const
|
|
1507
|
-
|
|
1505
|
+
let i;
|
|
1506
|
+
const o = new Promise((c) => {
|
|
1507
|
+
n.subscribe(c), i = c;
|
|
1508
1508
|
}).then(s);
|
|
1509
|
-
return
|
|
1510
|
-
|
|
1511
|
-
},
|
|
1512
|
-
}, t(function(
|
|
1513
|
-
|
|
1509
|
+
return o.cancel = function() {
|
|
1510
|
+
n.unsubscribe(i);
|
|
1511
|
+
}, o;
|
|
1512
|
+
}, t(function(i, o, c) {
|
|
1513
|
+
n.reason || (n.reason = new L(i, o, c), r(n.reason));
|
|
1514
1514
|
});
|
|
1515
1515
|
}
|
|
1516
1516
|
/**
|
|
@@ -1536,8 +1536,8 @@ let Nn = class Ye {
|
|
|
1536
1536
|
unsubscribe(t) {
|
|
1537
1537
|
if (!this._listeners)
|
|
1538
1538
|
return;
|
|
1539
|
-
const
|
|
1540
|
-
|
|
1539
|
+
const r = this._listeners.indexOf(t);
|
|
1540
|
+
r !== -1 && this._listeners.splice(r, 1);
|
|
1541
1541
|
}
|
|
1542
1542
|
/**
|
|
1543
1543
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
@@ -1553,13 +1553,13 @@ let Nn = class Ye {
|
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
1555
|
};
|
|
1556
|
-
function
|
|
1557
|
-
return function(
|
|
1558
|
-
return e.apply(null,
|
|
1556
|
+
function kn(e) {
|
|
1557
|
+
return function(r) {
|
|
1558
|
+
return e.apply(null, r);
|
|
1559
1559
|
};
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return
|
|
1561
|
+
function Cn(e) {
|
|
1562
|
+
return u.isObject(e) && e.isAxiosError === !0;
|
|
1563
1563
|
}
|
|
1564
1564
|
const ue = {
|
|
1565
1565
|
Continue: 100,
|
|
@@ -1630,10 +1630,10 @@ Object.entries(ue).forEach(([e, t]) => {
|
|
|
1630
1630
|
ue[t] = e;
|
|
1631
1631
|
});
|
|
1632
1632
|
function et(e) {
|
|
1633
|
-
const t = new B(e),
|
|
1634
|
-
return
|
|
1633
|
+
const t = new B(e), r = Be(B.prototype.request, t);
|
|
1634
|
+
return u.extend(r, B.prototype, t, { allOwnKeys: !0 }), u.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1635
1635
|
return et(U(e, s));
|
|
1636
|
-
},
|
|
1636
|
+
}, r;
|
|
1637
1637
|
}
|
|
1638
1638
|
const S = et(j);
|
|
1639
1639
|
S.Axios = B;
|
|
@@ -1642,81 +1642,81 @@ S.CancelToken = Nn;
|
|
|
1642
1642
|
S.isCancel = Ge;
|
|
1643
1643
|
S.VERSION = Ze;
|
|
1644
1644
|
S.toFormData = Q;
|
|
1645
|
-
S.AxiosError =
|
|
1645
|
+
S.AxiosError = m;
|
|
1646
1646
|
S.Cancel = S.CanceledError;
|
|
1647
1647
|
S.all = function(t) {
|
|
1648
1648
|
return Promise.all(t);
|
|
1649
1649
|
};
|
|
1650
|
-
S.spread =
|
|
1651
|
-
S.isAxiosError =
|
|
1650
|
+
S.spread = kn;
|
|
1651
|
+
S.isAxiosError = Cn;
|
|
1652
1652
|
S.mergeConfig = U;
|
|
1653
1653
|
S.AxiosHeaders = E;
|
|
1654
|
-
S.formToJSON = (e) => Ve(
|
|
1654
|
+
S.formToJSON = (e) => Ve(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
1655
1655
|
S.getAdapter = Xe.getAdapter;
|
|
1656
1656
|
S.HttpStatusCode = ue;
|
|
1657
1657
|
S.default = S;
|
|
1658
1658
|
const {
|
|
1659
|
-
Axios:
|
|
1659
|
+
Axios: Xn,
|
|
1660
1660
|
AxiosError: xn,
|
|
1661
|
-
CanceledError:
|
|
1662
|
-
isCancel:
|
|
1663
|
-
CancelToken:
|
|
1664
|
-
VERSION:
|
|
1665
|
-
all:
|
|
1666
|
-
Cancel:
|
|
1667
|
-
isAxiosError:
|
|
1668
|
-
spread:
|
|
1669
|
-
toFormData:
|
|
1670
|
-
AxiosHeaders:
|
|
1671
|
-
HttpStatusCode:
|
|
1672
|
-
formToJSON:
|
|
1673
|
-
getAdapter:
|
|
1674
|
-
mergeConfig:
|
|
1661
|
+
CanceledError: Zn,
|
|
1662
|
+
isCancel: Yn,
|
|
1663
|
+
CancelToken: er,
|
|
1664
|
+
VERSION: tr,
|
|
1665
|
+
all: nr,
|
|
1666
|
+
Cancel: rr,
|
|
1667
|
+
isAxiosError: sr,
|
|
1668
|
+
spread: or,
|
|
1669
|
+
toFormData: ir,
|
|
1670
|
+
AxiosHeaders: ke,
|
|
1671
|
+
HttpStatusCode: ar,
|
|
1672
|
+
formToJSON: cr,
|
|
1673
|
+
getAdapter: ur,
|
|
1674
|
+
mergeConfig: lr
|
|
1675
1675
|
} = S, H = () => new xn(
|
|
1676
1676
|
"Unauthorized",
|
|
1677
1677
|
"ERR_UNAUTHORIZED",
|
|
1678
|
-
{ headers: new
|
|
1678
|
+
{ headers: new ke() },
|
|
1679
1679
|
null,
|
|
1680
1680
|
{
|
|
1681
1681
|
status: 401,
|
|
1682
1682
|
data: null,
|
|
1683
1683
|
statusText: "UNAUTHORIZED",
|
|
1684
1684
|
headers: {},
|
|
1685
|
-
config: { headers: new
|
|
1685
|
+
config: { headers: new ke() }
|
|
1686
1686
|
}
|
|
1687
1687
|
), Bn = (e) => {
|
|
1688
1688
|
let t = !1;
|
|
1689
|
-
const
|
|
1689
|
+
const r = [], n = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), i = (a) => {
|
|
1690
1690
|
localStorage.setItem("accessToken", a.accessToken), localStorage.setItem("refreshToken", a.refreshToken);
|
|
1691
|
-
},
|
|
1691
|
+
}, o = () => {
|
|
1692
1692
|
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
|
|
1693
|
-
},
|
|
1694
|
-
|
|
1693
|
+
}, c = (a, l = null) => {
|
|
1694
|
+
r.forEach((y) => {
|
|
1695
1695
|
var g;
|
|
1696
|
-
a ?
|
|
1697
|
-
}),
|
|
1696
|
+
a ? y.reject(a) : ((g = y.requestConfig).headers ?? (g.headers = {}), y.requestConfig.headers.Authorization = `Bearer ${l}`, y.resolve(y.requestConfig));
|
|
1697
|
+
}), r.length = 0;
|
|
1698
1698
|
};
|
|
1699
1699
|
return {
|
|
1700
|
-
getAccessToken:
|
|
1701
|
-
setTokens:
|
|
1702
|
-
clearTokens:
|
|
1700
|
+
getAccessToken: n,
|
|
1701
|
+
setTokens: i,
|
|
1702
|
+
clearTokens: o,
|
|
1703
1703
|
handleTokenRefresh: async (a) => {
|
|
1704
1704
|
var h;
|
|
1705
1705
|
if ((h = a.url) == null ? void 0 : h.includes(
|
|
1706
1706
|
e.refreshTokenEndpointPath
|
|
1707
1707
|
)) {
|
|
1708
|
-
|
|
1708
|
+
o();
|
|
1709
1709
|
const p = H();
|
|
1710
|
-
throw
|
|
1710
|
+
throw c(p), p;
|
|
1711
1711
|
}
|
|
1712
|
-
if (!
|
|
1713
|
-
|
|
1712
|
+
if (!n()) {
|
|
1713
|
+
o();
|
|
1714
1714
|
const p = H();
|
|
1715
|
-
throw
|
|
1715
|
+
throw c(p), p;
|
|
1716
1716
|
}
|
|
1717
1717
|
if (t)
|
|
1718
1718
|
return new Promise((p, w) => {
|
|
1719
|
-
|
|
1719
|
+
r.push({
|
|
1720
1720
|
resolve: p,
|
|
1721
1721
|
reject: w,
|
|
1722
1722
|
requestConfig: a
|
|
@@ -1724,132 +1724,157 @@ const {
|
|
|
1724
1724
|
});
|
|
1725
1725
|
const g = s();
|
|
1726
1726
|
if (!g) {
|
|
1727
|
-
|
|
1727
|
+
o();
|
|
1728
1728
|
const p = H();
|
|
1729
|
-
throw
|
|
1729
|
+
throw c(p), p;
|
|
1730
1730
|
}
|
|
1731
1731
|
t = !0;
|
|
1732
1732
|
try {
|
|
1733
1733
|
const p = await e.onRefreshToken(g);
|
|
1734
|
-
return
|
|
1734
|
+
return i(p), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${p.accessToken}`, c(null, p.accessToken), t = !1, a;
|
|
1735
1735
|
} catch {
|
|
1736
|
-
|
|
1736
|
+
o();
|
|
1737
1737
|
const w = H();
|
|
1738
|
-
throw
|
|
1738
|
+
throw c(w), t = !1, w;
|
|
1739
1739
|
}
|
|
1740
1740
|
},
|
|
1741
1741
|
isAuthError: (a) => {
|
|
1742
|
-
var
|
|
1743
|
-
return ((
|
|
1742
|
+
var l;
|
|
1743
|
+
return ((l = a == null ? void 0 : a.response) == null ? void 0 : l.status) === 401;
|
|
1744
1744
|
}
|
|
1745
1745
|
};
|
|
1746
|
+
}, Un = (e) => {
|
|
1747
|
+
const t = (n) => n ? n.toString().replace(/(^\/{1,2})|(\/{1,2}$)/g, "") : null;
|
|
1748
|
+
return [
|
|
1749
|
+
t(e.baseUrl),
|
|
1750
|
+
t(e.productCode),
|
|
1751
|
+
t(e.apiVersion),
|
|
1752
|
+
t(e.endpoint)
|
|
1753
|
+
].filter(Boolean).join("/");
|
|
1746
1754
|
}, O = (e) => {
|
|
1747
|
-
const t = S.create(),
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
refreshTokenEndpointPath
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1755
|
+
const t = S.create(), r = e.apiVersion, n = e.productCode, s = e.baseUrl, i = s.replace(/\/$/, ""), o = e.hasTokenManager !== !1;
|
|
1756
|
+
let c = null, f = "";
|
|
1757
|
+
if (o) {
|
|
1758
|
+
const a = e.refreshTokenApiVersion ?? r, l = e.refreshTokenEndpointPath ?? "/refresh-token";
|
|
1759
|
+
f = `${i}/auth/${a}${l}`, c = Bn({
|
|
1760
|
+
baseUrl: s,
|
|
1761
|
+
refreshTokenEndpointPath: l,
|
|
1762
|
+
onRefreshToken: async (y) => (await t.post(
|
|
1763
|
+
f,
|
|
1764
|
+
{
|
|
1765
|
+
refreshToken: y
|
|
1766
|
+
}
|
|
1767
|
+
)).data
|
|
1768
|
+
});
|
|
1769
|
+
}
|
|
1770
|
+
return o && c && t.interceptors.response.use(
|
|
1771
|
+
(a) => a,
|
|
1772
|
+
async (a) => {
|
|
1773
|
+
const l = a.config;
|
|
1774
|
+
if (!c.isAuthError(a) || l._retry)
|
|
1775
|
+
return Promise.reject(a);
|
|
1776
|
+
l._retry = !0;
|
|
1762
1777
|
try {
|
|
1763
|
-
const
|
|
1764
|
-
return t.request(
|
|
1765
|
-
} catch (
|
|
1766
|
-
return Promise.reject(
|
|
1778
|
+
const y = await c.handleTokenRefresh(l);
|
|
1779
|
+
return t.request(y);
|
|
1780
|
+
} catch (y) {
|
|
1781
|
+
return Promise.reject(y);
|
|
1767
1782
|
}
|
|
1768
1783
|
}
|
|
1769
1784
|
), e.responseInterceptor && t.interceptors.response.use(
|
|
1770
1785
|
e.responseInterceptor.onFulfilled,
|
|
1771
1786
|
e.responseInterceptor.onReject
|
|
1772
1787
|
), {
|
|
1773
|
-
request: async (
|
|
1774
|
-
const
|
|
1775
|
-
|
|
1776
|
-
|
|
1788
|
+
request: async (a, l) => {
|
|
1789
|
+
const y = a.startsWith("/") ? a.substring(1) : a, g = Un({
|
|
1790
|
+
baseUrl: i,
|
|
1791
|
+
productCode: n,
|
|
1792
|
+
apiVersion: r,
|
|
1793
|
+
endpoint: y
|
|
1794
|
+
}), h = {
|
|
1795
|
+
"Content-Type": (l == null ? void 0 : l.contentType) ?? "application/json",
|
|
1796
|
+
apiVersion: r ?? "",
|
|
1777
1797
|
Authorization: "",
|
|
1778
1798
|
...e.headers ?? {},
|
|
1779
|
-
...(
|
|
1780
|
-
}
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1799
|
+
...(l == null ? void 0 : l.headers) ?? {}
|
|
1800
|
+
};
|
|
1801
|
+
if (o && c) {
|
|
1802
|
+
const w = c.getAccessToken();
|
|
1803
|
+
w && (h.Authorization = `Bearer ${w}`);
|
|
1804
|
+
}
|
|
1805
|
+
const p = {
|
|
1806
|
+
method: (l == null ? void 0 : l.method) ?? "GET",
|
|
1807
|
+
headers: h,
|
|
1808
|
+
url: g,
|
|
1809
|
+
data: l == null ? void 0 : l.data,
|
|
1810
|
+
responseType: l == null ? void 0 : l.responseType
|
|
1788
1811
|
};
|
|
1789
|
-
return await t.request(
|
|
1812
|
+
return await t.request(p);
|
|
1813
|
+
},
|
|
1814
|
+
getAccessToken: o && c ? c.getAccessToken : () => null,
|
|
1815
|
+
setTokens: o && c ? c.setTokens : () => {
|
|
1790
1816
|
},
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
clearTokens: l.clearTokens
|
|
1817
|
+
clearTokens: o && c ? c.clearTokens : () => {
|
|
1818
|
+
}
|
|
1794
1819
|
};
|
|
1795
|
-
},
|
|
1796
|
-
function
|
|
1820
|
+
}, qn = "cep";
|
|
1821
|
+
function Fn(e) {
|
|
1797
1822
|
const t = O(e);
|
|
1798
|
-
function n
|
|
1799
|
-
return t.request(`/${
|
|
1823
|
+
function r(n) {
|
|
1824
|
+
return t.request(`/${qn}`, {
|
|
1800
1825
|
method: "POST",
|
|
1801
|
-
data: JSON.stringify(
|
|
1826
|
+
data: JSON.stringify(n)
|
|
1802
1827
|
});
|
|
1803
1828
|
}
|
|
1804
1829
|
return {
|
|
1805
|
-
getAddress:
|
|
1830
|
+
getAddress: r
|
|
1806
1831
|
};
|
|
1807
1832
|
}
|
|
1808
|
-
const
|
|
1833
|
+
const Ce = "auth", Ln = (e) => {
|
|
1809
1834
|
const t = O(e);
|
|
1810
1835
|
return {
|
|
1811
1836
|
postLogin: async (s) => {
|
|
1812
|
-
var
|
|
1813
|
-
const
|
|
1837
|
+
var o;
|
|
1838
|
+
const i = await t.request(`/${Ce}/login`, {
|
|
1814
1839
|
method: "POST",
|
|
1815
1840
|
data: JSON.stringify(s)
|
|
1816
1841
|
});
|
|
1817
|
-
return
|
|
1842
|
+
return i.status === 200 && ((o = i.data) != null && o.accessToken) && localStorage.setItem("accessToken", i.data.accessToken), i;
|
|
1818
1843
|
},
|
|
1819
|
-
getToken: async (s) => await t.request(`/${
|
|
1844
|
+
getToken: async (s) => await t.request(`/${Ce}?code=${s}`, {
|
|
1820
1845
|
method: "GET",
|
|
1821
1846
|
data: ""
|
|
1822
1847
|
})
|
|
1823
1848
|
};
|
|
1824
|
-
},
|
|
1849
|
+
}, _n = (e) => {
|
|
1825
1850
|
const t = O(e);
|
|
1826
1851
|
return {
|
|
1827
|
-
signUp: async (
|
|
1852
|
+
signUp: async (c) => await t.request("/sign-up", {
|
|
1828
1853
|
method: "POST",
|
|
1829
|
-
data: JSON.stringify(
|
|
1854
|
+
data: JSON.stringify(c)
|
|
1830
1855
|
}),
|
|
1831
|
-
signIn: async (
|
|
1832
|
-
var
|
|
1856
|
+
signIn: async (c) => {
|
|
1857
|
+
var d, a;
|
|
1833
1858
|
const f = await t.request("/sign-in", {
|
|
1834
1859
|
method: "POST",
|
|
1835
|
-
data: JSON.stringify(
|
|
1860
|
+
data: JSON.stringify(c)
|
|
1836
1861
|
});
|
|
1837
|
-
return f.status === 200 && ((
|
|
1862
|
+
return f.status === 200 && ((d = f.data) != null && d.accessToken) && ((a = f.data) != null && a.refreshToken) && t.setTokens(f.data), f;
|
|
1838
1863
|
},
|
|
1839
1864
|
getProfile: async () => await t.request("/me", {
|
|
1840
1865
|
method: "GET",
|
|
1841
1866
|
data: ""
|
|
1842
1867
|
}),
|
|
1843
|
-
recoverPassword: async (
|
|
1868
|
+
recoverPassword: async (c) => await t.request("/recovery", {
|
|
1844
1869
|
method: "POST",
|
|
1845
|
-
data: JSON.stringify(
|
|
1870
|
+
data: JSON.stringify(c)
|
|
1846
1871
|
}),
|
|
1847
|
-
updatePassword: async (
|
|
1872
|
+
updatePassword: async (c) => await t.request("/update-password", {
|
|
1848
1873
|
method: "POST",
|
|
1849
|
-
data: JSON.stringify(
|
|
1874
|
+
data: JSON.stringify(c)
|
|
1850
1875
|
})
|
|
1851
1876
|
};
|
|
1852
|
-
}, xe = "digital",
|
|
1877
|
+
}, xe = "digital", Dn = (e) => {
|
|
1853
1878
|
const t = O(e);
|
|
1854
1879
|
return {
|
|
1855
1880
|
getBroker: () => t.request(`/${xe}/getBroker`, {
|
|
@@ -1864,62 +1889,62 @@ const ke = "auth", Fn = (e) => {
|
|
|
1864
1889
|
}
|
|
1865
1890
|
)
|
|
1866
1891
|
};
|
|
1867
|
-
},
|
|
1892
|
+
}, $n = "data", In = (e) => {
|
|
1868
1893
|
const t = O(e);
|
|
1869
1894
|
return {
|
|
1870
|
-
postData: async (
|
|
1895
|
+
postData: async (n) => await t.request(`/${$n}`, {
|
|
1871
1896
|
method: "POST",
|
|
1872
|
-
data: JSON.stringify(
|
|
1897
|
+
data: JSON.stringify(n)
|
|
1873
1898
|
})
|
|
1874
1899
|
};
|
|
1875
|
-
},
|
|
1900
|
+
}, jn = "endorsement", Hn = (e) => {
|
|
1876
1901
|
const t = O(e);
|
|
1877
1902
|
return {
|
|
1878
|
-
putEndorsement: (
|
|
1879
|
-
const
|
|
1880
|
-
return
|
|
1881
|
-
|
|
1882
|
-
}) :
|
|
1903
|
+
putEndorsement: (n, s) => {
|
|
1904
|
+
const i = new FormData();
|
|
1905
|
+
return i.append("data", JSON.stringify(n)), s && (Array.isArray(s) ? s.forEach((o) => {
|
|
1906
|
+
i.append("attachments", o);
|
|
1907
|
+
}) : i.append("attachments", s)), t.request(`/${jn}`, {
|
|
1883
1908
|
method: "PUT",
|
|
1884
|
-
data:
|
|
1909
|
+
data: i,
|
|
1885
1910
|
contentType: "multipart/form-data"
|
|
1886
1911
|
});
|
|
1887
1912
|
}
|
|
1888
1913
|
};
|
|
1889
|
-
}, ne = "payment",
|
|
1914
|
+
}, ne = "payment", Jn = (e) => {
|
|
1890
1915
|
const t = O(e);
|
|
1891
1916
|
return {
|
|
1892
|
-
postPayment: (
|
|
1917
|
+
postPayment: (i) => t.request(`/${ne}`, {
|
|
1893
1918
|
method: "POST",
|
|
1894
|
-
data: JSON.stringify(
|
|
1919
|
+
data: JSON.stringify(i)
|
|
1895
1920
|
}),
|
|
1896
|
-
getPaymentStatus: (
|
|
1897
|
-
`/${ne}/status?policyId=${
|
|
1921
|
+
getPaymentStatus: (i) => t.request(
|
|
1922
|
+
`/${ne}/status?policyId=${i.policyId}`,
|
|
1898
1923
|
{
|
|
1899
1924
|
method: "GET",
|
|
1900
1925
|
data: ""
|
|
1901
1926
|
}
|
|
1902
1927
|
),
|
|
1903
|
-
getPaymentSummary: (
|
|
1904
|
-
`/${ne}/summary?policyId=${
|
|
1928
|
+
getPaymentSummary: (i) => t.request(
|
|
1929
|
+
`/${ne}/summary?policyId=${i.policyId}`,
|
|
1905
1930
|
{
|
|
1906
1931
|
method: "GET",
|
|
1907
1932
|
data: ""
|
|
1908
1933
|
}
|
|
1909
1934
|
)
|
|
1910
1935
|
};
|
|
1911
|
-
}, J = "product/action",
|
|
1936
|
+
}, J = "product/action", Mn = (e) => {
|
|
1912
1937
|
const t = O(e);
|
|
1913
1938
|
return {
|
|
1914
|
-
getCnpjStatus: (
|
|
1939
|
+
getCnpjStatus: (o, c, f) => {
|
|
1915
1940
|
const a = new URLSearchParams({
|
|
1916
|
-
...
|
|
1917
|
-
...
|
|
1941
|
+
...o && { cnpj: o },
|
|
1942
|
+
...c && { brokerageIdentity: c },
|
|
1918
1943
|
...f !== void 0 && {
|
|
1919
1944
|
isBrokerageDefinedAtStart: String(f)
|
|
1920
1945
|
}
|
|
1921
|
-
}).toString(),
|
|
1922
|
-
return t.request(
|
|
1946
|
+
}).toString(), l = `/${J}/Custom/CnpjCheck?${a}`;
|
|
1947
|
+
return t.request(l, {
|
|
1923
1948
|
method: "GET",
|
|
1924
1949
|
data: ""
|
|
1925
1950
|
});
|
|
@@ -1928,28 +1953,28 @@ const ke = "auth", Fn = (e) => {
|
|
|
1928
1953
|
method: "GET",
|
|
1929
1954
|
data: ""
|
|
1930
1955
|
}),
|
|
1931
|
-
getProposalNumberByKeyNumber: (
|
|
1932
|
-
`/${J}/Custom/GetProposalNoByKeyNumber?keyNumber=${
|
|
1956
|
+
getProposalNumberByKeyNumber: (o) => t.request(
|
|
1957
|
+
`/${J}/Custom/GetProposalNoByKeyNumber?keyNumber=${o.keyNumber}`,
|
|
1933
1958
|
{
|
|
1934
1959
|
method: "GET",
|
|
1935
1960
|
data: ""
|
|
1936
1961
|
}
|
|
1937
1962
|
),
|
|
1938
|
-
postCoveragesAndClausesRules: (
|
|
1963
|
+
postCoveragesAndClausesRules: (o) => t.request(
|
|
1939
1964
|
`/${J}/Custom/LoadRules`,
|
|
1940
1965
|
{
|
|
1941
1966
|
method: "POST",
|
|
1942
|
-
data: JSON.stringify(
|
|
1967
|
+
data: JSON.stringify(o)
|
|
1943
1968
|
}
|
|
1944
1969
|
)
|
|
1945
1970
|
};
|
|
1946
|
-
}, x = "quotation",
|
|
1971
|
+
}, x = "quotation", zn = (e) => {
|
|
1947
1972
|
const t = O(e);
|
|
1948
1973
|
return {
|
|
1949
1974
|
getQuotations: (a) => {
|
|
1950
|
-
const
|
|
1975
|
+
const l = new URLSearchParams({ ...a });
|
|
1951
1976
|
return t.request(
|
|
1952
|
-
`/${x}/query?${
|
|
1977
|
+
`/${x}/query?${l.toString()}`,
|
|
1953
1978
|
{
|
|
1954
1979
|
method: "GET",
|
|
1955
1980
|
data: ""
|
|
@@ -1957,9 +1982,9 @@ const ke = "auth", Fn = (e) => {
|
|
|
1957
1982
|
);
|
|
1958
1983
|
},
|
|
1959
1984
|
getQuotationDetail: (a) => {
|
|
1960
|
-
const
|
|
1985
|
+
const l = new URLSearchParams({ id: a.policyId });
|
|
1961
1986
|
return t.request(
|
|
1962
|
-
`/${x}?${
|
|
1987
|
+
`/${x}?${l.toString()}`,
|
|
1963
1988
|
{
|
|
1964
1989
|
method: "GET",
|
|
1965
1990
|
data: ""
|
|
@@ -1997,17 +2022,17 @@ const ke = "auth", Fn = (e) => {
|
|
|
1997
2022
|
}
|
|
1998
2023
|
)
|
|
1999
2024
|
};
|
|
2000
|
-
},
|
|
2025
|
+
}, Vn = "report", Gn = (e) => {
|
|
2001
2026
|
const t = O(e);
|
|
2002
2027
|
return {
|
|
2003
|
-
getReportStream: (
|
|
2028
|
+
getReportStream: (n) => {
|
|
2004
2029
|
const s = new URLSearchParams({
|
|
2005
|
-
policyId:
|
|
2006
|
-
documentType:
|
|
2007
|
-
...
|
|
2030
|
+
policyId: n.policyId,
|
|
2031
|
+
documentType: n.documentType ?? "certificate",
|
|
2032
|
+
...n.additionalParams
|
|
2008
2033
|
});
|
|
2009
2034
|
return t.request(
|
|
2010
|
-
`/${
|
|
2035
|
+
`/${Vn}/generate-stream?${s.toString()}`,
|
|
2011
2036
|
{
|
|
2012
2037
|
method: "GET",
|
|
2013
2038
|
data: "",
|
|
@@ -2016,11 +2041,11 @@ const ke = "auth", Fn = (e) => {
|
|
|
2016
2041
|
);
|
|
2017
2042
|
}
|
|
2018
2043
|
};
|
|
2019
|
-
},
|
|
2044
|
+
}, Kn = "SubscriberData", vn = (e) => {
|
|
2020
2045
|
const t = O(e);
|
|
2021
2046
|
return {
|
|
2022
|
-
getSubscriber: (
|
|
2023
|
-
`/${
|
|
2047
|
+
getSubscriber: (n) => t.request(
|
|
2048
|
+
`/${Kn}/get-subscriber-data?cnpj=${n}`,
|
|
2024
2049
|
{
|
|
2025
2050
|
method: "GET",
|
|
2026
2051
|
data: ""
|
|
@@ -2028,23 +2053,23 @@ const ke = "auth", Fn = (e) => {
|
|
|
2028
2053
|
)
|
|
2029
2054
|
};
|
|
2030
2055
|
};
|
|
2031
|
-
function
|
|
2032
|
-
const t =
|
|
2056
|
+
function fr(e) {
|
|
2057
|
+
const t = Ln(e), r = _n(e), n = In(e), s = zn(e), i = Jn(e), o = Fn(e), c = Dn(e), f = Hn(e), d = Mn(e), a = Gn(e), l = vn(e), y = O(e);
|
|
2033
2058
|
return {
|
|
2034
2059
|
auth: t,
|
|
2035
|
-
authAkad:
|
|
2036
|
-
data:
|
|
2060
|
+
authAkad: r,
|
|
2061
|
+
data: n,
|
|
2037
2062
|
quotation: s,
|
|
2038
|
-
payment:
|
|
2039
|
-
address:
|
|
2040
|
-
broker:
|
|
2063
|
+
payment: i,
|
|
2064
|
+
address: o,
|
|
2065
|
+
broker: c,
|
|
2041
2066
|
endorsement: f,
|
|
2042
|
-
plugin:
|
|
2067
|
+
plugin: d,
|
|
2043
2068
|
report: a,
|
|
2044
|
-
subscriber:
|
|
2045
|
-
base:
|
|
2069
|
+
subscriber: l,
|
|
2070
|
+
base: y
|
|
2046
2071
|
};
|
|
2047
2072
|
}
|
|
2048
2073
|
export {
|
|
2049
|
-
|
|
2074
|
+
fr as default
|
|
2050
2075
|
};
|