dev-classes 1.3.11 → 1.3.13
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/README.md +12 -0
- package/dist/classes/HTTPSApi/deps/apiRequest/apiRequest.js +316 -315
- package/dist/classes/Utils/NetworkInformation/classes/InternetWatchers.d.ts +3 -1
- package/dist/classes/Utils/NetworkInformation/classes/InternetWatchers.js +9 -9
- package/dist/classes/Utils/NetworkInformation/classes/NetworkInformationCordova.js +8 -8
- package/dist/classes/Utils/NetworkInformation/classes/NetworkInformationPC.js +8 -8
- package/dist/classes/Utils/NetworkInformation/classes/types/types.abscruct.d.ts +1 -1
- package/package.json +1 -1
|
@@ -34,58 +34,58 @@ const mt = X("string"), x = X("function"), He = X("number"), Q = (e) => e !== nu
|
|
|
34
34
|
function H(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
35
35
|
if (e === null || typeof e > "u")
|
|
36
36
|
return;
|
|
37
|
-
let r,
|
|
37
|
+
let r, s;
|
|
38
38
|
if (typeof e != "object" && (e = [e]), j(e))
|
|
39
|
-
for (r = 0,
|
|
39
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
40
40
|
t.call(null, e[r], r, e);
|
|
41
41
|
else {
|
|
42
|
-
const
|
|
42
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
43
43
|
let c;
|
|
44
44
|
for (r = 0; r < i; r++)
|
|
45
|
-
c =
|
|
45
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
function ve(e, t) {
|
|
49
49
|
t = t.toLowerCase();
|
|
50
50
|
const n = Object.keys(e);
|
|
51
|
-
let r = n.length,
|
|
51
|
+
let r = n.length, s;
|
|
52
52
|
for (; r-- > 0; )
|
|
53
|
-
if (
|
|
54
|
-
return
|
|
53
|
+
if (s = n[r], t === s.toLowerCase())
|
|
54
|
+
return s;
|
|
55
55
|
return null;
|
|
56
56
|
}
|
|
57
|
-
const
|
|
57
|
+
const B = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Me = (e) => !I(e) && e !== B;
|
|
58
58
|
function ie() {
|
|
59
|
-
const { caseless: e } = Me(this) && this || {}, t = {}, n = (r,
|
|
60
|
-
const
|
|
61
|
-
z(t[
|
|
59
|
+
const { caseless: e } = Me(this) && this || {}, t = {}, n = (r, s) => {
|
|
60
|
+
const o = e && ve(t, s) || s;
|
|
61
|
+
z(t[o]) && z(r) ? t[o] = ie(t[o], r) : z(r) ? t[o] = ie({}, r) : j(r) ? t[o] = r.slice() : t[o] = r;
|
|
62
62
|
};
|
|
63
|
-
for (let r = 0,
|
|
63
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
64
64
|
arguments[r] && H(arguments[r], n);
|
|
65
65
|
return t;
|
|
66
66
|
}
|
|
67
|
-
const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (
|
|
68
|
-
n && x(
|
|
67
|
+
const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
68
|
+
n && x(s) ? e[o] = qe(s, n) : e[o] = s;
|
|
69
69
|
}, { allOwnKeys: r }), e), kt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Ft = (e, t, n, r) => {
|
|
70
70
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
71
71
|
value: t.prototype
|
|
72
72
|
}), n && Object.assign(e.prototype, n);
|
|
73
73
|
}, Ut = (e, t, n, r) => {
|
|
74
|
-
let
|
|
74
|
+
let s, o, i;
|
|
75
75
|
const c = {};
|
|
76
76
|
if (t = t || {}, e == null)
|
|
77
77
|
return t;
|
|
78
78
|
do {
|
|
79
|
-
for (
|
|
80
|
-
i = o
|
|
79
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
80
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
81
81
|
e = n !== !1 && he(e);
|
|
82
82
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
83
83
|
return t;
|
|
84
|
-
},
|
|
84
|
+
}, Lt = (e, t, n) => {
|
|
85
85
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
86
86
|
const r = e.indexOf(t, n);
|
|
87
87
|
return r !== -1 && r === n;
|
|
88
|
-
},
|
|
88
|
+
}, Bt = (e) => {
|
|
89
89
|
if (!e)
|
|
90
90
|
return null;
|
|
91
91
|
if (j(e))
|
|
@@ -97,12 +97,12 @@ const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (o, s) => {
|
|
|
97
97
|
for (; t-- > 0; )
|
|
98
98
|
n[t] = e[t];
|
|
99
99
|
return n;
|
|
100
|
-
},
|
|
100
|
+
}, Dt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && he(Uint8Array)), jt = (e, t) => {
|
|
101
101
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
102
|
-
let
|
|
103
|
-
for (; (
|
|
104
|
-
const
|
|
105
|
-
t.call(e,
|
|
102
|
+
let s;
|
|
103
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
104
|
+
const o = s.value;
|
|
105
|
+
t.call(e, o[0], o[1]);
|
|
106
106
|
}
|
|
107
107
|
}, _t = (e, t) => {
|
|
108
108
|
let n;
|
|
@@ -112,14 +112,14 @@ const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (o, s) => {
|
|
|
112
112
|
return r;
|
|
113
113
|
}, qt = N("HTMLFormElement"), It = (e) => e.toLowerCase().replace(
|
|
114
114
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
115
|
-
function(n, r,
|
|
116
|
-
return r.toUpperCase() +
|
|
115
|
+
function(n, r, s) {
|
|
116
|
+
return r.toUpperCase() + s;
|
|
117
117
|
}
|
|
118
118
|
), Oe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Ht = N("RegExp"), ze = (e, t) => {
|
|
119
119
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
120
|
-
H(n, (
|
|
120
|
+
H(n, (s, o) => {
|
|
121
121
|
let i;
|
|
122
|
-
(i = t(
|
|
122
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
123
123
|
}), Object.defineProperties(e, r);
|
|
124
124
|
}, vt = (e) => {
|
|
125
125
|
ze(e, (t, n) => {
|
|
@@ -137,9 +137,9 @@ const Nt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (o, s) => {
|
|
|
137
137
|
}
|
|
138
138
|
});
|
|
139
139
|
}, Mt = (e, t) => {
|
|
140
|
-
const n = {}, r = (
|
|
141
|
-
|
|
142
|
-
n[
|
|
140
|
+
const n = {}, r = (s) => {
|
|
141
|
+
s.forEach((o) => {
|
|
142
|
+
n[o] = !0;
|
|
143
143
|
});
|
|
144
144
|
};
|
|
145
145
|
return j(e) ? r(e) : r(String(e).split(t)), n;
|
|
@@ -159,30 +159,30 @@ function Vt(e) {
|
|
|
159
159
|
return !!(e && x(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
160
160
|
}
|
|
161
161
|
const Wt = (e) => {
|
|
162
|
-
const t = new Array(10), n = (r,
|
|
162
|
+
const t = new Array(10), n = (r, s) => {
|
|
163
163
|
if (Q(r)) {
|
|
164
164
|
if (t.indexOf(r) >= 0)
|
|
165
165
|
return;
|
|
166
166
|
if (!("toJSON" in r)) {
|
|
167
|
-
t[
|
|
168
|
-
const
|
|
167
|
+
t[s] = r;
|
|
168
|
+
const o = j(r) ? [] : {};
|
|
169
169
|
return H(r, (i, c) => {
|
|
170
|
-
const f = n(i,
|
|
171
|
-
!I(f) && (
|
|
172
|
-
}), t[
|
|
170
|
+
const f = n(i, s + 1);
|
|
171
|
+
!I(f) && (o[c] = f);
|
|
172
|
+
}), t[s] = void 0, o;
|
|
173
173
|
}
|
|
174
174
|
}
|
|
175
175
|
return r;
|
|
176
176
|
};
|
|
177
177
|
return n(e, 0);
|
|
178
|
-
}, Kt = N("AsyncFunction"), Gt = (e) => e && (Q(e) || x(e)) && x(e.then) && x(e.catch), $e = ((e, t) => e ? setImmediate : t ? ((n, r) => (
|
|
179
|
-
|
|
180
|
-
}, !1), (
|
|
181
|
-
r.push(
|
|
178
|
+
}, Kt = N("AsyncFunction"), Gt = (e) => e && (Q(e) || x(e)) && x(e.then) && x(e.catch), $e = ((e, t) => e ? setImmediate : t ? ((n, r) => (B.addEventListener("message", ({ source: s, data: o }) => {
|
|
179
|
+
s === B && o === n && r.length && r.shift()();
|
|
180
|
+
}, !1), (s) => {
|
|
181
|
+
r.push(s), B.postMessage(n, "*");
|
|
182
182
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
183
183
|
typeof setImmediate == "function",
|
|
184
|
-
x(
|
|
185
|
-
), Xt = typeof queueMicrotask < "u" ? queueMicrotask.bind(
|
|
184
|
+
x(B.postMessage)
|
|
185
|
+
), Xt = typeof queueMicrotask < "u" ? queueMicrotask.bind(B) : typeof process < "u" && process.nextTick || $e, a = {
|
|
186
186
|
isArray: j,
|
|
187
187
|
isArrayBuffer: Ie,
|
|
188
188
|
isBuffer: pt,
|
|
@@ -205,7 +205,7 @@ const Wt = (e) => {
|
|
|
205
205
|
isFunction: x,
|
|
206
206
|
isStream: St,
|
|
207
207
|
isURLSearchParams: Ot,
|
|
208
|
-
isTypedArray:
|
|
208
|
+
isTypedArray: Dt,
|
|
209
209
|
isFileList: Et,
|
|
210
210
|
forEach: H,
|
|
211
211
|
merge: ie,
|
|
@@ -216,8 +216,8 @@ const Wt = (e) => {
|
|
|
216
216
|
toFlatObject: Ut,
|
|
217
217
|
kindOf: G,
|
|
218
218
|
kindOfTest: N,
|
|
219
|
-
endsWith:
|
|
220
|
-
toArray:
|
|
219
|
+
endsWith: Lt,
|
|
220
|
+
toArray: Bt,
|
|
221
221
|
forEachEntry: jt,
|
|
222
222
|
matchAll: _t,
|
|
223
223
|
isHTMLForm: qt,
|
|
@@ -231,7 +231,7 @@ const Wt = (e) => {
|
|
|
231
231
|
noop: zt,
|
|
232
232
|
toFiniteNumber: Jt,
|
|
233
233
|
findKey: ve,
|
|
234
|
-
global:
|
|
234
|
+
global: B,
|
|
235
235
|
isContextDefined: Me,
|
|
236
236
|
ALPHABET: Je,
|
|
237
237
|
generateString: $t,
|
|
@@ -242,8 +242,8 @@ const Wt = (e) => {
|
|
|
242
242
|
setImmediate: $e,
|
|
243
243
|
asap: Xt
|
|
244
244
|
};
|
|
245
|
-
function y(e, t, n, r,
|
|
246
|
-
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r),
|
|
245
|
+
function y(e, t, n, r, s) {
|
|
246
|
+
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
247
247
|
}
|
|
248
248
|
a.inherits(y, Error, {
|
|
249
249
|
toJSON: function() {
|
|
@@ -286,11 +286,11 @@ const Ve = y.prototype, We = {};
|
|
|
286
286
|
});
|
|
287
287
|
Object.defineProperties(y, We);
|
|
288
288
|
Object.defineProperty(Ve, "isAxiosError", { value: !0 });
|
|
289
|
-
y.from = (e, t, n, r,
|
|
289
|
+
y.from = (e, t, n, r, s, o) => {
|
|
290
290
|
const i = Object.create(Ve);
|
|
291
291
|
return a.toFlatObject(e, i, function(f) {
|
|
292
292
|
return f !== Error.prototype;
|
|
293
|
-
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r,
|
|
293
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
294
294
|
};
|
|
295
295
|
const Qt = null;
|
|
296
296
|
function ae(e) {
|
|
@@ -300,8 +300,8 @@ function Ke(e) {
|
|
|
300
300
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
301
301
|
}
|
|
302
302
|
function Ae(e, t, n) {
|
|
303
|
-
return e ? e.concat(t).map(function(
|
|
304
|
-
return
|
|
303
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
304
|
+
return s = Ke(s), !n && o ? "[" + s + "]" : s;
|
|
305
305
|
}).join(n ? "." : "") : t;
|
|
306
306
|
}
|
|
307
307
|
function Zt(e) {
|
|
@@ -320,8 +320,8 @@ function Z(e, t, n) {
|
|
|
320
320
|
}, !1, function(m, h) {
|
|
321
321
|
return !a.isUndefined(h[m]);
|
|
322
322
|
});
|
|
323
|
-
const r = n.metaTokens,
|
|
324
|
-
if (!a.isFunction(
|
|
323
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
324
|
+
if (!a.isFunction(s))
|
|
325
325
|
throw new TypeError("visitor must be a function");
|
|
326
326
|
function u(d) {
|
|
327
327
|
if (d === null)
|
|
@@ -341,12 +341,12 @@ function Z(e, t, n) {
|
|
|
341
341
|
return m = Ke(m), E.forEach(function(O, k) {
|
|
342
342
|
!(a.isUndefined(O) || O === null) && t.append(
|
|
343
343
|
// eslint-disable-next-line no-nested-ternary
|
|
344
|
-
i === !0 ? Ae([m], k,
|
|
344
|
+
i === !0 ? Ae([m], k, o) : i === null ? m : m + "[]",
|
|
345
345
|
u(O)
|
|
346
346
|
);
|
|
347
347
|
}), !1;
|
|
348
348
|
}
|
|
349
|
-
return ae(d) ? !0 : (t.append(Ae(h, m,
|
|
349
|
+
return ae(d) ? !0 : (t.append(Ae(h, m, o), u(d)), !1);
|
|
350
350
|
}
|
|
351
351
|
const p = [], b = Object.assign(Yt, {
|
|
352
352
|
defaultVisitor: l,
|
|
@@ -358,7 +358,7 @@ function Z(e, t, n) {
|
|
|
358
358
|
if (p.indexOf(d) !== -1)
|
|
359
359
|
throw Error("Circular reference detected in " + m.join("."));
|
|
360
360
|
p.push(d), a.forEach(d, function(E, R) {
|
|
361
|
-
(!(a.isUndefined(E) || E === null) &&
|
|
361
|
+
(!(a.isUndefined(E) || E === null) && s.call(
|
|
362
362
|
t,
|
|
363
363
|
E,
|
|
364
364
|
a.isString(R) ? R.trim() : R,
|
|
@@ -397,8 +397,8 @@ Ge.toString = function(t) {
|
|
|
397
397
|
const n = t ? function(r) {
|
|
398
398
|
return t.call(this, r, Ce);
|
|
399
399
|
} : Ce;
|
|
400
|
-
return this._pairs.map(function(
|
|
401
|
-
return n(
|
|
400
|
+
return this._pairs.map(function(s) {
|
|
401
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
402
402
|
}, "").join("&");
|
|
403
403
|
};
|
|
404
404
|
function en(e) {
|
|
@@ -407,11 +407,11 @@ function en(e) {
|
|
|
407
407
|
function Xe(e, t, n) {
|
|
408
408
|
if (!t)
|
|
409
409
|
return e;
|
|
410
|
-
const r = n && n.encode || en,
|
|
411
|
-
let
|
|
412
|
-
if (
|
|
410
|
+
const r = n && n.encode || en, s = n && n.serialize;
|
|
411
|
+
let o;
|
|
412
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new me(t, n).toString(r), o) {
|
|
413
413
|
const i = e.indexOf("#");
|
|
414
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") +
|
|
414
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
415
415
|
}
|
|
416
416
|
return e;
|
|
417
417
|
}
|
|
@@ -473,7 +473,7 @@ const Qe = {
|
|
|
473
473
|
silentJSONParsing: !0,
|
|
474
474
|
forcedJSONParsing: !0,
|
|
475
475
|
clarifyTimeoutError: !1
|
|
476
|
-
}, tn = typeof URLSearchParams < "u" ? URLSearchParams : me, nn = typeof FormData < "u" ? FormData : null, rn = typeof Blob < "u" ? Blob : null,
|
|
476
|
+
}, tn = typeof URLSearchParams < "u" ? URLSearchParams : me, nn = typeof FormData < "u" ? FormData : null, rn = typeof Blob < "u" ? Blob : null, sn = {
|
|
477
477
|
isBrowser: !0,
|
|
478
478
|
classes: {
|
|
479
479
|
URLSearchParams: tn,
|
|
@@ -481,22 +481,22 @@ const Qe = {
|
|
|
481
481
|
Blob: rn
|
|
482
482
|
},
|
|
483
483
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
484
|
-
}, ye = typeof window < "u" && typeof document < "u", ce = typeof navigator == "object" && navigator || void 0,
|
|
484
|
+
}, ye = typeof window < "u" && typeof document < "u", ce = typeof navigator == "object" && navigator || void 0, on = ye && (!ce || ["ReactNative", "NativeScript", "NS"].indexOf(ce.product) < 0), an = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
485
485
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", cn = ye && window.location.href || "http://localhost", un = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
486
486
|
__proto__: null,
|
|
487
487
|
hasBrowserEnv: ye,
|
|
488
|
-
hasStandardBrowserEnv:
|
|
488
|
+
hasStandardBrowserEnv: on,
|
|
489
489
|
hasStandardBrowserWebWorkerEnv: an,
|
|
490
490
|
navigator: ce,
|
|
491
491
|
origin: cn
|
|
492
492
|
}, Symbol.toStringTag, { value: "Module" })), A = {
|
|
493
493
|
...un,
|
|
494
|
-
...
|
|
494
|
+
...sn
|
|
495
495
|
};
|
|
496
496
|
function ln(e, t) {
|
|
497
497
|
return Z(e, new A.classes.URLSearchParams(), Object.assign({
|
|
498
|
-
visitor: function(n, r,
|
|
499
|
-
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) :
|
|
498
|
+
visitor: function(n, r, s, o) {
|
|
499
|
+
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
500
500
|
}
|
|
501
501
|
}, t));
|
|
502
502
|
}
|
|
@@ -506,24 +506,24 @@ function fn(e) {
|
|
|
506
506
|
function dn(e) {
|
|
507
507
|
const t = {}, n = Object.keys(e);
|
|
508
508
|
let r;
|
|
509
|
-
const
|
|
510
|
-
let
|
|
511
|
-
for (r = 0; r <
|
|
512
|
-
|
|
509
|
+
const s = n.length;
|
|
510
|
+
let o;
|
|
511
|
+
for (r = 0; r < s; r++)
|
|
512
|
+
o = n[r], t[o] = e[o];
|
|
513
513
|
return t;
|
|
514
514
|
}
|
|
515
515
|
function Ze(e) {
|
|
516
|
-
function t(n, r,
|
|
517
|
-
let i = n[
|
|
516
|
+
function t(n, r, s, o) {
|
|
517
|
+
let i = n[o++];
|
|
518
518
|
if (i === "__proto__")
|
|
519
519
|
return !0;
|
|
520
|
-
const c = Number.isFinite(+i), f =
|
|
521
|
-
return i = !i && a.isArray(
|
|
520
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
521
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = dn(s[i])), !c);
|
|
522
522
|
}
|
|
523
523
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
524
524
|
const n = {};
|
|
525
|
-
return a.forEachEntry(e, (r,
|
|
526
|
-
t(fn(r),
|
|
525
|
+
return a.forEachEntry(e, (r, s) => {
|
|
526
|
+
t(fn(r), s, n, 0);
|
|
527
527
|
}), n;
|
|
528
528
|
}
|
|
529
529
|
return null;
|
|
@@ -542,9 +542,9 @@ const we = {
|
|
|
542
542
|
transitional: Qe,
|
|
543
543
|
adapter: ["xhr", "http", "fetch"],
|
|
544
544
|
transformRequest: [function(t, n) {
|
|
545
|
-
const r = n.getContentType() || "",
|
|
546
|
-
if (
|
|
547
|
-
return
|
|
545
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
546
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
547
|
+
return s ? JSON.stringify(Ze(t)) : t;
|
|
548
548
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
549
549
|
return t;
|
|
550
550
|
if (a.isArrayBufferView(t))
|
|
@@ -552,7 +552,7 @@ const we = {
|
|
|
552
552
|
if (a.isURLSearchParams(t))
|
|
553
553
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
554
554
|
let c;
|
|
555
|
-
if (
|
|
555
|
+
if (o) {
|
|
556
556
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
557
557
|
return ln(t, this.formSerializer).toString();
|
|
558
558
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
@@ -564,14 +564,14 @@ const we = {
|
|
|
564
564
|
);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
|
-
return
|
|
567
|
+
return o || s ? (n.setContentType("application/json", !1), pn(t)) : t;
|
|
568
568
|
}],
|
|
569
569
|
transformResponse: [function(t) {
|
|
570
|
-
const n = this.transitional || we.transitional, r = n && n.forcedJSONParsing,
|
|
570
|
+
const n = this.transitional || we.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
571
571
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
572
572
|
return t;
|
|
573
|
-
if (t && a.isString(t) && (r && !this.responseType ||
|
|
574
|
-
const i = !(n && n.silentJSONParsing) &&
|
|
573
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
574
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
575
575
|
try {
|
|
576
576
|
return JSON.parse(t);
|
|
577
577
|
} catch (c) {
|
|
@@ -627,10 +627,10 @@ const be = we, hn = a.toObjectSet([
|
|
|
627
627
|
"user-agent"
|
|
628
628
|
]), mn = (e) => {
|
|
629
629
|
const t = {};
|
|
630
|
-
let n, r,
|
|
630
|
+
let n, r, s;
|
|
631
631
|
return e && e.split(`
|
|
632
632
|
`).forEach(function(i) {
|
|
633
|
-
|
|
633
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && hn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
634
634
|
}), t;
|
|
635
635
|
}, Pe = Symbol("internals");
|
|
636
636
|
function q(e) {
|
|
@@ -647,10 +647,10 @@ function yn(e) {
|
|
|
647
647
|
return t;
|
|
648
648
|
}
|
|
649
649
|
const wn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
650
|
-
function ne(e, t, n, r,
|
|
650
|
+
function ne(e, t, n, r, s) {
|
|
651
651
|
if (a.isFunction(r))
|
|
652
652
|
return r.call(this, t, n);
|
|
653
|
-
if (
|
|
653
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
654
654
|
if (a.isString(r))
|
|
655
655
|
return t.indexOf(r) !== -1;
|
|
656
656
|
if (a.isRegExp(r))
|
|
@@ -664,8 +664,8 @@ function gn(e, t) {
|
|
|
664
664
|
const n = a.toCamelCase(" " + t);
|
|
665
665
|
["get", "set", "has"].forEach((r) => {
|
|
666
666
|
Object.defineProperty(e, r + n, {
|
|
667
|
-
value: function(
|
|
668
|
-
return this[r].call(this, t,
|
|
667
|
+
value: function(s, o, i) {
|
|
668
|
+
return this[r].call(this, t, s, o, i);
|
|
669
669
|
},
|
|
670
670
|
configurable: !0
|
|
671
671
|
});
|
|
@@ -676,39 +676,39 @@ class Y {
|
|
|
676
676
|
t && this.set(t);
|
|
677
677
|
}
|
|
678
678
|
set(t, n, r) {
|
|
679
|
-
const
|
|
680
|
-
function
|
|
679
|
+
const s = this;
|
|
680
|
+
function o(c, f, u) {
|
|
681
681
|
const l = q(f);
|
|
682
682
|
if (!l)
|
|
683
683
|
throw new Error("header name must be a non-empty string");
|
|
684
|
-
const p = a.findKey(
|
|
685
|
-
(!p ||
|
|
684
|
+
const p = a.findKey(s, l);
|
|
685
|
+
(!p || s[p] === void 0 || u === !0 || u === void 0 && s[p] !== !1) && (s[p || f] = J(c));
|
|
686
686
|
}
|
|
687
|
-
const i = (c, f) => a.forEach(c, (u, l) =>
|
|
687
|
+
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
688
688
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
689
689
|
i(t, n);
|
|
690
690
|
else if (a.isString(t) && (t = t.trim()) && !wn(t))
|
|
691
691
|
i(mn(t), n);
|
|
692
692
|
else if (a.isHeaders(t))
|
|
693
693
|
for (const [c, f] of t.entries())
|
|
694
|
-
|
|
694
|
+
o(f, c, r);
|
|
695
695
|
else
|
|
696
|
-
t != null &&
|
|
696
|
+
t != null && o(n, t, r);
|
|
697
697
|
return this;
|
|
698
698
|
}
|
|
699
699
|
get(t, n) {
|
|
700
700
|
if (t = q(t), t) {
|
|
701
701
|
const r = a.findKey(this, t);
|
|
702
702
|
if (r) {
|
|
703
|
-
const
|
|
703
|
+
const s = this[r];
|
|
704
704
|
if (!n)
|
|
705
|
-
return
|
|
705
|
+
return s;
|
|
706
706
|
if (n === !0)
|
|
707
|
-
return yn(
|
|
707
|
+
return yn(s);
|
|
708
708
|
if (a.isFunction(n))
|
|
709
|
-
return n.call(this,
|
|
709
|
+
return n.call(this, s, r);
|
|
710
710
|
if (a.isRegExp(n))
|
|
711
|
-
return n.exec(
|
|
711
|
+
return n.exec(s);
|
|
712
712
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
713
713
|
}
|
|
714
714
|
}
|
|
@@ -722,34 +722,34 @@ class Y {
|
|
|
722
722
|
}
|
|
723
723
|
delete(t, n) {
|
|
724
724
|
const r = this;
|
|
725
|
-
let
|
|
726
|
-
function
|
|
725
|
+
let s = !1;
|
|
726
|
+
function o(i) {
|
|
727
727
|
if (i = q(i), i) {
|
|
728
728
|
const c = a.findKey(r, i);
|
|
729
|
-
c && (!n || ne(r, r[c], c, n)) && (delete r[c],
|
|
729
|
+
c && (!n || ne(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
|
-
return a.isArray(t) ? t.forEach(
|
|
732
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
733
733
|
}
|
|
734
734
|
clear(t) {
|
|
735
735
|
const n = Object.keys(this);
|
|
736
|
-
let r = n.length,
|
|
736
|
+
let r = n.length, s = !1;
|
|
737
737
|
for (; r--; ) {
|
|
738
|
-
const
|
|
739
|
-
(!t || ne(this, this[
|
|
738
|
+
const o = n[r];
|
|
739
|
+
(!t || ne(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
740
740
|
}
|
|
741
|
-
return
|
|
741
|
+
return s;
|
|
742
742
|
}
|
|
743
743
|
normalize(t) {
|
|
744
744
|
const n = this, r = {};
|
|
745
|
-
return a.forEach(this, (
|
|
746
|
-
const i = a.findKey(r,
|
|
745
|
+
return a.forEach(this, (s, o) => {
|
|
746
|
+
const i = a.findKey(r, o);
|
|
747
747
|
if (i) {
|
|
748
|
-
n[i] = J(
|
|
748
|
+
n[i] = J(s), delete n[o];
|
|
749
749
|
return;
|
|
750
750
|
}
|
|
751
|
-
const c = t ? bn(
|
|
752
|
-
c !==
|
|
751
|
+
const c = t ? bn(o) : String(o).trim();
|
|
752
|
+
c !== o && delete n[o], n[c] = J(s), r[c] = !0;
|
|
753
753
|
}), this;
|
|
754
754
|
}
|
|
755
755
|
concat(...t) {
|
|
@@ -757,8 +757,8 @@ class Y {
|
|
|
757
757
|
}
|
|
758
758
|
toJSON(t) {
|
|
759
759
|
const n = /* @__PURE__ */ Object.create(null);
|
|
760
|
-
return a.forEach(this, (r,
|
|
761
|
-
r != null && r !== !1 && (n[
|
|
760
|
+
return a.forEach(this, (r, s) => {
|
|
761
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
762
762
|
}), n;
|
|
763
763
|
}
|
|
764
764
|
[Symbol.iterator]() {
|
|
@@ -776,17 +776,17 @@ class Y {
|
|
|
776
776
|
}
|
|
777
777
|
static concat(t, ...n) {
|
|
778
778
|
const r = new this(t);
|
|
779
|
-
return n.forEach((
|
|
779
|
+
return n.forEach((s) => r.set(s)), r;
|
|
780
780
|
}
|
|
781
781
|
static accessor(t) {
|
|
782
782
|
const r = (this[Pe] = this[Pe] = {
|
|
783
783
|
accessors: {}
|
|
784
|
-
}).accessors,
|
|
785
|
-
function
|
|
784
|
+
}).accessors, s = this.prototype;
|
|
785
|
+
function o(i) {
|
|
786
786
|
const c = q(i);
|
|
787
|
-
r[c] || (gn(
|
|
787
|
+
r[c] || (gn(s, i), r[c] = !0);
|
|
788
788
|
}
|
|
789
|
-
return a.isArray(t) ? t.forEach(
|
|
789
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
790
790
|
}
|
|
791
791
|
}
|
|
792
792
|
Y.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
@@ -802,11 +802,11 @@ a.reduceDescriptors(Y.prototype, ({ value: e }, t) => {
|
|
|
802
802
|
a.freezeMethods(Y);
|
|
803
803
|
const P = Y;
|
|
804
804
|
function re(e, t) {
|
|
805
|
-
const n = this || be, r = t || n,
|
|
806
|
-
let
|
|
805
|
+
const n = this || be, r = t || n, s = P.from(r.headers);
|
|
806
|
+
let o = r.data;
|
|
807
807
|
return a.forEach(e, function(c) {
|
|
808
|
-
|
|
809
|
-
}),
|
|
808
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
809
|
+
}), s.normalize(), o;
|
|
810
810
|
}
|
|
811
811
|
function Ye(e) {
|
|
812
812
|
return !!(e && e.__CANCEL__);
|
|
@@ -834,36 +834,36 @@ function En(e) {
|
|
|
834
834
|
function Sn(e, t) {
|
|
835
835
|
e = e || 10;
|
|
836
836
|
const n = new Array(e), r = new Array(e);
|
|
837
|
-
let
|
|
837
|
+
let s = 0, o = 0, i;
|
|
838
838
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
839
|
-
const u = Date.now(), l = r[
|
|
840
|
-
i || (i = u), n[
|
|
841
|
-
let p =
|
|
842
|
-
for (; p !==
|
|
839
|
+
const u = Date.now(), l = r[o];
|
|
840
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
841
|
+
let p = o, b = 0;
|
|
842
|
+
for (; p !== s; )
|
|
843
843
|
b += n[p++], p = p % e;
|
|
844
|
-
if (
|
|
844
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
845
845
|
return;
|
|
846
846
|
const w = l && u - l;
|
|
847
847
|
return w ? Math.round(b * 1e3 / w) : void 0;
|
|
848
848
|
};
|
|
849
849
|
}
|
|
850
850
|
function Rn(e, t) {
|
|
851
|
-
let n = 0, r = 1e3 / t,
|
|
851
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
852
852
|
const i = (u, l = Date.now()) => {
|
|
853
|
-
n = l,
|
|
853
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
854
854
|
};
|
|
855
855
|
return [(...u) => {
|
|
856
856
|
const l = Date.now(), p = l - n;
|
|
857
|
-
p >= r ? i(u, l) : (
|
|
858
|
-
|
|
857
|
+
p >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
858
|
+
o = null, i(s);
|
|
859
859
|
}, r - p)));
|
|
860
|
-
}, () =>
|
|
860
|
+
}, () => s && i(s)];
|
|
861
861
|
}
|
|
862
862
|
const V = (e, t, n = 3) => {
|
|
863
863
|
let r = 0;
|
|
864
|
-
const
|
|
865
|
-
return Rn((
|
|
866
|
-
const i =
|
|
864
|
+
const s = Sn(50, 250);
|
|
865
|
+
return Rn((o) => {
|
|
866
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
867
867
|
r = i;
|
|
868
868
|
const p = {
|
|
869
869
|
loaded: i,
|
|
@@ -872,7 +872,7 @@ const V = (e, t, n = 3) => {
|
|
|
872
872
|
bytes: f,
|
|
873
873
|
rate: u || void 0,
|
|
874
874
|
estimated: u && c && l ? (c - i) / u : void 0,
|
|
875
|
-
event:
|
|
875
|
+
event: o,
|
|
876
876
|
lengthComputable: c != null,
|
|
877
877
|
[t ? "download" : "upload"]: !0
|
|
878
878
|
};
|
|
@@ -891,8 +891,8 @@ const V = (e, t, n = 3) => {
|
|
|
891
891
|
function() {
|
|
892
892
|
const t = A.navigator && /(msie|trident)/i.test(A.navigator.userAgent), n = document.createElement("a");
|
|
893
893
|
let r;
|
|
894
|
-
function o
|
|
895
|
-
let i =
|
|
894
|
+
function s(o) {
|
|
895
|
+
let i = o;
|
|
896
896
|
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
897
897
|
href: n.href,
|
|
898
898
|
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
@@ -904,8 +904,8 @@ const V = (e, t, n = 3) => {
|
|
|
904
904
|
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
905
905
|
};
|
|
906
906
|
}
|
|
907
|
-
return r =
|
|
908
|
-
const c = a.isString(i) ?
|
|
907
|
+
return r = s(window.location.href), function(i) {
|
|
908
|
+
const c = a.isString(i) ? s(i) : i;
|
|
909
909
|
return c.protocol === r.protocol && c.host === r.host;
|
|
910
910
|
};
|
|
911
911
|
}()
|
|
@@ -919,9 +919,9 @@ const V = (e, t, n = 3) => {
|
|
|
919
919
|
), Tn = A.hasStandardBrowserEnv ? (
|
|
920
920
|
// Standard browser envs support document.cookie
|
|
921
921
|
{
|
|
922
|
-
write(e, t, n, r,
|
|
922
|
+
write(e, t, n, r, s, o) {
|
|
923
923
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
924
|
-
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(
|
|
924
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
925
925
|
},
|
|
926
926
|
read(e) {
|
|
927
927
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -953,20 +953,20 @@ function tt(e, t) {
|
|
|
953
953
|
return e && !An(t) ? Cn(e, t) : t;
|
|
954
954
|
}
|
|
955
955
|
const Fe = (e) => e instanceof P ? { ...e } : e;
|
|
956
|
-
function
|
|
956
|
+
function D(e, t) {
|
|
957
957
|
t = t || {};
|
|
958
958
|
const n = {};
|
|
959
959
|
function r(u, l, p) {
|
|
960
960
|
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: p }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
961
961
|
}
|
|
962
|
-
function
|
|
962
|
+
function s(u, l, p) {
|
|
963
963
|
if (a.isUndefined(l)) {
|
|
964
964
|
if (!a.isUndefined(u))
|
|
965
965
|
return r(void 0, u, p);
|
|
966
966
|
} else
|
|
967
967
|
return r(u, l, p);
|
|
968
968
|
}
|
|
969
|
-
function
|
|
969
|
+
function o(u, l) {
|
|
970
970
|
if (!a.isUndefined(l))
|
|
971
971
|
return r(void 0, l);
|
|
972
972
|
}
|
|
@@ -984,9 +984,9 @@ function L(e, t) {
|
|
|
984
984
|
return r(void 0, u);
|
|
985
985
|
}
|
|
986
986
|
const f = {
|
|
987
|
-
url:
|
|
988
|
-
method:
|
|
989
|
-
data:
|
|
987
|
+
url: o,
|
|
988
|
+
method: o,
|
|
989
|
+
data: o,
|
|
990
990
|
baseURL: i,
|
|
991
991
|
transformRequest: i,
|
|
992
992
|
transformResponse: i,
|
|
@@ -1012,16 +1012,16 @@ function L(e, t) {
|
|
|
1012
1012
|
socketPath: i,
|
|
1013
1013
|
responseEncoding: i,
|
|
1014
1014
|
validateStatus: c,
|
|
1015
|
-
headers: (u, l) =>
|
|
1015
|
+
headers: (u, l) => s(Fe(u), Fe(l), !0)
|
|
1016
1016
|
};
|
|
1017
1017
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1018
|
-
const p = f[l] ||
|
|
1018
|
+
const p = f[l] || s, b = p(e[l], t[l], l);
|
|
1019
1019
|
a.isUndefined(b) && p !== c || (n[l] = b);
|
|
1020
1020
|
}), n;
|
|
1021
1021
|
}
|
|
1022
1022
|
const nt = (e) => {
|
|
1023
|
-
const t =
|
|
1024
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName:
|
|
1023
|
+
const t = D({}, e);
|
|
1024
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
1025
1025
|
t.headers = i = P.from(i), t.url = Xe(tt(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
|
1026
1026
|
"Authorization",
|
|
1027
1027
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
@@ -1036,21 +1036,21 @@ const nt = (e) => {
|
|
|
1036
1036
|
}
|
|
1037
1037
|
}
|
|
1038
1038
|
if (A.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && On(t.url))) {
|
|
1039
|
-
const u =
|
|
1040
|
-
u && i.set(
|
|
1039
|
+
const u = s && o && Tn.read(o);
|
|
1040
|
+
u && i.set(s, u);
|
|
1041
1041
|
}
|
|
1042
1042
|
return t;
|
|
1043
1043
|
}, xn = typeof XMLHttpRequest < "u", Pn = xn && function(e) {
|
|
1044
1044
|
return new Promise(function(n, r) {
|
|
1045
|
-
const
|
|
1046
|
-
let
|
|
1047
|
-
const i = P.from(
|
|
1048
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } =
|
|
1045
|
+
const s = nt(e);
|
|
1046
|
+
let o = s.data;
|
|
1047
|
+
const i = P.from(s.headers).normalize();
|
|
1048
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, p, b, w, d;
|
|
1049
1049
|
function m() {
|
|
1050
|
-
w && w(), d && d(),
|
|
1050
|
+
w && w(), d && d(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1051
1051
|
}
|
|
1052
1052
|
let h = new XMLHttpRequest();
|
|
1053
|
-
h.open(
|
|
1053
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1054
1054
|
function E() {
|
|
1055
1055
|
if (!h)
|
|
1056
1056
|
return;
|
|
@@ -1064,10 +1064,10 @@ const nt = (e) => {
|
|
|
1064
1064
|
config: e,
|
|
1065
1065
|
request: h
|
|
1066
1066
|
};
|
|
1067
|
-
et(function(
|
|
1068
|
-
n(
|
|
1069
|
-
}, function(
|
|
1070
|
-
r(
|
|
1067
|
+
et(function(L) {
|
|
1068
|
+
n(L), m();
|
|
1069
|
+
}, function(L) {
|
|
1070
|
+
r(L), m();
|
|
1071
1071
|
}, T), h = null;
|
|
1072
1072
|
}
|
|
1073
1073
|
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
@@ -1077,46 +1077,46 @@ const nt = (e) => {
|
|
|
1077
1077
|
}, h.onerror = function() {
|
|
1078
1078
|
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1079
1079
|
}, h.ontimeout = function() {
|
|
1080
|
-
let k =
|
|
1081
|
-
const T =
|
|
1082
|
-
|
|
1080
|
+
let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1081
|
+
const T = s.transitional || Qe;
|
|
1082
|
+
s.timeoutErrorMessage && (k = s.timeoutErrorMessage), r(new y(
|
|
1083
1083
|
k,
|
|
1084
1084
|
T.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1085
1085
|
e,
|
|
1086
1086
|
h
|
|
1087
1087
|
)), h = null;
|
|
1088
|
-
},
|
|
1088
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(k, T) {
|
|
1089
1089
|
h.setRequestHeader(T, k);
|
|
1090
|
-
}), a.isUndefined(
|
|
1090
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && ([b, d] = V(u, !0), h.addEventListener("progress", b)), f && h.upload && ([p, w] = V(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", w)), (s.cancelToken || s.signal) && (l = (O) => {
|
|
1091
1091
|
h && (r(!O || O.type ? new _(null, e, h) : O), h.abort(), h = null);
|
|
1092
|
-
},
|
|
1093
|
-
const R = En(
|
|
1092
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1093
|
+
const R = En(s.url);
|
|
1094
1094
|
if (R && A.protocols.indexOf(R) === -1) {
|
|
1095
1095
|
r(new y("Unsupported protocol " + R + ":", y.ERR_BAD_REQUEST, e));
|
|
1096
1096
|
return;
|
|
1097
1097
|
}
|
|
1098
|
-
h.send(
|
|
1098
|
+
h.send(o || null);
|
|
1099
1099
|
});
|
|
1100
1100
|
}, Nn = (e, t) => {
|
|
1101
1101
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1102
1102
|
if (t || n) {
|
|
1103
|
-
let r = new AbortController(),
|
|
1104
|
-
const
|
|
1105
|
-
if (!
|
|
1106
|
-
|
|
1103
|
+
let r = new AbortController(), s;
|
|
1104
|
+
const o = function(u) {
|
|
1105
|
+
if (!s) {
|
|
1106
|
+
s = !0, c();
|
|
1107
1107
|
const l = u instanceof Error ? u : this.reason;
|
|
1108
1108
|
r.abort(l instanceof y ? l : new _(l instanceof Error ? l.message : l));
|
|
1109
1109
|
}
|
|
1110
1110
|
};
|
|
1111
1111
|
let i = t && setTimeout(() => {
|
|
1112
|
-
i = null,
|
|
1112
|
+
i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1113
1113
|
}, t);
|
|
1114
1114
|
const c = () => {
|
|
1115
1115
|
e && (i && clearTimeout(i), i = null, e.forEach((u) => {
|
|
1116
|
-
u.unsubscribe ? u.unsubscribe(
|
|
1116
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1117
1117
|
}), e = null);
|
|
1118
1118
|
};
|
|
1119
|
-
e.forEach((u) => u.addEventListener("abort",
|
|
1119
|
+
e.forEach((u) => u.addEventListener("abort", o));
|
|
1120
1120
|
const { signal: f } = r;
|
|
1121
1121
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1122
1122
|
}
|
|
@@ -1126,13 +1126,13 @@ const nt = (e) => {
|
|
|
1126
1126
|
yield e;
|
|
1127
1127
|
return;
|
|
1128
1128
|
}
|
|
1129
|
-
let r = 0,
|
|
1129
|
+
let r = 0, s;
|
|
1130
1130
|
for (; r < n; )
|
|
1131
|
-
|
|
1131
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1132
1132
|
}, Un = async function* (e, t) {
|
|
1133
|
-
for await (const n of
|
|
1133
|
+
for await (const n of Ln(e))
|
|
1134
1134
|
yield* Fn(n, t);
|
|
1135
|
-
},
|
|
1135
|
+
}, Ln = async function* (e) {
|
|
1136
1136
|
if (e[Symbol.asyncIterator]) {
|
|
1137
1137
|
yield* e;
|
|
1138
1138
|
return;
|
|
@@ -1149,21 +1149,21 @@ const nt = (e) => {
|
|
|
1149
1149
|
await t.cancel();
|
|
1150
1150
|
}
|
|
1151
1151
|
}, Ue = (e, t, n, r) => {
|
|
1152
|
-
const
|
|
1153
|
-
let
|
|
1152
|
+
const s = Un(e, t);
|
|
1153
|
+
let o = 0, i, c = (f) => {
|
|
1154
1154
|
i || (i = !0, r && r(f));
|
|
1155
1155
|
};
|
|
1156
1156
|
return new ReadableStream({
|
|
1157
1157
|
async pull(f) {
|
|
1158
1158
|
try {
|
|
1159
|
-
const { done: u, value: l } = await
|
|
1159
|
+
const { done: u, value: l } = await s.next();
|
|
1160
1160
|
if (u) {
|
|
1161
1161
|
c(), f.close();
|
|
1162
1162
|
return;
|
|
1163
1163
|
}
|
|
1164
1164
|
let p = l.byteLength;
|
|
1165
1165
|
if (n) {
|
|
1166
|
-
let b =
|
|
1166
|
+
let b = o += p;
|
|
1167
1167
|
n(b);
|
|
1168
1168
|
}
|
|
1169
1169
|
f.enqueue(new Uint8Array(l));
|
|
@@ -1172,18 +1172,18 @@ const nt = (e) => {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
},
|
|
1174
1174
|
cancel(f) {
|
|
1175
|
-
return c(f),
|
|
1175
|
+
return c(f), s.return();
|
|
1176
1176
|
}
|
|
1177
1177
|
}, {
|
|
1178
1178
|
highWaterMark: 2
|
|
1179
1179
|
});
|
|
1180
|
-
}, ee = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", rt = ee && typeof ReadableStream == "function",
|
|
1180
|
+
}, ee = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", rt = ee && typeof ReadableStream == "function", Bn = ee && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), st = (e, ...t) => {
|
|
1181
1181
|
try {
|
|
1182
1182
|
return !!e(...t);
|
|
1183
1183
|
} catch {
|
|
1184
1184
|
return !1;
|
|
1185
1185
|
}
|
|
1186
|
-
},
|
|
1186
|
+
}, Dn = rt && st(() => {
|
|
1187
1187
|
let e = !1;
|
|
1188
1188
|
const t = new Request(A.origin, {
|
|
1189
1189
|
body: new ReadableStream(),
|
|
@@ -1193,7 +1193,7 @@ const nt = (e) => {
|
|
|
1193
1193
|
}
|
|
1194
1194
|
}).headers.has("Content-Type");
|
|
1195
1195
|
return e && !t;
|
|
1196
|
-
}),
|
|
1196
|
+
}), Le = 64 * 1024, ue = rt && st(() => a.isReadableStream(new Response("").body)), W = {
|
|
1197
1197
|
stream: ue && ((e) => e.body)
|
|
1198
1198
|
};
|
|
1199
1199
|
ee && ((e) => {
|
|
@@ -1216,7 +1216,7 @@ const jn = async (e) => {
|
|
|
1216
1216
|
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1217
1217
|
return e.byteLength;
|
|
1218
1218
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1219
|
-
return (await
|
|
1219
|
+
return (await Bn(e)).byteLength;
|
|
1220
1220
|
}, _n = async (e, t) => {
|
|
1221
1221
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1222
1222
|
return n ?? jn(t);
|
|
@@ -1225,8 +1225,8 @@ const jn = async (e) => {
|
|
|
1225
1225
|
url: t,
|
|
1226
1226
|
method: n,
|
|
1227
1227
|
data: r,
|
|
1228
|
-
signal:
|
|
1229
|
-
cancelToken:
|
|
1228
|
+
signal: s,
|
|
1229
|
+
cancelToken: o,
|
|
1230
1230
|
timeout: i,
|
|
1231
1231
|
onDownloadProgress: c,
|
|
1232
1232
|
onUploadProgress: f,
|
|
@@ -1236,24 +1236,24 @@ const jn = async (e) => {
|
|
|
1236
1236
|
fetchOptions: b
|
|
1237
1237
|
} = nt(e);
|
|
1238
1238
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1239
|
-
let w = kn([
|
|
1239
|
+
let w = kn([s, o && o.toAbortSignal()], i), d;
|
|
1240
1240
|
const m = w && w.unsubscribe && (() => {
|
|
1241
1241
|
w.unsubscribe();
|
|
1242
1242
|
});
|
|
1243
1243
|
let h;
|
|
1244
1244
|
try {
|
|
1245
|
-
if (f &&
|
|
1245
|
+
if (f && Dn && n !== "get" && n !== "head" && (h = await _n(l, r)) !== 0) {
|
|
1246
1246
|
let T = new Request(t, {
|
|
1247
1247
|
method: "POST",
|
|
1248
1248
|
body: r,
|
|
1249
1249
|
duplex: "half"
|
|
1250
1250
|
}), F;
|
|
1251
1251
|
if (a.isFormData(r) && (F = T.headers.get("content-type")) && l.setContentType(F), T.body) {
|
|
1252
|
-
const [
|
|
1252
|
+
const [L, v] = Ne(
|
|
1253
1253
|
h,
|
|
1254
1254
|
V(ke(f))
|
|
1255
1255
|
);
|
|
1256
|
-
r = Ue(T.body,
|
|
1256
|
+
r = Ue(T.body, Le, L, v);
|
|
1257
1257
|
}
|
|
1258
1258
|
}
|
|
1259
1259
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
@@ -1274,12 +1274,12 @@ const jn = async (e) => {
|
|
|
1274
1274
|
["status", "statusText", "headers"].forEach((Se) => {
|
|
1275
1275
|
T[Se] = R[Se];
|
|
1276
1276
|
});
|
|
1277
|
-
const F = a.toFiniteNumber(R.headers.get("content-length")), [
|
|
1277
|
+
const F = a.toFiniteNumber(R.headers.get("content-length")), [L, v] = c && Ne(
|
|
1278
1278
|
F,
|
|
1279
1279
|
V(ke(c), !0)
|
|
1280
1280
|
) || [];
|
|
1281
1281
|
R = new Response(
|
|
1282
|
-
Ue(R.body,
|
|
1282
|
+
Ue(R.body, Le, L, () => {
|
|
1283
1283
|
v && v(), m && m();
|
|
1284
1284
|
}),
|
|
1285
1285
|
T
|
|
@@ -1319,28 +1319,28 @@ a.forEach(le, (e, t) => {
|
|
|
1319
1319
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1320
1320
|
}
|
|
1321
1321
|
});
|
|
1322
|
-
const
|
|
1322
|
+
const Be = (e) => `- ${e}`, In = (e) => a.isFunction(e) || e === null || e === !1, ot = {
|
|
1323
1323
|
getAdapter: (e) => {
|
|
1324
1324
|
e = a.isArray(e) ? e : [e];
|
|
1325
1325
|
const { length: t } = e;
|
|
1326
1326
|
let n, r;
|
|
1327
|
-
const
|
|
1328
|
-
for (let
|
|
1329
|
-
n = e[
|
|
1327
|
+
const s = {};
|
|
1328
|
+
for (let o = 0; o < t; o++) {
|
|
1329
|
+
n = e[o];
|
|
1330
1330
|
let i;
|
|
1331
1331
|
if (r = n, !In(n) && (r = le[(i = String(n)).toLowerCase()], r === void 0))
|
|
1332
1332
|
throw new y(`Unknown adapter '${i}'`);
|
|
1333
1333
|
if (r)
|
|
1334
1334
|
break;
|
|
1335
|
-
|
|
1335
|
+
s[i || "#" + o] = r;
|
|
1336
1336
|
}
|
|
1337
1337
|
if (!r) {
|
|
1338
|
-
const
|
|
1338
|
+
const o = Object.entries(s).map(
|
|
1339
1339
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1340
1340
|
);
|
|
1341
|
-
let i = t ?
|
|
1342
|
-
` +
|
|
1343
|
-
`) : " " +
|
|
1341
|
+
let i = t ? o.length > 1 ? `since :
|
|
1342
|
+
` + o.map(Be).join(`
|
|
1343
|
+
`) : " " + Be(o[0]) : "as no adapter specified";
|
|
1344
1344
|
throw new y(
|
|
1345
1345
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1346
1346
|
"ERR_NOT_SUPPORT"
|
|
@@ -1350,22 +1350,22 @@ const De = (e) => `- ${e}`, In = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1350
1350
|
},
|
|
1351
1351
|
adapters: le
|
|
1352
1352
|
};
|
|
1353
|
-
function
|
|
1353
|
+
function se(e) {
|
|
1354
1354
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1355
1355
|
throw new _(null, e);
|
|
1356
1356
|
}
|
|
1357
|
-
function
|
|
1358
|
-
return
|
|
1357
|
+
function De(e) {
|
|
1358
|
+
return se(e), e.headers = P.from(e.headers), e.data = re.call(
|
|
1359
1359
|
e,
|
|
1360
1360
|
e.transformRequest
|
|
1361
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1362
|
-
return
|
|
1361
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), ot.getAdapter(e.adapter || be.adapter)(e).then(function(r) {
|
|
1362
|
+
return se(e), r.data = re.call(
|
|
1363
1363
|
e,
|
|
1364
1364
|
e.transformResponse,
|
|
1365
1365
|
r
|
|
1366
1366
|
), r.headers = P.from(r.headers), r;
|
|
1367
1367
|
}, function(r) {
|
|
1368
|
-
return Ye(r) || (
|
|
1368
|
+
return Ye(r) || (se(e), r && r.response && (r.response.data = re.call(
|
|
1369
1369
|
e,
|
|
1370
1370
|
e.transformResponse,
|
|
1371
1371
|
r.response
|
|
@@ -1380,38 +1380,38 @@ const it = "1.7.7", ge = {};
|
|
|
1380
1380
|
});
|
|
1381
1381
|
const je = {};
|
|
1382
1382
|
ge.transitional = function(t, n, r) {
|
|
1383
|
-
function o
|
|
1384
|
-
return "[Axios v" + it + "] Transitional option '" +
|
|
1383
|
+
function s(o, i) {
|
|
1384
|
+
return "[Axios v" + it + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1385
1385
|
}
|
|
1386
|
-
return (
|
|
1386
|
+
return (o, i, c) => {
|
|
1387
1387
|
if (t === !1)
|
|
1388
1388
|
throw new y(
|
|
1389
|
-
|
|
1389
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1390
1390
|
y.ERR_DEPRECATED
|
|
1391
1391
|
);
|
|
1392
1392
|
return n && !je[i] && (je[i] = !0, console.warn(
|
|
1393
|
-
|
|
1393
|
+
s(
|
|
1394
1394
|
i,
|
|
1395
1395
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1396
1396
|
)
|
|
1397
|
-
)), t ? t(
|
|
1397
|
+
)), t ? t(o, i, c) : !0;
|
|
1398
1398
|
};
|
|
1399
1399
|
};
|
|
1400
1400
|
function Hn(e, t, n) {
|
|
1401
1401
|
if (typeof e != "object")
|
|
1402
1402
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1403
1403
|
const r = Object.keys(e);
|
|
1404
|
-
let
|
|
1405
|
-
for (;
|
|
1406
|
-
const
|
|
1404
|
+
let s = r.length;
|
|
1405
|
+
for (; s-- > 0; ) {
|
|
1406
|
+
const o = r[s], i = t[o];
|
|
1407
1407
|
if (i) {
|
|
1408
|
-
const c = e[
|
|
1408
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1409
1409
|
if (f !== !0)
|
|
1410
|
-
throw new y("option " +
|
|
1410
|
+
throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1411
1411
|
continue;
|
|
1412
1412
|
}
|
|
1413
1413
|
if (n !== !0)
|
|
1414
|
-
throw new y("Unknown option " +
|
|
1414
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
1417
|
const fe = {
|
|
@@ -1438,12 +1438,12 @@ class K {
|
|
|
1438
1438
|
return await this._request(t, n);
|
|
1439
1439
|
} catch (r) {
|
|
1440
1440
|
if (r instanceof Error) {
|
|
1441
|
-
let
|
|
1442
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1443
|
-
const
|
|
1441
|
+
let s;
|
|
1442
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1443
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1444
1444
|
try {
|
|
1445
|
-
r.stack ?
|
|
1446
|
-
` +
|
|
1445
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1446
|
+
` + o) : r.stack = o;
|
|
1447
1447
|
} catch {
|
|
1448
1448
|
}
|
|
1449
1449
|
}
|
|
@@ -1451,28 +1451,28 @@ class K {
|
|
|
1451
1451
|
}
|
|
1452
1452
|
}
|
|
1453
1453
|
_request(t, n) {
|
|
1454
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1455
|
-
const { transitional: r, paramsSerializer:
|
|
1454
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = D(this.defaults, n);
|
|
1455
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1456
1456
|
r !== void 0 && fe.assertOptions(r, {
|
|
1457
1457
|
silentJSONParsing: U.transitional(U.boolean),
|
|
1458
1458
|
forcedJSONParsing: U.transitional(U.boolean),
|
|
1459
1459
|
clarifyTimeoutError: U.transitional(U.boolean)
|
|
1460
|
-
}, !1),
|
|
1461
|
-
serialize:
|
|
1462
|
-
} : fe.assertOptions(
|
|
1460
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1461
|
+
serialize: s
|
|
1462
|
+
} : fe.assertOptions(s, {
|
|
1463
1463
|
encode: U.function,
|
|
1464
1464
|
serialize: U.function
|
|
1465
1465
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1466
|
-
let i =
|
|
1467
|
-
|
|
1468
|
-
|
|
1466
|
+
let i = o && a.merge(
|
|
1467
|
+
o.common,
|
|
1468
|
+
o[n.method]
|
|
1469
1469
|
);
|
|
1470
|
-
|
|
1470
|
+
o && a.forEach(
|
|
1471
1471
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1472
1472
|
(d) => {
|
|
1473
|
-
delete
|
|
1473
|
+
delete o[d];
|
|
1474
1474
|
}
|
|
1475
|
-
), n.headers = P.concat(i,
|
|
1475
|
+
), n.headers = P.concat(i, o);
|
|
1476
1476
|
const c = [];
|
|
1477
1477
|
let f = !0;
|
|
1478
1478
|
this.interceptors.request.forEach(function(m) {
|
|
@@ -1484,7 +1484,7 @@ class K {
|
|
|
1484
1484
|
});
|
|
1485
1485
|
let l, p = 0, b;
|
|
1486
1486
|
if (!f) {
|
|
1487
|
-
const d = [
|
|
1487
|
+
const d = [De.bind(this), void 0];
|
|
1488
1488
|
for (d.unshift.apply(d, c), d.push.apply(d, u), b = d.length, l = Promise.resolve(n); p < b; )
|
|
1489
1489
|
l = l.then(d[p++], d[p++]);
|
|
1490
1490
|
return l;
|
|
@@ -1501,7 +1501,7 @@ class K {
|
|
|
1501
1501
|
}
|
|
1502
1502
|
}
|
|
1503
1503
|
try {
|
|
1504
|
-
l =
|
|
1504
|
+
l = De.call(this, w);
|
|
1505
1505
|
} catch (d) {
|
|
1506
1506
|
return Promise.reject(d);
|
|
1507
1507
|
}
|
|
@@ -1510,14 +1510,14 @@ class K {
|
|
|
1510
1510
|
return l;
|
|
1511
1511
|
}
|
|
1512
1512
|
getUri(t) {
|
|
1513
|
-
t =
|
|
1513
|
+
t = D(this.defaults, t);
|
|
1514
1514
|
const n = tt(t.baseURL, t.url);
|
|
1515
1515
|
return Xe(n, t.params, t.paramsSerializer);
|
|
1516
1516
|
}
|
|
1517
1517
|
}
|
|
1518
1518
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1519
1519
|
K.prototype[t] = function(n, r) {
|
|
1520
|
-
return this.request(
|
|
1520
|
+
return this.request(D(r || {}, {
|
|
1521
1521
|
method: t,
|
|
1522
1522
|
url: n,
|
|
1523
1523
|
data: (r || {}).data
|
|
@@ -1526,13 +1526,13 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1526
1526
|
});
|
|
1527
1527
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1528
1528
|
function n(r) {
|
|
1529
|
-
return function(
|
|
1530
|
-
return this.request(
|
|
1529
|
+
return function(o, i, c) {
|
|
1530
|
+
return this.request(D(c || {}, {
|
|
1531
1531
|
method: t,
|
|
1532
1532
|
headers: r ? {
|
|
1533
1533
|
"Content-Type": "multipart/form-data"
|
|
1534
1534
|
} : {},
|
|
1535
|
-
url:
|
|
1535
|
+
url: o,
|
|
1536
1536
|
data: i
|
|
1537
1537
|
}));
|
|
1538
1538
|
};
|
|
@@ -1545,27 +1545,27 @@ class Ee {
|
|
|
1545
1545
|
if (typeof t != "function")
|
|
1546
1546
|
throw new TypeError("executor must be a function.");
|
|
1547
1547
|
let n;
|
|
1548
|
-
this.promise = new Promise(function(
|
|
1549
|
-
n =
|
|
1548
|
+
this.promise = new Promise(function(o) {
|
|
1549
|
+
n = o;
|
|
1550
1550
|
});
|
|
1551
1551
|
const r = this;
|
|
1552
|
-
this.promise.then((
|
|
1552
|
+
this.promise.then((s) => {
|
|
1553
1553
|
if (!r._listeners)
|
|
1554
1554
|
return;
|
|
1555
|
-
let
|
|
1556
|
-
for (;
|
|
1557
|
-
r._listeners[
|
|
1555
|
+
let o = r._listeners.length;
|
|
1556
|
+
for (; o-- > 0; )
|
|
1557
|
+
r._listeners[o](s);
|
|
1558
1558
|
r._listeners = null;
|
|
1559
|
-
}), this.promise.then = (
|
|
1560
|
-
let
|
|
1559
|
+
}), this.promise.then = (s) => {
|
|
1560
|
+
let o;
|
|
1561
1561
|
const i = new Promise((c) => {
|
|
1562
|
-
r.subscribe(c),
|
|
1563
|
-
}).then(
|
|
1562
|
+
r.subscribe(c), o = c;
|
|
1563
|
+
}).then(s);
|
|
1564
1564
|
return i.cancel = function() {
|
|
1565
|
-
r.unsubscribe(
|
|
1565
|
+
r.unsubscribe(o);
|
|
1566
1566
|
}, i;
|
|
1567
|
-
}, t(function(
|
|
1568
|
-
r.reason || (r.reason = new _(
|
|
1567
|
+
}, t(function(o, i, c) {
|
|
1568
|
+
r.reason || (r.reason = new _(o, i, c), n(r.reason));
|
|
1569
1569
|
});
|
|
1570
1570
|
}
|
|
1571
1571
|
/**
|
|
@@ -1607,8 +1607,8 @@ class Ee {
|
|
|
1607
1607
|
static source() {
|
|
1608
1608
|
let t;
|
|
1609
1609
|
return {
|
|
1610
|
-
token: new Ee(function(
|
|
1611
|
-
t =
|
|
1610
|
+
token: new Ee(function(s) {
|
|
1611
|
+
t = s;
|
|
1612
1612
|
}),
|
|
1613
1613
|
cancel: t
|
|
1614
1614
|
};
|
|
@@ -1694,8 +1694,8 @@ Object.entries(de).forEach(([e, t]) => {
|
|
|
1694
1694
|
const Jn = de;
|
|
1695
1695
|
function at(e) {
|
|
1696
1696
|
const t = new $(e), n = qe($.prototype.request, t);
|
|
1697
|
-
return a.extend(n, $.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(
|
|
1698
|
-
return at(
|
|
1697
|
+
return a.extend(n, $.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1698
|
+
return at(D(e, s));
|
|
1699
1699
|
}, n;
|
|
1700
1700
|
}
|
|
1701
1701
|
const S = at(be);
|
|
@@ -1712,10 +1712,10 @@ S.all = function(t) {
|
|
|
1712
1712
|
};
|
|
1713
1713
|
S.spread = Mn;
|
|
1714
1714
|
S.isAxiosError = zn;
|
|
1715
|
-
S.mergeConfig =
|
|
1715
|
+
S.mergeConfig = D;
|
|
1716
1716
|
S.AxiosHeaders = P;
|
|
1717
1717
|
S.formToJSON = (e) => Ze(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1718
|
-
S.getAdapter =
|
|
1718
|
+
S.getAdapter = ot.getAdapter;
|
|
1719
1719
|
S.HttpStatusCode = Jn;
|
|
1720
1720
|
S.default = S;
|
|
1721
1721
|
/*! js-cookie v3.0.5 | MIT */
|
|
@@ -1739,47 +1739,47 @@ var $n = {
|
|
|
1739
1739
|
}
|
|
1740
1740
|
};
|
|
1741
1741
|
function pe(e, t) {
|
|
1742
|
-
function n(
|
|
1742
|
+
function n(s, o, i) {
|
|
1743
1743
|
if (!(typeof document > "u")) {
|
|
1744
|
-
i = M({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()),
|
|
1744
|
+
i = M({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1745
1745
|
var c = "";
|
|
1746
1746
|
for (var f in i)
|
|
1747
1747
|
i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
|
|
1748
|
-
return document.cookie =
|
|
1748
|
+
return document.cookie = s + "=" + e.write(o, s) + c;
|
|
1749
1749
|
}
|
|
1750
1750
|
}
|
|
1751
|
-
function r(
|
|
1752
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
1753
|
-
for (var
|
|
1754
|
-
var f =
|
|
1751
|
+
function r(s) {
|
|
1752
|
+
if (!(typeof document > "u" || arguments.length && !s)) {
|
|
1753
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < o.length; c++) {
|
|
1754
|
+
var f = o[c].split("="), u = f.slice(1).join("=");
|
|
1755
1755
|
try {
|
|
1756
1756
|
var l = decodeURIComponent(f[0]);
|
|
1757
|
-
if (i[l] = e.read(u, l),
|
|
1757
|
+
if (i[l] = e.read(u, l), s === l)
|
|
1758
1758
|
break;
|
|
1759
1759
|
} catch {
|
|
1760
1760
|
}
|
|
1761
1761
|
}
|
|
1762
|
-
return
|
|
1762
|
+
return s ? i[s] : i;
|
|
1763
1763
|
}
|
|
1764
1764
|
}
|
|
1765
1765
|
return Object.create(
|
|
1766
1766
|
{
|
|
1767
1767
|
set: n,
|
|
1768
1768
|
get: r,
|
|
1769
|
-
remove: function(
|
|
1769
|
+
remove: function(s, o) {
|
|
1770
1770
|
n(
|
|
1771
|
-
|
|
1771
|
+
s,
|
|
1772
1772
|
"",
|
|
1773
|
-
M({},
|
|
1773
|
+
M({}, o, {
|
|
1774
1774
|
expires: -1
|
|
1775
1775
|
})
|
|
1776
1776
|
);
|
|
1777
1777
|
},
|
|
1778
|
-
withAttributes: function(
|
|
1779
|
-
return pe(this.converter, M({}, this.attributes,
|
|
1778
|
+
withAttributes: function(s) {
|
|
1779
|
+
return pe(this.converter, M({}, this.attributes, s));
|
|
1780
1780
|
},
|
|
1781
|
-
withConverter: function(
|
|
1782
|
-
return pe(M({}, this.converter,
|
|
1781
|
+
withConverter: function(s) {
|
|
1782
|
+
return pe(M({}, this.converter, s), this.attributes);
|
|
1783
1783
|
}
|
|
1784
1784
|
},
|
|
1785
1785
|
{
|
|
@@ -1788,7 +1788,7 @@ function pe(e, t) {
|
|
|
1788
1788
|
}
|
|
1789
1789
|
);
|
|
1790
1790
|
}
|
|
1791
|
-
var
|
|
1791
|
+
var oe = pe($n, { path: "/" });
|
|
1792
1792
|
const g = class g {
|
|
1793
1793
|
static setErrorsHandler(t) {
|
|
1794
1794
|
g.errorsHandler = t;
|
|
@@ -1796,9 +1796,9 @@ const g = class g {
|
|
|
1796
1796
|
};
|
|
1797
1797
|
C(g, "keyCookie", "Token"), C(g, "cookieOptions", {}), C(g, "registerRequest", new Re()), C(g, "registerFailedRequests", new Re()), C(g, "requestUploadToken", null), C(g, "errorsHandler", new lt()), C(g, "setMethodUploadToken", (t) => {
|
|
1798
1798
|
g.requestUploadToken = t;
|
|
1799
|
-
}), C(g, "requestInServer", (t, n = {}) => new Promise((r,
|
|
1799
|
+
}), C(g, "requestInServer", (t, n = {}) => new Promise((r, s) => {
|
|
1800
1800
|
var u, l, p;
|
|
1801
|
-
let
|
|
1801
|
+
let o = { url: t, statusCode: 0, data: {}, res: {} };
|
|
1802
1802
|
const i = { url: t, statusCode: 520, msg: "", isErr: !0, errExt: {} }, c = {
|
|
1803
1803
|
method: "get",
|
|
1804
1804
|
headers: {
|
|
@@ -1814,49 +1814,50 @@ C(g, "keyCookie", "Token"), C(g, "cookieOptions", {}), C(g, "registerRequest", n
|
|
|
1814
1814
|
(w) => {
|
|
1815
1815
|
g.registerFailedRequests.removeItem(t), g.registerRequest.removeItem(t);
|
|
1816
1816
|
const d = (w == null ? void 0 : w.headers) && w.headers["set-cookie"], m = w.status, h = w == null ? void 0 : w.data;
|
|
1817
|
-
|
|
1817
|
+
o = { ...o, statusCode: m, data: h, res: w }, m === 200 && d && (g.saveToken(d), o.data = { ...o.data, token: d }), r(o);
|
|
1818
1818
|
},
|
|
1819
1819
|
(w) => {
|
|
1820
1820
|
const d = g.errorsHandler.handleError(w);
|
|
1821
|
-
|
|
1821
|
+
s({ ...i, ...d, errExt: w });
|
|
1822
1822
|
}
|
|
1823
1823
|
);
|
|
1824
1824
|
} else
|
|
1825
|
-
S({ url: t, ...f }).then((b) => {
|
|
1825
|
+
g.registerRequest.setList({ url: t, options: f }), S({ url: t, ...f }).then((b) => {
|
|
1826
|
+
g.registerRequest.removeItem(t);
|
|
1826
1827
|
const w = b.status, d = b == null ? void 0 : b.data;
|
|
1827
|
-
|
|
1828
|
+
o = { ...o, statusCode: w, data: d, res: b }, r(o);
|
|
1828
1829
|
}).catch((b) => {
|
|
1829
1830
|
const w = g.errorsHandler.handleError(b);
|
|
1830
|
-
|
|
1831
|
+
s({ ...i, ...w, errExt: b });
|
|
1831
1832
|
});
|
|
1832
1833
|
})), C(g, "getToken", () => {
|
|
1833
|
-
var n, r,
|
|
1834
|
+
var n, r, s;
|
|
1834
1835
|
const { keyCookie: t } = g;
|
|
1835
1836
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
1836
|
-
const { http:
|
|
1837
|
-
return
|
|
1837
|
+
const { http: o } = (s = window == null ? void 0 : window.cordova) == null ? void 0 : s.plugin;
|
|
1838
|
+
return o.getCookieString(t);
|
|
1838
1839
|
}
|
|
1839
|
-
return
|
|
1840
|
+
return oe.get(t);
|
|
1840
1841
|
}), C(g, "saveToken", (t) => {
|
|
1841
|
-
var n, r,
|
|
1842
|
+
var n, r, s;
|
|
1842
1843
|
if (t) {
|
|
1843
|
-
const { keyCookie:
|
|
1844
|
+
const { keyCookie: o, cookieOptions: i } = g;
|
|
1844
1845
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
1845
|
-
const { http: c } = (
|
|
1846
|
-
c.setCookie(
|
|
1846
|
+
const { http: c } = (s = window == null ? void 0 : window.cordova) == null ? void 0 : s.plugin;
|
|
1847
|
+
c.setCookie(o, t, i);
|
|
1847
1848
|
return;
|
|
1848
1849
|
}
|
|
1849
|
-
|
|
1850
|
+
oe.set(o, t, i);
|
|
1850
1851
|
}
|
|
1851
1852
|
}), C(g, "removeAuthCookie", () => {
|
|
1852
|
-
var n, r,
|
|
1853
|
+
var n, r, s;
|
|
1853
1854
|
const { keyCookie: t } = g;
|
|
1854
1855
|
if ((r = (n = window == null ? void 0 : window.cordova) == null ? void 0 : n.plugin) != null && r.http) {
|
|
1855
|
-
const { http:
|
|
1856
|
-
|
|
1856
|
+
const { http: o } = (s = window == null ? void 0 : window.cordova) == null ? void 0 : s.plugin;
|
|
1857
|
+
o.clearCookies();
|
|
1857
1858
|
return;
|
|
1858
1859
|
}
|
|
1859
|
-
|
|
1860
|
+
oe.remove(t);
|
|
1860
1861
|
}), C(g, "setCookieOptions", (t) => {
|
|
1861
1862
|
g.cookieOptions = t;
|
|
1862
1863
|
});
|