@akad/sdk 1.0.22 → 1.0.23
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/auth/index.d.ts +8 -0
- package/auth/types.d.ts +2 -1
- package/base.d.ts +11 -3
- package/helpers/TokenRefreshManager.d.ts +8 -5
- package/main.d.ts +7 -3
- package/package.json +1 -1
- package/ts-lib.js +849 -806
- package/ts-lib.umd.cjs +6 -6
package/ts-lib.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
function
|
|
1
|
+
function Ue(e, t) {
|
|
2
2
|
return function() {
|
|
3
3
|
return e.apply(t, arguments);
|
|
4
4
|
};
|
|
5
5
|
}
|
|
6
|
-
const { toString: nt } = Object.prototype, { getPrototypeOf:
|
|
6
|
+
const { toString: nt } = Object.prototype, { getPrototypeOf: ue } = Object, v = /* @__PURE__ */ ((e) => (t) => {
|
|
7
7
|
const r = nt.call(t);
|
|
8
8
|
return e[r] || (e[r] = r.slice(8, -1).toLowerCase());
|
|
9
|
-
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) =>
|
|
10
|
-
function
|
|
9
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => v(t) === e), G = (e) => (t) => typeof t === e, { isArray: L } = Array, $ = G("undefined");
|
|
10
|
+
function st(e) {
|
|
11
11
|
return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && R(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
12
12
|
}
|
|
13
|
-
const
|
|
14
|
-
function
|
|
13
|
+
const qe = P("ArrayBuffer");
|
|
14
|
+
function ot(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
|
|
19
|
-
if (
|
|
18
|
+
const it = G("string"), R = G("function"), Be = G("number"), K = (e) => e !== null && typeof e == "object", at = (e) => e === !0 || e === !1, J = (e) => {
|
|
19
|
+
if (v(e) !== "object")
|
|
20
20
|
return !1;
|
|
21
|
-
const t =
|
|
21
|
+
const t = ue(e);
|
|
22
22
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
23
|
-
},
|
|
23
|
+
}, ct = P("Date"), ut = P("File"), lt = P("Blob"), ft = P("FileList"), dt = (e) => K(e) && R(e.pipe), ht = (e) => {
|
|
24
24
|
let t;
|
|
25
|
-
return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t =
|
|
25
|
+
return e && (typeof FormData == "function" && e instanceof FormData || R(e.append) && ((t = v(e)) === "formdata" || // detect form-data instance
|
|
26
26
|
t === "object" && R(e.toString) && e.toString() === "[object FormData]"));
|
|
27
|
-
},
|
|
27
|
+
}, pt = P("URLSearchParams"), [mt, yt, gt, wt] = ["ReadableStream", "Request", "Response", "Headers"].map(P), bt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
28
28
|
function I(e, t, { allOwnKeys: r = !1 } = {}) {
|
|
29
29
|
if (e === null || typeof e > "u")
|
|
30
30
|
return;
|
|
31
31
|
let n, s;
|
|
32
|
-
if (typeof e != "object" && (e = [e]),
|
|
32
|
+
if (typeof e != "object" && (e = [e]), L(e))
|
|
33
33
|
for (n = 0, s = e.length; n < s; n++)
|
|
34
34
|
t.call(null, e[n], n, e);
|
|
35
35
|
else {
|
|
36
|
-
const
|
|
36
|
+
const o = r ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
37
37
|
let c;
|
|
38
|
-
for (n = 0; n <
|
|
39
|
-
c =
|
|
38
|
+
for (n = 0; n < i; n++)
|
|
39
|
+
c = o[n], t.call(null, e[c], c, e);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function Le(e, t) {
|
|
43
43
|
t = t.toLowerCase();
|
|
44
44
|
const r = Object.keys(e);
|
|
45
45
|
let n = r.length, s;
|
|
@@ -48,74 +48,74 @@ function Fe(e, t) {
|
|
|
48
48
|
return s;
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const _e = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Fe = (e) => !$(e) && e !== _e;
|
|
52
52
|
function re() {
|
|
53
|
-
const { caseless: e } =
|
|
54
|
-
const
|
|
55
|
-
|
|
53
|
+
const { caseless: e } = Fe(this) && this || {}, t = {}, r = (n, s) => {
|
|
54
|
+
const o = e && Le(t, s) || s;
|
|
55
|
+
J(t[o]) && J(n) ? t[o] = re(t[o], n) : J(n) ? t[o] = re({}, n) : L(n) ? t[o] = n.slice() : t[o] = n;
|
|
56
56
|
};
|
|
57
57
|
for (let n = 0, s = arguments.length; n < s; n++)
|
|
58
58
|
arguments[n] && I(arguments[n], r);
|
|
59
59
|
return t;
|
|
60
60
|
}
|
|
61
|
-
const
|
|
62
|
-
r && R(s) ? e[
|
|
63
|
-
}, { allOwnKeys: n }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e),
|
|
61
|
+
const Tt = (e, t, r, { allOwnKeys: n } = {}) => (I(t, (s, o) => {
|
|
62
|
+
r && R(s) ? e[o] = Ue(s, r) : e[o] = s;
|
|
63
|
+
}, { allOwnKeys: n }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Et = (e, t, r, n) => {
|
|
64
64
|
e.prototype = Object.create(t.prototype, n), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
65
65
|
value: t.prototype
|
|
66
66
|
}), r && Object.assign(e.prototype, r);
|
|
67
|
-
},
|
|
68
|
-
let s,
|
|
67
|
+
}, Rt = (e, t, r, n) => {
|
|
68
|
+
let s, o, i;
|
|
69
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 = r !== !1 &&
|
|
73
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
74
|
+
i = s[o], (!n || n(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
75
|
+
e = r !== !1 && ue(e);
|
|
76
76
|
} while (e && (!r || r(e, t)) && e !== Object.prototype);
|
|
77
77
|
return t;
|
|
78
|
-
},
|
|
78
|
+
}, Ot = (e, t, r) => {
|
|
79
79
|
e = String(e), (r === void 0 || r > e.length) && (r = e.length), r -= t.length;
|
|
80
80
|
const n = e.indexOf(t, r);
|
|
81
81
|
return n !== -1 && n === r;
|
|
82
|
-
},
|
|
82
|
+
}, At = (e) => {
|
|
83
83
|
if (!e)
|
|
84
84
|
return null;
|
|
85
|
-
if (
|
|
85
|
+
if (L(e))
|
|
86
86
|
return e;
|
|
87
87
|
let t = e.length;
|
|
88
|
-
if (!
|
|
88
|
+
if (!Be(t))
|
|
89
89
|
return null;
|
|
90
90
|
const r = new Array(t);
|
|
91
91
|
for (; t-- > 0; )
|
|
92
92
|
r[t] = e[t];
|
|
93
93
|
return r;
|
|
94
|
-
},
|
|
94
|
+
}, Pt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), Nt = (e, t) => {
|
|
95
95
|
const n = (e && e[Symbol.iterator]).call(e);
|
|
96
96
|
let s;
|
|
97
97
|
for (; (s = n.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
|
+
}, kt = (e, t) => {
|
|
102
102
|
let r;
|
|
103
103
|
const n = [];
|
|
104
104
|
for (; (r = e.exec(t)) !== null; )
|
|
105
105
|
n.push(r);
|
|
106
106
|
return n;
|
|
107
|
-
},
|
|
107
|
+
}, Ct = P("HTMLFormElement"), xt = (e) => e.toLowerCase().replace(
|
|
108
108
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
109
109
|
function(r, n, s) {
|
|
110
110
|
return n.toUpperCase() + s;
|
|
111
111
|
}
|
|
112
|
-
),
|
|
112
|
+
), pe = (({ hasOwnProperty: e }) => (t, r) => e.call(t, r))(Object.prototype), Ut = P("RegExp"), De = (e, t) => {
|
|
113
113
|
const r = Object.getOwnPropertyDescriptors(e), n = {};
|
|
114
|
-
I(r, (s,
|
|
115
|
-
let
|
|
116
|
-
(
|
|
114
|
+
I(r, (s, o) => {
|
|
115
|
+
let i;
|
|
116
|
+
(i = t(s, o, e)) !== !1 && (n[o] = i || s);
|
|
117
117
|
}), Object.defineProperties(e, n);
|
|
118
|
-
},
|
|
118
|
+
}, qt = (e) => {
|
|
119
119
|
De(e, (t, r) => {
|
|
120
120
|
if (R(e) && ["arguments", "caller", "callee"].indexOf(r) !== -1)
|
|
121
121
|
return !1;
|
|
@@ -130,107 +130,107 @@ const bt = (e, t, r, { allOwnKeys: n } = {}) => (I(t, (s, i) => {
|
|
|
130
130
|
});
|
|
131
131
|
}
|
|
132
132
|
});
|
|
133
|
-
},
|
|
133
|
+
}, Bt = (e, t) => {
|
|
134
134
|
const r = {}, n = (s) => {
|
|
135
|
-
s.forEach((
|
|
136
|
-
r[
|
|
135
|
+
s.forEach((o) => {
|
|
136
|
+
r[o] = !0;
|
|
137
137
|
});
|
|
138
138
|
};
|
|
139
|
-
return
|
|
140
|
-
},
|
|
141
|
-
},
|
|
142
|
-
DIGIT:
|
|
143
|
-
ALPHA:
|
|
144
|
-
ALPHA_DIGIT:
|
|
145
|
-
},
|
|
139
|
+
return L(e) ? n(e) : n(String(e).split(t)), r;
|
|
140
|
+
}, Lt = () => {
|
|
141
|
+
}, _t = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, X = "abcdefghijklmnopqrstuvwxyz", me = "0123456789", $e = {
|
|
142
|
+
DIGIT: me,
|
|
143
|
+
ALPHA: X,
|
|
144
|
+
ALPHA_DIGIT: X + X.toUpperCase() + me
|
|
145
|
+
}, Ft = (e = 16, t = $e.ALPHA_DIGIT) => {
|
|
146
146
|
let r = "";
|
|
147
147
|
const { length: n } = t;
|
|
148
148
|
for (; e--; )
|
|
149
149
|
r += t[Math.random() * n | 0];
|
|
150
150
|
return r;
|
|
151
151
|
};
|
|
152
|
-
function
|
|
152
|
+
function Dt(e) {
|
|
153
153
|
return !!(e && R(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
154
154
|
}
|
|
155
|
-
const
|
|
155
|
+
const $t = (e) => {
|
|
156
156
|
const t = new Array(10), r = (n, s) => {
|
|
157
|
-
if (
|
|
157
|
+
if (K(n)) {
|
|
158
158
|
if (t.indexOf(n) >= 0)
|
|
159
159
|
return;
|
|
160
160
|
if (!("toJSON" in n)) {
|
|
161
161
|
t[s] = n;
|
|
162
|
-
const
|
|
163
|
-
return I(n, (
|
|
164
|
-
const
|
|
165
|
-
!$(
|
|
166
|
-
}), t[s] = void 0,
|
|
162
|
+
const o = L(n) ? [] : {};
|
|
163
|
+
return I(n, (i, c) => {
|
|
164
|
+
const l = r(i, s + 1);
|
|
165
|
+
!$(l) && (o[c] = l);
|
|
166
|
+
}), t[s] = void 0, o;
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
169
|
return n;
|
|
170
170
|
};
|
|
171
171
|
return r(e, 0);
|
|
172
|
-
},
|
|
173
|
-
isArray:
|
|
174
|
-
isArrayBuffer:
|
|
175
|
-
isBuffer:
|
|
176
|
-
isFormData:
|
|
177
|
-
isArrayBufferView:
|
|
178
|
-
isString:
|
|
179
|
-
isNumber:
|
|
180
|
-
isBoolean:
|
|
181
|
-
isObject:
|
|
182
|
-
isPlainObject:
|
|
183
|
-
isReadableStream:
|
|
184
|
-
isRequest:
|
|
185
|
-
isResponse:
|
|
186
|
-
isHeaders:
|
|
172
|
+
}, It = P("AsyncFunction"), jt = (e) => e && (K(e) || R(e)) && R(e.then) && R(e.catch), u = {
|
|
173
|
+
isArray: L,
|
|
174
|
+
isArrayBuffer: qe,
|
|
175
|
+
isBuffer: st,
|
|
176
|
+
isFormData: ht,
|
|
177
|
+
isArrayBufferView: ot,
|
|
178
|
+
isString: it,
|
|
179
|
+
isNumber: Be,
|
|
180
|
+
isBoolean: at,
|
|
181
|
+
isObject: K,
|
|
182
|
+
isPlainObject: J,
|
|
183
|
+
isReadableStream: mt,
|
|
184
|
+
isRequest: yt,
|
|
185
|
+
isResponse: gt,
|
|
186
|
+
isHeaders: wt,
|
|
187
187
|
isUndefined: $,
|
|
188
|
-
isDate:
|
|
189
|
-
isFile:
|
|
190
|
-
isBlob:
|
|
191
|
-
isRegExp:
|
|
188
|
+
isDate: ct,
|
|
189
|
+
isFile: ut,
|
|
190
|
+
isBlob: lt,
|
|
191
|
+
isRegExp: Ut,
|
|
192
192
|
isFunction: R,
|
|
193
|
-
isStream:
|
|
194
|
-
isURLSearchParams:
|
|
195
|
-
isTypedArray:
|
|
196
|
-
isFileList:
|
|
193
|
+
isStream: dt,
|
|
194
|
+
isURLSearchParams: pt,
|
|
195
|
+
isTypedArray: Pt,
|
|
196
|
+
isFileList: ft,
|
|
197
197
|
forEach: I,
|
|
198
198
|
merge: re,
|
|
199
|
-
extend:
|
|
200
|
-
trim:
|
|
199
|
+
extend: Tt,
|
|
200
|
+
trim: bt,
|
|
201
201
|
stripBOM: St,
|
|
202
|
-
inherits:
|
|
203
|
-
toFlatObject:
|
|
204
|
-
kindOf:
|
|
202
|
+
inherits: Et,
|
|
203
|
+
toFlatObject: Rt,
|
|
204
|
+
kindOf: v,
|
|
205
205
|
kindOfTest: P,
|
|
206
|
-
endsWith:
|
|
207
|
-
toArray:
|
|
208
|
-
forEachEntry:
|
|
209
|
-
matchAll:
|
|
210
|
-
isHTMLForm:
|
|
211
|
-
hasOwnProperty:
|
|
212
|
-
hasOwnProp:
|
|
206
|
+
endsWith: Ot,
|
|
207
|
+
toArray: At,
|
|
208
|
+
forEachEntry: Nt,
|
|
209
|
+
matchAll: kt,
|
|
210
|
+
isHTMLForm: Ct,
|
|
211
|
+
hasOwnProperty: pe,
|
|
212
|
+
hasOwnProp: pe,
|
|
213
213
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
214
214
|
reduceDescriptors: De,
|
|
215
|
-
freezeMethods:
|
|
216
|
-
toObjectSet:
|
|
217
|
-
toCamelCase:
|
|
218
|
-
noop:
|
|
219
|
-
toFiniteNumber:
|
|
220
|
-
findKey:
|
|
221
|
-
global:
|
|
222
|
-
isContextDefined:
|
|
215
|
+
freezeMethods: qt,
|
|
216
|
+
toObjectSet: Bt,
|
|
217
|
+
toCamelCase: xt,
|
|
218
|
+
noop: Lt,
|
|
219
|
+
toFiniteNumber: _t,
|
|
220
|
+
findKey: Le,
|
|
221
|
+
global: _e,
|
|
222
|
+
isContextDefined: Fe,
|
|
223
223
|
ALPHABET: $e,
|
|
224
|
-
generateString:
|
|
225
|
-
isSpecCompliantForm:
|
|
226
|
-
toJSONObject:
|
|
227
|
-
isAsyncFn:
|
|
228
|
-
isThenable:
|
|
224
|
+
generateString: Ft,
|
|
225
|
+
isSpecCompliantForm: Dt,
|
|
226
|
+
toJSONObject: $t,
|
|
227
|
+
isAsyncFn: It,
|
|
228
|
+
isThenable: jt
|
|
229
229
|
};
|
|
230
|
-
function
|
|
230
|
+
function p(e, t, r, n, 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), r && (this.config = r), n && (this.request = n), s && (this.response = s);
|
|
232
232
|
}
|
|
233
|
-
u.inherits(
|
|
233
|
+
u.inherits(p, Error, {
|
|
234
234
|
toJSON: function() {
|
|
235
235
|
return {
|
|
236
236
|
// Standard
|
|
@@ -251,7 +251,7 @@ u.inherits(m, Error, {
|
|
|
251
251
|
};
|
|
252
252
|
}
|
|
253
253
|
});
|
|
254
|
-
const Ie =
|
|
254
|
+
const Ie = p.prototype, je = {};
|
|
255
255
|
[
|
|
256
256
|
"ERR_BAD_OPTION_VALUE",
|
|
257
257
|
"ERR_BAD_OPTION",
|
|
@@ -269,95 +269,95 @@ const Ie = m.prototype, je = {};
|
|
|
269
269
|
].forEach((e) => {
|
|
270
270
|
je[e] = { value: e };
|
|
271
271
|
});
|
|
272
|
-
Object.defineProperties(
|
|
272
|
+
Object.defineProperties(p, je);
|
|
273
273
|
Object.defineProperty(Ie, "isAxiosError", { value: !0 });
|
|
274
|
-
|
|
275
|
-
const
|
|
276
|
-
return u.toFlatObject(e,
|
|
277
|
-
return
|
|
278
|
-
}, (c) => c !== "isAxiosError"),
|
|
274
|
+
p.from = (e, t, r, n, s, o) => {
|
|
275
|
+
const i = Object.create(Ie);
|
|
276
|
+
return u.toFlatObject(e, i, function(l) {
|
|
277
|
+
return l !== Error.prototype;
|
|
278
|
+
}, (c) => c !== "isAxiosError"), p.call(i, e.message, t, r, n, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
279
279
|
};
|
|
280
|
-
const
|
|
281
|
-
function
|
|
280
|
+
const Ht = null;
|
|
281
|
+
function ne(e) {
|
|
282
282
|
return u.isPlainObject(e) || u.isArray(e);
|
|
283
283
|
}
|
|
284
284
|
function He(e) {
|
|
285
285
|
return u.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
return e ? e.concat(t).map(function(s,
|
|
289
|
-
return s = He(s), !r &&
|
|
287
|
+
function ye(e, t, r) {
|
|
288
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
289
|
+
return s = He(s), !r && o ? "[" + s + "]" : s;
|
|
290
290
|
}).join(r ? "." : "") : t;
|
|
291
291
|
}
|
|
292
|
-
function
|
|
293
|
-
return u.isArray(e) && !e.some(
|
|
292
|
+
function Jt(e) {
|
|
293
|
+
return u.isArray(e) && !e.some(ne);
|
|
294
294
|
}
|
|
295
|
-
const
|
|
295
|
+
const zt = u.toFlatObject(u, {}, null, function(t) {
|
|
296
296
|
return /^is[A-Z]/.test(t);
|
|
297
297
|
});
|
|
298
|
-
function
|
|
298
|
+
function W(e, t, r) {
|
|
299
299
|
if (!u.isObject(e))
|
|
300
300
|
throw new TypeError("target must be an object");
|
|
301
301
|
t = t || new FormData(), r = u.toFlatObject(r, {
|
|
302
302
|
metaTokens: !0,
|
|
303
303
|
dots: !1,
|
|
304
304
|
indexes: !1
|
|
305
|
-
}, !1, function(
|
|
306
|
-
return !u.isUndefined(
|
|
305
|
+
}, !1, function(y, T) {
|
|
306
|
+
return !u.isUndefined(T[y]);
|
|
307
307
|
});
|
|
308
|
-
const n = r.metaTokens, s = r.visitor || a,
|
|
308
|
+
const n = r.metaTokens, s = r.visitor || a, o = r.dots, i = r.indexes, l = (r.Blob || typeof Blob < "u" && Blob) && u.isSpecCompliantForm(t);
|
|
309
309
|
if (!u.isFunction(s))
|
|
310
310
|
throw new TypeError("visitor must be a function");
|
|
311
|
-
function
|
|
311
|
+
function f(h) {
|
|
312
312
|
if (h === null)
|
|
313
313
|
return "";
|
|
314
314
|
if (u.isDate(h))
|
|
315
315
|
return h.toISOString();
|
|
316
|
-
if (!
|
|
317
|
-
throw new
|
|
318
|
-
return u.isArrayBuffer(h) || u.isTypedArray(h) ?
|
|
316
|
+
if (!l && u.isBlob(h))
|
|
317
|
+
throw new p("Blob is not supported. Use a Buffer instead.");
|
|
318
|
+
return u.isArrayBuffer(h) || u.isTypedArray(h) ? l && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
319
319
|
}
|
|
320
|
-
function a(h,
|
|
321
|
-
let
|
|
322
|
-
if (h && !
|
|
323
|
-
if (u.endsWith(
|
|
324
|
-
|
|
325
|
-
else if (u.isArray(h) &&
|
|
326
|
-
return
|
|
327
|
-
!(u.isUndefined(
|
|
320
|
+
function a(h, y, T) {
|
|
321
|
+
let S = h;
|
|
322
|
+
if (h && !T && typeof h == "object") {
|
|
323
|
+
if (u.endsWith(y, "{}"))
|
|
324
|
+
y = n ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
325
|
+
else if (u.isArray(h) && Jt(h) || (u.isFileList(h) || u.endsWith(y, "[]")) && (S = u.toArray(h)))
|
|
326
|
+
return y = He(y), S.forEach(function(w, F) {
|
|
327
|
+
!(u.isUndefined(w) || w === null) && t.append(
|
|
328
328
|
// eslint-disable-next-line no-nested-ternary
|
|
329
|
-
|
|
330
|
-
|
|
329
|
+
i === !0 ? ye([y], F, o) : i === null ? y : y + "[]",
|
|
330
|
+
f(w)
|
|
331
331
|
);
|
|
332
332
|
}), !1;
|
|
333
333
|
}
|
|
334
|
-
return
|
|
334
|
+
return ne(h) ? !0 : (t.append(ye(T, y, o), f(h)), !1);
|
|
335
335
|
}
|
|
336
|
-
const
|
|
336
|
+
const d = [], g = Object.assign(zt, {
|
|
337
337
|
defaultVisitor: a,
|
|
338
|
-
convertValue:
|
|
339
|
-
isVisitable:
|
|
338
|
+
convertValue: f,
|
|
339
|
+
isVisitable: ne
|
|
340
340
|
});
|
|
341
|
-
function
|
|
341
|
+
function m(h, y) {
|
|
342
342
|
if (!u.isUndefined(h)) {
|
|
343
|
-
if (
|
|
344
|
-
throw Error("Circular reference detected in " +
|
|
345
|
-
|
|
346
|
-
(!(u.isUndefined(
|
|
343
|
+
if (d.indexOf(h) !== -1)
|
|
344
|
+
throw Error("Circular reference detected in " + y.join("."));
|
|
345
|
+
d.push(h), u.forEach(h, function(S, N) {
|
|
346
|
+
(!(u.isUndefined(S) || S === null) && s.call(
|
|
347
347
|
t,
|
|
348
|
-
|
|
348
|
+
S,
|
|
349
349
|
u.isString(N) ? N.trim() : N,
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
)) === !0 &&
|
|
353
|
-
}),
|
|
350
|
+
y,
|
|
351
|
+
g
|
|
352
|
+
)) === !0 && m(S, y ? y.concat(N) : [N]);
|
|
353
|
+
}), d.pop();
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
if (!u.isObject(e))
|
|
357
357
|
throw new TypeError("data must be an object");
|
|
358
|
-
return
|
|
358
|
+
return m(e), t;
|
|
359
359
|
}
|
|
360
|
-
function
|
|
360
|
+
function ge(e) {
|
|
361
361
|
const t = {
|
|
362
362
|
"!": "%21",
|
|
363
363
|
"'": "%27",
|
|
@@ -371,17 +371,17 @@ function we(e) {
|
|
|
371
371
|
return t[n];
|
|
372
372
|
});
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
this._pairs = [], e &&
|
|
374
|
+
function le(e, t) {
|
|
375
|
+
this._pairs = [], e && W(e, this, t);
|
|
376
376
|
}
|
|
377
|
-
const Je =
|
|
377
|
+
const Je = le.prototype;
|
|
378
378
|
Je.append = function(t, r) {
|
|
379
379
|
this._pairs.push([t, r]);
|
|
380
380
|
};
|
|
381
381
|
Je.toString = function(t) {
|
|
382
382
|
const r = t ? function(n) {
|
|
383
|
-
return t.call(this, n,
|
|
384
|
-
} :
|
|
383
|
+
return t.call(this, n, ge);
|
|
384
|
+
} : ge;
|
|
385
385
|
return this._pairs.map(function(s) {
|
|
386
386
|
return r(s[0]) + "=" + r(s[1]);
|
|
387
387
|
}, "").join("&");
|
|
@@ -389,18 +389,18 @@ Je.toString = function(t) {
|
|
|
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
|
|
392
|
+
function ze(e, t, r) {
|
|
393
393
|
if (!t)
|
|
394
394
|
return e;
|
|
395
395
|
const n = r && r.encode || Mt, s = r && r.serialize;
|
|
396
|
-
let
|
|
397
|
-
if (s ?
|
|
398
|
-
const
|
|
399
|
-
|
|
396
|
+
let o;
|
|
397
|
+
if (s ? o = s(t, r) : o = u.isURLSearchParams(t) ? t.toString() : new le(t, r).toString(n), 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 we {
|
|
404
404
|
constructor() {
|
|
405
405
|
this.handlers = [];
|
|
406
406
|
}
|
|
@@ -454,65 +454,65 @@ class be {
|
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const Me = {
|
|
458
458
|
silentJSONParsing: !0,
|
|
459
459
|
forcedJSONParsing: !0,
|
|
460
460
|
clarifyTimeoutError: !1
|
|
461
|
-
},
|
|
461
|
+
}, Vt = typeof URLSearchParams < "u" ? URLSearchParams : le, vt = typeof FormData < "u" ? FormData : null, Gt = typeof Blob < "u" ? Blob : null, Kt = {
|
|
462
462
|
isBrowser: !0,
|
|
463
463
|
classes: {
|
|
464
|
-
URLSearchParams:
|
|
465
|
-
FormData:
|
|
464
|
+
URLSearchParams: Vt,
|
|
465
|
+
FormData: vt,
|
|
466
466
|
Blob: Gt
|
|
467
467
|
},
|
|
468
468
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
469
|
-
},
|
|
470
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
469
|
+
}, fe = typeof window < "u" && typeof document < "u", Wt = ((e) => fe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Qt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
470
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xt = fe && window.location.href || "http://localhost", Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
471
471
|
__proto__: null,
|
|
472
|
-
hasBrowserEnv:
|
|
473
|
-
hasStandardBrowserEnv:
|
|
474
|
-
hasStandardBrowserWebWorkerEnv:
|
|
475
|
-
origin:
|
|
472
|
+
hasBrowserEnv: fe,
|
|
473
|
+
hasStandardBrowserEnv: Wt,
|
|
474
|
+
hasStandardBrowserWebWorkerEnv: Qt,
|
|
475
|
+
origin: Xt
|
|
476
476
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
477
|
-
...
|
|
477
|
+
...Zt,
|
|
478
478
|
...Kt
|
|
479
479
|
};
|
|
480
|
-
function
|
|
481
|
-
return
|
|
482
|
-
visitor: function(r, n, s,
|
|
483
|
-
return A.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) :
|
|
480
|
+
function Yt(e, t) {
|
|
481
|
+
return W(e, new A.classes.URLSearchParams(), Object.assign({
|
|
482
|
+
visitor: function(r, n, s, o) {
|
|
483
|
+
return A.isNode && u.isBuffer(r) ? (this.append(n, r.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
484
484
|
}
|
|
485
485
|
}, t));
|
|
486
486
|
}
|
|
487
|
-
function
|
|
487
|
+
function er(e) {
|
|
488
488
|
return u.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function tr(e) {
|
|
491
491
|
const t = {}, r = Object.keys(e);
|
|
492
492
|
let n;
|
|
493
493
|
const s = r.length;
|
|
494
|
-
let
|
|
494
|
+
let o;
|
|
495
495
|
for (n = 0; n < s; n++)
|
|
496
|
-
|
|
496
|
+
o = r[n], t[o] = e[o];
|
|
497
497
|
return t;
|
|
498
498
|
}
|
|
499
499
|
function Ve(e) {
|
|
500
|
-
function t(r, n, s,
|
|
501
|
-
let
|
|
502
|
-
if (
|
|
500
|
+
function t(r, n, s, o) {
|
|
501
|
+
let i = r[o++];
|
|
502
|
+
if (i === "__proto__")
|
|
503
503
|
return !0;
|
|
504
|
-
const c = Number.isFinite(+
|
|
505
|
-
return
|
|
504
|
+
const c = Number.isFinite(+i), l = o >= r.length;
|
|
505
|
+
return i = !i && u.isArray(s) ? s.length : i, l ? (u.hasOwnProp(s, i) ? s[i] = [s[i], n] : s[i] = n, !c) : ((!s[i] || !u.isObject(s[i])) && (s[i] = []), t(r, n, s[i], o) && u.isArray(s[i]) && (s[i] = tr(s[i])), !c);
|
|
506
506
|
}
|
|
507
507
|
if (u.isFormData(e) && u.isFunction(e.entries)) {
|
|
508
508
|
const r = {};
|
|
509
509
|
return u.forEachEntry(e, (n, s) => {
|
|
510
|
-
t(
|
|
510
|
+
t(er(n), s, r, 0);
|
|
511
511
|
}), r;
|
|
512
512
|
}
|
|
513
513
|
return null;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function rr(e, t, r) {
|
|
516
516
|
if (u.isString(e))
|
|
517
517
|
try {
|
|
518
518
|
return (t || JSON.parse)(e), u.trim(e);
|
|
@@ -523,11 +523,11 @@ function tn(e, t, r) {
|
|
|
523
523
|
return (r || JSON.stringify)(e);
|
|
524
524
|
}
|
|
525
525
|
const j = {
|
|
526
|
-
transitional:
|
|
526
|
+
transitional: Me,
|
|
527
527
|
adapter: ["xhr", "http", "fetch"],
|
|
528
528
|
transformRequest: [function(t, r) {
|
|
529
|
-
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1,
|
|
530
|
-
if (
|
|
529
|
+
const n = r.getContentType() || "", s = n.indexOf("application/json") > -1, o = u.isObject(t);
|
|
530
|
+
if (o && u.isHTMLForm(t) && (t = new FormData(t)), u.isFormData(t))
|
|
531
531
|
return s ? JSON.stringify(Ve(t)) : t;
|
|
532
532
|
if (u.isArrayBuffer(t) || u.isBuffer(t) || u.isStream(t) || u.isFile(t) || u.isBlob(t) || u.isReadableStream(t))
|
|
533
533
|
return t;
|
|
@@ -536,31 +536,31 @@ const j = {
|
|
|
536
536
|
if (u.isURLSearchParams(t))
|
|
537
537
|
return r.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
538
538
|
let c;
|
|
539
|
-
if (
|
|
539
|
+
if (o) {
|
|
540
540
|
if (n.indexOf("application/x-www-form-urlencoded") > -1)
|
|
541
|
-
return
|
|
541
|
+
return Yt(t, this.formSerializer).toString();
|
|
542
542
|
if ((c = u.isFileList(t)) || n.indexOf("multipart/form-data") > -1) {
|
|
543
|
-
const
|
|
544
|
-
return
|
|
543
|
+
const l = this.env && this.env.FormData;
|
|
544
|
+
return W(
|
|
545
545
|
c ? { "files[]": t } : t,
|
|
546
|
-
|
|
546
|
+
l && new l(),
|
|
547
547
|
this.formSerializer
|
|
548
548
|
);
|
|
549
549
|
}
|
|
550
550
|
}
|
|
551
|
-
return
|
|
551
|
+
return o || s ? (r.setContentType("application/json", !1), rr(t)) : t;
|
|
552
552
|
}],
|
|
553
553
|
transformResponse: [function(t) {
|
|
554
554
|
const r = this.transitional || j.transitional, n = r && r.forcedJSONParsing, s = this.responseType === "json";
|
|
555
555
|
if (u.isResponse(t) || u.isReadableStream(t))
|
|
556
556
|
return t;
|
|
557
557
|
if (t && u.isString(t) && (n && !this.responseType || s)) {
|
|
558
|
-
const
|
|
558
|
+
const i = !(r && r.silentJSONParsing) && s;
|
|
559
559
|
try {
|
|
560
560
|
return JSON.parse(t);
|
|
561
561
|
} catch (c) {
|
|
562
|
-
if (
|
|
563
|
-
throw c.name === "SyntaxError" ?
|
|
562
|
+
if (i)
|
|
563
|
+
throw c.name === "SyntaxError" ? p.from(c, p.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return t;
|
|
@@ -591,7 +591,7 @@ const j = {
|
|
|
591
591
|
u.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
592
592
|
j.headers[e] = {};
|
|
593
593
|
});
|
|
594
|
-
const
|
|
594
|
+
const nr = u.toObjectSet([
|
|
595
595
|
"age",
|
|
596
596
|
"authorization",
|
|
597
597
|
"content-length",
|
|
@@ -609,29 +609,29 @@ const nn = u.toObjectSet([
|
|
|
609
609
|
"referer",
|
|
610
610
|
"retry-after",
|
|
611
611
|
"user-agent"
|
|
612
|
-
]),
|
|
612
|
+
]), sr = (e) => {
|
|
613
613
|
const t = {};
|
|
614
614
|
let r, n, s;
|
|
615
615
|
return e && e.split(`
|
|
616
|
-
`).forEach(function(
|
|
617
|
-
s =
|
|
616
|
+
`).forEach(function(i) {
|
|
617
|
+
s = i.indexOf(":"), r = i.substring(0, s).trim().toLowerCase(), n = i.substring(s + 1).trim(), !(!r || t[r] && nr[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
|
+
}, be = Symbol("internals");
|
|
620
620
|
function D(e) {
|
|
621
621
|
return e && String(e).trim().toLowerCase();
|
|
622
622
|
}
|
|
623
623
|
function z(e) {
|
|
624
624
|
return e === !1 || e == null ? e : u.isArray(e) ? e.map(z) : String(e);
|
|
625
625
|
}
|
|
626
|
-
function
|
|
626
|
+
function or(e) {
|
|
627
627
|
const t = /* @__PURE__ */ Object.create(null), r = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
628
628
|
let n;
|
|
629
629
|
for (; n = r.exec(e); )
|
|
630
630
|
t[n[1]] = n[2];
|
|
631
631
|
return t;
|
|
632
632
|
}
|
|
633
|
-
const
|
|
634
|
-
function
|
|
633
|
+
const ir = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
634
|
+
function Z(e, t, r, n, s) {
|
|
635
635
|
if (u.isFunction(n))
|
|
636
636
|
return n.call(this, t, r);
|
|
637
637
|
if (s && (t = r), !!u.isString(t)) {
|
|
@@ -641,15 +641,15 @@ function Y(e, t, r, n, s) {
|
|
|
641
641
|
return n.test(t);
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
|
-
function
|
|
644
|
+
function ar(e) {
|
|
645
645
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, r, n) => r.toUpperCase() + n);
|
|
646
646
|
}
|
|
647
|
-
function
|
|
647
|
+
function cr(e, t) {
|
|
648
648
|
const r = u.toCamelCase(" " + t);
|
|
649
649
|
["get", "set", "has"].forEach((n) => {
|
|
650
650
|
Object.defineProperty(e, n + r, {
|
|
651
|
-
value: function(s,
|
|
652
|
-
return this[n].call(this, t, s,
|
|
651
|
+
value: function(s, o, i) {
|
|
652
|
+
return this[n].call(this, t, s, o, i);
|
|
653
653
|
},
|
|
654
654
|
configurable: !0
|
|
655
655
|
});
|
|
@@ -661,23 +661,23 @@ let E = class {
|
|
|
661
661
|
}
|
|
662
662
|
set(t, r, n) {
|
|
663
663
|
const s = this;
|
|
664
|
-
function
|
|
665
|
-
const a = D(
|
|
664
|
+
function o(c, l, f) {
|
|
665
|
+
const a = D(l);
|
|
666
666
|
if (!a)
|
|
667
667
|
throw new Error("header name must be a non-empty string");
|
|
668
|
-
const
|
|
669
|
-
(!
|
|
668
|
+
const d = u.findKey(s, a);
|
|
669
|
+
(!d || s[d] === void 0 || f === !0 || f === void 0 && s[d] !== !1) && (s[d || l] = z(c));
|
|
670
670
|
}
|
|
671
|
-
const
|
|
671
|
+
const i = (c, l) => u.forEach(c, (f, a) => o(f, a, l));
|
|
672
672
|
if (u.isPlainObject(t) || t instanceof this.constructor)
|
|
673
|
-
|
|
674
|
-
else if (u.isString(t) && (t = t.trim()) && !
|
|
675
|
-
|
|
673
|
+
i(t, r);
|
|
674
|
+
else if (u.isString(t) && (t = t.trim()) && !ir(t))
|
|
675
|
+
i(sr(t), r);
|
|
676
676
|
else if (u.isHeaders(t))
|
|
677
|
-
for (const [c,
|
|
678
|
-
|
|
677
|
+
for (const [c, l] of t.entries())
|
|
678
|
+
o(l, c, n);
|
|
679
679
|
else
|
|
680
|
-
t != null &&
|
|
680
|
+
t != null && o(r, t, n);
|
|
681
681
|
return this;
|
|
682
682
|
}
|
|
683
683
|
get(t, r) {
|
|
@@ -688,7 +688,7 @@ let E = class {
|
|
|
688
688
|
if (!r)
|
|
689
689
|
return s;
|
|
690
690
|
if (r === !0)
|
|
691
|
-
return
|
|
691
|
+
return or(s);
|
|
692
692
|
if (u.isFunction(r))
|
|
693
693
|
return r.call(this, s, n);
|
|
694
694
|
if (u.isRegExp(r))
|
|
@@ -700,40 +700,40 @@ let E = class {
|
|
|
700
700
|
has(t, r) {
|
|
701
701
|
if (t = D(t), t) {
|
|
702
702
|
const n = u.findKey(this, t);
|
|
703
|
-
return !!(n && this[n] !== void 0 && (!r ||
|
|
703
|
+
return !!(n && this[n] !== void 0 && (!r || Z(this, this[n], n, r)));
|
|
704
704
|
}
|
|
705
705
|
return !1;
|
|
706
706
|
}
|
|
707
707
|
delete(t, r) {
|
|
708
708
|
const n = this;
|
|
709
709
|
let s = !1;
|
|
710
|
-
function i
|
|
711
|
-
if (
|
|
712
|
-
const c = u.findKey(n,
|
|
713
|
-
c && (!r ||
|
|
710
|
+
function o(i) {
|
|
711
|
+
if (i = D(i), i) {
|
|
712
|
+
const c = u.findKey(n, i);
|
|
713
|
+
c && (!r || Z(n, n[c], c, r)) && (delete n[c], s = !0);
|
|
714
714
|
}
|
|
715
715
|
}
|
|
716
|
-
return u.isArray(t) ? t.forEach(
|
|
716
|
+
return u.isArray(t) ? t.forEach(o) : o(t), s;
|
|
717
717
|
}
|
|
718
718
|
clear(t) {
|
|
719
719
|
const r = Object.keys(this);
|
|
720
720
|
let n = r.length, s = !1;
|
|
721
721
|
for (; n--; ) {
|
|
722
|
-
const
|
|
723
|
-
(!t ||
|
|
722
|
+
const o = r[n];
|
|
723
|
+
(!t || Z(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 r = this, n = {};
|
|
729
|
-
return u.forEach(this, (s,
|
|
730
|
-
const
|
|
731
|
-
if (
|
|
732
|
-
r[
|
|
729
|
+
return u.forEach(this, (s, o) => {
|
|
730
|
+
const i = u.findKey(n, o);
|
|
731
|
+
if (i) {
|
|
732
|
+
r[i] = z(s), delete r[o];
|
|
733
733
|
return;
|
|
734
734
|
}
|
|
735
|
-
const c = t ?
|
|
736
|
-
c !==
|
|
735
|
+
const c = t ? ar(o) : String(o).trim();
|
|
736
|
+
c !== o && delete r[o], r[c] = z(s), n[c] = !0;
|
|
737
737
|
}), this;
|
|
738
738
|
}
|
|
739
739
|
concat(...t) {
|
|
@@ -763,14 +763,14 @@ let E = class {
|
|
|
763
763
|
return r.forEach((s) => n.set(s)), n;
|
|
764
764
|
}
|
|
765
765
|
static accessor(t) {
|
|
766
|
-
const n = (this[
|
|
766
|
+
const n = (this[be] = this[be] = {
|
|
767
767
|
accessors: {}
|
|
768
768
|
}).accessors, s = this.prototype;
|
|
769
|
-
function i
|
|
770
|
-
const c = D(
|
|
771
|
-
n[c] || (
|
|
769
|
+
function o(i) {
|
|
770
|
+
const c = D(i);
|
|
771
|
+
n[c] || (cr(s, i), n[c] = !0);
|
|
772
772
|
}
|
|
773
|
-
return u.isArray(t) ? t.forEach(
|
|
773
|
+
return u.isArray(t) ? t.forEach(o) : o(t), this;
|
|
774
774
|
}
|
|
775
775
|
};
|
|
776
776
|
E.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -784,90 +784,90 @@ u.reduceDescriptors(E.prototype, ({ value: e }, t) => {
|
|
|
784
784
|
};
|
|
785
785
|
});
|
|
786
786
|
u.freezeMethods(E);
|
|
787
|
-
function
|
|
787
|
+
function Y(e, t) {
|
|
788
788
|
const r = this || j, n = t || r, s = E.from(n.headers);
|
|
789
|
-
let
|
|
789
|
+
let o = n.data;
|
|
790
790
|
return u.forEach(e, function(c) {
|
|
791
|
-
|
|
792
|
-
}), s.normalize(),
|
|
791
|
+
o = c.call(r, o, s.normalize(), t ? t.status : void 0);
|
|
792
|
+
}), s.normalize(), o;
|
|
793
793
|
}
|
|
794
|
-
function
|
|
794
|
+
function ve(e) {
|
|
795
795
|
return !!(e && e.__CANCEL__);
|
|
796
796
|
}
|
|
797
|
-
function
|
|
798
|
-
|
|
797
|
+
function _(e, t, r) {
|
|
798
|
+
p.call(this, e ?? "canceled", p.ERR_CANCELED, t, r), this.name = "CanceledError";
|
|
799
799
|
}
|
|
800
|
-
u.inherits(
|
|
800
|
+
u.inherits(_, p, {
|
|
801
801
|
__CANCEL__: !0
|
|
802
802
|
});
|
|
803
|
-
function
|
|
803
|
+
function Ge(e, t, r) {
|
|
804
804
|
const n = r.config.validateStatus;
|
|
805
|
-
!r.status || !n || n(r.status) ? e(r) : t(new
|
|
805
|
+
!r.status || !n || n(r.status) ? e(r) : t(new p(
|
|
806
806
|
"Request failed with status code " + r.status,
|
|
807
|
-
[
|
|
807
|
+
[p.ERR_BAD_REQUEST, p.ERR_BAD_RESPONSE][Math.floor(r.status / 100) - 4],
|
|
808
808
|
r.config,
|
|
809
809
|
r.request,
|
|
810
810
|
r
|
|
811
811
|
));
|
|
812
812
|
}
|
|
813
|
-
function
|
|
813
|
+
function ur(e) {
|
|
814
814
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
815
815
|
return t && t[1] || "";
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function lr(e, t) {
|
|
818
818
|
e = e || 10;
|
|
819
819
|
const r = new Array(e), n = new Array(e);
|
|
820
|
-
let s = 0,
|
|
821
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
822
|
-
const
|
|
823
|
-
|
|
824
|
-
let
|
|
825
|
-
for (;
|
|
826
|
-
|
|
827
|
-
if (s = (s + 1) % e, s ===
|
|
820
|
+
let s = 0, o = 0, i;
|
|
821
|
+
return t = t !== void 0 ? t : 1e3, function(l) {
|
|
822
|
+
const f = Date.now(), a = n[o];
|
|
823
|
+
i || (i = f), r[s] = l, n[s] = f;
|
|
824
|
+
let d = o, g = 0;
|
|
825
|
+
for (; d !== s; )
|
|
826
|
+
g += r[d++], d = d % e;
|
|
827
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - i < t)
|
|
828
828
|
return;
|
|
829
|
-
const
|
|
830
|
-
return
|
|
829
|
+
const m = a && f - a;
|
|
830
|
+
return m ? Math.round(g * 1e3 / m) : void 0;
|
|
831
831
|
};
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function fr(e, t) {
|
|
834
834
|
let r = 0;
|
|
835
835
|
const n = 1e3 / t;
|
|
836
836
|
let s = null;
|
|
837
837
|
return function() {
|
|
838
|
-
const
|
|
839
|
-
if (
|
|
838
|
+
const i = this === !0, c = Date.now();
|
|
839
|
+
if (i || c - r > n)
|
|
840
840
|
return s && (clearTimeout(s), s = null), r = c, e.apply(null, arguments);
|
|
841
841
|
s || (s = setTimeout(() => (s = null, r = Date.now(), e.apply(null, arguments)), n - (c - r)));
|
|
842
842
|
};
|
|
843
843
|
}
|
|
844
|
-
const
|
|
844
|
+
const M = (e, t, r = 3) => {
|
|
845
845
|
let n = 0;
|
|
846
|
-
const s =
|
|
847
|
-
return
|
|
848
|
-
const
|
|
849
|
-
n =
|
|
850
|
-
const
|
|
851
|
-
loaded:
|
|
846
|
+
const s = lr(50, 250);
|
|
847
|
+
return fr((o) => {
|
|
848
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, l = i - n, f = s(l), a = i <= c;
|
|
849
|
+
n = i;
|
|
850
|
+
const d = {
|
|
851
|
+
loaded: i,
|
|
852
852
|
total: c,
|
|
853
|
-
progress: c ?
|
|
854
|
-
bytes:
|
|
855
|
-
rate:
|
|
856
|
-
estimated:
|
|
857
|
-
event:
|
|
853
|
+
progress: c ? i / c : void 0,
|
|
854
|
+
bytes: l,
|
|
855
|
+
rate: f || void 0,
|
|
856
|
+
estimated: f && c && a ? (c - i) / f : void 0,
|
|
857
|
+
event: o,
|
|
858
858
|
lengthComputable: c != null
|
|
859
859
|
};
|
|
860
|
-
|
|
860
|
+
d[t ? "download" : "upload"] = !0, e(d);
|
|
861
861
|
}, r);
|
|
862
|
-
},
|
|
862
|
+
}, dr = 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
866
|
const t = /(msie|trident)/i.test(navigator.userAgent), r = document.createElement("a");
|
|
867
867
|
let n;
|
|
868
|
-
function s(
|
|
869
|
-
let
|
|
870
|
-
return t && (r.setAttribute("href",
|
|
868
|
+
function s(o) {
|
|
869
|
+
let i = o;
|
|
870
|
+
return t && (r.setAttribute("href", i), i = r.href), r.setAttribute("href", i), {
|
|
871
871
|
href: r.href,
|
|
872
872
|
protocol: r.protocol ? r.protocol.replace(/:$/, "") : "",
|
|
873
873
|
host: r.host,
|
|
@@ -878,8 +878,8 @@ const V = (e, t, r = 3) => {
|
|
|
878
878
|
pathname: r.pathname.charAt(0) === "/" ? r.pathname : "/" + r.pathname
|
|
879
879
|
};
|
|
880
880
|
}
|
|
881
|
-
return n = s(window.location.href), function(
|
|
882
|
-
const c = u.isString(
|
|
881
|
+
return n = s(window.location.href), function(i) {
|
|
882
|
+
const c = u.isString(i) ? s(i) : i;
|
|
883
883
|
return c.protocol === n.protocol && c.host === n.host;
|
|
884
884
|
};
|
|
885
885
|
}()
|
|
@@ -890,12 +890,12 @@ const V = (e, t, r = 3) => {
|
|
|
890
890
|
return !0;
|
|
891
891
|
};
|
|
892
892
|
}()
|
|
893
|
-
),
|
|
893
|
+
), hr = A.hasStandardBrowserEnv ? (
|
|
894
894
|
// Standard browser envs support document.cookie
|
|
895
895
|
{
|
|
896
|
-
write(e, t, r, n, s,
|
|
897
|
-
const
|
|
898
|
-
u.isNumber(r) &&
|
|
896
|
+
write(e, t, r, n, s, o) {
|
|
897
|
+
const i = [e + "=" + encodeURIComponent(t)];
|
|
898
|
+
u.isNumber(r) && i.push("expires=" + new Date(r).toGMTString()), u.isString(n) && i.push("path=" + n), u.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 + ")=([^;]*)"));
|
|
@@ -917,183 +917,183 @@ const V = (e, t, r = 3) => {
|
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
);
|
|
920
|
-
function
|
|
920
|
+
function pr(e) {
|
|
921
921
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
922
922
|
}
|
|
923
|
-
function
|
|
923
|
+
function mr(e, t) {
|
|
924
924
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
return e && !
|
|
926
|
+
function Ke(e, t) {
|
|
927
|
+
return e && !pr(t) ? mr(e, t) : t;
|
|
928
928
|
}
|
|
929
929
|
const Te = (e) => e instanceof E ? { ...e } : e;
|
|
930
|
-
function
|
|
930
|
+
function q(e, t) {
|
|
931
931
|
t = t || {};
|
|
932
932
|
const r = {};
|
|
933
|
-
function n(
|
|
934
|
-
return u.isPlainObject(
|
|
933
|
+
function n(f, a, d) {
|
|
934
|
+
return u.isPlainObject(f) && u.isPlainObject(a) ? u.merge.call({ caseless: d }, f, a) : u.isPlainObject(a) ? u.merge({}, a) : u.isArray(a) ? a.slice() : a;
|
|
935
935
|
}
|
|
936
|
-
function s(
|
|
936
|
+
function s(f, a, d) {
|
|
937
937
|
if (u.isUndefined(a)) {
|
|
938
|
-
if (!u.isUndefined(
|
|
939
|
-
return n(void 0,
|
|
938
|
+
if (!u.isUndefined(f))
|
|
939
|
+
return n(void 0, f, d);
|
|
940
940
|
} else
|
|
941
|
-
return n(
|
|
941
|
+
return n(f, a, d);
|
|
942
942
|
}
|
|
943
|
-
function
|
|
943
|
+
function o(f, a) {
|
|
944
944
|
if (!u.isUndefined(a))
|
|
945
945
|
return n(void 0, a);
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function i(f, a) {
|
|
948
948
|
if (u.isUndefined(a)) {
|
|
949
|
-
if (!u.isUndefined(
|
|
950
|
-
return n(void 0,
|
|
949
|
+
if (!u.isUndefined(f))
|
|
950
|
+
return n(void 0, f);
|
|
951
951
|
} else
|
|
952
952
|
return n(void 0, a);
|
|
953
953
|
}
|
|
954
|
-
function c(
|
|
955
|
-
if (
|
|
956
|
-
return n(
|
|
957
|
-
if (
|
|
958
|
-
return n(void 0,
|
|
954
|
+
function c(f, a, d) {
|
|
955
|
+
if (d in t)
|
|
956
|
+
return n(f, a);
|
|
957
|
+
if (d in e)
|
|
958
|
+
return n(void 0, f);
|
|
959
959
|
}
|
|
960
|
-
const
|
|
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:
|
|
960
|
+
const l = {
|
|
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: c,
|
|
989
|
-
headers: (
|
|
989
|
+
headers: (f, a) => s(Te(f), Te(a), !0)
|
|
990
990
|
};
|
|
991
991
|
return u.forEach(Object.keys(Object.assign({}, e, t)), function(a) {
|
|
992
|
-
const
|
|
993
|
-
u.isUndefined(
|
|
992
|
+
const d = l[a] || s, g = d(e[a], t[a], a);
|
|
993
|
+
u.isUndefined(g) && d !== c || (r[a] = g);
|
|
994
994
|
}), r;
|
|
995
995
|
}
|
|
996
996
|
const We = (e) => {
|
|
997
|
-
const t =
|
|
998
|
-
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName:
|
|
999
|
-
t.headers =
|
|
997
|
+
const t = q({}, e);
|
|
998
|
+
let { data: r, withXSRFToken: n, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
999
|
+
t.headers = i = E.from(i), t.url = ze(Ke(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
1000
1000
|
"Authorization",
|
|
1001
1001
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
1002
1002
|
);
|
|
1003
|
-
let
|
|
1003
|
+
let l;
|
|
1004
1004
|
if (u.isFormData(r)) {
|
|
1005
1005
|
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1006
|
-
|
|
1007
|
-
else if ((
|
|
1008
|
-
const [
|
|
1009
|
-
|
|
1006
|
+
i.setContentType(void 0);
|
|
1007
|
+
else if ((l = i.getContentType()) !== !1) {
|
|
1008
|
+
const [f, ...a] = l ? l.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1009
|
+
i.setContentType([f || "multipart/form-data", ...a].join("; "));
|
|
1010
1010
|
}
|
|
1011
1011
|
}
|
|
1012
|
-
if (A.hasStandardBrowserEnv && (n && u.isFunction(n) && (n = n(t)), n || n !== !1 &&
|
|
1013
|
-
const
|
|
1014
|
-
|
|
1012
|
+
if (A.hasStandardBrowserEnv && (n && u.isFunction(n) && (n = n(t)), n || n !== !1 && dr(t.url))) {
|
|
1013
|
+
const f = s && o && hr.read(o);
|
|
1014
|
+
f && i.set(s, f);
|
|
1015
1015
|
}
|
|
1016
1016
|
return t;
|
|
1017
|
-
},
|
|
1017
|
+
}, yr = typeof XMLHttpRequest < "u", gr = yr && function(e) {
|
|
1018
1018
|
return new Promise(function(r, n) {
|
|
1019
1019
|
const s = We(e);
|
|
1020
|
-
let
|
|
1021
|
-
const
|
|
1022
|
-
let { responseType: c } = s,
|
|
1023
|
-
function
|
|
1024
|
-
s.cancelToken && s.cancelToken.unsubscribe(
|
|
1020
|
+
let o = s.data;
|
|
1021
|
+
const i = E.from(s.headers).normalize();
|
|
1022
|
+
let { responseType: c } = s, l;
|
|
1023
|
+
function f() {
|
|
1024
|
+
s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
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 d() {
|
|
1029
1029
|
if (!a)
|
|
1030
1030
|
return;
|
|
1031
|
-
const
|
|
1031
|
+
const m = E.from(
|
|
1032
1032
|
"getAllResponseHeaders" in a && a.getAllResponseHeaders()
|
|
1033
|
-
),
|
|
1033
|
+
), y = {
|
|
1034
1034
|
data: !c || c === "text" || c === "json" ? a.responseText : a.response,
|
|
1035
1035
|
status: a.status,
|
|
1036
1036
|
statusText: a.statusText,
|
|
1037
|
-
headers:
|
|
1037
|
+
headers: m,
|
|
1038
1038
|
config: e,
|
|
1039
1039
|
request: a
|
|
1040
1040
|
};
|
|
1041
|
-
|
|
1042
|
-
r(
|
|
1043
|
-
}, function(
|
|
1044
|
-
n(
|
|
1045
|
-
},
|
|
1041
|
+
Ge(function(S) {
|
|
1042
|
+
r(S), f();
|
|
1043
|
+
}, function(S) {
|
|
1044
|
+
n(S), f();
|
|
1045
|
+
}, y), 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 = d : a.onreadystatechange = function() {
|
|
1048
|
+
!a || a.readyState !== 4 || a.status === 0 && !(a.responseURL && a.responseURL.indexOf("file:") === 0) || setTimeout(d);
|
|
1049
1049
|
}, a.onabort = function() {
|
|
1050
|
-
a && (n(new
|
|
1050
|
+
a && (n(new p("Request aborted", p.ECONNABORTED, s, a)), a = null);
|
|
1051
1051
|
}, a.onerror = function() {
|
|
1052
|
-
n(new
|
|
1052
|
+
n(new p("Network Error", p.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
|
|
1056
|
-
s.timeoutErrorMessage && (h = s.timeoutErrorMessage), n(new
|
|
1055
|
+
const y = s.transitional || Me;
|
|
1056
|
+
s.timeoutErrorMessage && (h = s.timeoutErrorMessage), n(new p(
|
|
1057
1057
|
h,
|
|
1058
|
-
|
|
1058
|
+
y.clarifyTimeoutError ? p.ETIMEDOUT : p.ECONNABORTED,
|
|
1059
1059
|
s,
|
|
1060
1060
|
a
|
|
1061
1061
|
)), a = null;
|
|
1062
|
-
},
|
|
1063
|
-
a.setRequestHeader(
|
|
1064
|
-
}), u.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), c && c !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress",
|
|
1065
|
-
a && (n(!
|
|
1066
|
-
}, s.cancelToken && s.cancelToken.subscribe(
|
|
1067
|
-
const
|
|
1068
|
-
if (
|
|
1069
|
-
n(new
|
|
1062
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in a && u.forEach(i.toJSON(), function(h, y) {
|
|
1063
|
+
a.setRequestHeader(y, h);
|
|
1064
|
+
}), u.isUndefined(s.withCredentials) || (a.withCredentials = !!s.withCredentials), c && c !== "json" && (a.responseType = s.responseType), typeof s.onDownloadProgress == "function" && a.addEventListener("progress", M(s.onDownloadProgress, !0)), typeof s.onUploadProgress == "function" && a.upload && a.upload.addEventListener("progress", M(s.onUploadProgress)), (s.cancelToken || s.signal) && (l = (m) => {
|
|
1065
|
+
a && (n(!m || m.type ? new _(null, e, a) : m), a.abort(), a = null);
|
|
1066
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1067
|
+
const g = ur(s.url);
|
|
1068
|
+
if (g && A.protocols.indexOf(g) === -1) {
|
|
1069
|
+
n(new p("Unsupported protocol " + g + ":", p.ERR_BAD_REQUEST, e));
|
|
1070
1070
|
return;
|
|
1071
1071
|
}
|
|
1072
|
-
a.send(
|
|
1072
|
+
a.send(o || null);
|
|
1073
1073
|
});
|
|
1074
|
-
},
|
|
1074
|
+
}, wr = (e, t) => {
|
|
1075
1075
|
let r = new AbortController(), n;
|
|
1076
|
-
const s = function(
|
|
1076
|
+
const s = function(l) {
|
|
1077
1077
|
if (!n) {
|
|
1078
|
-
n = !0,
|
|
1079
|
-
const
|
|
1080
|
-
r.abort(
|
|
1078
|
+
n = !0, i();
|
|
1079
|
+
const f = l instanceof Error ? l : this.reason;
|
|
1080
|
+
r.abort(f instanceof p ? f : new _(f instanceof Error ? f.message : f));
|
|
1081
1081
|
}
|
|
1082
1082
|
};
|
|
1083
|
-
let
|
|
1084
|
-
s(new
|
|
1083
|
+
let o = t && setTimeout(() => {
|
|
1084
|
+
s(new p(`timeout ${t} of ms exceeded`, p.ETIMEDOUT));
|
|
1085
1085
|
}, t);
|
|
1086
|
-
const
|
|
1087
|
-
e && (
|
|
1088
|
-
|
|
1086
|
+
const i = () => {
|
|
1087
|
+
e && (o && clearTimeout(o), o = null, e.forEach((l) => {
|
|
1088
|
+
l && (l.removeEventListener ? l.removeEventListener("abort", s) : l.unsubscribe(s));
|
|
1089
1089
|
}), e = null);
|
|
1090
1090
|
};
|
|
1091
|
-
e.forEach((
|
|
1091
|
+
e.forEach((l) => l && l.addEventListener && l.addEventListener("abort", s));
|
|
1092
1092
|
const { signal: c } = r;
|
|
1093
|
-
return c.unsubscribe =
|
|
1094
|
-
|
|
1093
|
+
return c.unsubscribe = i, [c, () => {
|
|
1094
|
+
o && clearTimeout(o), o = null;
|
|
1095
1095
|
}];
|
|
1096
|
-
},
|
|
1096
|
+
}, br = function* (e, t) {
|
|
1097
1097
|
let r = e.byteLength;
|
|
1098
1098
|
if (!t || r < t) {
|
|
1099
1099
|
yield e;
|
|
@@ -1102,37 +1102,37 @@ const We = (e) => {
|
|
|
1102
1102
|
let n = 0, s;
|
|
1103
1103
|
for (; n < r; )
|
|
1104
1104
|
s = n + t, yield e.slice(n, s), n = s;
|
|
1105
|
-
},
|
|
1105
|
+
}, Tr = async function* (e, t, r) {
|
|
1106
1106
|
for await (const n of e)
|
|
1107
|
-
yield*
|
|
1108
|
-
},
|
|
1109
|
-
const
|
|
1110
|
-
let
|
|
1107
|
+
yield* br(ArrayBuffer.isView(n) ? n : await r(String(n)), t);
|
|
1108
|
+
}, Se = (e, t, r, n, s) => {
|
|
1109
|
+
const o = Tr(e, t, s);
|
|
1110
|
+
let i = 0;
|
|
1111
1111
|
return new ReadableStream({
|
|
1112
1112
|
type: "bytes",
|
|
1113
1113
|
async pull(c) {
|
|
1114
|
-
const { done:
|
|
1115
|
-
if (
|
|
1114
|
+
const { done: l, value: f } = await o.next();
|
|
1115
|
+
if (l) {
|
|
1116
1116
|
c.close(), n();
|
|
1117
1117
|
return;
|
|
1118
1118
|
}
|
|
1119
|
-
let a =
|
|
1120
|
-
r && r(
|
|
1119
|
+
let a = f.byteLength;
|
|
1120
|
+
r && r(i += a), c.enqueue(new Uint8Array(f));
|
|
1121
1121
|
},
|
|
1122
1122
|
cancel(c) {
|
|
1123
|
-
return n(c),
|
|
1123
|
+
return n(c), o.return();
|
|
1124
1124
|
}
|
|
1125
1125
|
}, {
|
|
1126
1126
|
highWaterMark: 2
|
|
1127
1127
|
});
|
|
1128
|
-
},
|
|
1128
|
+
}, Ee = (e, t) => {
|
|
1129
1129
|
const r = e != null;
|
|
1130
1130
|
return (n) => setTimeout(() => t({
|
|
1131
1131
|
lengthComputable: r,
|
|
1132
1132
|
total: e,
|
|
1133
1133
|
loaded: n
|
|
1134
1134
|
}));
|
|
1135
|
-
},
|
|
1135
|
+
}, Q = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Qe = Q && typeof ReadableStream == "function", se = Q && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Sr = Qe && (() => {
|
|
1136
1136
|
let e = !1;
|
|
1137
1137
|
const t = new Request(A.origin, {
|
|
1138
1138
|
body: new ReadableStream(),
|
|
@@ -1142,22 +1142,22 @@ const We = (e) => {
|
|
|
1142
1142
|
}
|
|
1143
1143
|
}).headers.has("Content-Type");
|
|
1144
1144
|
return e && !t;
|
|
1145
|
-
})(),
|
|
1145
|
+
})(), Re = 64 * 1024, oe = Qe && !!(() => {
|
|
1146
1146
|
try {
|
|
1147
1147
|
return u.isReadableStream(new Response("").body);
|
|
1148
1148
|
} catch {
|
|
1149
1149
|
}
|
|
1150
|
-
})(),
|
|
1151
|
-
stream:
|
|
1150
|
+
})(), V = {
|
|
1151
|
+
stream: oe && ((e) => e.body)
|
|
1152
1152
|
};
|
|
1153
|
-
|
|
1153
|
+
Q && ((e) => {
|
|
1154
1154
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1155
|
-
!
|
|
1156
|
-
throw new
|
|
1155
|
+
!V[t] && (V[t] = u.isFunction(e[t]) ? (r) => r[t]() : (r, n) => {
|
|
1156
|
+
throw new p(`Response type '${t}' is not supported`, p.ERR_NOT_SUPPORT, n);
|
|
1157
1157
|
});
|
|
1158
1158
|
});
|
|
1159
1159
|
})(new Response());
|
|
1160
|
-
const
|
|
1160
|
+
const Er = async (e) => {
|
|
1161
1161
|
if (e == null)
|
|
1162
1162
|
return 0;
|
|
1163
1163
|
if (u.isBlob(e))
|
|
@@ -1167,96 +1167,96 @@ const En = async (e) => {
|
|
|
1167
1167
|
if (u.isArrayBufferView(e))
|
|
1168
1168
|
return e.byteLength;
|
|
1169
1169
|
if (u.isURLSearchParams(e) && (e = e + ""), u.isString(e))
|
|
1170
|
-
return (await
|
|
1171
|
-
},
|
|
1170
|
+
return (await se(e)).byteLength;
|
|
1171
|
+
}, Rr = async (e, t) => {
|
|
1172
1172
|
const r = u.toFiniteNumber(e.getContentLength());
|
|
1173
|
-
return r ??
|
|
1174
|
-
},
|
|
1173
|
+
return r ?? Er(t);
|
|
1174
|
+
}, Or = Q && (async (e) => {
|
|
1175
1175
|
let {
|
|
1176
1176
|
url: t,
|
|
1177
1177
|
method: r,
|
|
1178
1178
|
data: n,
|
|
1179
1179
|
signal: s,
|
|
1180
|
-
cancelToken:
|
|
1181
|
-
timeout:
|
|
1180
|
+
cancelToken: o,
|
|
1181
|
+
timeout: i,
|
|
1182
1182
|
onDownloadProgress: c,
|
|
1183
|
-
onUploadProgress:
|
|
1184
|
-
responseType:
|
|
1183
|
+
onUploadProgress: l,
|
|
1184
|
+
responseType: f,
|
|
1185
1185
|
headers: a,
|
|
1186
|
-
withCredentials:
|
|
1187
|
-
fetchOptions:
|
|
1186
|
+
withCredentials: d = "same-origin",
|
|
1187
|
+
fetchOptions: g
|
|
1188
1188
|
} = We(e);
|
|
1189
|
-
|
|
1190
|
-
let [
|
|
1191
|
-
const
|
|
1192
|
-
!
|
|
1193
|
-
|
|
1194
|
-
}),
|
|
1189
|
+
f = f ? (f + "").toLowerCase() : "text";
|
|
1190
|
+
let [m, h] = s || o || i ? wr([s, o], i) : [], y, T;
|
|
1191
|
+
const S = () => {
|
|
1192
|
+
!y && setTimeout(() => {
|
|
1193
|
+
m && m.unsubscribe();
|
|
1194
|
+
}), y = !0;
|
|
1195
1195
|
};
|
|
1196
1196
|
let N;
|
|
1197
1197
|
try {
|
|
1198
|
-
if (
|
|
1198
|
+
if (l && Sr && r !== "get" && r !== "head" && (N = await Rr(a, n)) !== 0) {
|
|
1199
1199
|
let k = new Request(t, {
|
|
1200
1200
|
method: "POST",
|
|
1201
1201
|
body: n,
|
|
1202
1202
|
duplex: "half"
|
|
1203
|
-
}),
|
|
1204
|
-
u.isFormData(n) && (
|
|
1203
|
+
}), B;
|
|
1204
|
+
u.isFormData(n) && (B = k.headers.get("content-type")) && a.setContentType(B), k.body && (n = Se(k.body, Re, Ee(
|
|
1205
1205
|
N,
|
|
1206
|
-
|
|
1207
|
-
), null,
|
|
1206
|
+
M(l)
|
|
1207
|
+
), null, se));
|
|
1208
1208
|
}
|
|
1209
|
-
u.isString(
|
|
1210
|
-
...
|
|
1211
|
-
signal:
|
|
1209
|
+
u.isString(d) || (d = d ? "cors" : "omit"), T = new Request(t, {
|
|
1210
|
+
...g,
|
|
1211
|
+
signal: m,
|
|
1212
1212
|
method: r.toUpperCase(),
|
|
1213
1213
|
headers: a.normalize().toJSON(),
|
|
1214
1214
|
body: n,
|
|
1215
1215
|
duplex: "half",
|
|
1216
|
-
withCredentials:
|
|
1216
|
+
withCredentials: d
|
|
1217
1217
|
});
|
|
1218
|
-
let
|
|
1219
|
-
const
|
|
1220
|
-
if (
|
|
1218
|
+
let w = await fetch(T);
|
|
1219
|
+
const F = oe && (f === "stream" || f === "response");
|
|
1220
|
+
if (oe && (c || F)) {
|
|
1221
1221
|
const k = {};
|
|
1222
|
-
["status", "statusText", "headers"].forEach((
|
|
1223
|
-
k[
|
|
1222
|
+
["status", "statusText", "headers"].forEach((he) => {
|
|
1223
|
+
k[he] = w[he];
|
|
1224
1224
|
});
|
|
1225
|
-
const
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
),
|
|
1225
|
+
const B = u.toFiniteNumber(w.headers.get("content-length"));
|
|
1226
|
+
w = new Response(
|
|
1227
|
+
Se(w.body, Re, c && Ee(
|
|
1228
|
+
B,
|
|
1229
|
+
M(c, !0)
|
|
1230
|
+
), F && S, se),
|
|
1231
1231
|
k
|
|
1232
1232
|
);
|
|
1233
1233
|
}
|
|
1234
|
-
|
|
1235
|
-
let
|
|
1236
|
-
return !
|
|
1237
|
-
|
|
1238
|
-
data:
|
|
1239
|
-
headers: E.from(
|
|
1240
|
-
status:
|
|
1241
|
-
statusText:
|
|
1234
|
+
f = f || "text";
|
|
1235
|
+
let rt = await V[u.findKey(V, f) || "text"](w, e);
|
|
1236
|
+
return !F && S(), h && h(), await new Promise((k, B) => {
|
|
1237
|
+
Ge(k, B, {
|
|
1238
|
+
data: rt,
|
|
1239
|
+
headers: E.from(w.headers),
|
|
1240
|
+
status: w.status,
|
|
1241
|
+
statusText: w.statusText,
|
|
1242
1242
|
config: e,
|
|
1243
|
-
request:
|
|
1243
|
+
request: T
|
|
1244
1244
|
});
|
|
1245
1245
|
});
|
|
1246
|
-
} catch (
|
|
1247
|
-
throw
|
|
1248
|
-
new
|
|
1246
|
+
} catch (w) {
|
|
1247
|
+
throw S(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1248
|
+
new p("Network Error", p.ERR_NETWORK, e, T),
|
|
1249
1249
|
{
|
|
1250
|
-
cause:
|
|
1250
|
+
cause: w.cause || w
|
|
1251
1251
|
}
|
|
1252
|
-
) :
|
|
1252
|
+
) : p.from(w, w && w.code, e, T);
|
|
1253
1253
|
}
|
|
1254
|
-
}),
|
|
1255
|
-
http:
|
|
1256
|
-
xhr:
|
|
1257
|
-
fetch:
|
|
1254
|
+
}), ie = {
|
|
1255
|
+
http: Ht,
|
|
1256
|
+
xhr: gr,
|
|
1257
|
+
fetch: Or
|
|
1258
1258
|
};
|
|
1259
|
-
u.forEach(
|
|
1259
|
+
u.forEach(ie, (e, t) => {
|
|
1260
1260
|
if (e) {
|
|
1261
1261
|
try {
|
|
1262
1262
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1265,110 +1265,110 @@ u.forEach(ae, (e, t) => {
|
|
|
1265
1265
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1266
1266
|
}
|
|
1267
1267
|
});
|
|
1268
|
-
const
|
|
1268
|
+
const Oe = (e) => `- ${e}`, Ar = (e) => u.isFunction(e) || e === null || e === !1, Xe = {
|
|
1269
1269
|
getAdapter: (e) => {
|
|
1270
1270
|
e = u.isArray(e) ? e : [e];
|
|
1271
1271
|
const { length: t } = e;
|
|
1272
1272
|
let r, n;
|
|
1273
1273
|
const s = {};
|
|
1274
|
-
for (let
|
|
1275
|
-
r = e[
|
|
1276
|
-
let
|
|
1277
|
-
if (n = r, !
|
|
1278
|
-
throw new
|
|
1274
|
+
for (let o = 0; o < t; o++) {
|
|
1275
|
+
r = e[o];
|
|
1276
|
+
let i;
|
|
1277
|
+
if (n = r, !Ar(r) && (n = ie[(i = String(r)).toLowerCase()], n === void 0))
|
|
1278
|
+
throw new p(`Unknown adapter '${i}'`);
|
|
1279
1279
|
if (n)
|
|
1280
1280
|
break;
|
|
1281
|
-
s[
|
|
1281
|
+
s[i || "#" + o] = n;
|
|
1282
1282
|
}
|
|
1283
1283
|
if (!n) {
|
|
1284
|
-
const
|
|
1285
|
-
([c,
|
|
1284
|
+
const o = Object.entries(s).map(
|
|
1285
|
+
([c, l]) => `adapter ${c} ` + (l === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1286
1286
|
);
|
|
1287
|
-
let
|
|
1288
|
-
` +
|
|
1289
|
-
`) : " " +
|
|
1290
|
-
throw new
|
|
1291
|
-
"There is no suitable adapter to dispatch the request " +
|
|
1287
|
+
let i = t ? o.length > 1 ? `since :
|
|
1288
|
+
` + o.map(Oe).join(`
|
|
1289
|
+
`) : " " + Oe(o[0]) : "as no adapter specified";
|
|
1290
|
+
throw new p(
|
|
1291
|
+
"There is no suitable adapter to dispatch the request " + i,
|
|
1292
1292
|
"ERR_NOT_SUPPORT"
|
|
1293
1293
|
);
|
|
1294
1294
|
}
|
|
1295
1295
|
return n;
|
|
1296
1296
|
},
|
|
1297
|
-
adapters:
|
|
1297
|
+
adapters: ie
|
|
1298
1298
|
};
|
|
1299
|
-
function
|
|
1299
|
+
function ee(e) {
|
|
1300
1300
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1301
|
-
throw new
|
|
1301
|
+
throw new _(null, e);
|
|
1302
1302
|
}
|
|
1303
|
-
function
|
|
1304
|
-
return
|
|
1303
|
+
function Ae(e) {
|
|
1304
|
+
return ee(e), e.headers = E.from(e.headers), e.data = Y.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(n) {
|
|
1308
|
-
return
|
|
1308
|
+
return ee(e), n.data = Y.call(
|
|
1309
1309
|
e,
|
|
1310
1310
|
e.transformResponse,
|
|
1311
1311
|
n
|
|
1312
1312
|
), n.headers = E.from(n.headers), n;
|
|
1313
1313
|
}, function(n) {
|
|
1314
|
-
return
|
|
1314
|
+
return ve(n) || (ee(e), n && n.response && (n.response.data = Y.call(
|
|
1315
1315
|
e,
|
|
1316
1316
|
e.transformResponse,
|
|
1317
1317
|
n.response
|
|
1318
1318
|
), n.response.headers = E.from(n.response.headers))), Promise.reject(n);
|
|
1319
1319
|
});
|
|
1320
1320
|
}
|
|
1321
|
-
const Ze = "1.7.2",
|
|
1321
|
+
const Ze = "1.7.2", de = {};
|
|
1322
1322
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1323
|
-
|
|
1323
|
+
de[e] = function(n) {
|
|
1324
1324
|
return typeof n === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1325
1325
|
};
|
|
1326
1326
|
});
|
|
1327
|
-
const
|
|
1328
|
-
|
|
1329
|
-
function s(
|
|
1330
|
-
return "[Axios v" + Ze + "] Transitional option '" +
|
|
1327
|
+
const Pe = {};
|
|
1328
|
+
de.transitional = function(t, r, n) {
|
|
1329
|
+
function s(o, i) {
|
|
1330
|
+
return "[Axios v" + Ze + "] Transitional option '" + o + "'" + i + (n ? ". " + n : "");
|
|
1331
1331
|
}
|
|
1332
|
-
return (
|
|
1332
|
+
return (o, i, c) => {
|
|
1333
1333
|
if (t === !1)
|
|
1334
|
-
throw new
|
|
1335
|
-
s(
|
|
1336
|
-
|
|
1334
|
+
throw new p(
|
|
1335
|
+
s(i, " has been removed" + (r ? " in " + r : "")),
|
|
1336
|
+
p.ERR_DEPRECATED
|
|
1337
1337
|
);
|
|
1338
|
-
return r && !
|
|
1338
|
+
return r && !Pe[i] && (Pe[i] = !0, console.warn(
|
|
1339
1339
|
s(
|
|
1340
|
-
|
|
1340
|
+
i,
|
|
1341
1341
|
" has been deprecated since v" + r + " and will be removed in the near future"
|
|
1342
1342
|
)
|
|
1343
|
-
)), t ? t(
|
|
1343
|
+
)), t ? t(o, i, c) : !0;
|
|
1344
1344
|
};
|
|
1345
1345
|
};
|
|
1346
|
-
function
|
|
1346
|
+
function Pr(e, t, r) {
|
|
1347
1347
|
if (typeof e != "object")
|
|
1348
|
-
throw new
|
|
1348
|
+
throw new p("options must be an object", p.ERR_BAD_OPTION_VALUE);
|
|
1349
1349
|
const n = Object.keys(e);
|
|
1350
1350
|
let s = n.length;
|
|
1351
1351
|
for (; s-- > 0; ) {
|
|
1352
|
-
const
|
|
1353
|
-
if (
|
|
1354
|
-
const c = e[
|
|
1355
|
-
if (
|
|
1356
|
-
throw new
|
|
1352
|
+
const o = n[s], i = t[o];
|
|
1353
|
+
if (i) {
|
|
1354
|
+
const c = e[o], l = c === void 0 || i(c, o, e);
|
|
1355
|
+
if (l !== !0)
|
|
1356
|
+
throw new p("option " + o + " must be " + l, p.ERR_BAD_OPTION_VALUE);
|
|
1357
1357
|
continue;
|
|
1358
1358
|
}
|
|
1359
1359
|
if (r !== !0)
|
|
1360
|
-
throw new
|
|
1360
|
+
throw new p("Unknown option " + o, p.ERR_BAD_OPTION);
|
|
1361
1361
|
}
|
|
1362
1362
|
}
|
|
1363
|
-
const
|
|
1364
|
-
assertOptions:
|
|
1365
|
-
validators:
|
|
1366
|
-
}, C =
|
|
1367
|
-
let
|
|
1363
|
+
const ae = {
|
|
1364
|
+
assertOptions: Pr,
|
|
1365
|
+
validators: de
|
|
1366
|
+
}, C = ae.validators;
|
|
1367
|
+
let U = class {
|
|
1368
1368
|
constructor(t) {
|
|
1369
1369
|
this.defaults = t, this.interceptors = {
|
|
1370
|
-
request: new
|
|
1371
|
-
response: new
|
|
1370
|
+
request: new we(),
|
|
1371
|
+
response: new we()
|
|
1372
1372
|
};
|
|
1373
1373
|
}
|
|
1374
1374
|
/**
|
|
@@ -1386,10 +1386,10 @@ let B = class {
|
|
|
1386
1386
|
if (n 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
|
-
n.stack ?
|
|
1392
|
-
` +
|
|
1391
|
+
n.stack ? o && !String(n.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (n.stack += `
|
|
1392
|
+
` + o) : n.stack = o;
|
|
1393
1393
|
} catch {
|
|
1394
1394
|
}
|
|
1395
1395
|
}
|
|
@@ -1397,73 +1397,73 @@ let B = class {
|
|
|
1397
1397
|
}
|
|
1398
1398
|
}
|
|
1399
1399
|
_request(t, r) {
|
|
1400
|
-
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r =
|
|
1401
|
-
const { transitional: n, paramsSerializer: s, headers:
|
|
1402
|
-
n !== void 0 &&
|
|
1400
|
+
typeof t == "string" ? (r = r || {}, r.url = t) : r = t || {}, r = q(this.defaults, r);
|
|
1401
|
+
const { transitional: n, paramsSerializer: s, headers: o } = r;
|
|
1402
|
+
n !== void 0 && ae.assertOptions(n, {
|
|
1403
1403
|
silentJSONParsing: C.transitional(C.boolean),
|
|
1404
1404
|
forcedJSONParsing: C.transitional(C.boolean),
|
|
1405
1405
|
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1406
1406
|
}, !1), s != null && (u.isFunction(s) ? r.paramsSerializer = {
|
|
1407
1407
|
serialize: s
|
|
1408
|
-
} :
|
|
1408
|
+
} : ae.assertOptions(s, {
|
|
1409
1409
|
encode: C.function,
|
|
1410
1410
|
serialize: C.function
|
|
1411
1411
|
}, !0)), r.method = (r.method || this.defaults.method || "get").toLowerCase();
|
|
1412
|
-
let
|
|
1413
|
-
|
|
1414
|
-
|
|
1412
|
+
let i = o && u.merge(
|
|
1413
|
+
o.common,
|
|
1414
|
+
o[r.method]
|
|
1415
1415
|
);
|
|
1416
|
-
|
|
1416
|
+
o && u.forEach(
|
|
1417
1417
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1418
1418
|
(h) => {
|
|
1419
|
-
delete
|
|
1419
|
+
delete o[h];
|
|
1420
1420
|
}
|
|
1421
|
-
), r.headers = E.concat(
|
|
1421
|
+
), r.headers = E.concat(i, o);
|
|
1422
1422
|
const c = [];
|
|
1423
|
-
let
|
|
1424
|
-
this.interceptors.request.forEach(function(
|
|
1425
|
-
typeof
|
|
1423
|
+
let l = !0;
|
|
1424
|
+
this.interceptors.request.forEach(function(y) {
|
|
1425
|
+
typeof y.runWhen == "function" && y.runWhen(r) === !1 || (l = l && y.synchronous, c.unshift(y.fulfilled, y.rejected));
|
|
1426
1426
|
});
|
|
1427
|
-
const
|
|
1428
|
-
this.interceptors.response.forEach(function(
|
|
1429
|
-
|
|
1427
|
+
const f = [];
|
|
1428
|
+
this.interceptors.response.forEach(function(y) {
|
|
1429
|
+
f.push(y.fulfilled, y.rejected);
|
|
1430
1430
|
});
|
|
1431
|
-
let a,
|
|
1432
|
-
if (!
|
|
1433
|
-
const h = [
|
|
1434
|
-
for (h.unshift.apply(h, c), h.push.apply(h,
|
|
1435
|
-
a = a.then(h[
|
|
1431
|
+
let a, d = 0, g;
|
|
1432
|
+
if (!l) {
|
|
1433
|
+
const h = [Ae.bind(this), void 0];
|
|
1434
|
+
for (h.unshift.apply(h, c), h.push.apply(h, f), g = h.length, a = Promise.resolve(r); d < g; )
|
|
1435
|
+
a = a.then(h[d++], h[d++]);
|
|
1436
1436
|
return a;
|
|
1437
1437
|
}
|
|
1438
|
-
|
|
1439
|
-
let
|
|
1440
|
-
for (
|
|
1441
|
-
const h = c[
|
|
1438
|
+
g = c.length;
|
|
1439
|
+
let m = r;
|
|
1440
|
+
for (d = 0; d < g; ) {
|
|
1441
|
+
const h = c[d++], y = c[d++];
|
|
1442
1442
|
try {
|
|
1443
|
-
|
|
1444
|
-
} catch (
|
|
1445
|
-
|
|
1443
|
+
m = h(m);
|
|
1444
|
+
} catch (T) {
|
|
1445
|
+
y.call(this, T);
|
|
1446
1446
|
break;
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
try {
|
|
1450
|
-
a =
|
|
1450
|
+
a = Ae.call(this, m);
|
|
1451
1451
|
} catch (h) {
|
|
1452
1452
|
return Promise.reject(h);
|
|
1453
1453
|
}
|
|
1454
|
-
for (
|
|
1455
|
-
a = a.then(d
|
|
1454
|
+
for (d = 0, g = f.length; d < g; )
|
|
1455
|
+
a = a.then(f[d++], f[d++]);
|
|
1456
1456
|
return a;
|
|
1457
1457
|
}
|
|
1458
1458
|
getUri(t) {
|
|
1459
|
-
t =
|
|
1460
|
-
const r =
|
|
1461
|
-
return
|
|
1459
|
+
t = q(this.defaults, t);
|
|
1460
|
+
const r = Ke(t.baseURL, t.url);
|
|
1461
|
+
return ze(r, t.params, t.paramsSerializer);
|
|
1462
1462
|
}
|
|
1463
1463
|
};
|
|
1464
1464
|
u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1465
|
-
|
|
1466
|
-
return this.request(
|
|
1465
|
+
U.prototype[t] = function(r, n) {
|
|
1466
|
+
return this.request(q(n || {}, {
|
|
1467
1467
|
method: t,
|
|
1468
1468
|
url: r,
|
|
1469
1469
|
data: (n || {}).data
|
|
@@ -1472,45 +1472,45 @@ u.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1472
1472
|
});
|
|
1473
1473
|
u.forEach(["post", "put", "patch"], function(t) {
|
|
1474
1474
|
function r(n) {
|
|
1475
|
-
return function(
|
|
1476
|
-
return this.request(
|
|
1475
|
+
return function(o, i, c) {
|
|
1476
|
+
return this.request(q(c || {}, {
|
|
1477
1477
|
method: t,
|
|
1478
1478
|
headers: n ? {
|
|
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
|
}
|
|
1486
|
-
|
|
1486
|
+
U.prototype[t] = r(), U.prototype[t + "Form"] = r(!0);
|
|
1487
1487
|
});
|
|
1488
|
-
let
|
|
1488
|
+
let Nr = class Ye {
|
|
1489
1489
|
constructor(t) {
|
|
1490
1490
|
if (typeof t != "function")
|
|
1491
1491
|
throw new TypeError("executor must be a function.");
|
|
1492
1492
|
let r;
|
|
1493
|
-
this.promise = new Promise(function(
|
|
1494
|
-
r =
|
|
1493
|
+
this.promise = new Promise(function(o) {
|
|
1494
|
+
r = o;
|
|
1495
1495
|
});
|
|
1496
1496
|
const n = this;
|
|
1497
1497
|
this.promise.then((s) => {
|
|
1498
1498
|
if (!n._listeners)
|
|
1499
1499
|
return;
|
|
1500
|
-
let
|
|
1501
|
-
for (;
|
|
1502
|
-
n._listeners[
|
|
1500
|
+
let o = n._listeners.length;
|
|
1501
|
+
for (; o-- > 0; )
|
|
1502
|
+
n._listeners[o](s);
|
|
1503
1503
|
n._listeners = null;
|
|
1504
1504
|
}), this.promise.then = (s) => {
|
|
1505
|
-
let
|
|
1506
|
-
const
|
|
1507
|
-
n.subscribe(c),
|
|
1505
|
+
let o;
|
|
1506
|
+
const i = new Promise((c) => {
|
|
1507
|
+
n.subscribe(c), o = c;
|
|
1508
1508
|
}).then(s);
|
|
1509
|
-
return
|
|
1510
|
-
n.unsubscribe(
|
|
1511
|
-
},
|
|
1512
|
-
}, t(function(
|
|
1513
|
-
n.reason || (n.reason = new
|
|
1509
|
+
return i.cancel = function() {
|
|
1510
|
+
n.unsubscribe(o);
|
|
1511
|
+
}, i;
|
|
1512
|
+
}, t(function(o, i, c) {
|
|
1513
|
+
n.reason || (n.reason = new _(o, i, c), r(n.reason));
|
|
1514
1514
|
});
|
|
1515
1515
|
}
|
|
1516
1516
|
/**
|
|
@@ -1553,15 +1553,15 @@ let Nn = class Ye {
|
|
|
1553
1553
|
};
|
|
1554
1554
|
}
|
|
1555
1555
|
};
|
|
1556
|
-
function
|
|
1556
|
+
function kr(e) {
|
|
1557
1557
|
return function(r) {
|
|
1558
1558
|
return e.apply(null, r);
|
|
1559
1559
|
};
|
|
1560
1560
|
}
|
|
1561
|
-
function
|
|
1561
|
+
function Cr(e) {
|
|
1562
1562
|
return u.isObject(e) && e.isAxiosError === !0;
|
|
1563
1563
|
}
|
|
1564
|
-
const
|
|
1564
|
+
const ce = {
|
|
1565
1565
|
Continue: 100,
|
|
1566
1566
|
SwitchingProtocols: 101,
|
|
1567
1567
|
Processing: 102,
|
|
@@ -1626,124 +1626,159 @@ const ue = {
|
|
|
1626
1626
|
NotExtended: 510,
|
|
1627
1627
|
NetworkAuthenticationRequired: 511
|
|
1628
1628
|
};
|
|
1629
|
-
Object.entries(
|
|
1630
|
-
|
|
1629
|
+
Object.entries(ce).forEach(([e, t]) => {
|
|
1630
|
+
ce[t] = e;
|
|
1631
1631
|
});
|
|
1632
1632
|
function et(e) {
|
|
1633
|
-
const t = new
|
|
1634
|
-
return u.extend(r,
|
|
1635
|
-
return et(
|
|
1633
|
+
const t = new U(e), r = Ue(U.prototype.request, t);
|
|
1634
|
+
return u.extend(r, U.prototype, t, { allOwnKeys: !0 }), u.extend(r, t, null, { allOwnKeys: !0 }), r.create = function(s) {
|
|
1635
|
+
return et(q(e, s));
|
|
1636
1636
|
}, r;
|
|
1637
1637
|
}
|
|
1638
|
-
const
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1643
|
-
|
|
1644
|
-
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
|
|
1638
|
+
const b = et(j);
|
|
1639
|
+
b.Axios = U;
|
|
1640
|
+
b.CanceledError = _;
|
|
1641
|
+
b.CancelToken = Nr;
|
|
1642
|
+
b.isCancel = ve;
|
|
1643
|
+
b.VERSION = Ze;
|
|
1644
|
+
b.toFormData = W;
|
|
1645
|
+
b.AxiosError = p;
|
|
1646
|
+
b.Cancel = b.CanceledError;
|
|
1647
|
+
b.all = function(t) {
|
|
1648
1648
|
return Promise.all(t);
|
|
1649
1649
|
};
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1650
|
+
b.spread = kr;
|
|
1651
|
+
b.isAxiosError = Cr;
|
|
1652
|
+
b.mergeConfig = q;
|
|
1653
|
+
b.AxiosHeaders = E;
|
|
1654
|
+
b.formToJSON = (e) => Ve(u.isHTMLForm(e) ? new FormData(e) : e);
|
|
1655
|
+
b.getAdapter = Xe.getAdapter;
|
|
1656
|
+
b.HttpStatusCode = ce;
|
|
1657
|
+
b.default = b;
|
|
1658
1658
|
const {
|
|
1659
|
-
Axios:
|
|
1660
|
-
AxiosError:
|
|
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:
|
|
1675
|
-
} =
|
|
1659
|
+
Axios: rn,
|
|
1660
|
+
AxiosError: xr,
|
|
1661
|
+
CanceledError: nn,
|
|
1662
|
+
isCancel: sn,
|
|
1663
|
+
CancelToken: on,
|
|
1664
|
+
VERSION: an,
|
|
1665
|
+
all: cn,
|
|
1666
|
+
Cancel: un,
|
|
1667
|
+
isAxiosError: ln,
|
|
1668
|
+
spread: fn,
|
|
1669
|
+
toFormData: dn,
|
|
1670
|
+
AxiosHeaders: Ne,
|
|
1671
|
+
HttpStatusCode: hn,
|
|
1672
|
+
formToJSON: pn,
|
|
1673
|
+
getAdapter: mn,
|
|
1674
|
+
mergeConfig: yn
|
|
1675
|
+
} = b, ke = "auth", tt = async (e, t, r) => {
|
|
1676
|
+
const n = {
|
|
1677
|
+
client_id: e.clientId,
|
|
1678
|
+
client_secret: e.clientSecret
|
|
1679
|
+
}, s = await r.post(
|
|
1680
|
+
`${e.url}/security/connect/token/refresh`,
|
|
1681
|
+
n,
|
|
1682
|
+
{ withCredentials: !0, headers: t || {} }
|
|
1683
|
+
), o = {
|
|
1684
|
+
...s.data,
|
|
1685
|
+
accessToken: s.data.access_token
|
|
1686
|
+
};
|
|
1687
|
+
return "access_token" in o && delete o.access_token, s.status === 200 && o.accessToken && localStorage.setItem("accessToken", o.accessToken), o;
|
|
1688
|
+
}, Ur = (e) => {
|
|
1689
|
+
const t = O(e), r = e.digitalRefresh, n = async (c) => {
|
|
1690
|
+
var f;
|
|
1691
|
+
const l = await t.request(`/${ke}/login`, {
|
|
1692
|
+
method: "POST",
|
|
1693
|
+
data: JSON.stringify(c)
|
|
1694
|
+
});
|
|
1695
|
+
return l.status === 200 && ((f = l.data) != null && f.accessToken) && localStorage.setItem("accessToken", l.data.accessToken), l;
|
|
1696
|
+
}, s = async (c) => await t.request(`/${ke}?code=${c}`, {
|
|
1697
|
+
method: "GET",
|
|
1698
|
+
data: ""
|
|
1699
|
+
}), o = async () => {
|
|
1700
|
+
try {
|
|
1701
|
+
await t.request("/security/api/authorization/logout", {
|
|
1702
|
+
method: "POST",
|
|
1703
|
+
data: "",
|
|
1704
|
+
withCredentials: !0
|
|
1705
|
+
});
|
|
1706
|
+
} catch (c) {
|
|
1707
|
+
console.error("Error during logout:", c);
|
|
1708
|
+
} finally {
|
|
1709
|
+
t.clearTokens();
|
|
1710
|
+
const c = e.refreshLogoutUrl ?? "";
|
|
1711
|
+
c && (globalThis.location.href = `${c}?logout`);
|
|
1712
|
+
}
|
|
1713
|
+
}, i = t.axiosClient;
|
|
1714
|
+
return {
|
|
1715
|
+
postLogin: n,
|
|
1716
|
+
getToken: s,
|
|
1717
|
+
postToken: r ? () => tt(r, e.headers, i) : void 0,
|
|
1718
|
+
postLogout: o
|
|
1719
|
+
};
|
|
1720
|
+
}, Ce = () => new xr(
|
|
1676
1721
|
"Unauthorized",
|
|
1677
1722
|
"ERR_UNAUTHORIZED",
|
|
1678
|
-
{ headers: new
|
|
1723
|
+
{ headers: new Ne() },
|
|
1679
1724
|
null,
|
|
1680
1725
|
{
|
|
1681
1726
|
status: 401,
|
|
1682
1727
|
data: null,
|
|
1683
1728
|
statusText: "UNAUTHORIZED",
|
|
1684
1729
|
headers: {},
|
|
1685
|
-
config: { headers: new
|
|
1730
|
+
config: { headers: new Ne() }
|
|
1686
1731
|
}
|
|
1687
|
-
),
|
|
1732
|
+
), qr = (e) => {
|
|
1688
1733
|
let t = !1;
|
|
1689
|
-
const r = [], n = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"),
|
|
1690
|
-
|
|
1691
|
-
|
|
1734
|
+
const r = [], n = () => localStorage.getItem("accessToken"), s = () => localStorage.getItem("refreshToken"), o = (a) => {
|
|
1735
|
+
const d = a.accessToken, g = a.refreshToken;
|
|
1736
|
+
d && localStorage.setItem("accessToken", d), g && localStorage.setItem("refreshToken", g);
|
|
1737
|
+
}, i = () => {
|
|
1692
1738
|
localStorage.removeItem("accessToken"), localStorage.removeItem("refreshToken");
|
|
1693
|
-
}, c = (a,
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
a ?
|
|
1697
|
-
|
|
1739
|
+
}, c = (a, d = null) => {
|
|
1740
|
+
var g;
|
|
1741
|
+
for (const m of r)
|
|
1742
|
+
a ? m.reject(a) : ((g = m.requestConfig).headers ?? (g.headers = {}), m.requestConfig.headers.Authorization = `Bearer ${d}`, m.resolve(m.requestConfig));
|
|
1743
|
+
r.length = 0;
|
|
1698
1744
|
};
|
|
1699
1745
|
return {
|
|
1700
1746
|
getAccessToken: n,
|
|
1701
|
-
setTokens:
|
|
1702
|
-
clearTokens:
|
|
1747
|
+
setTokens: o,
|
|
1748
|
+
clearTokens: i,
|
|
1703
1749
|
handleTokenRefresh: async (a) => {
|
|
1704
|
-
var
|
|
1705
|
-
if ((
|
|
1750
|
+
var d;
|
|
1751
|
+
if (e.refreshTokenEndpointPath && ((d = a.url) == null ? void 0 : d.includes(
|
|
1706
1752
|
e.refreshTokenEndpointPath
|
|
1707
|
-
)) {
|
|
1708
|
-
|
|
1709
|
-
const
|
|
1710
|
-
throw c(
|
|
1711
|
-
}
|
|
1712
|
-
if (!n()) {
|
|
1713
|
-
o();
|
|
1714
|
-
const p = H();
|
|
1715
|
-
throw c(p), p;
|
|
1753
|
+
))) {
|
|
1754
|
+
i();
|
|
1755
|
+
const m = Ce();
|
|
1756
|
+
throw c(m), e.refreshLogoutUrl && (globalThis.location.href = `${e.refreshLogoutUrl}?logout`), m;
|
|
1716
1757
|
}
|
|
1717
1758
|
if (t)
|
|
1718
|
-
return new Promise((
|
|
1759
|
+
return new Promise((g, m) => {
|
|
1719
1760
|
r.push({
|
|
1720
|
-
resolve:
|
|
1721
|
-
reject:
|
|
1761
|
+
resolve: g,
|
|
1762
|
+
reject: m,
|
|
1722
1763
|
requestConfig: a
|
|
1723
1764
|
});
|
|
1724
1765
|
});
|
|
1725
|
-
const g = s();
|
|
1726
|
-
if (!g) {
|
|
1727
|
-
o();
|
|
1728
|
-
const p = H();
|
|
1729
|
-
throw c(p), p;
|
|
1730
|
-
}
|
|
1731
1766
|
t = !0;
|
|
1732
1767
|
try {
|
|
1733
|
-
const
|
|
1734
|
-
return
|
|
1768
|
+
const g = s(), m = await e.onRefreshToken(g);
|
|
1769
|
+
return o(m), a.headers ?? (a.headers = {}), a.headers.Authorization = `Bearer ${m.accessToken}`, c(null, m.accessToken), t = !1, a;
|
|
1735
1770
|
} catch {
|
|
1736
|
-
|
|
1737
|
-
const
|
|
1738
|
-
throw c(
|
|
1771
|
+
i();
|
|
1772
|
+
const g = Ce();
|
|
1773
|
+
throw c(g), t = !1, g;
|
|
1739
1774
|
}
|
|
1740
1775
|
},
|
|
1741
1776
|
isAuthError: (a) => {
|
|
1742
|
-
var
|
|
1743
|
-
return ((
|
|
1777
|
+
var d;
|
|
1778
|
+
return ((d = a == null ? void 0 : a.response) == null ? void 0 : d.status) === 401;
|
|
1744
1779
|
}
|
|
1745
1780
|
};
|
|
1746
|
-
},
|
|
1781
|
+
}, Br = (e) => {
|
|
1747
1782
|
const t = (n) => n ? n.toString().replace(/(^\/{1,2})|(\/{1,2}$)/g, "") : null;
|
|
1748
1783
|
return [
|
|
1749
1784
|
t(e.baseUrl),
|
|
@@ -1751,77 +1786,101 @@ const {
|
|
|
1751
1786
|
t(e.apiVersion),
|
|
1752
1787
|
t(e.endpoint)
|
|
1753
1788
|
].filter(Boolean).join("/");
|
|
1754
|
-
},
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
}
|
|
1789
|
+
}, Lr = (e, t, r, n, s) => {
|
|
1790
|
+
var f;
|
|
1791
|
+
if (!t)
|
|
1792
|
+
return null;
|
|
1793
|
+
const o = !!e.digitalRefresh, i = e.refreshTokenApiVersion ?? s, c = e.refreshTokenEndpointPath ?? (o ? "/security/connect/token/refresh" : "/refresh-token"), l = `${n}/auth/${i}${c}`;
|
|
1794
|
+
return qr({
|
|
1795
|
+
baseUrl: e.baseUrl,
|
|
1796
|
+
refreshTokenEndpointPath: c,
|
|
1797
|
+
digitalRefreshUrl: (f = e.digitalRefresh) == null ? void 0 : f.url,
|
|
1798
|
+
refreshLogoutUrl: e.refreshLogoutUrl ?? void 0,
|
|
1799
|
+
onRefreshToken: async (a) => o ? await tt(
|
|
1800
|
+
e.digitalRefresh,
|
|
1801
|
+
e.headers,
|
|
1802
|
+
r
|
|
1803
|
+
) : (await r.post(l, {
|
|
1804
|
+
refreshToken: a
|
|
1805
|
+
})).data
|
|
1806
|
+
});
|
|
1807
|
+
}, _r = (e, t) => {
|
|
1808
|
+
e.interceptors.response.use(
|
|
1809
|
+
(r) => r,
|
|
1810
|
+
async (r) => {
|
|
1811
|
+
const n = r.config;
|
|
1812
|
+
if (!t.isAuthError(r) || n._retry)
|
|
1813
|
+
throw r;
|
|
1814
|
+
n._retry = !0;
|
|
1815
|
+
const s = await t.handleTokenRefresh(n);
|
|
1816
|
+
return e.request(s);
|
|
1783
1817
|
}
|
|
1784
|
-
)
|
|
1818
|
+
);
|
|
1819
|
+
}, Fr = (e, t, r, n, s) => {
|
|
1820
|
+
const o = {
|
|
1821
|
+
"Content-Type": (e == null ? void 0 : e.contentType) ?? "application/json",
|
|
1822
|
+
apiVersion: t ?? "",
|
|
1823
|
+
Authorization: "",
|
|
1824
|
+
...r,
|
|
1825
|
+
...e == null ? void 0 : e.headers
|
|
1826
|
+
};
|
|
1827
|
+
if (s && n) {
|
|
1828
|
+
const i = n.getAccessToken();
|
|
1829
|
+
i && (o.Authorization = `Bearer ${i}`);
|
|
1830
|
+
}
|
|
1831
|
+
return o;
|
|
1832
|
+
}, Dr = (e, t, r) => {
|
|
1833
|
+
const n = {
|
|
1834
|
+
method: (e == null ? void 0 : e.method) ?? "GET",
|
|
1835
|
+
headers: t,
|
|
1836
|
+
url: r,
|
|
1837
|
+
data: (e == null ? void 0 : e.data) ?? {},
|
|
1838
|
+
responseType: e == null ? void 0 : e.responseType
|
|
1839
|
+
};
|
|
1840
|
+
return (e == null ? void 0 : e.withCredentials) !== void 0 && (n.withCredentials = e.withCredentials), n;
|
|
1841
|
+
}, $r = (e, t) => ({
|
|
1842
|
+
getAccessToken: e && t ? t.getAccessToken : () => null,
|
|
1843
|
+
setTokens: e && t ? t.setTokens : () => {
|
|
1844
|
+
},
|
|
1845
|
+
clearTokens: e && t ? t.clearTokens : () => {
|
|
1846
|
+
}
|
|
1847
|
+
}), O = (e) => {
|
|
1848
|
+
const t = b.create(), r = e.apiVersion, n = e.productCode, o = e.baseUrl.replace(/\/$/, ""), i = e.hasTokenManager !== !1, c = Lr(
|
|
1849
|
+
e,
|
|
1850
|
+
i,
|
|
1851
|
+
t,
|
|
1852
|
+
o,
|
|
1853
|
+
r
|
|
1854
|
+
);
|
|
1855
|
+
i && c && _r(t, c), e.responseInterceptor && t.interceptors.response.use(
|
|
1785
1856
|
e.responseInterceptor.onFulfilled,
|
|
1786
1857
|
e.responseInterceptor.onReject
|
|
1787
|
-
)
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
headers: h,
|
|
1808
|
-
url: g,
|
|
1809
|
-
data: l == null ? void 0 : l.data,
|
|
1810
|
-
responseType: l == null ? void 0 : l.responseType
|
|
1811
|
-
};
|
|
1812
|
-
return await t.request(p);
|
|
1813
|
-
},
|
|
1814
|
-
getAccessToken: o && c ? c.getAccessToken : () => null,
|
|
1815
|
-
setTokens: o && c ? c.setTokens : () => {
|
|
1816
|
-
},
|
|
1817
|
-
clearTokens: o && c ? c.clearTokens : () => {
|
|
1818
|
-
}
|
|
1858
|
+
);
|
|
1859
|
+
const l = async (a, d) => {
|
|
1860
|
+
const g = a.startsWith("/") ? a.substring(1) : a, m = Br({
|
|
1861
|
+
baseUrl: o,
|
|
1862
|
+
productCode: n,
|
|
1863
|
+
apiVersion: r,
|
|
1864
|
+
endpoint: g
|
|
1865
|
+
}), h = Fr(
|
|
1866
|
+
d,
|
|
1867
|
+
r,
|
|
1868
|
+
e.headers,
|
|
1869
|
+
c,
|
|
1870
|
+
i
|
|
1871
|
+
), y = Dr(d, h, m);
|
|
1872
|
+
return await t.request(y);
|
|
1873
|
+
}, f = $r(i, c);
|
|
1874
|
+
return {
|
|
1875
|
+
request: l,
|
|
1876
|
+
...f,
|
|
1877
|
+
axiosClient: t
|
|
1819
1878
|
};
|
|
1820
|
-
},
|
|
1821
|
-
function
|
|
1879
|
+
}, Ir = "cep";
|
|
1880
|
+
function jr(e) {
|
|
1822
1881
|
const t = O(e);
|
|
1823
1882
|
function r(n) {
|
|
1824
|
-
return t.request(`/${
|
|
1883
|
+
return t.request(`/${Ir}`, {
|
|
1825
1884
|
method: "POST",
|
|
1826
1885
|
data: JSON.stringify(n)
|
|
1827
1886
|
});
|
|
@@ -1830,23 +1889,7 @@ function Fn(e) {
|
|
|
1830
1889
|
getAddress: r
|
|
1831
1890
|
};
|
|
1832
1891
|
}
|
|
1833
|
-
const
|
|
1834
|
-
const t = O(e);
|
|
1835
|
-
return {
|
|
1836
|
-
postLogin: async (s) => {
|
|
1837
|
-
var o;
|
|
1838
|
-
const i = await t.request(`/${Ce}/login`, {
|
|
1839
|
-
method: "POST",
|
|
1840
|
-
data: JSON.stringify(s)
|
|
1841
|
-
});
|
|
1842
|
-
return i.status === 200 && ((o = i.data) != null && o.accessToken) && localStorage.setItem("accessToken", i.data.accessToken), i;
|
|
1843
|
-
},
|
|
1844
|
-
getToken: async (s) => await t.request(`/${Ce}?code=${s}`, {
|
|
1845
|
-
method: "GET",
|
|
1846
|
-
data: ""
|
|
1847
|
-
})
|
|
1848
|
-
};
|
|
1849
|
-
}, _n = (e) => {
|
|
1892
|
+
const Hr = (e) => {
|
|
1850
1893
|
const t = O(e);
|
|
1851
1894
|
return {
|
|
1852
1895
|
signUp: async (c) => await t.request("/sign-up", {
|
|
@@ -1854,12 +1897,12 @@ const Ce = "auth", Ln = (e) => {
|
|
|
1854
1897
|
data: JSON.stringify(c)
|
|
1855
1898
|
}),
|
|
1856
1899
|
signIn: async (c) => {
|
|
1857
|
-
var
|
|
1858
|
-
const
|
|
1900
|
+
var f, a;
|
|
1901
|
+
const l = await t.request("/sign-in", {
|
|
1859
1902
|
method: "POST",
|
|
1860
1903
|
data: JSON.stringify(c)
|
|
1861
1904
|
});
|
|
1862
|
-
return
|
|
1905
|
+
return l.status === 200 && ((f = l.data) != null && f.accessToken) && ((a = l.data) != null && a.refreshToken) && t.setTokens(l.data), l;
|
|
1863
1906
|
},
|
|
1864
1907
|
getProfile: async () => await t.request("/me", {
|
|
1865
1908
|
method: "GET",
|
|
@@ -1874,7 +1917,7 @@ const Ce = "auth", Ln = (e) => {
|
|
|
1874
1917
|
data: JSON.stringify(c)
|
|
1875
1918
|
})
|
|
1876
1919
|
};
|
|
1877
|
-
}, xe = "digital",
|
|
1920
|
+
}, xe = "digital", Jr = (e) => {
|
|
1878
1921
|
const t = O(e);
|
|
1879
1922
|
return {
|
|
1880
1923
|
getBroker: () => t.request(`/${xe}/getBroker`, {
|
|
@@ -1889,92 +1932,92 @@ const Ce = "auth", Ln = (e) => {
|
|
|
1889
1932
|
}
|
|
1890
1933
|
)
|
|
1891
1934
|
};
|
|
1892
|
-
},
|
|
1935
|
+
}, zr = "data", Mr = (e) => {
|
|
1893
1936
|
const t = O(e);
|
|
1894
1937
|
return {
|
|
1895
|
-
postData: async (n) => await t.request(`/${
|
|
1938
|
+
postData: async (n) => await t.request(`/${zr}`, {
|
|
1896
1939
|
method: "POST",
|
|
1897
1940
|
data: JSON.stringify(n)
|
|
1898
1941
|
})
|
|
1899
1942
|
};
|
|
1900
|
-
},
|
|
1943
|
+
}, Vr = "endorsement", vr = (e) => {
|
|
1901
1944
|
const t = O(e);
|
|
1902
1945
|
return {
|
|
1903
1946
|
putEndorsement: (n, s) => {
|
|
1904
|
-
const
|
|
1905
|
-
return
|
|
1906
|
-
|
|
1907
|
-
}) :
|
|
1947
|
+
const o = new FormData();
|
|
1948
|
+
return o.append("data", JSON.stringify(n)), s && (Array.isArray(s) ? s.forEach((i) => {
|
|
1949
|
+
o.append("attachments", i);
|
|
1950
|
+
}) : o.append("attachments", s)), t.request(`/${Vr}`, {
|
|
1908
1951
|
method: "PUT",
|
|
1909
|
-
data:
|
|
1952
|
+
data: o,
|
|
1910
1953
|
contentType: "multipart/form-data"
|
|
1911
1954
|
});
|
|
1912
1955
|
}
|
|
1913
1956
|
};
|
|
1914
|
-
},
|
|
1957
|
+
}, te = "payment", Gr = (e) => {
|
|
1915
1958
|
const t = O(e);
|
|
1916
1959
|
return {
|
|
1917
|
-
postPayment: (
|
|
1960
|
+
postPayment: (o) => t.request(`/${te}`, {
|
|
1918
1961
|
method: "POST",
|
|
1919
|
-
data: JSON.stringify(
|
|
1962
|
+
data: JSON.stringify(o)
|
|
1920
1963
|
}),
|
|
1921
|
-
getPaymentStatus: (
|
|
1922
|
-
`/${
|
|
1964
|
+
getPaymentStatus: (o) => t.request(
|
|
1965
|
+
`/${te}/status?policyId=${o.policyId}`,
|
|
1923
1966
|
{
|
|
1924
1967
|
method: "GET",
|
|
1925
1968
|
data: ""
|
|
1926
1969
|
}
|
|
1927
1970
|
),
|
|
1928
|
-
getPaymentSummary: (
|
|
1929
|
-
`/${
|
|
1971
|
+
getPaymentSummary: (o) => t.request(
|
|
1972
|
+
`/${te}/summary?policyId=${o.policyId}`,
|
|
1930
1973
|
{
|
|
1931
1974
|
method: "GET",
|
|
1932
1975
|
data: ""
|
|
1933
1976
|
}
|
|
1934
1977
|
)
|
|
1935
1978
|
};
|
|
1936
|
-
},
|
|
1979
|
+
}, H = "product/action", Kr = (e) => {
|
|
1937
1980
|
const t = O(e);
|
|
1938
1981
|
return {
|
|
1939
|
-
getCnpjStatus: (
|
|
1982
|
+
getCnpjStatus: (i, c, l) => {
|
|
1940
1983
|
const a = new URLSearchParams({
|
|
1941
|
-
...
|
|
1984
|
+
...i && { cnpj: i },
|
|
1942
1985
|
...c && { brokerageIdentity: c },
|
|
1943
|
-
...
|
|
1944
|
-
isBrokerageDefinedAtStart: String(
|
|
1986
|
+
...l !== void 0 && {
|
|
1987
|
+
isBrokerageDefinedAtStart: String(l)
|
|
1945
1988
|
}
|
|
1946
|
-
}).toString(),
|
|
1947
|
-
return t.request(
|
|
1989
|
+
}).toString(), d = `/${H}/Custom/CnpjCheck?${a}`;
|
|
1990
|
+
return t.request(d, {
|
|
1948
1991
|
method: "GET",
|
|
1949
1992
|
data: ""
|
|
1950
1993
|
});
|
|
1951
1994
|
},
|
|
1952
|
-
getKeyNumber: () => t.request(`/${
|
|
1995
|
+
getKeyNumber: () => t.request(`/${H}/Custom/GetKeyNumber`, {
|
|
1953
1996
|
method: "GET",
|
|
1954
1997
|
data: ""
|
|
1955
1998
|
}),
|
|
1956
|
-
getProposalNumberByKeyNumber: (
|
|
1957
|
-
`/${
|
|
1999
|
+
getProposalNumberByKeyNumber: (i) => t.request(
|
|
2000
|
+
`/${H}/Custom/GetProposalNoByKeyNumber?keyNumber=${i.keyNumber}`,
|
|
1958
2001
|
{
|
|
1959
2002
|
method: "GET",
|
|
1960
2003
|
data: ""
|
|
1961
2004
|
}
|
|
1962
2005
|
),
|
|
1963
|
-
postCoveragesAndClausesRules: (
|
|
1964
|
-
`/${
|
|
2006
|
+
postCoveragesAndClausesRules: (i) => t.request(
|
|
2007
|
+
`/${H}/Custom/LoadRules`,
|
|
1965
2008
|
{
|
|
1966
2009
|
method: "POST",
|
|
1967
|
-
data: JSON.stringify(
|
|
2010
|
+
data: JSON.stringify(i)
|
|
1968
2011
|
}
|
|
1969
2012
|
)
|
|
1970
2013
|
};
|
|
1971
|
-
}, x = "quotation",
|
|
2014
|
+
}, x = "quotation", Wr = (e) => {
|
|
1972
2015
|
const t = O(e);
|
|
1973
2016
|
return {
|
|
1974
2017
|
getQuotations: (a) => {
|
|
1975
|
-
const
|
|
2018
|
+
const d = new URLSearchParams({ ...a });
|
|
1976
2019
|
return t.request(
|
|
1977
|
-
`/${x}/query?${
|
|
2020
|
+
`/${x}/query?${d.toString()}`,
|
|
1978
2021
|
{
|
|
1979
2022
|
method: "GET",
|
|
1980
2023
|
data: ""
|
|
@@ -1982,9 +2025,9 @@ const Ce = "auth", Ln = (e) => {
|
|
|
1982
2025
|
);
|
|
1983
2026
|
},
|
|
1984
2027
|
getQuotationDetail: (a) => {
|
|
1985
|
-
const
|
|
2028
|
+
const d = new URLSearchParams({ id: a.policyId });
|
|
1986
2029
|
return t.request(
|
|
1987
|
-
`/${x}?${
|
|
2030
|
+
`/${x}?${d.toString()}`,
|
|
1988
2031
|
{
|
|
1989
2032
|
method: "GET",
|
|
1990
2033
|
data: ""
|
|
@@ -2022,7 +2065,7 @@ const Ce = "auth", Ln = (e) => {
|
|
|
2022
2065
|
}
|
|
2023
2066
|
)
|
|
2024
2067
|
};
|
|
2025
|
-
},
|
|
2068
|
+
}, Qr = "report", Xr = (e) => {
|
|
2026
2069
|
const t = O(e);
|
|
2027
2070
|
return {
|
|
2028
2071
|
getReportStream: (n) => {
|
|
@@ -2032,7 +2075,7 @@ const Ce = "auth", Ln = (e) => {
|
|
|
2032
2075
|
...n.additionalParams
|
|
2033
2076
|
});
|
|
2034
2077
|
return t.request(
|
|
2035
|
-
`/${
|
|
2078
|
+
`/${Qr}/generate-stream?${s.toString()}`,
|
|
2036
2079
|
{
|
|
2037
2080
|
method: "GET",
|
|
2038
2081
|
data: "",
|
|
@@ -2041,11 +2084,11 @@ const Ce = "auth", Ln = (e) => {
|
|
|
2041
2084
|
);
|
|
2042
2085
|
}
|
|
2043
2086
|
};
|
|
2044
|
-
},
|
|
2087
|
+
}, Zr = "SubscriberData", Yr = (e) => {
|
|
2045
2088
|
const t = O(e);
|
|
2046
2089
|
return {
|
|
2047
2090
|
getSubscriber: (n) => t.request(
|
|
2048
|
-
`/${
|
|
2091
|
+
`/${Zr}/get-subscriber-data?cnpj=${n}`,
|
|
2049
2092
|
{
|
|
2050
2093
|
method: "GET",
|
|
2051
2094
|
data: ""
|
|
@@ -2053,23 +2096,23 @@ const Ce = "auth", Ln = (e) => {
|
|
|
2053
2096
|
)
|
|
2054
2097
|
};
|
|
2055
2098
|
};
|
|
2056
|
-
function
|
|
2057
|
-
const t =
|
|
2099
|
+
function gn(e) {
|
|
2100
|
+
const t = Ur(e), r = Hr(e), n = Mr(e), s = Wr(e), o = Gr(e), i = jr(e), c = Jr(e), l = vr(e), f = Kr(e), a = Xr(e), d = Yr(e), g = O(e);
|
|
2058
2101
|
return {
|
|
2059
2102
|
auth: t,
|
|
2060
2103
|
authAkad: r,
|
|
2061
2104
|
data: n,
|
|
2062
2105
|
quotation: s,
|
|
2063
|
-
payment:
|
|
2064
|
-
address:
|
|
2106
|
+
payment: o,
|
|
2107
|
+
address: i,
|
|
2065
2108
|
broker: c,
|
|
2066
|
-
endorsement:
|
|
2067
|
-
plugin:
|
|
2109
|
+
endorsement: l,
|
|
2110
|
+
plugin: f,
|
|
2068
2111
|
report: a,
|
|
2069
|
-
subscriber:
|
|
2070
|
-
base:
|
|
2112
|
+
subscriber: d,
|
|
2113
|
+
base: g
|
|
2071
2114
|
};
|
|
2072
2115
|
}
|
|
2073
2116
|
export {
|
|
2074
|
-
|
|
2117
|
+
gn as default
|
|
2075
2118
|
};
|