datatable-axios 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/datatable-axios.cjs.js +61 -0
- package/{src/datatable.js → dist/datatable-axios.esm.js} +22 -19
- package/dist/datatable-axios.js +17 -1424
- package/dist/datatable-axios.umd.cjs +1 -3
- package/dist/datatable-axios.umd.js +65 -0
- package/package.json +15 -4
- package/src/axios.js +0 -5
- package/src/index.js +0 -2
- package/vite.config.js +0 -8
package/dist/datatable-axios.js
CHANGED
|
@@ -1,1437 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
const { toString: Ue } = Object.prototype, { getPrototypeOf: ee } = Object, M = ((e) => (t) => {
|
|
7
|
-
const n = Ue.call(t);
|
|
8
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
9
|
-
})(/* @__PURE__ */ Object.create(null)), O = (e) => (e = e.toLowerCase(), (t) => M(t) === e), q = (e) => (t) => typeof t === e, { isArray: C } = Array, B = q("undefined");
|
|
10
|
-
function je(e) {
|
|
11
|
-
return e !== null && !B(e) && e.constructor !== null && !B(e.constructor) && b(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
12
|
-
}
|
|
13
|
-
const ye = O("ArrayBuffer");
|
|
14
|
-
function ke(e) {
|
|
15
|
-
let t;
|
|
16
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ye(e.buffer), t;
|
|
17
|
-
}
|
|
18
|
-
const He = q("string"), b = q("function"), we = q("number"), z = (e) => e !== null && typeof e == "object", Ie = (e) => e === !0 || e === !1, U = (e) => {
|
|
19
|
-
if (M(e) !== "object")
|
|
20
|
-
return !1;
|
|
21
|
-
const t = ee(e);
|
|
22
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
23
|
-
}, Me = O("Date"), qe = O("File"), ze = O("Blob"), $e = O("FileList"), Je = (e) => z(e) && b(e.pipe), Ve = (e) => {
|
|
24
|
-
let t;
|
|
25
|
-
return e && (typeof FormData == "function" && e instanceof FormData || b(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
|
|
26
|
-
t === "object" && b(e.toString) && e.toString() === "[object FormData]"));
|
|
27
|
-
}, We = O("URLSearchParams"), Ke = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
28
|
-
function D(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
29
|
-
if (e === null || typeof e > "u")
|
|
30
|
-
return;
|
|
31
|
-
let r, s;
|
|
32
|
-
if (typeof e != "object" && (e = [e]), C(e))
|
|
33
|
-
for (r = 0, s = e.length; r < s; r++)
|
|
34
|
-
t.call(null, e[r], r, e);
|
|
35
|
-
else {
|
|
36
|
-
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
37
|
-
let u;
|
|
38
|
-
for (r = 0; r < i; r++)
|
|
39
|
-
u = o[r], t.call(null, e[u], u, e);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
function Ee(e, t) {
|
|
43
|
-
t = t.toLowerCase();
|
|
44
|
-
const n = Object.keys(e);
|
|
45
|
-
let r = n.length, s;
|
|
46
|
-
for (; r-- > 0; )
|
|
47
|
-
if (s = n[r], t === s.toLowerCase())
|
|
48
|
-
return s;
|
|
49
|
-
return null;
|
|
50
|
-
}
|
|
51
|
-
const be = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Se = (e) => !B(e) && e !== be;
|
|
52
|
-
function Q() {
|
|
53
|
-
const { caseless: e } = Se(this) && this || {}, t = {}, n = (r, s) => {
|
|
54
|
-
const o = e && Ee(t, s) || s;
|
|
55
|
-
U(t[o]) && U(r) ? t[o] = Q(t[o], r) : U(r) ? t[o] = Q({}, r) : C(r) ? t[o] = r.slice() : t[o] = r;
|
|
56
|
-
};
|
|
57
|
-
for (let r = 0, s = arguments.length; r < s; r++)
|
|
58
|
-
arguments[r] && D(arguments[r], n);
|
|
59
|
-
return t;
|
|
60
|
-
}
|
|
61
|
-
const Ge = (e, t, n, { allOwnKeys: r } = {}) => (D(t, (s, o) => {
|
|
62
|
-
n && b(s) ? e[o] = me(s, n) : e[o] = s;
|
|
63
|
-
}, { allOwnKeys: r }), e), Xe = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Qe = (e, t, n, r) => {
|
|
64
|
-
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
65
|
-
value: t.prototype
|
|
66
|
-
}), n && Object.assign(e.prototype, n);
|
|
67
|
-
}, ve = (e, t, n, r) => {
|
|
68
|
-
let s, o, i;
|
|
69
|
-
const u = {};
|
|
70
|
-
if (t = t || {}, e == null)
|
|
71
|
-
return t;
|
|
72
|
-
do {
|
|
73
|
-
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
74
|
-
i = s[o], (!r || r(i, e, t)) && !u[i] && (t[i] = e[i], u[i] = !0);
|
|
75
|
-
e = n !== !1 && ee(e);
|
|
76
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
77
|
-
return t;
|
|
78
|
-
}, Ye = (e, t, n) => {
|
|
79
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
80
|
-
const r = e.indexOf(t, n);
|
|
81
|
-
return r !== -1 && r === n;
|
|
82
|
-
}, Ze = (e) => {
|
|
83
|
-
if (!e)
|
|
84
|
-
return null;
|
|
85
|
-
if (C(e))
|
|
86
|
-
return e;
|
|
87
|
-
let t = e.length;
|
|
88
|
-
if (!we(t))
|
|
89
|
-
return null;
|
|
90
|
-
const n = new Array(t);
|
|
91
|
-
for (; t-- > 0; )
|
|
92
|
-
n[t] = e[t];
|
|
93
|
-
return n;
|
|
94
|
-
}, et = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ee(Uint8Array)), tt = (e, t) => {
|
|
95
|
-
const r = (e && e[Symbol.iterator]).call(e);
|
|
96
|
-
let s;
|
|
97
|
-
for (; (s = r.next()) && !s.done; ) {
|
|
98
|
-
const o = s.value;
|
|
99
|
-
t.call(e, o[0], o[1]);
|
|
100
|
-
}
|
|
101
|
-
}, nt = (e, t) => {
|
|
102
|
-
let n;
|
|
103
|
-
const r = [];
|
|
104
|
-
for (; (n = e.exec(t)) !== null; )
|
|
105
|
-
r.push(n);
|
|
106
|
-
return r;
|
|
107
|
-
}, rt = O("HTMLFormElement"), st = (e) => e.toLowerCase().replace(
|
|
108
|
-
/[-_\s]([a-z\d])(\w*)/g,
|
|
109
|
-
function(n, r, s) {
|
|
110
|
-
return r.toUpperCase() + s;
|
|
111
|
-
}
|
|
112
|
-
), oe = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), ot = O("RegExp"), Re = (e, t) => {
|
|
113
|
-
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
114
|
-
D(n, (s, o) => {
|
|
115
|
-
t(s, o, e) !== !1 && (r[o] = s);
|
|
116
|
-
}), Object.defineProperties(e, r);
|
|
117
|
-
}, it = (e) => {
|
|
118
|
-
Re(e, (t, n) => {
|
|
119
|
-
if (b(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
120
|
-
return !1;
|
|
121
|
-
const r = e[n];
|
|
122
|
-
if (b(r)) {
|
|
123
|
-
if (t.enumerable = !1, "writable" in t) {
|
|
124
|
-
t.writable = !1;
|
|
125
|
-
return;
|
|
126
|
-
}
|
|
127
|
-
t.set || (t.set = () => {
|
|
128
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
});
|
|
132
|
-
}, at = (e, t) => {
|
|
133
|
-
const n = {}, r = (s) => {
|
|
134
|
-
s.forEach((o) => {
|
|
135
|
-
n[o] = !0;
|
|
136
|
-
});
|
|
137
|
-
};
|
|
138
|
-
return C(e) ? r(e) : r(String(e).split(t)), n;
|
|
139
|
-
}, ct = () => {
|
|
140
|
-
}, ut = (e, t) => (e = +e, Number.isFinite(e) ? e : t), W = "abcdefghijklmnopqrstuvwxyz", ie = "0123456789", Oe = {
|
|
141
|
-
DIGIT: ie,
|
|
142
|
-
ALPHA: W,
|
|
143
|
-
ALPHA_DIGIT: W + W.toUpperCase() + ie
|
|
144
|
-
}, lt = (e = 16, t = Oe.ALPHA_DIGIT) => {
|
|
145
|
-
let n = "";
|
|
146
|
-
const { length: r } = t;
|
|
147
|
-
for (; e--; )
|
|
148
|
-
n += t[Math.random() * r | 0];
|
|
149
|
-
return n;
|
|
150
|
-
};
|
|
151
|
-
function ft(e) {
|
|
152
|
-
return !!(e && b(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
153
|
-
}
|
|
154
|
-
const dt = (e) => {
|
|
155
|
-
const t = new Array(10), n = (r, s) => {
|
|
156
|
-
if (z(r)) {
|
|
157
|
-
if (t.indexOf(r) >= 0)
|
|
158
|
-
return;
|
|
159
|
-
if (!("toJSON" in r)) {
|
|
160
|
-
t[s] = r;
|
|
161
|
-
const o = C(r) ? [] : {};
|
|
162
|
-
return D(r, (i, u) => {
|
|
163
|
-
const d = n(i, s + 1);
|
|
164
|
-
!B(d) && (o[u] = d);
|
|
165
|
-
}), t[s] = void 0, o;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
return r;
|
|
169
|
-
};
|
|
170
|
-
return n(e, 0);
|
|
171
|
-
}, pt = O("AsyncFunction"), ht = (e) => e && (z(e) || b(e)) && b(e.then) && b(e.catch), a = {
|
|
172
|
-
isArray: C,
|
|
173
|
-
isArrayBuffer: ye,
|
|
174
|
-
isBuffer: je,
|
|
175
|
-
isFormData: Ve,
|
|
176
|
-
isArrayBufferView: ke,
|
|
177
|
-
isString: He,
|
|
178
|
-
isNumber: we,
|
|
179
|
-
isBoolean: Ie,
|
|
180
|
-
isObject: z,
|
|
181
|
-
isPlainObject: U,
|
|
182
|
-
isUndefined: B,
|
|
183
|
-
isDate: Me,
|
|
184
|
-
isFile: qe,
|
|
185
|
-
isBlob: ze,
|
|
186
|
-
isRegExp: ot,
|
|
187
|
-
isFunction: b,
|
|
188
|
-
isStream: Je,
|
|
189
|
-
isURLSearchParams: We,
|
|
190
|
-
isTypedArray: et,
|
|
191
|
-
isFileList: $e,
|
|
192
|
-
forEach: D,
|
|
193
|
-
merge: Q,
|
|
194
|
-
extend: Ge,
|
|
195
|
-
trim: Ke,
|
|
196
|
-
stripBOM: Xe,
|
|
197
|
-
inherits: Qe,
|
|
198
|
-
toFlatObject: ve,
|
|
199
|
-
kindOf: M,
|
|
200
|
-
kindOfTest: O,
|
|
201
|
-
endsWith: Ye,
|
|
202
|
-
toArray: Ze,
|
|
203
|
-
forEachEntry: tt,
|
|
204
|
-
matchAll: nt,
|
|
205
|
-
isHTMLForm: rt,
|
|
206
|
-
hasOwnProperty: oe,
|
|
207
|
-
hasOwnProp: oe,
|
|
208
|
-
// an alias to avoid ESLint no-prototype-builtins detection
|
|
209
|
-
reduceDescriptors: Re,
|
|
210
|
-
freezeMethods: it,
|
|
211
|
-
toObjectSet: at,
|
|
212
|
-
toCamelCase: st,
|
|
213
|
-
noop: ct,
|
|
214
|
-
toFiniteNumber: ut,
|
|
215
|
-
findKey: Ee,
|
|
216
|
-
global: be,
|
|
217
|
-
isContextDefined: Se,
|
|
218
|
-
ALPHABET: Oe,
|
|
219
|
-
generateString: lt,
|
|
220
|
-
isSpecCompliantForm: ft,
|
|
221
|
-
toJSONObject: dt,
|
|
222
|
-
isAsyncFn: pt,
|
|
223
|
-
isThenable: ht
|
|
224
|
-
};
|
|
225
|
-
function m(e, t, n, r, s) {
|
|
226
|
-
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);
|
|
227
|
-
}
|
|
228
|
-
a.inherits(m, Error, {
|
|
229
|
-
toJSON: function() {
|
|
230
|
-
return {
|
|
231
|
-
// Standard
|
|
232
|
-
message: this.message,
|
|
233
|
-
name: this.name,
|
|
234
|
-
// Microsoft
|
|
235
|
-
description: this.description,
|
|
236
|
-
number: this.number,
|
|
237
|
-
// Mozilla
|
|
238
|
-
fileName: this.fileName,
|
|
239
|
-
lineNumber: this.lineNumber,
|
|
240
|
-
columnNumber: this.columnNumber,
|
|
241
|
-
stack: this.stack,
|
|
242
|
-
// Axios
|
|
243
|
-
config: a.toJSONObject(this.config),
|
|
244
|
-
code: this.code,
|
|
245
|
-
status: this.response && this.response.status ? this.response.status : null
|
|
246
|
-
};
|
|
247
|
-
}
|
|
248
|
-
});
|
|
249
|
-
const Ae = m.prototype, ge = {};
|
|
250
|
-
[
|
|
251
|
-
"ERR_BAD_OPTION_VALUE",
|
|
252
|
-
"ERR_BAD_OPTION",
|
|
253
|
-
"ECONNABORTED",
|
|
254
|
-
"ETIMEDOUT",
|
|
255
|
-
"ERR_NETWORK",
|
|
256
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
|
257
|
-
"ERR_DEPRECATED",
|
|
258
|
-
"ERR_BAD_RESPONSE",
|
|
259
|
-
"ERR_BAD_REQUEST",
|
|
260
|
-
"ERR_CANCELED",
|
|
261
|
-
"ERR_NOT_SUPPORT",
|
|
262
|
-
"ERR_INVALID_URL"
|
|
263
|
-
// eslint-disable-next-line func-names
|
|
264
|
-
].forEach((e) => {
|
|
265
|
-
ge[e] = { value: e };
|
|
266
|
-
});
|
|
267
|
-
Object.defineProperties(m, ge);
|
|
268
|
-
Object.defineProperty(Ae, "isAxiosError", { value: !0 });
|
|
269
|
-
m.from = (e, t, n, r, s, o) => {
|
|
270
|
-
const i = Object.create(Ae);
|
|
271
|
-
return a.toFlatObject(e, i, function(d) {
|
|
272
|
-
return d !== Error.prototype;
|
|
273
|
-
}, (u) => u !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
274
|
-
};
|
|
275
|
-
const mt = null;
|
|
276
|
-
function v(e) {
|
|
277
|
-
return a.isPlainObject(e) || a.isArray(e);
|
|
278
|
-
}
|
|
279
|
-
function Te(e) {
|
|
280
|
-
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
281
|
-
}
|
|
282
|
-
function ae(e, t, n) {
|
|
283
|
-
return e ? e.concat(t).map(function(s, o) {
|
|
284
|
-
return s = Te(s), !n && o ? "[" + s + "]" : s;
|
|
285
|
-
}).join(n ? "." : "") : t;
|
|
286
|
-
}
|
|
287
|
-
function yt(e) {
|
|
288
|
-
return a.isArray(e) && !e.some(v);
|
|
289
|
-
}
|
|
290
|
-
const wt = a.toFlatObject(a, {}, null, function(t) {
|
|
291
|
-
return /^is[A-Z]/.test(t);
|
|
292
|
-
});
|
|
293
|
-
function $(e, t, n) {
|
|
294
|
-
if (!a.isObject(e))
|
|
295
|
-
throw new TypeError("target must be an object");
|
|
296
|
-
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
297
|
-
metaTokens: !0,
|
|
298
|
-
dots: !1,
|
|
299
|
-
indexes: !1
|
|
300
|
-
}, !1, function(h, A) {
|
|
301
|
-
return !a.isUndefined(A[h]);
|
|
302
|
-
});
|
|
303
|
-
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, d = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
304
|
-
if (!a.isFunction(s))
|
|
305
|
-
throw new TypeError("visitor must be a function");
|
|
306
|
-
function c(f) {
|
|
307
|
-
if (f === null)
|
|
308
|
-
return "";
|
|
309
|
-
if (a.isDate(f))
|
|
310
|
-
return f.toISOString();
|
|
311
|
-
if (!d && a.isBlob(f))
|
|
312
|
-
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
313
|
-
return a.isArrayBuffer(f) || a.isTypedArray(f) ? d && typeof Blob == "function" ? new Blob([f]) : Buffer.from(f) : f;
|
|
314
|
-
}
|
|
315
|
-
function l(f, h, A) {
|
|
316
|
-
let S = f;
|
|
317
|
-
if (f && !A && typeof f == "object") {
|
|
318
|
-
if (a.endsWith(h, "{}"))
|
|
319
|
-
h = r ? h : h.slice(0, -2), f = JSON.stringify(f);
|
|
320
|
-
else if (a.isArray(f) && yt(f) || (a.isFileList(f) || a.endsWith(h, "[]")) && (S = a.toArray(f)))
|
|
321
|
-
return h = Te(h), S.forEach(function(L, Le) {
|
|
322
|
-
!(a.isUndefined(L) || L === null) && t.append(
|
|
323
|
-
// eslint-disable-next-line no-nested-ternary
|
|
324
|
-
i === !0 ? ae([h], Le, o) : i === null ? h : h + "[]",
|
|
325
|
-
c(L)
|
|
326
|
-
);
|
|
327
|
-
}), !1;
|
|
328
|
-
}
|
|
329
|
-
return v(f) ? !0 : (t.append(ae(A, h, o), c(f)), !1);
|
|
330
|
-
}
|
|
331
|
-
const p = [], E = Object.assign(wt, {
|
|
332
|
-
defaultVisitor: l,
|
|
333
|
-
convertValue: c,
|
|
334
|
-
isVisitable: v
|
|
335
|
-
});
|
|
336
|
-
function y(f, h) {
|
|
337
|
-
if (!a.isUndefined(f)) {
|
|
338
|
-
if (p.indexOf(f) !== -1)
|
|
339
|
-
throw Error("Circular reference detected in " + h.join("."));
|
|
340
|
-
p.push(f), a.forEach(f, function(S, x) {
|
|
341
|
-
(!(a.isUndefined(S) || S === null) && s.call(
|
|
342
|
-
t,
|
|
343
|
-
S,
|
|
344
|
-
a.isString(x) ? x.trim() : x,
|
|
345
|
-
h,
|
|
346
|
-
E
|
|
347
|
-
)) === !0 && y(S, h ? h.concat(x) : [x]);
|
|
348
|
-
}), p.pop();
|
|
349
|
-
}
|
|
350
|
-
}
|
|
351
|
-
if (!a.isObject(e))
|
|
352
|
-
throw new TypeError("data must be an object");
|
|
353
|
-
return y(e), t;
|
|
354
|
-
}
|
|
355
|
-
function ce(e) {
|
|
356
|
-
const t = {
|
|
357
|
-
"!": "%21",
|
|
358
|
-
"'": "%27",
|
|
359
|
-
"(": "%28",
|
|
360
|
-
")": "%29",
|
|
361
|
-
"~": "%7E",
|
|
362
|
-
"%20": "+",
|
|
363
|
-
"%00": "\0"
|
|
364
|
-
};
|
|
365
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
|
366
|
-
return t[r];
|
|
367
|
-
});
|
|
368
|
-
}
|
|
369
|
-
function te(e, t) {
|
|
370
|
-
this._pairs = [], e && $(e, this, t);
|
|
371
|
-
}
|
|
372
|
-
const xe = te.prototype;
|
|
373
|
-
xe.append = function(t, n) {
|
|
374
|
-
this._pairs.push([t, n]);
|
|
375
|
-
};
|
|
376
|
-
xe.toString = function(t) {
|
|
377
|
-
const n = t ? function(r) {
|
|
378
|
-
return t.call(this, r, ce);
|
|
379
|
-
} : ce;
|
|
380
|
-
return this._pairs.map(function(s) {
|
|
381
|
-
return n(s[0]) + "=" + n(s[1]);
|
|
382
|
-
}, "").join("&");
|
|
383
|
-
};
|
|
384
|
-
function Et(e) {
|
|
385
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
386
|
-
}
|
|
387
|
-
function Ne(e, t, n) {
|
|
388
|
-
if (!t)
|
|
389
|
-
return e;
|
|
390
|
-
const r = n && n.encode || Et, s = n && n.serialize;
|
|
391
|
-
let o;
|
|
392
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new te(t, n).toString(r), o) {
|
|
393
|
-
const i = e.indexOf("#");
|
|
394
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
395
|
-
}
|
|
396
|
-
return e;
|
|
397
|
-
}
|
|
398
|
-
class bt {
|
|
399
|
-
constructor() {
|
|
400
|
-
this.handlers = [];
|
|
401
|
-
}
|
|
402
|
-
/**
|
|
403
|
-
* Add a new interceptor to the stack
|
|
404
|
-
*
|
|
405
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
406
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
407
|
-
*
|
|
408
|
-
* @return {Number} An ID used to remove interceptor later
|
|
409
|
-
*/
|
|
410
|
-
use(t, n, r) {
|
|
411
|
-
return this.handlers.push({
|
|
412
|
-
fulfilled: t,
|
|
413
|
-
rejected: n,
|
|
414
|
-
synchronous: r ? r.synchronous : !1,
|
|
415
|
-
runWhen: r ? r.runWhen : null
|
|
416
|
-
}), this.handlers.length - 1;
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
* Remove an interceptor from the stack
|
|
420
|
-
*
|
|
421
|
-
* @param {Number} id The ID that was returned by `use`
|
|
422
|
-
*
|
|
423
|
-
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
424
|
-
*/
|
|
425
|
-
eject(t) {
|
|
426
|
-
this.handlers[t] && (this.handlers[t] = null);
|
|
427
|
-
}
|
|
428
|
-
/**
|
|
429
|
-
* Clear all interceptors from the stack
|
|
430
|
-
*
|
|
431
|
-
* @returns {void}
|
|
432
|
-
*/
|
|
433
|
-
clear() {
|
|
434
|
-
this.handlers && (this.handlers = []);
|
|
435
|
-
}
|
|
436
|
-
/**
|
|
437
|
-
* Iterate over all the registered interceptors
|
|
438
|
-
*
|
|
439
|
-
* This method is particularly useful for skipping over any
|
|
440
|
-
* interceptors that may have become `null` calling `eject`.
|
|
441
|
-
*
|
|
442
|
-
* @param {Function} fn The function to call for each interceptor
|
|
443
|
-
*
|
|
444
|
-
* @returns {void}
|
|
445
|
-
*/
|
|
446
|
-
forEach(t) {
|
|
447
|
-
a.forEach(this.handlers, function(r) {
|
|
448
|
-
r !== null && t(r);
|
|
449
|
-
});
|
|
450
|
-
}
|
|
451
|
-
}
|
|
452
|
-
const ue = bt, Pe = {
|
|
453
|
-
silentJSONParsing: !0,
|
|
454
|
-
forcedJSONParsing: !0,
|
|
455
|
-
clarifyTimeoutError: !1
|
|
456
|
-
}, St = typeof URLSearchParams < "u" ? URLSearchParams : te, Rt = typeof FormData < "u" ? FormData : null, Ot = typeof Blob < "u" ? Blob : null, At = (() => {
|
|
457
|
-
let e;
|
|
458
|
-
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
459
|
-
})(), gt = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
460
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), R = {
|
|
461
|
-
isBrowser: !0,
|
|
462
|
-
classes: {
|
|
463
|
-
URLSearchParams: St,
|
|
464
|
-
FormData: Rt,
|
|
465
|
-
Blob: Ot
|
|
466
|
-
},
|
|
467
|
-
isStandardBrowserEnv: At,
|
|
468
|
-
isStandardBrowserWebWorkerEnv: gt,
|
|
469
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
470
|
-
};
|
|
471
|
-
function Tt(e, t) {
|
|
472
|
-
return $(e, new R.classes.URLSearchParams(), Object.assign({
|
|
473
|
-
visitor: function(n, r, s, o) {
|
|
474
|
-
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
475
|
-
}
|
|
476
|
-
}, t));
|
|
477
|
-
}
|
|
478
|
-
function xt(e) {
|
|
479
|
-
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
480
|
-
}
|
|
481
|
-
function Nt(e) {
|
|
482
|
-
const t = {}, n = Object.keys(e);
|
|
483
|
-
let r;
|
|
484
|
-
const s = n.length;
|
|
485
|
-
let o;
|
|
486
|
-
for (r = 0; r < s; r++)
|
|
487
|
-
o = n[r], t[o] = e[o];
|
|
488
|
-
return t;
|
|
489
|
-
}
|
|
490
|
-
function Ce(e) {
|
|
491
|
-
function t(n, r, s, o) {
|
|
492
|
-
let i = n[o++];
|
|
493
|
-
const u = Number.isFinite(+i), d = o >= n.length;
|
|
494
|
-
return i = !i && a.isArray(s) ? s.length : i, d ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !u) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Nt(s[i])), !u);
|
|
495
|
-
}
|
|
496
|
-
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
497
|
-
const n = {};
|
|
498
|
-
return a.forEachEntry(e, (r, s) => {
|
|
499
|
-
t(xt(r), s, n, 0);
|
|
500
|
-
}), n;
|
|
501
|
-
}
|
|
502
|
-
return null;
|
|
503
|
-
}
|
|
504
|
-
const Pt = {
|
|
505
|
-
"Content-Type": void 0
|
|
506
|
-
};
|
|
507
|
-
function Ct(e, t, n) {
|
|
508
|
-
if (a.isString(e))
|
|
509
|
-
try {
|
|
510
|
-
return (t || JSON.parse)(e), a.trim(e);
|
|
511
|
-
} catch (r) {
|
|
512
|
-
if (r.name !== "SyntaxError")
|
|
513
|
-
throw r;
|
|
514
|
-
}
|
|
515
|
-
return (n || JSON.stringify)(e);
|
|
516
|
-
}
|
|
517
|
-
const J = {
|
|
518
|
-
transitional: Pe,
|
|
519
|
-
adapter: ["xhr", "http"],
|
|
520
|
-
transformRequest: [function(t, n) {
|
|
521
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
522
|
-
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
523
|
-
return s && s ? JSON.stringify(Ce(t)) : t;
|
|
524
|
-
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
525
|
-
return t;
|
|
526
|
-
if (a.isArrayBufferView(t))
|
|
527
|
-
return t.buffer;
|
|
528
|
-
if (a.isURLSearchParams(t))
|
|
529
|
-
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
530
|
-
let u;
|
|
531
|
-
if (o) {
|
|
532
|
-
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
533
|
-
return Tt(t, this.formSerializer).toString();
|
|
534
|
-
if ((u = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
535
|
-
const d = this.env && this.env.FormData;
|
|
536
|
-
return $(
|
|
537
|
-
u ? { "files[]": t } : t,
|
|
538
|
-
d && new d(),
|
|
539
|
-
this.formSerializer
|
|
540
|
-
);
|
|
541
|
-
}
|
|
542
|
-
}
|
|
543
|
-
return o || s ? (n.setContentType("application/json", !1), Ct(t)) : t;
|
|
544
|
-
}],
|
|
545
|
-
transformResponse: [function(t) {
|
|
546
|
-
const n = this.transitional || J.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
547
|
-
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
548
|
-
const i = !(n && n.silentJSONParsing) && s;
|
|
549
|
-
try {
|
|
550
|
-
return JSON.parse(t);
|
|
551
|
-
} catch (u) {
|
|
552
|
-
if (i)
|
|
553
|
-
throw u.name === "SyntaxError" ? m.from(u, m.ERR_BAD_RESPONSE, this, null, this.response) : u;
|
|
554
|
-
}
|
|
555
|
-
}
|
|
556
|
-
return t;
|
|
557
|
-
}],
|
|
558
|
-
/**
|
|
559
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
560
|
-
* timeout is not created.
|
|
561
|
-
*/
|
|
562
|
-
timeout: 0,
|
|
563
|
-
xsrfCookieName: "XSRF-TOKEN",
|
|
564
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
565
|
-
maxContentLength: -1,
|
|
566
|
-
maxBodyLength: -1,
|
|
567
|
-
env: {
|
|
568
|
-
FormData: R.classes.FormData,
|
|
569
|
-
Blob: R.classes.Blob
|
|
570
|
-
},
|
|
571
|
-
validateStatus: function(t) {
|
|
572
|
-
return t >= 200 && t < 300;
|
|
573
|
-
},
|
|
574
|
-
headers: {
|
|
575
|
-
common: {
|
|
576
|
-
Accept: "application/json, text/plain, */*"
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
|
-
};
|
|
580
|
-
a.forEach(["delete", "get", "head"], function(t) {
|
|
581
|
-
J.headers[t] = {};
|
|
582
|
-
});
|
|
583
|
-
a.forEach(["post", "put", "patch"], function(t) {
|
|
584
|
-
J.headers[t] = a.merge(Pt);
|
|
585
|
-
});
|
|
586
|
-
const ne = J, Ft = a.toObjectSet([
|
|
587
|
-
"age",
|
|
588
|
-
"authorization",
|
|
589
|
-
"content-length",
|
|
590
|
-
"content-type",
|
|
591
|
-
"etag",
|
|
592
|
-
"expires",
|
|
593
|
-
"from",
|
|
594
|
-
"host",
|
|
595
|
-
"if-modified-since",
|
|
596
|
-
"if-unmodified-since",
|
|
597
|
-
"last-modified",
|
|
598
|
-
"location",
|
|
599
|
-
"max-forwards",
|
|
600
|
-
"proxy-authorization",
|
|
601
|
-
"referer",
|
|
602
|
-
"retry-after",
|
|
603
|
-
"user-agent"
|
|
604
|
-
]), Bt = (e) => {
|
|
605
|
-
const t = {};
|
|
606
|
-
let n, r, s;
|
|
607
|
-
return e && e.split(`
|
|
608
|
-
`).forEach(function(i) {
|
|
609
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Ft[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
610
|
-
}), t;
|
|
611
|
-
}, le = Symbol("internals");
|
|
612
|
-
function F(e) {
|
|
613
|
-
return e && String(e).trim().toLowerCase();
|
|
614
|
-
}
|
|
615
|
-
function j(e) {
|
|
616
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(j) : String(e);
|
|
617
|
-
}
|
|
618
|
-
function Dt(e) {
|
|
619
|
-
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
620
|
-
let r;
|
|
621
|
-
for (; r = n.exec(e); )
|
|
622
|
-
t[r[1]] = r[2];
|
|
623
|
-
return t;
|
|
624
|
-
}
|
|
625
|
-
const _t = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
626
|
-
function K(e, t, n, r, s) {
|
|
627
|
-
if (a.isFunction(r))
|
|
628
|
-
return r.call(this, t, n);
|
|
629
|
-
if (s && (t = n), !!a.isString(t)) {
|
|
630
|
-
if (a.isString(r))
|
|
631
|
-
return t.indexOf(r) !== -1;
|
|
632
|
-
if (a.isRegExp(r))
|
|
633
|
-
return r.test(t);
|
|
634
|
-
}
|
|
635
|
-
}
|
|
636
|
-
function Lt(e) {
|
|
637
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
638
|
-
}
|
|
639
|
-
function Ut(e, t) {
|
|
640
|
-
const n = a.toCamelCase(" " + t);
|
|
641
|
-
["get", "set", "has"].forEach((r) => {
|
|
642
|
-
Object.defineProperty(e, r + n, {
|
|
643
|
-
value: function(s, o, i) {
|
|
644
|
-
return this[r].call(this, t, s, o, i);
|
|
645
|
-
},
|
|
646
|
-
configurable: !0
|
|
647
|
-
});
|
|
648
|
-
});
|
|
649
|
-
}
|
|
650
|
-
class V {
|
|
651
|
-
constructor(t) {
|
|
652
|
-
t && this.set(t);
|
|
653
|
-
}
|
|
654
|
-
set(t, n, r) {
|
|
655
|
-
const s = this;
|
|
656
|
-
function o(u, d, c) {
|
|
657
|
-
const l = F(d);
|
|
658
|
-
if (!l)
|
|
659
|
-
throw new Error("header name must be a non-empty string");
|
|
660
|
-
const p = a.findKey(s, l);
|
|
661
|
-
(!p || s[p] === void 0 || c === !0 || c === void 0 && s[p] !== !1) && (s[p || d] = j(u));
|
|
662
|
-
}
|
|
663
|
-
const i = (u, d) => a.forEach(u, (c, l) => o(c, l, d));
|
|
664
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !_t(t) ? i(Bt(t), n) : t != null && o(n, t, r), this;
|
|
665
|
-
}
|
|
666
|
-
get(t, n) {
|
|
667
|
-
if (t = F(t), t) {
|
|
668
|
-
const r = a.findKey(this, t);
|
|
669
|
-
if (r) {
|
|
670
|
-
const s = this[r];
|
|
671
|
-
if (!n)
|
|
672
|
-
return s;
|
|
673
|
-
if (n === !0)
|
|
674
|
-
return Dt(s);
|
|
675
|
-
if (a.isFunction(n))
|
|
676
|
-
return n.call(this, s, r);
|
|
677
|
-
if (a.isRegExp(n))
|
|
678
|
-
return n.exec(s);
|
|
679
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
}
|
|
683
|
-
has(t, n) {
|
|
684
|
-
if (t = F(t), t) {
|
|
685
|
-
const r = a.findKey(this, t);
|
|
686
|
-
return !!(r && this[r] !== void 0 && (!n || K(this, this[r], r, n)));
|
|
687
|
-
}
|
|
688
|
-
return !1;
|
|
689
|
-
}
|
|
690
|
-
delete(t, n) {
|
|
691
|
-
const r = this;
|
|
692
|
-
let s = !1;
|
|
693
|
-
function o(i) {
|
|
694
|
-
if (i = F(i), i) {
|
|
695
|
-
const u = a.findKey(r, i);
|
|
696
|
-
u && (!n || K(r, r[u], u, n)) && (delete r[u], s = !0);
|
|
697
|
-
}
|
|
698
|
-
}
|
|
699
|
-
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
700
|
-
}
|
|
701
|
-
clear(t) {
|
|
702
|
-
const n = Object.keys(this);
|
|
703
|
-
let r = n.length, s = !1;
|
|
704
|
-
for (; r--; ) {
|
|
705
|
-
const o = n[r];
|
|
706
|
-
(!t || K(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
707
|
-
}
|
|
708
|
-
return s;
|
|
709
|
-
}
|
|
710
|
-
normalize(t) {
|
|
711
|
-
const n = this, r = {};
|
|
712
|
-
return a.forEach(this, (s, o) => {
|
|
713
|
-
const i = a.findKey(r, o);
|
|
714
|
-
if (i) {
|
|
715
|
-
n[i] = j(s), delete n[o];
|
|
716
|
-
return;
|
|
717
|
-
}
|
|
718
|
-
const u = t ? Lt(o) : String(o).trim();
|
|
719
|
-
u !== o && delete n[o], n[u] = j(s), r[u] = !0;
|
|
720
|
-
}), this;
|
|
721
|
-
}
|
|
722
|
-
concat(...t) {
|
|
723
|
-
return this.constructor.concat(this, ...t);
|
|
724
|
-
}
|
|
725
|
-
toJSON(t) {
|
|
726
|
-
const n = /* @__PURE__ */ Object.create(null);
|
|
727
|
-
return a.forEach(this, (r, s) => {
|
|
728
|
-
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
729
|
-
}), n;
|
|
730
|
-
}
|
|
731
|
-
[Symbol.iterator]() {
|
|
732
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
733
|
-
}
|
|
734
|
-
toString() {
|
|
735
|
-
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
736
|
-
`);
|
|
737
|
-
}
|
|
738
|
-
get [Symbol.toStringTag]() {
|
|
739
|
-
return "AxiosHeaders";
|
|
740
|
-
}
|
|
741
|
-
static from(t) {
|
|
742
|
-
return t instanceof this ? t : new this(t);
|
|
743
|
-
}
|
|
744
|
-
static concat(t, ...n) {
|
|
745
|
-
const r = new this(t);
|
|
746
|
-
return n.forEach((s) => r.set(s)), r;
|
|
747
|
-
}
|
|
748
|
-
static accessor(t) {
|
|
749
|
-
const r = (this[le] = this[le] = {
|
|
750
|
-
accessors: {}
|
|
751
|
-
}).accessors, s = this.prototype;
|
|
752
|
-
function o(i) {
|
|
753
|
-
const u = F(i);
|
|
754
|
-
r[u] || (Ut(s, i), r[u] = !0);
|
|
755
|
-
}
|
|
756
|
-
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
757
|
-
}
|
|
758
|
-
}
|
|
759
|
-
V.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
760
|
-
a.freezeMethods(V.prototype);
|
|
761
|
-
a.freezeMethods(V);
|
|
762
|
-
const g = V;
|
|
763
|
-
function G(e, t) {
|
|
764
|
-
const n = this || ne, r = t || n, s = g.from(r.headers);
|
|
765
|
-
let o = r.data;
|
|
766
|
-
return a.forEach(e, function(u) {
|
|
767
|
-
o = u.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
768
|
-
}), s.normalize(), o;
|
|
769
|
-
}
|
|
770
|
-
function Fe(e) {
|
|
771
|
-
return !!(e && e.__CANCEL__);
|
|
772
|
-
}
|
|
773
|
-
function _(e, t, n) {
|
|
774
|
-
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
775
|
-
}
|
|
776
|
-
a.inherits(_, m, {
|
|
777
|
-
__CANCEL__: !0
|
|
778
|
-
});
|
|
779
|
-
function jt(e, t, n) {
|
|
780
|
-
const r = n.config.validateStatus;
|
|
781
|
-
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
782
|
-
"Request failed with status code " + n.status,
|
|
783
|
-
[m.ERR_BAD_REQUEST, m.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
784
|
-
n.config,
|
|
785
|
-
n.request,
|
|
786
|
-
n
|
|
787
|
-
));
|
|
788
|
-
}
|
|
789
|
-
const kt = R.isStandardBrowserEnv ? (
|
|
790
|
-
// Standard browser envs support document.cookie
|
|
791
|
-
function() {
|
|
792
|
-
return {
|
|
793
|
-
write: function(n, r, s, o, i, u) {
|
|
794
|
-
const d = [];
|
|
795
|
-
d.push(n + "=" + encodeURIComponent(r)), a.isNumber(s) && d.push("expires=" + new Date(s).toGMTString()), a.isString(o) && d.push("path=" + o), a.isString(i) && d.push("domain=" + i), u === !0 && d.push("secure"), document.cookie = d.join("; ");
|
|
796
|
-
},
|
|
797
|
-
read: function(n) {
|
|
798
|
-
const r = document.cookie.match(new RegExp("(^|;\\s*)(" + n + ")=([^;]*)"));
|
|
799
|
-
return r ? decodeURIComponent(r[3]) : null;
|
|
800
|
-
},
|
|
801
|
-
remove: function(n) {
|
|
802
|
-
this.write(n, "", Date.now() - 864e5);
|
|
803
|
-
}
|
|
804
|
-
};
|
|
805
|
-
}()
|
|
806
|
-
) : (
|
|
807
|
-
// Non standard browser env (web workers, react-native) lack needed support.
|
|
808
|
-
function() {
|
|
809
|
-
return {
|
|
810
|
-
write: function() {
|
|
811
|
-
},
|
|
812
|
-
read: function() {
|
|
813
|
-
return null;
|
|
814
|
-
},
|
|
815
|
-
remove: function() {
|
|
816
|
-
}
|
|
817
|
-
};
|
|
818
|
-
}()
|
|
819
|
-
);
|
|
820
|
-
function Ht(e) {
|
|
821
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
822
|
-
}
|
|
823
|
-
function It(e, t) {
|
|
824
|
-
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
825
|
-
}
|
|
826
|
-
function Be(e, t) {
|
|
827
|
-
return e && !Ht(t) ? It(e, t) : t;
|
|
828
|
-
}
|
|
829
|
-
const Mt = R.isStandardBrowserEnv ? (
|
|
830
|
-
// Standard browser envs have full support of the APIs needed to test
|
|
831
|
-
// whether the request URL is of the same origin as current location.
|
|
832
|
-
function() {
|
|
833
|
-
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
834
|
-
let r;
|
|
835
|
-
function s(o) {
|
|
836
|
-
let i = o;
|
|
837
|
-
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
838
|
-
href: n.href,
|
|
839
|
-
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
840
|
-
host: n.host,
|
|
841
|
-
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
842
|
-
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
843
|
-
hostname: n.hostname,
|
|
844
|
-
port: n.port,
|
|
845
|
-
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
846
|
-
};
|
|
847
|
-
}
|
|
848
|
-
return r = s(window.location.href), function(i) {
|
|
849
|
-
const u = a.isString(i) ? s(i) : i;
|
|
850
|
-
return u.protocol === r.protocol && u.host === r.host;
|
|
851
|
-
};
|
|
852
|
-
}()
|
|
853
|
-
) : (
|
|
854
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
855
|
-
function() {
|
|
856
|
-
return function() {
|
|
857
|
-
return !0;
|
|
858
|
-
};
|
|
859
|
-
}()
|
|
860
|
-
);
|
|
861
|
-
function qt(e) {
|
|
862
|
-
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
863
|
-
return t && t[1] || "";
|
|
864
|
-
}
|
|
865
|
-
function zt(e, t) {
|
|
866
|
-
e = e || 10;
|
|
867
|
-
const n = new Array(e), r = new Array(e);
|
|
868
|
-
let s = 0, o = 0, i;
|
|
869
|
-
return t = t !== void 0 ? t : 1e3, function(d) {
|
|
870
|
-
const c = Date.now(), l = r[o];
|
|
871
|
-
i || (i = c), n[s] = d, r[s] = c;
|
|
872
|
-
let p = o, E = 0;
|
|
873
|
-
for (; p !== s; )
|
|
874
|
-
E += n[p++], p = p % e;
|
|
875
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), c - i < t)
|
|
876
|
-
return;
|
|
877
|
-
const y = l && c - l;
|
|
878
|
-
return y ? Math.round(E * 1e3 / y) : void 0;
|
|
879
|
-
};
|
|
880
|
-
}
|
|
881
|
-
function fe(e, t) {
|
|
882
|
-
let n = 0;
|
|
883
|
-
const r = zt(50, 250);
|
|
884
|
-
return (s) => {
|
|
885
|
-
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, u = o - n, d = r(u), c = o <= i;
|
|
886
|
-
n = o;
|
|
887
|
-
const l = {
|
|
888
|
-
loaded: o,
|
|
889
|
-
total: i,
|
|
890
|
-
progress: i ? o / i : void 0,
|
|
891
|
-
bytes: u,
|
|
892
|
-
rate: d || void 0,
|
|
893
|
-
estimated: d && i && c ? (i - o) / d : void 0,
|
|
894
|
-
event: s
|
|
895
|
-
};
|
|
896
|
-
l[t ? "download" : "upload"] = !0, e(l);
|
|
897
|
-
};
|
|
898
|
-
}
|
|
899
|
-
const $t = typeof XMLHttpRequest < "u", Jt = $t && function(e) {
|
|
900
|
-
return new Promise(function(n, r) {
|
|
901
|
-
let s = e.data;
|
|
902
|
-
const o = g.from(e.headers).normalize(), i = e.responseType;
|
|
903
|
-
let u;
|
|
904
|
-
function d() {
|
|
905
|
-
e.cancelToken && e.cancelToken.unsubscribe(u), e.signal && e.signal.removeEventListener("abort", u);
|
|
906
|
-
}
|
|
907
|
-
a.isFormData(s) && (R.isStandardBrowserEnv || R.isStandardBrowserWebWorkerEnv ? o.setContentType(!1) : o.setContentType("multipart/form-data;", !1));
|
|
908
|
-
let c = new XMLHttpRequest();
|
|
909
|
-
if (e.auth) {
|
|
910
|
-
const y = e.auth.username || "", f = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
911
|
-
o.set("Authorization", "Basic " + btoa(y + ":" + f));
|
|
912
|
-
}
|
|
913
|
-
const l = Be(e.baseURL, e.url);
|
|
914
|
-
c.open(e.method.toUpperCase(), Ne(l, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
|
|
915
|
-
function p() {
|
|
916
|
-
if (!c)
|
|
917
|
-
return;
|
|
918
|
-
const y = g.from(
|
|
919
|
-
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
920
|
-
), h = {
|
|
921
|
-
data: !i || i === "text" || i === "json" ? c.responseText : c.response,
|
|
922
|
-
status: c.status,
|
|
923
|
-
statusText: c.statusText,
|
|
924
|
-
headers: y,
|
|
925
|
-
config: e,
|
|
926
|
-
request: c
|
|
927
|
-
};
|
|
928
|
-
jt(function(S) {
|
|
929
|
-
n(S), d();
|
|
930
|
-
}, function(S) {
|
|
931
|
-
r(S), d();
|
|
932
|
-
}, h), c = null;
|
|
933
|
-
}
|
|
934
|
-
if ("onloadend" in c ? c.onloadend = p : c.onreadystatechange = function() {
|
|
935
|
-
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(p);
|
|
936
|
-
}, c.onabort = function() {
|
|
937
|
-
c && (r(new m("Request aborted", m.ECONNABORTED, e, c)), c = null);
|
|
938
|
-
}, c.onerror = function() {
|
|
939
|
-
r(new m("Network Error", m.ERR_NETWORK, e, c)), c = null;
|
|
940
|
-
}, c.ontimeout = function() {
|
|
941
|
-
let f = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
942
|
-
const h = e.transitional || Pe;
|
|
943
|
-
e.timeoutErrorMessage && (f = e.timeoutErrorMessage), r(new m(
|
|
944
|
-
f,
|
|
945
|
-
h.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
946
|
-
e,
|
|
947
|
-
c
|
|
948
|
-
)), c = null;
|
|
949
|
-
}, R.isStandardBrowserEnv) {
|
|
950
|
-
const y = (e.withCredentials || Mt(l)) && e.xsrfCookieName && kt.read(e.xsrfCookieName);
|
|
951
|
-
y && o.set(e.xsrfHeaderName, y);
|
|
952
|
-
}
|
|
953
|
-
s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(f, h) {
|
|
954
|
-
c.setRequestHeader(h, f);
|
|
955
|
-
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", fe(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", fe(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (y) => {
|
|
956
|
-
c && (r(!y || y.type ? new _(null, e, c) : y), c.abort(), c = null);
|
|
957
|
-
}, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
|
|
958
|
-
const E = qt(l);
|
|
959
|
-
if (E && R.protocols.indexOf(E) === -1) {
|
|
960
|
-
r(new m("Unsupported protocol " + E + ":", m.ERR_BAD_REQUEST, e));
|
|
961
|
-
return;
|
|
962
|
-
}
|
|
963
|
-
c.send(s || null);
|
|
964
|
-
});
|
|
965
|
-
}, k = {
|
|
966
|
-
http: mt,
|
|
967
|
-
xhr: Jt
|
|
968
|
-
};
|
|
969
|
-
a.forEach(k, (e, t) => {
|
|
970
|
-
if (e) {
|
|
971
|
-
try {
|
|
972
|
-
Object.defineProperty(e, "name", { value: t });
|
|
973
|
-
} catch {
|
|
974
|
-
}
|
|
975
|
-
Object.defineProperty(e, "adapterName", { value: t });
|
|
976
|
-
}
|
|
977
|
-
});
|
|
978
|
-
const Vt = {
|
|
979
|
-
getAdapter: (e) => {
|
|
980
|
-
e = a.isArray(e) ? e : [e];
|
|
981
|
-
const { length: t } = e;
|
|
982
|
-
let n, r;
|
|
983
|
-
for (let s = 0; s < t && (n = e[s], !(r = a.isString(n) ? k[n.toLowerCase()] : n)); s++)
|
|
984
|
-
;
|
|
985
|
-
if (!r)
|
|
986
|
-
throw r === !1 ? new m(
|
|
987
|
-
`Adapter ${n} is not supported by the environment`,
|
|
988
|
-
"ERR_NOT_SUPPORT"
|
|
989
|
-
) : new Error(
|
|
990
|
-
a.hasOwnProp(k, n) ? `Adapter '${n}' is not available in the build` : `Unknown adapter '${n}'`
|
|
991
|
-
);
|
|
992
|
-
if (!a.isFunction(r))
|
|
993
|
-
throw new TypeError("adapter is not a function");
|
|
994
|
-
return r;
|
|
995
|
-
},
|
|
996
|
-
adapters: k
|
|
997
|
-
};
|
|
998
|
-
function X(e) {
|
|
999
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1000
|
-
throw new _(null, e);
|
|
1001
|
-
}
|
|
1002
|
-
function de(e) {
|
|
1003
|
-
return X(e), e.headers = g.from(e.headers), e.data = G.call(
|
|
1004
|
-
e,
|
|
1005
|
-
e.transformRequest
|
|
1006
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Vt.getAdapter(e.adapter || ne.adapter)(e).then(function(r) {
|
|
1007
|
-
return X(e), r.data = G.call(
|
|
1008
|
-
e,
|
|
1009
|
-
e.transformResponse,
|
|
1010
|
-
r
|
|
1011
|
-
), r.headers = g.from(r.headers), r;
|
|
1012
|
-
}, function(r) {
|
|
1013
|
-
return Fe(r) || (X(e), r && r.response && (r.response.data = G.call(
|
|
1014
|
-
e,
|
|
1015
|
-
e.transformResponse,
|
|
1016
|
-
r.response
|
|
1017
|
-
), r.response.headers = g.from(r.response.headers))), Promise.reject(r);
|
|
1018
|
-
});
|
|
1019
|
-
}
|
|
1020
|
-
const pe = (e) => e instanceof g ? e.toJSON() : e;
|
|
1021
|
-
function P(e, t) {
|
|
1022
|
-
t = t || {};
|
|
1023
|
-
const n = {};
|
|
1024
|
-
function r(c, l, p) {
|
|
1025
|
-
return a.isPlainObject(c) && a.isPlainObject(l) ? a.merge.call({ caseless: p }, c, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1026
|
-
}
|
|
1027
|
-
function s(c, l, p) {
|
|
1028
|
-
if (a.isUndefined(l)) {
|
|
1029
|
-
if (!a.isUndefined(c))
|
|
1030
|
-
return r(void 0, c, p);
|
|
1031
|
-
} else
|
|
1032
|
-
return r(c, l, p);
|
|
1033
|
-
}
|
|
1034
|
-
function o(c, l) {
|
|
1035
|
-
if (!a.isUndefined(l))
|
|
1036
|
-
return r(void 0, l);
|
|
1037
|
-
}
|
|
1038
|
-
function i(c, l) {
|
|
1039
|
-
if (a.isUndefined(l)) {
|
|
1040
|
-
if (!a.isUndefined(c))
|
|
1041
|
-
return r(void 0, c);
|
|
1042
|
-
} else
|
|
1043
|
-
return r(void 0, l);
|
|
1044
|
-
}
|
|
1045
|
-
function u(c, l, p) {
|
|
1046
|
-
if (p in t)
|
|
1047
|
-
return r(c, l);
|
|
1048
|
-
if (p in e)
|
|
1049
|
-
return r(void 0, c);
|
|
1050
|
-
}
|
|
1051
|
-
const d = {
|
|
1052
|
-
url: o,
|
|
1053
|
-
method: o,
|
|
1054
|
-
data: o,
|
|
1055
|
-
baseURL: i,
|
|
1056
|
-
transformRequest: i,
|
|
1057
|
-
transformResponse: i,
|
|
1058
|
-
paramsSerializer: i,
|
|
1059
|
-
timeout: i,
|
|
1060
|
-
timeoutMessage: i,
|
|
1061
|
-
withCredentials: i,
|
|
1062
|
-
adapter: i,
|
|
1063
|
-
responseType: i,
|
|
1064
|
-
xsrfCookieName: i,
|
|
1065
|
-
xsrfHeaderName: i,
|
|
1066
|
-
onUploadProgress: i,
|
|
1067
|
-
onDownloadProgress: i,
|
|
1068
|
-
decompress: i,
|
|
1069
|
-
maxContentLength: i,
|
|
1070
|
-
maxBodyLength: i,
|
|
1071
|
-
beforeRedirect: i,
|
|
1072
|
-
transport: i,
|
|
1073
|
-
httpAgent: i,
|
|
1074
|
-
httpsAgent: i,
|
|
1075
|
-
cancelToken: i,
|
|
1076
|
-
socketPath: i,
|
|
1077
|
-
responseEncoding: i,
|
|
1078
|
-
validateStatus: u,
|
|
1079
|
-
headers: (c, l) => s(pe(c), pe(l), !0)
|
|
1080
|
-
};
|
|
1081
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1082
|
-
const p = d[l] || s, E = p(e[l], t[l], l);
|
|
1083
|
-
a.isUndefined(E) && p !== u || (n[l] = E);
|
|
1084
|
-
}), n;
|
|
1085
|
-
}
|
|
1086
|
-
const De = "1.4.0", re = {};
|
|
1087
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1088
|
-
re[e] = function(r) {
|
|
1089
|
-
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1090
|
-
};
|
|
1091
|
-
});
|
|
1092
|
-
const he = {};
|
|
1093
|
-
re.transitional = function(t, n, r) {
|
|
1094
|
-
function s(o, i) {
|
|
1095
|
-
return "[Axios v" + De + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1096
|
-
}
|
|
1097
|
-
return (o, i, u) => {
|
|
1098
|
-
if (t === !1)
|
|
1099
|
-
throw new m(
|
|
1100
|
-
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1101
|
-
m.ERR_DEPRECATED
|
|
1102
|
-
);
|
|
1103
|
-
return n && !he[i] && (he[i] = !0, console.warn(
|
|
1104
|
-
s(
|
|
1105
|
-
i,
|
|
1106
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1107
|
-
)
|
|
1108
|
-
)), t ? t(o, i, u) : !0;
|
|
1109
|
-
};
|
|
1110
|
-
};
|
|
1111
|
-
function Wt(e, t, n) {
|
|
1112
|
-
if (typeof e != "object")
|
|
1113
|
-
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1114
|
-
const r = Object.keys(e);
|
|
1115
|
-
let s = r.length;
|
|
1116
|
-
for (; s-- > 0; ) {
|
|
1117
|
-
const o = r[s], i = t[o];
|
|
1118
|
-
if (i) {
|
|
1119
|
-
const u = e[o], d = u === void 0 || i(u, o, e);
|
|
1120
|
-
if (d !== !0)
|
|
1121
|
-
throw new m("option " + o + " must be " + d, m.ERR_BAD_OPTION_VALUE);
|
|
1122
|
-
continue;
|
|
1123
|
-
}
|
|
1124
|
-
if (n !== !0)
|
|
1125
|
-
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1126
|
-
}
|
|
1127
|
-
}
|
|
1128
|
-
const Y = {
|
|
1129
|
-
assertOptions: Wt,
|
|
1130
|
-
validators: re
|
|
1131
|
-
}, T = Y.validators;
|
|
1132
|
-
class I {
|
|
1133
|
-
constructor(t) {
|
|
1134
|
-
this.defaults = t, this.interceptors = {
|
|
1135
|
-
request: new ue(),
|
|
1136
|
-
response: new ue()
|
|
1137
|
-
};
|
|
1138
|
-
}
|
|
1139
|
-
/**
|
|
1140
|
-
* Dispatch a request
|
|
1141
|
-
*
|
|
1142
|
-
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1143
|
-
* @param {?Object} config
|
|
1144
|
-
*
|
|
1145
|
-
* @returns {Promise} The Promise to be fulfilled
|
|
1146
|
-
*/
|
|
1147
|
-
request(t, n) {
|
|
1148
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = P(this.defaults, n);
|
|
1149
|
-
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1150
|
-
r !== void 0 && Y.assertOptions(r, {
|
|
1151
|
-
silentJSONParsing: T.transitional(T.boolean),
|
|
1152
|
-
forcedJSONParsing: T.transitional(T.boolean),
|
|
1153
|
-
clarifyTimeoutError: T.transitional(T.boolean)
|
|
1154
|
-
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1155
|
-
serialize: s
|
|
1156
|
-
} : Y.assertOptions(s, {
|
|
1157
|
-
encode: T.function,
|
|
1158
|
-
serialize: T.function
|
|
1159
|
-
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1160
|
-
let i;
|
|
1161
|
-
i = o && a.merge(
|
|
1162
|
-
o.common,
|
|
1163
|
-
o[n.method]
|
|
1164
|
-
), i && a.forEach(
|
|
1165
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1166
|
-
(f) => {
|
|
1167
|
-
delete o[f];
|
|
1168
|
-
}
|
|
1169
|
-
), n.headers = g.concat(i, o);
|
|
1170
|
-
const u = [];
|
|
1171
|
-
let d = !0;
|
|
1172
|
-
this.interceptors.request.forEach(function(h) {
|
|
1173
|
-
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (d = d && h.synchronous, u.unshift(h.fulfilled, h.rejected));
|
|
1174
|
-
});
|
|
1175
|
-
const c = [];
|
|
1176
|
-
this.interceptors.response.forEach(function(h) {
|
|
1177
|
-
c.push(h.fulfilled, h.rejected);
|
|
1178
|
-
});
|
|
1179
|
-
let l, p = 0, E;
|
|
1180
|
-
if (!d) {
|
|
1181
|
-
const f = [de.bind(this), void 0];
|
|
1182
|
-
for (f.unshift.apply(f, u), f.push.apply(f, c), E = f.length, l = Promise.resolve(n); p < E; )
|
|
1183
|
-
l = l.then(f[p++], f[p++]);
|
|
1184
|
-
return l;
|
|
1185
|
-
}
|
|
1186
|
-
E = u.length;
|
|
1187
|
-
let y = n;
|
|
1188
|
-
for (p = 0; p < E; ) {
|
|
1189
|
-
const f = u[p++], h = u[p++];
|
|
1190
|
-
try {
|
|
1191
|
-
y = f(y);
|
|
1192
|
-
} catch (A) {
|
|
1193
|
-
h.call(this, A);
|
|
1194
|
-
break;
|
|
1195
|
-
}
|
|
1196
|
-
}
|
|
1197
|
-
try {
|
|
1198
|
-
l = de.call(this, y);
|
|
1199
|
-
} catch (f) {
|
|
1200
|
-
return Promise.reject(f);
|
|
1201
|
-
}
|
|
1202
|
-
for (p = 0, E = c.length; p < E; )
|
|
1203
|
-
l = l.then(c[p++], c[p++]);
|
|
1204
|
-
return l;
|
|
1205
|
-
}
|
|
1206
|
-
getUri(t) {
|
|
1207
|
-
t = P(this.defaults, t);
|
|
1208
|
-
const n = Be(t.baseURL, t.url);
|
|
1209
|
-
return Ne(n, t.params, t.paramsSerializer);
|
|
1210
|
-
}
|
|
1211
|
-
}
|
|
1212
|
-
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1213
|
-
I.prototype[t] = function(n, r) {
|
|
1214
|
-
return this.request(P(r || {}, {
|
|
1215
|
-
method: t,
|
|
1216
|
-
url: n,
|
|
1217
|
-
data: (r || {}).data
|
|
1218
|
-
}));
|
|
1219
|
-
};
|
|
1220
|
-
});
|
|
1221
|
-
a.forEach(["post", "put", "patch"], function(t) {
|
|
1222
|
-
function n(r) {
|
|
1223
|
-
return function(o, i, u) {
|
|
1224
|
-
return this.request(P(u || {}, {
|
|
1225
|
-
method: t,
|
|
1226
|
-
headers: r ? {
|
|
1227
|
-
"Content-Type": "multipart/form-data"
|
|
1228
|
-
} : {},
|
|
1229
|
-
url: o,
|
|
1230
|
-
data: i
|
|
1231
|
-
}));
|
|
1232
|
-
};
|
|
1233
|
-
}
|
|
1234
|
-
I.prototype[t] = n(), I.prototype[t + "Form"] = n(!0);
|
|
1235
|
-
});
|
|
1236
|
-
const H = I;
|
|
1237
|
-
class se {
|
|
1238
|
-
constructor(t) {
|
|
1239
|
-
if (typeof t != "function")
|
|
1240
|
-
throw new TypeError("executor must be a function.");
|
|
1241
|
-
let n;
|
|
1242
|
-
this.promise = new Promise(function(o) {
|
|
1243
|
-
n = o;
|
|
1244
|
-
});
|
|
1245
|
-
const r = this;
|
|
1246
|
-
this.promise.then((s) => {
|
|
1247
|
-
if (!r._listeners)
|
|
1248
|
-
return;
|
|
1249
|
-
let o = r._listeners.length;
|
|
1250
|
-
for (; o-- > 0; )
|
|
1251
|
-
r._listeners[o](s);
|
|
1252
|
-
r._listeners = null;
|
|
1253
|
-
}), this.promise.then = (s) => {
|
|
1254
|
-
let o;
|
|
1255
|
-
const i = new Promise((u) => {
|
|
1256
|
-
r.subscribe(u), o = u;
|
|
1257
|
-
}).then(s);
|
|
1258
|
-
return i.cancel = function() {
|
|
1259
|
-
r.unsubscribe(o);
|
|
1260
|
-
}, i;
|
|
1261
|
-
}, t(function(o, i, u) {
|
|
1262
|
-
r.reason || (r.reason = new _(o, i, u), n(r.reason));
|
|
1263
|
-
});
|
|
1264
|
-
}
|
|
1265
|
-
/**
|
|
1266
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
|
1267
|
-
*/
|
|
1268
|
-
throwIfRequested() {
|
|
1269
|
-
if (this.reason)
|
|
1270
|
-
throw this.reason;
|
|
1271
|
-
}
|
|
1272
|
-
/**
|
|
1273
|
-
* Subscribe to the cancel signal
|
|
1274
|
-
*/
|
|
1275
|
-
subscribe(t) {
|
|
1276
|
-
if (this.reason) {
|
|
1277
|
-
t(this.reason);
|
|
1278
|
-
return;
|
|
1279
|
-
}
|
|
1280
|
-
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
1281
|
-
}
|
|
1282
|
-
/**
|
|
1283
|
-
* Unsubscribe from the cancel signal
|
|
1284
|
-
*/
|
|
1285
|
-
unsubscribe(t) {
|
|
1286
|
-
if (!this._listeners)
|
|
1287
|
-
return;
|
|
1288
|
-
const n = this._listeners.indexOf(t);
|
|
1289
|
-
n !== -1 && this._listeners.splice(n, 1);
|
|
1290
|
-
}
|
|
1291
|
-
/**
|
|
1292
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1293
|
-
* cancels the `CancelToken`.
|
|
1294
|
-
*/
|
|
1295
|
-
static source() {
|
|
1296
|
-
let t;
|
|
1297
|
-
return {
|
|
1298
|
-
token: new se(function(s) {
|
|
1299
|
-
t = s;
|
|
1300
|
-
}),
|
|
1301
|
-
cancel: t
|
|
1302
|
-
};
|
|
1303
|
-
}
|
|
1304
|
-
}
|
|
1305
|
-
const Kt = se;
|
|
1306
|
-
function Gt(e) {
|
|
1307
|
-
return function(n) {
|
|
1308
|
-
return e.apply(null, n);
|
|
1309
|
-
};
|
|
1310
|
-
}
|
|
1311
|
-
function Xt(e) {
|
|
1312
|
-
return a.isObject(e) && e.isAxiosError === !0;
|
|
1313
|
-
}
|
|
1314
|
-
const Z = {
|
|
1315
|
-
Continue: 100,
|
|
1316
|
-
SwitchingProtocols: 101,
|
|
1317
|
-
Processing: 102,
|
|
1318
|
-
EarlyHints: 103,
|
|
1319
|
-
Ok: 200,
|
|
1320
|
-
Created: 201,
|
|
1321
|
-
Accepted: 202,
|
|
1322
|
-
NonAuthoritativeInformation: 203,
|
|
1323
|
-
NoContent: 204,
|
|
1324
|
-
ResetContent: 205,
|
|
1325
|
-
PartialContent: 206,
|
|
1326
|
-
MultiStatus: 207,
|
|
1327
|
-
AlreadyReported: 208,
|
|
1328
|
-
ImUsed: 226,
|
|
1329
|
-
MultipleChoices: 300,
|
|
1330
|
-
MovedPermanently: 301,
|
|
1331
|
-
Found: 302,
|
|
1332
|
-
SeeOther: 303,
|
|
1333
|
-
NotModified: 304,
|
|
1334
|
-
UseProxy: 305,
|
|
1335
|
-
Unused: 306,
|
|
1336
|
-
TemporaryRedirect: 307,
|
|
1337
|
-
PermanentRedirect: 308,
|
|
1338
|
-
BadRequest: 400,
|
|
1339
|
-
Unauthorized: 401,
|
|
1340
|
-
PaymentRequired: 402,
|
|
1341
|
-
Forbidden: 403,
|
|
1342
|
-
NotFound: 404,
|
|
1343
|
-
MethodNotAllowed: 405,
|
|
1344
|
-
NotAcceptable: 406,
|
|
1345
|
-
ProxyAuthenticationRequired: 407,
|
|
1346
|
-
RequestTimeout: 408,
|
|
1347
|
-
Conflict: 409,
|
|
1348
|
-
Gone: 410,
|
|
1349
|
-
LengthRequired: 411,
|
|
1350
|
-
PreconditionFailed: 412,
|
|
1351
|
-
PayloadTooLarge: 413,
|
|
1352
|
-
UriTooLong: 414,
|
|
1353
|
-
UnsupportedMediaType: 415,
|
|
1354
|
-
RangeNotSatisfiable: 416,
|
|
1355
|
-
ExpectationFailed: 417,
|
|
1356
|
-
ImATeapot: 418,
|
|
1357
|
-
MisdirectedRequest: 421,
|
|
1358
|
-
UnprocessableEntity: 422,
|
|
1359
|
-
Locked: 423,
|
|
1360
|
-
FailedDependency: 424,
|
|
1361
|
-
TooEarly: 425,
|
|
1362
|
-
UpgradeRequired: 426,
|
|
1363
|
-
PreconditionRequired: 428,
|
|
1364
|
-
TooManyRequests: 429,
|
|
1365
|
-
RequestHeaderFieldsTooLarge: 431,
|
|
1366
|
-
UnavailableForLegalReasons: 451,
|
|
1367
|
-
InternalServerError: 500,
|
|
1368
|
-
NotImplemented: 501,
|
|
1369
|
-
BadGateway: 502,
|
|
1370
|
-
ServiceUnavailable: 503,
|
|
1371
|
-
GatewayTimeout: 504,
|
|
1372
|
-
HttpVersionNotSupported: 505,
|
|
1373
|
-
VariantAlsoNegotiates: 506,
|
|
1374
|
-
InsufficientStorage: 507,
|
|
1375
|
-
LoopDetected: 508,
|
|
1376
|
-
NotExtended: 510,
|
|
1377
|
-
NetworkAuthenticationRequired: 511
|
|
1378
|
-
};
|
|
1379
|
-
Object.entries(Z).forEach(([e, t]) => {
|
|
1380
|
-
Z[t] = e;
|
|
1381
|
-
});
|
|
1382
|
-
const Qt = Z;
|
|
1383
|
-
function _e(e) {
|
|
1384
|
-
const t = new H(e), n = me(H.prototype.request, t);
|
|
1385
|
-
return a.extend(n, H.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1386
|
-
return _e(P(e, s));
|
|
1387
|
-
}, n;
|
|
1388
|
-
}
|
|
1389
|
-
const w = _e(ne);
|
|
1390
|
-
w.Axios = H;
|
|
1391
|
-
w.CanceledError = _;
|
|
1392
|
-
w.CancelToken = Kt;
|
|
1393
|
-
w.isCancel = Fe;
|
|
1394
|
-
w.VERSION = De;
|
|
1395
|
-
w.toFormData = $;
|
|
1396
|
-
w.AxiosError = m;
|
|
1397
|
-
w.Cancel = w.CanceledError;
|
|
1398
|
-
w.all = function(t) {
|
|
1399
|
-
return Promise.all(t);
|
|
1400
|
-
};
|
|
1401
|
-
w.spread = Gt;
|
|
1402
|
-
w.isAxiosError = Xt;
|
|
1403
|
-
w.mergeConfig = P;
|
|
1404
|
-
w.AxiosHeaders = g;
|
|
1405
|
-
w.formToJSON = (e) => Ce(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1406
|
-
w.HttpStatusCode = Qt;
|
|
1407
|
-
w.default = w;
|
|
1408
|
-
const vt = w;
|
|
1409
|
-
window.axios = vt;
|
|
1410
|
-
const N = new URLSearchParams(window.location.search);
|
|
1411
|
-
class Yt {
|
|
1
|
+
import c from "axios";
|
|
2
|
+
window.axios = c;
|
|
3
|
+
const e = new URLSearchParams(window.location.search);
|
|
4
|
+
class r {
|
|
1412
5
|
constructor() {
|
|
1413
6
|
}
|
|
1414
7
|
async get(t) {
|
|
1415
|
-
const
|
|
1416
|
-
return new Promise(async (
|
|
1417
|
-
!
|
|
1418
|
-
|
|
1419
|
-
}) : await window.axios.get(`${t}?page=${
|
|
1420
|
-
|
|
8
|
+
const s = e.get("page"), n = e.get("paginate"), o = e.get("search");
|
|
9
|
+
return new Promise(async (i) => {
|
|
10
|
+
!s && !n && !o ? await window.axios.get(t).then((a) => {
|
|
11
|
+
i(a);
|
|
12
|
+
}) : await window.axios.get(`${t}?page=${s}&paginate=${n}&search=${o}`).then((a) => {
|
|
13
|
+
i(a);
|
|
1421
14
|
});
|
|
1422
15
|
});
|
|
1423
16
|
}
|
|
1424
17
|
async post(t) {
|
|
1425
|
-
const
|
|
1426
|
-
return new Promise(async (
|
|
1427
|
-
!
|
|
1428
|
-
|
|
1429
|
-
}) : await window.axios.post(`${t}?page=${
|
|
1430
|
-
|
|
18
|
+
const s = e.get("page"), n = e.get("paginate"), o = e.get("search");
|
|
19
|
+
return new Promise(async (i) => {
|
|
20
|
+
!s && !n && !o ? await window.axios.post(t).then((a) => {
|
|
21
|
+
i(a);
|
|
22
|
+
}) : await window.axios.post(`${t}?page=${s}&paginate=${n}&search=${o}`).then((a) => {
|
|
23
|
+
i(a);
|
|
1431
24
|
});
|
|
1432
25
|
});
|
|
1433
26
|
}
|
|
1434
27
|
}
|
|
1435
28
|
export {
|
|
1436
|
-
|
|
29
|
+
r as default
|
|
1437
30
|
};
|