morghulis 1.0.7 → 1.0.8
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/components/MyComponent.vue.d.ts +20 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/index.d.ts +7 -0
- package/dist/morghulis.css +1 -1
- package/dist/morghulis.es.js +26 -0
- package/dist/morghulis.umd.js +1 -0
- package/package.json +22 -37
- package/README.md +0 -5
- package/dist/morghulis.js +0 -2177
- package/dist/morghulis.umd.cjs +0 -11
- package/dist/vite.svg +0 -1
package/dist/morghulis.js
DELETED
@@ -1,2177 +0,0 @@
|
|
1
|
-
import { defineComponent as Ct, openBlock as At, createElementBlock as _t, getCurrentScope as xt, onScopeDispose as Nt, toRef as Pt, readonly as kt, customRef as vt, ref as q, isRef as Lt, watch as xe, toValue as K } from "vue";
|
2
|
-
const Ut = { class: "main" }, Dt = /* @__PURE__ */ Ct({
|
3
|
-
__name: "MorTable",
|
4
|
-
props: {
|
5
|
-
domain: {},
|
6
|
-
entity: {},
|
7
|
-
code: {}
|
8
|
-
},
|
9
|
-
setup(e) {
|
10
|
-
return (t, n) => (At(), _t("div", Ut));
|
11
|
-
}
|
12
|
-
});
|
13
|
-
function G(e) {
|
14
|
-
return xt() ? (Nt(e), !0) : !1;
|
15
|
-
}
|
16
|
-
const H = typeof window < "u" && typeof document < "u", Le = typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope, Ft = Object.prototype.toString, Bt = (e) => Ft.call(e) === "[object Object]", Ye = () => {
|
17
|
-
};
|
18
|
-
function Ue(e) {
|
19
|
-
return Array.isArray(e) ? e : [e];
|
20
|
-
}
|
21
|
-
function jt(...e) {
|
22
|
-
if (e.length !== 1)
|
23
|
-
return Pt(...e);
|
24
|
-
const t = e[0];
|
25
|
-
return typeof t == "function" ? kt(vt(() => ({ get: t, set: Ye }))) : q(t);
|
26
|
-
}
|
27
|
-
function It(e, t = 1e3, n = {}) {
|
28
|
-
const {
|
29
|
-
immediate: r = !0,
|
30
|
-
immediateCallback: s = !1
|
31
|
-
} = n;
|
32
|
-
let o = null;
|
33
|
-
const i = q(!1);
|
34
|
-
function c() {
|
35
|
-
o && (clearInterval(o), o = null);
|
36
|
-
}
|
37
|
-
function f() {
|
38
|
-
i.value = !1, c();
|
39
|
-
}
|
40
|
-
function l() {
|
41
|
-
const u = K(t);
|
42
|
-
u <= 0 || (i.value = !0, s && e(), c(), i.value && (o = setInterval(e, u)));
|
43
|
-
}
|
44
|
-
if (r && H && l(), Lt(t) || typeof t == "function") {
|
45
|
-
const u = xe(t, () => {
|
46
|
-
i.value && H && l();
|
47
|
-
});
|
48
|
-
G(u);
|
49
|
-
}
|
50
|
-
return G(f), {
|
51
|
-
isActive: i,
|
52
|
-
pause: f,
|
53
|
-
resume: l
|
54
|
-
};
|
55
|
-
}
|
56
|
-
var ee = {};
|
57
|
-
/*!
|
58
|
-
* cookie
|
59
|
-
* Copyright(c) 2012-2014 Roman Shtylman
|
60
|
-
* Copyright(c) 2015 Douglas Christopher Wilson
|
61
|
-
* MIT Licensed
|
62
|
-
*/
|
63
|
-
var De;
|
64
|
-
function $t() {
|
65
|
-
if (De) return ee;
|
66
|
-
De = 1, ee.parse = i, ee.serialize = l;
|
67
|
-
var e = Object.prototype.toString, t = Object.prototype.hasOwnProperty, n = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/, r = /^("?)[\u0021\u0023-\u002B\u002D-\u003A\u003C-\u005B\u005D-\u007E]*\1$/, s = /^([.]?[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)([.][a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?)*$/i, o = /^[\u0020-\u003A\u003D-\u007E]*$/;
|
68
|
-
function i(y, h) {
|
69
|
-
if (typeof y != "string")
|
70
|
-
throw new TypeError("argument str must be a string");
|
71
|
-
var d = {}, p = y.length;
|
72
|
-
if (p < 2) return d;
|
73
|
-
var S = h && h.decode || u, g = 0, E = 0, O = 0;
|
74
|
-
do {
|
75
|
-
if (E = y.indexOf("=", g), E === -1) break;
|
76
|
-
if (O = y.indexOf(";", g), O === -1)
|
77
|
-
O = p;
|
78
|
-
else if (E > O) {
|
79
|
-
g = y.lastIndexOf(";", E - 1) + 1;
|
80
|
-
continue;
|
81
|
-
}
|
82
|
-
var R = c(y, g, E), N = f(y, E, R), k = y.slice(R, N);
|
83
|
-
if (!t.call(d, k)) {
|
84
|
-
var x = c(y, E + 1, O), F = f(y, O, x);
|
85
|
-
y.charCodeAt(x) === 34 && y.charCodeAt(F - 1) === 34 && (x++, F--);
|
86
|
-
var V = y.slice(x, F);
|
87
|
-
d[k] = b(V, S);
|
88
|
-
}
|
89
|
-
g = O + 1;
|
90
|
-
} while (g < p);
|
91
|
-
return d;
|
92
|
-
}
|
93
|
-
function c(y, h, d) {
|
94
|
-
do {
|
95
|
-
var p = y.charCodeAt(h);
|
96
|
-
if (p !== 32 && p !== 9) return h;
|
97
|
-
} while (++h < d);
|
98
|
-
return d;
|
99
|
-
}
|
100
|
-
function f(y, h, d) {
|
101
|
-
for (; h > d; ) {
|
102
|
-
var p = y.charCodeAt(--h);
|
103
|
-
if (p !== 32 && p !== 9) return h + 1;
|
104
|
-
}
|
105
|
-
return d;
|
106
|
-
}
|
107
|
-
function l(y, h, d) {
|
108
|
-
var p = d && d.encode || encodeURIComponent;
|
109
|
-
if (typeof p != "function")
|
110
|
-
throw new TypeError("option encode is invalid");
|
111
|
-
if (!n.test(y))
|
112
|
-
throw new TypeError("argument name is invalid");
|
113
|
-
var S = p(h);
|
114
|
-
if (!r.test(S))
|
115
|
-
throw new TypeError("argument val is invalid");
|
116
|
-
var g = y + "=" + S;
|
117
|
-
if (!d) return g;
|
118
|
-
if (d.maxAge != null) {
|
119
|
-
var E = Math.floor(d.maxAge);
|
120
|
-
if (!isFinite(E))
|
121
|
-
throw new TypeError("option maxAge is invalid");
|
122
|
-
g += "; Max-Age=" + E;
|
123
|
-
}
|
124
|
-
if (d.domain) {
|
125
|
-
if (!s.test(d.domain))
|
126
|
-
throw new TypeError("option domain is invalid");
|
127
|
-
g += "; Domain=" + d.domain;
|
128
|
-
}
|
129
|
-
if (d.path) {
|
130
|
-
if (!o.test(d.path))
|
131
|
-
throw new TypeError("option path is invalid");
|
132
|
-
g += "; Path=" + d.path;
|
133
|
-
}
|
134
|
-
if (d.expires) {
|
135
|
-
var O = d.expires;
|
136
|
-
if (!m(O) || isNaN(O.valueOf()))
|
137
|
-
throw new TypeError("option expires is invalid");
|
138
|
-
g += "; Expires=" + O.toUTCString();
|
139
|
-
}
|
140
|
-
if (d.httpOnly && (g += "; HttpOnly"), d.secure && (g += "; Secure"), d.partitioned && (g += "; Partitioned"), d.priority) {
|
141
|
-
var R = typeof d.priority == "string" ? d.priority.toLowerCase() : d.priority;
|
142
|
-
switch (R) {
|
143
|
-
case "low":
|
144
|
-
g += "; Priority=Low";
|
145
|
-
break;
|
146
|
-
case "medium":
|
147
|
-
g += "; Priority=Medium";
|
148
|
-
break;
|
149
|
-
case "high":
|
150
|
-
g += "; Priority=High";
|
151
|
-
break;
|
152
|
-
default:
|
153
|
-
throw new TypeError("option priority is invalid");
|
154
|
-
}
|
155
|
-
}
|
156
|
-
if (d.sameSite) {
|
157
|
-
var N = typeof d.sameSite == "string" ? d.sameSite.toLowerCase() : d.sameSite;
|
158
|
-
switch (N) {
|
159
|
-
case !0:
|
160
|
-
g += "; SameSite=Strict";
|
161
|
-
break;
|
162
|
-
case "lax":
|
163
|
-
g += "; SameSite=Lax";
|
164
|
-
break;
|
165
|
-
case "strict":
|
166
|
-
g += "; SameSite=Strict";
|
167
|
-
break;
|
168
|
-
case "none":
|
169
|
-
g += "; SameSite=None";
|
170
|
-
break;
|
171
|
-
default:
|
172
|
-
throw new TypeError("option sameSite is invalid");
|
173
|
-
}
|
174
|
-
}
|
175
|
-
return g;
|
176
|
-
}
|
177
|
-
function u(y) {
|
178
|
-
return y.indexOf("%") !== -1 ? decodeURIComponent(y) : y;
|
179
|
-
}
|
180
|
-
function m(y) {
|
181
|
-
return e.call(y) === "[object Date]";
|
182
|
-
}
|
183
|
-
function b(y, h) {
|
184
|
-
try {
|
185
|
-
return h(y);
|
186
|
-
} catch {
|
187
|
-
return y;
|
188
|
-
}
|
189
|
-
}
|
190
|
-
return ee;
|
191
|
-
}
|
192
|
-
var te = $t();
|
193
|
-
function Mt() {
|
194
|
-
const e = typeof global > "u" ? void 0 : global.TEST_HAS_DOCUMENT_COOKIE;
|
195
|
-
return typeof e == "boolean" ? e : typeof document == "object" && typeof document.cookie == "string";
|
196
|
-
}
|
197
|
-
function qt(e) {
|
198
|
-
return typeof e == "string" ? te.parse(e) : typeof e == "object" && e !== null ? e : {};
|
199
|
-
}
|
200
|
-
function pe(e, t = {}) {
|
201
|
-
const n = Ht(e);
|
202
|
-
if (!t.doNotParse)
|
203
|
-
try {
|
204
|
-
return JSON.parse(n);
|
205
|
-
} catch {
|
206
|
-
}
|
207
|
-
return e;
|
208
|
-
}
|
209
|
-
function Ht(e) {
|
210
|
-
return e && e[0] === "j" && e[1] === ":" ? e.substr(2) : e;
|
211
|
-
}
|
212
|
-
class zt {
|
213
|
-
constructor(t, n = {}) {
|
214
|
-
this.changeListeners = [], this.HAS_DOCUMENT_COOKIE = !1, this.update = () => {
|
215
|
-
if (!this.HAS_DOCUMENT_COOKIE)
|
216
|
-
return;
|
217
|
-
const s = this.cookies;
|
218
|
-
this.cookies = te.parse(document.cookie), this._checkChanges(s);
|
219
|
-
};
|
220
|
-
const r = typeof document > "u" ? "" : document.cookie;
|
221
|
-
this.cookies = qt(t || r), this.defaultSetOptions = n, this.HAS_DOCUMENT_COOKIE = Mt();
|
222
|
-
}
|
223
|
-
_emitChange(t) {
|
224
|
-
for (let n = 0; n < this.changeListeners.length; ++n)
|
225
|
-
this.changeListeners[n](t);
|
226
|
-
}
|
227
|
-
_checkChanges(t) {
|
228
|
-
new Set(Object.keys(t).concat(Object.keys(this.cookies))).forEach((r) => {
|
229
|
-
t[r] !== this.cookies[r] && this._emitChange({
|
230
|
-
name: r,
|
231
|
-
value: pe(this.cookies[r])
|
232
|
-
});
|
233
|
-
});
|
234
|
-
}
|
235
|
-
_startPolling() {
|
236
|
-
this.pollingInterval = setInterval(this.update, 300);
|
237
|
-
}
|
238
|
-
_stopPolling() {
|
239
|
-
this.pollingInterval && clearInterval(this.pollingInterval);
|
240
|
-
}
|
241
|
-
get(t, n = {}) {
|
242
|
-
return n.doNotUpdate || this.update(), pe(this.cookies[t], n);
|
243
|
-
}
|
244
|
-
getAll(t = {}) {
|
245
|
-
t.doNotUpdate || this.update();
|
246
|
-
const n = {};
|
247
|
-
for (let r in this.cookies)
|
248
|
-
n[r] = pe(this.cookies[r], t);
|
249
|
-
return n;
|
250
|
-
}
|
251
|
-
set(t, n, r) {
|
252
|
-
r ? r = Object.assign(Object.assign({}, this.defaultSetOptions), r) : r = this.defaultSetOptions;
|
253
|
-
const s = typeof n == "string" ? n : JSON.stringify(n);
|
254
|
-
this.cookies = Object.assign(Object.assign({}, this.cookies), { [t]: s }), this.HAS_DOCUMENT_COOKIE && (document.cookie = te.serialize(t, s, r)), this._emitChange({ name: t, value: n, options: r });
|
255
|
-
}
|
256
|
-
remove(t, n) {
|
257
|
-
const r = n = Object.assign(Object.assign(Object.assign({}, this.defaultSetOptions), n), { expires: new Date(1970, 1, 1, 0, 0, 1), maxAge: 0 });
|
258
|
-
this.cookies = Object.assign({}, this.cookies), delete this.cookies[t], this.HAS_DOCUMENT_COOKIE && (document.cookie = te.serialize(t, "", r)), this._emitChange({ name: t, value: void 0, options: n });
|
259
|
-
}
|
260
|
-
addChangeListener(t) {
|
261
|
-
this.changeListeners.push(t), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 1 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.addEventListener("change", this.update) : this._startPolling());
|
262
|
-
}
|
263
|
-
removeChangeListener(t) {
|
264
|
-
const n = this.changeListeners.indexOf(t);
|
265
|
-
n >= 0 && this.changeListeners.splice(n, 1), this.HAS_DOCUMENT_COOKIE && this.changeListeners.length === 0 && (typeof window == "object" && "cookieStore" in window ? window.cookieStore.removeEventListener("change", this.update) : this._stopPolling());
|
266
|
-
}
|
267
|
-
}
|
268
|
-
function et(e, { doNotParse: t = !1, autoUpdateDependencies: n = !1 } = {}, r = new zt()) {
|
269
|
-
const s = n ? [...e || []] : e;
|
270
|
-
let o = r.getAll({ doNotParse: !0 });
|
271
|
-
const i = q(0), c = () => {
|
272
|
-
const f = r.getAll({ doNotParse: !0 });
|
273
|
-
Jt(
|
274
|
-
s || null,
|
275
|
-
f,
|
276
|
-
o
|
277
|
-
) && i.value++, o = f;
|
278
|
-
};
|
279
|
-
return r.addChangeListener(c), G(() => {
|
280
|
-
r.removeChangeListener(c);
|
281
|
-
}), {
|
282
|
-
/**
|
283
|
-
* Reactive get cookie by name. If **autoUpdateDependencies = true** then it will update watching dependencies
|
284
|
-
*/
|
285
|
-
get: (...f) => (n && s && !s.includes(f[0]) && s.push(f[0]), i.value, r.get(f[0], { doNotParse: t, ...f[1] })),
|
286
|
-
/**
|
287
|
-
* Reactive get all cookies
|
288
|
-
*/
|
289
|
-
getAll: (...f) => (i.value, r.getAll({ doNotParse: t, ...f[0] })),
|
290
|
-
set: (...f) => r.set(...f),
|
291
|
-
remove: (...f) => r.remove(...f),
|
292
|
-
addChangeListener: (...f) => r.addChangeListener(...f),
|
293
|
-
removeChangeListener: (...f) => r.removeChangeListener(...f)
|
294
|
-
};
|
295
|
-
}
|
296
|
-
function Jt(e, t, n) {
|
297
|
-
if (!e)
|
298
|
-
return !0;
|
299
|
-
for (const r of e)
|
300
|
-
if (t[r] !== n[r])
|
301
|
-
return !0;
|
302
|
-
return !1;
|
303
|
-
}
|
304
|
-
const A = [];
|
305
|
-
for (let e = 0; e < 256; ++e)
|
306
|
-
A.push((e + 256).toString(16).slice(1));
|
307
|
-
function Vt(e, t = 0) {
|
308
|
-
return (A[e[t + 0]] + A[e[t + 1]] + A[e[t + 2]] + A[e[t + 3]] + "-" + A[e[t + 4]] + A[e[t + 5]] + "-" + A[e[t + 6]] + A[e[t + 7]] + "-" + A[e[t + 8]] + A[e[t + 9]] + "-" + A[e[t + 10]] + A[e[t + 11]] + A[e[t + 12]] + A[e[t + 13]] + A[e[t + 14]] + A[e[t + 15]]).toLowerCase();
|
309
|
-
}
|
310
|
-
let me;
|
311
|
-
const Wt = new Uint8Array(16);
|
312
|
-
function Kt() {
|
313
|
-
if (!me) {
|
314
|
-
if (typeof crypto > "u" || !crypto.getRandomValues)
|
315
|
-
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
316
|
-
me = crypto.getRandomValues.bind(crypto);
|
317
|
-
}
|
318
|
-
return me(Wt);
|
319
|
-
}
|
320
|
-
const Gt = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), Fe = { randomUUID: Gt };
|
321
|
-
function Xt(e, t, n) {
|
322
|
-
if (Fe.randomUUID && !t && !e)
|
323
|
-
return Fe.randomUUID();
|
324
|
-
e = e || {};
|
325
|
-
const r = e.random || (e.rng || Kt)();
|
326
|
-
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, Vt(r);
|
327
|
-
}
|
328
|
-
function tt(e, t) {
|
329
|
-
return function() {
|
330
|
-
return e.apply(t, arguments);
|
331
|
-
};
|
332
|
-
}
|
333
|
-
const { toString: Zt } = Object.prototype, { getPrototypeOf: Ne } = Object, ae = /* @__PURE__ */ ((e) => (t) => {
|
334
|
-
const n = Zt.call(t);
|
335
|
-
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
336
|
-
})(/* @__PURE__ */ Object.create(null)), U = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ce = (e) => (t) => typeof t === e, { isArray: z } = Array, X = ce("undefined");
|
337
|
-
function Qt(e) {
|
338
|
-
return e !== null && !X(e) && e.constructor !== null && !X(e.constructor) && L(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
339
|
-
}
|
340
|
-
const nt = U("ArrayBuffer");
|
341
|
-
function Yt(e) {
|
342
|
-
let t;
|
343
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && nt(e.buffer), t;
|
344
|
-
}
|
345
|
-
const en = ce("string"), L = ce("function"), rt = ce("number"), ue = (e) => e !== null && typeof e == "object", tn = (e) => e === !0 || e === !1, ne = (e) => {
|
346
|
-
if (ae(e) !== "object")
|
347
|
-
return !1;
|
348
|
-
const t = Ne(e);
|
349
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
350
|
-
}, nn = U("Date"), rn = U("File"), sn = U("Blob"), on = U("FileList"), an = (e) => ue(e) && L(e.pipe), cn = (e) => {
|
351
|
-
let t;
|
352
|
-
return e && (typeof FormData == "function" && e instanceof FormData || L(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
|
353
|
-
t === "object" && L(e.toString) && e.toString() === "[object FormData]"));
|
354
|
-
}, un = U("URLSearchParams"), [ln, fn, dn, hn] = ["ReadableStream", "Request", "Response", "Headers"].map(U), pn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
355
|
-
function Z(e, t, { allOwnKeys: n = !1 } = {}) {
|
356
|
-
if (e === null || typeof e > "u")
|
357
|
-
return;
|
358
|
-
let r, s;
|
359
|
-
if (typeof e != "object" && (e = [e]), z(e))
|
360
|
-
for (r = 0, s = e.length; r < s; r++)
|
361
|
-
t.call(null, e[r], r, e);
|
362
|
-
else {
|
363
|
-
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
364
|
-
let c;
|
365
|
-
for (r = 0; r < i; r++)
|
366
|
-
c = o[r], t.call(null, e[c], c, e);
|
367
|
-
}
|
368
|
-
}
|
369
|
-
function st(e, t) {
|
370
|
-
t = t.toLowerCase();
|
371
|
-
const n = Object.keys(e);
|
372
|
-
let r = n.length, s;
|
373
|
-
for (; r-- > 0; )
|
374
|
-
if (s = n[r], t === s.toLowerCase())
|
375
|
-
return s;
|
376
|
-
return null;
|
377
|
-
}
|
378
|
-
const j = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, ot = (e) => !X(e) && e !== j;
|
379
|
-
function Se() {
|
380
|
-
const { caseless: e } = ot(this) && this || {}, t = {}, n = (r, s) => {
|
381
|
-
const o = e && st(t, s) || s;
|
382
|
-
ne(t[o]) && ne(r) ? t[o] = Se(t[o], r) : ne(r) ? t[o] = Se({}, r) : z(r) ? t[o] = r.slice() : t[o] = r;
|
383
|
-
};
|
384
|
-
for (let r = 0, s = arguments.length; r < s; r++)
|
385
|
-
arguments[r] && Z(arguments[r], n);
|
386
|
-
return t;
|
387
|
-
}
|
388
|
-
const mn = (e, t, n, { allOwnKeys: r } = {}) => (Z(t, (s, o) => {
|
389
|
-
n && L(s) ? e[o] = tt(s, n) : e[o] = s;
|
390
|
-
}, { allOwnKeys: r }), e), yn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), gn = (e, t, n, r) => {
|
391
|
-
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
392
|
-
value: t.prototype
|
393
|
-
}), n && Object.assign(e.prototype, n);
|
394
|
-
}, bn = (e, t, n, r) => {
|
395
|
-
let s, o, i;
|
396
|
-
const c = {};
|
397
|
-
if (t = t || {}, e == null) return t;
|
398
|
-
do {
|
399
|
-
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
400
|
-
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
401
|
-
e = n !== !1 && Ne(e);
|
402
|
-
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
403
|
-
return t;
|
404
|
-
}, wn = (e, t, n) => {
|
405
|
-
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
406
|
-
const r = e.indexOf(t, n);
|
407
|
-
return r !== -1 && r === n;
|
408
|
-
}, En = (e) => {
|
409
|
-
if (!e) return null;
|
410
|
-
if (z(e)) return e;
|
411
|
-
let t = e.length;
|
412
|
-
if (!rt(t)) return null;
|
413
|
-
const n = new Array(t);
|
414
|
-
for (; t-- > 0; )
|
415
|
-
n[t] = e[t];
|
416
|
-
return n;
|
417
|
-
}, Sn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ne(Uint8Array)), On = (e, t) => {
|
418
|
-
const r = (e && e[Symbol.iterator]).call(e);
|
419
|
-
let s;
|
420
|
-
for (; (s = r.next()) && !s.done; ) {
|
421
|
-
const o = s.value;
|
422
|
-
t.call(e, o[0], o[1]);
|
423
|
-
}
|
424
|
-
}, Rn = (e, t) => {
|
425
|
-
let n;
|
426
|
-
const r = [];
|
427
|
-
for (; (n = e.exec(t)) !== null; )
|
428
|
-
r.push(n);
|
429
|
-
return r;
|
430
|
-
}, Tn = U("HTMLFormElement"), Cn = (e) => e.toLowerCase().replace(
|
431
|
-
/[-_\s]([a-z\d])(\w*)/g,
|
432
|
-
function(n, r, s) {
|
433
|
-
return r.toUpperCase() + s;
|
434
|
-
}
|
435
|
-
), Be = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), An = U("RegExp"), it = (e, t) => {
|
436
|
-
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
437
|
-
Z(n, (s, o) => {
|
438
|
-
let i;
|
439
|
-
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
440
|
-
}), Object.defineProperties(e, r);
|
441
|
-
}, _n = (e) => {
|
442
|
-
it(e, (t, n) => {
|
443
|
-
if (L(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
444
|
-
return !1;
|
445
|
-
const r = e[n];
|
446
|
-
if (L(r)) {
|
447
|
-
if (t.enumerable = !1, "writable" in t) {
|
448
|
-
t.writable = !1;
|
449
|
-
return;
|
450
|
-
}
|
451
|
-
t.set || (t.set = () => {
|
452
|
-
throw Error("Can not rewrite read-only method '" + n + "'");
|
453
|
-
});
|
454
|
-
}
|
455
|
-
});
|
456
|
-
}, xn = (e, t) => {
|
457
|
-
const n = {}, r = (s) => {
|
458
|
-
s.forEach((o) => {
|
459
|
-
n[o] = !0;
|
460
|
-
});
|
461
|
-
};
|
462
|
-
return z(e) ? r(e) : r(String(e).split(t)), n;
|
463
|
-
}, Nn = () => {
|
464
|
-
}, Pn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, ye = "abcdefghijklmnopqrstuvwxyz", je = "0123456789", at = {
|
465
|
-
DIGIT: je,
|
466
|
-
ALPHA: ye,
|
467
|
-
ALPHA_DIGIT: ye + ye.toUpperCase() + je
|
468
|
-
}, kn = (e = 16, t = at.ALPHA_DIGIT) => {
|
469
|
-
let n = "";
|
470
|
-
const { length: r } = t;
|
471
|
-
for (; e--; )
|
472
|
-
n += t[Math.random() * r | 0];
|
473
|
-
return n;
|
474
|
-
};
|
475
|
-
function vn(e) {
|
476
|
-
return !!(e && L(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
477
|
-
}
|
478
|
-
const Ln = (e) => {
|
479
|
-
const t = new Array(10), n = (r, s) => {
|
480
|
-
if (ue(r)) {
|
481
|
-
if (t.indexOf(r) >= 0)
|
482
|
-
return;
|
483
|
-
if (!("toJSON" in r)) {
|
484
|
-
t[s] = r;
|
485
|
-
const o = z(r) ? [] : {};
|
486
|
-
return Z(r, (i, c) => {
|
487
|
-
const f = n(i, s + 1);
|
488
|
-
!X(f) && (o[c] = f);
|
489
|
-
}), t[s] = void 0, o;
|
490
|
-
}
|
491
|
-
}
|
492
|
-
return r;
|
493
|
-
};
|
494
|
-
return n(e, 0);
|
495
|
-
}, Un = U("AsyncFunction"), Dn = (e) => e && (ue(e) || L(e)) && L(e.then) && L(e.catch), ct = ((e, t) => e ? setImmediate : t ? ((n, r) => (j.addEventListener("message", ({ source: s, data: o }) => {
|
496
|
-
s === j && o === n && r.length && r.shift()();
|
497
|
-
}, !1), (s) => {
|
498
|
-
r.push(s), j.postMessage(n, "*");
|
499
|
-
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
500
|
-
typeof setImmediate == "function",
|
501
|
-
L(j.postMessage)
|
502
|
-
), Fn = typeof queueMicrotask < "u" ? queueMicrotask.bind(j) : typeof process < "u" && process.nextTick || ct, a = {
|
503
|
-
isArray: z,
|
504
|
-
isArrayBuffer: nt,
|
505
|
-
isBuffer: Qt,
|
506
|
-
isFormData: cn,
|
507
|
-
isArrayBufferView: Yt,
|
508
|
-
isString: en,
|
509
|
-
isNumber: rt,
|
510
|
-
isBoolean: tn,
|
511
|
-
isObject: ue,
|
512
|
-
isPlainObject: ne,
|
513
|
-
isReadableStream: ln,
|
514
|
-
isRequest: fn,
|
515
|
-
isResponse: dn,
|
516
|
-
isHeaders: hn,
|
517
|
-
isUndefined: X,
|
518
|
-
isDate: nn,
|
519
|
-
isFile: rn,
|
520
|
-
isBlob: sn,
|
521
|
-
isRegExp: An,
|
522
|
-
isFunction: L,
|
523
|
-
isStream: an,
|
524
|
-
isURLSearchParams: un,
|
525
|
-
isTypedArray: Sn,
|
526
|
-
isFileList: on,
|
527
|
-
forEach: Z,
|
528
|
-
merge: Se,
|
529
|
-
extend: mn,
|
530
|
-
trim: pn,
|
531
|
-
stripBOM: yn,
|
532
|
-
inherits: gn,
|
533
|
-
toFlatObject: bn,
|
534
|
-
kindOf: ae,
|
535
|
-
kindOfTest: U,
|
536
|
-
endsWith: wn,
|
537
|
-
toArray: En,
|
538
|
-
forEachEntry: On,
|
539
|
-
matchAll: Rn,
|
540
|
-
isHTMLForm: Tn,
|
541
|
-
hasOwnProperty: Be,
|
542
|
-
hasOwnProp: Be,
|
543
|
-
// an alias to avoid ESLint no-prototype-builtins detection
|
544
|
-
reduceDescriptors: it,
|
545
|
-
freezeMethods: _n,
|
546
|
-
toObjectSet: xn,
|
547
|
-
toCamelCase: Cn,
|
548
|
-
noop: Nn,
|
549
|
-
toFiniteNumber: Pn,
|
550
|
-
findKey: st,
|
551
|
-
global: j,
|
552
|
-
isContextDefined: ot,
|
553
|
-
ALPHABET: at,
|
554
|
-
generateString: kn,
|
555
|
-
isSpecCompliantForm: vn,
|
556
|
-
toJSONObject: Ln,
|
557
|
-
isAsyncFn: Un,
|
558
|
-
isThenable: Dn,
|
559
|
-
setImmediate: ct,
|
560
|
-
asap: Fn
|
561
|
-
};
|
562
|
-
function w(e, t, n, r, s) {
|
563
|
-
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);
|
564
|
-
}
|
565
|
-
a.inherits(w, Error, {
|
566
|
-
toJSON: function() {
|
567
|
-
return {
|
568
|
-
// Standard
|
569
|
-
message: this.message,
|
570
|
-
name: this.name,
|
571
|
-
// Microsoft
|
572
|
-
description: this.description,
|
573
|
-
number: this.number,
|
574
|
-
// Mozilla
|
575
|
-
fileName: this.fileName,
|
576
|
-
lineNumber: this.lineNumber,
|
577
|
-
columnNumber: this.columnNumber,
|
578
|
-
stack: this.stack,
|
579
|
-
// Axios
|
580
|
-
config: a.toJSONObject(this.config),
|
581
|
-
code: this.code,
|
582
|
-
status: this.status
|
583
|
-
};
|
584
|
-
}
|
585
|
-
});
|
586
|
-
const ut = w.prototype, lt = {};
|
587
|
-
[
|
588
|
-
"ERR_BAD_OPTION_VALUE",
|
589
|
-
"ERR_BAD_OPTION",
|
590
|
-
"ECONNABORTED",
|
591
|
-
"ETIMEDOUT",
|
592
|
-
"ERR_NETWORK",
|
593
|
-
"ERR_FR_TOO_MANY_REDIRECTS",
|
594
|
-
"ERR_DEPRECATED",
|
595
|
-
"ERR_BAD_RESPONSE",
|
596
|
-
"ERR_BAD_REQUEST",
|
597
|
-
"ERR_CANCELED",
|
598
|
-
"ERR_NOT_SUPPORT",
|
599
|
-
"ERR_INVALID_URL"
|
600
|
-
// eslint-disable-next-line func-names
|
601
|
-
].forEach((e) => {
|
602
|
-
lt[e] = { value: e };
|
603
|
-
});
|
604
|
-
Object.defineProperties(w, lt);
|
605
|
-
Object.defineProperty(ut, "isAxiosError", { value: !0 });
|
606
|
-
w.from = (e, t, n, r, s, o) => {
|
607
|
-
const i = Object.create(ut);
|
608
|
-
return a.toFlatObject(e, i, function(f) {
|
609
|
-
return f !== Error.prototype;
|
610
|
-
}, (c) => c !== "isAxiosError"), w.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
611
|
-
};
|
612
|
-
const Bn = null;
|
613
|
-
function Oe(e) {
|
614
|
-
return a.isPlainObject(e) || a.isArray(e);
|
615
|
-
}
|
616
|
-
function ft(e) {
|
617
|
-
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
618
|
-
}
|
619
|
-
function Ie(e, t, n) {
|
620
|
-
return e ? e.concat(t).map(function(s, o) {
|
621
|
-
return s = ft(s), !n && o ? "[" + s + "]" : s;
|
622
|
-
}).join(n ? "." : "") : t;
|
623
|
-
}
|
624
|
-
function jn(e) {
|
625
|
-
return a.isArray(e) && !e.some(Oe);
|
626
|
-
}
|
627
|
-
const In = a.toFlatObject(a, {}, null, function(t) {
|
628
|
-
return /^is[A-Z]/.test(t);
|
629
|
-
});
|
630
|
-
function le(e, t, n) {
|
631
|
-
if (!a.isObject(e))
|
632
|
-
throw new TypeError("target must be an object");
|
633
|
-
t = t || new FormData(), n = a.toFlatObject(n, {
|
634
|
-
metaTokens: !0,
|
635
|
-
dots: !1,
|
636
|
-
indexes: !1
|
637
|
-
}, !1, function(d, p) {
|
638
|
-
return !a.isUndefined(p[d]);
|
639
|
-
});
|
640
|
-
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
641
|
-
if (!a.isFunction(s))
|
642
|
-
throw new TypeError("visitor must be a function");
|
643
|
-
function l(h) {
|
644
|
-
if (h === null) return "";
|
645
|
-
if (a.isDate(h))
|
646
|
-
return h.toISOString();
|
647
|
-
if (!f && a.isBlob(h))
|
648
|
-
throw new w("Blob is not supported. Use a Buffer instead.");
|
649
|
-
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
650
|
-
}
|
651
|
-
function u(h, d, p) {
|
652
|
-
let S = h;
|
653
|
-
if (h && !p && typeof h == "object") {
|
654
|
-
if (a.endsWith(d, "{}"))
|
655
|
-
d = r ? d : d.slice(0, -2), h = JSON.stringify(h);
|
656
|
-
else if (a.isArray(h) && jn(h) || (a.isFileList(h) || a.endsWith(d, "[]")) && (S = a.toArray(h)))
|
657
|
-
return d = ft(d), S.forEach(function(E, O) {
|
658
|
-
!(a.isUndefined(E) || E === null) && t.append(
|
659
|
-
// eslint-disable-next-line no-nested-ternary
|
660
|
-
i === !0 ? Ie([d], O, o) : i === null ? d : d + "[]",
|
661
|
-
l(E)
|
662
|
-
);
|
663
|
-
}), !1;
|
664
|
-
}
|
665
|
-
return Oe(h) ? !0 : (t.append(Ie(p, d, o), l(h)), !1);
|
666
|
-
}
|
667
|
-
const m = [], b = Object.assign(In, {
|
668
|
-
defaultVisitor: u,
|
669
|
-
convertValue: l,
|
670
|
-
isVisitable: Oe
|
671
|
-
});
|
672
|
-
function y(h, d) {
|
673
|
-
if (!a.isUndefined(h)) {
|
674
|
-
if (m.indexOf(h) !== -1)
|
675
|
-
throw Error("Circular reference detected in " + d.join("."));
|
676
|
-
m.push(h), a.forEach(h, function(S, g) {
|
677
|
-
(!(a.isUndefined(S) || S === null) && s.call(
|
678
|
-
t,
|
679
|
-
S,
|
680
|
-
a.isString(g) ? g.trim() : g,
|
681
|
-
d,
|
682
|
-
b
|
683
|
-
)) === !0 && y(S, d ? d.concat(g) : [g]);
|
684
|
-
}), m.pop();
|
685
|
-
}
|
686
|
-
}
|
687
|
-
if (!a.isObject(e))
|
688
|
-
throw new TypeError("data must be an object");
|
689
|
-
return y(e), t;
|
690
|
-
}
|
691
|
-
function $e(e) {
|
692
|
-
const t = {
|
693
|
-
"!": "%21",
|
694
|
-
"'": "%27",
|
695
|
-
"(": "%28",
|
696
|
-
")": "%29",
|
697
|
-
"~": "%7E",
|
698
|
-
"%20": "+",
|
699
|
-
"%00": "\0"
|
700
|
-
};
|
701
|
-
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function(r) {
|
702
|
-
return t[r];
|
703
|
-
});
|
704
|
-
}
|
705
|
-
function Pe(e, t) {
|
706
|
-
this._pairs = [], e && le(e, this, t);
|
707
|
-
}
|
708
|
-
const dt = Pe.prototype;
|
709
|
-
dt.append = function(t, n) {
|
710
|
-
this._pairs.push([t, n]);
|
711
|
-
};
|
712
|
-
dt.toString = function(t) {
|
713
|
-
const n = t ? function(r) {
|
714
|
-
return t.call(this, r, $e);
|
715
|
-
} : $e;
|
716
|
-
return this._pairs.map(function(s) {
|
717
|
-
return n(s[0]) + "=" + n(s[1]);
|
718
|
-
}, "").join("&");
|
719
|
-
};
|
720
|
-
function $n(e) {
|
721
|
-
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
722
|
-
}
|
723
|
-
function ht(e, t, n) {
|
724
|
-
if (!t)
|
725
|
-
return e;
|
726
|
-
const r = n && n.encode || $n;
|
727
|
-
a.isFunction(n) && (n = {
|
728
|
-
serialize: n
|
729
|
-
});
|
730
|
-
const s = n && n.serialize;
|
731
|
-
let o;
|
732
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Pe(t, n).toString(r), o) {
|
733
|
-
const i = e.indexOf("#");
|
734
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
735
|
-
}
|
736
|
-
return e;
|
737
|
-
}
|
738
|
-
class Me {
|
739
|
-
constructor() {
|
740
|
-
this.handlers = [];
|
741
|
-
}
|
742
|
-
/**
|
743
|
-
* Add a new interceptor to the stack
|
744
|
-
*
|
745
|
-
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
746
|
-
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
747
|
-
*
|
748
|
-
* @return {Number} An ID used to remove interceptor later
|
749
|
-
*/
|
750
|
-
use(t, n, r) {
|
751
|
-
return this.handlers.push({
|
752
|
-
fulfilled: t,
|
753
|
-
rejected: n,
|
754
|
-
synchronous: r ? r.synchronous : !1,
|
755
|
-
runWhen: r ? r.runWhen : null
|
756
|
-
}), this.handlers.length - 1;
|
757
|
-
}
|
758
|
-
/**
|
759
|
-
* Remove an interceptor from the stack
|
760
|
-
*
|
761
|
-
* @param {Number} id The ID that was returned by `use`
|
762
|
-
*
|
763
|
-
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
764
|
-
*/
|
765
|
-
eject(t) {
|
766
|
-
this.handlers[t] && (this.handlers[t] = null);
|
767
|
-
}
|
768
|
-
/**
|
769
|
-
* Clear all interceptors from the stack
|
770
|
-
*
|
771
|
-
* @returns {void}
|
772
|
-
*/
|
773
|
-
clear() {
|
774
|
-
this.handlers && (this.handlers = []);
|
775
|
-
}
|
776
|
-
/**
|
777
|
-
* Iterate over all the registered interceptors
|
778
|
-
*
|
779
|
-
* This method is particularly useful for skipping over any
|
780
|
-
* interceptors that may have become `null` calling `eject`.
|
781
|
-
*
|
782
|
-
* @param {Function} fn The function to call for each interceptor
|
783
|
-
*
|
784
|
-
* @returns {void}
|
785
|
-
*/
|
786
|
-
forEach(t) {
|
787
|
-
a.forEach(this.handlers, function(r) {
|
788
|
-
r !== null && t(r);
|
789
|
-
});
|
790
|
-
}
|
791
|
-
}
|
792
|
-
const pt = {
|
793
|
-
silentJSONParsing: !0,
|
794
|
-
forcedJSONParsing: !0,
|
795
|
-
clarifyTimeoutError: !1
|
796
|
-
}, Mn = typeof URLSearchParams < "u" ? URLSearchParams : Pe, qn = typeof FormData < "u" ? FormData : null, Hn = typeof Blob < "u" ? Blob : null, zn = {
|
797
|
-
isBrowser: !0,
|
798
|
-
classes: {
|
799
|
-
URLSearchParams: Mn,
|
800
|
-
FormData: qn,
|
801
|
-
Blob: Hn
|
802
|
-
},
|
803
|
-
protocols: ["http", "https", "file", "blob", "url", "data"]
|
804
|
-
}, ke = typeof window < "u" && typeof document < "u", Re = typeof navigator == "object" && navigator || void 0, Jn = ke && (!Re || ["ReactNative", "NativeScript", "NS"].indexOf(Re.product) < 0), Vn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
805
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Wn = ke && window.location.href || "http://localhost", Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
806
|
-
__proto__: null,
|
807
|
-
hasBrowserEnv: ke,
|
808
|
-
hasStandardBrowserEnv: Jn,
|
809
|
-
hasStandardBrowserWebWorkerEnv: Vn,
|
810
|
-
navigator: Re,
|
811
|
-
origin: Wn
|
812
|
-
}, Symbol.toStringTag, { value: "Module" })), _ = {
|
813
|
-
...Kn,
|
814
|
-
...zn
|
815
|
-
};
|
816
|
-
function Gn(e, t) {
|
817
|
-
return le(e, new _.classes.URLSearchParams(), Object.assign({
|
818
|
-
visitor: function(n, r, s, o) {
|
819
|
-
return _.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
820
|
-
}
|
821
|
-
}, t));
|
822
|
-
}
|
823
|
-
function Xn(e) {
|
824
|
-
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
825
|
-
}
|
826
|
-
function Zn(e) {
|
827
|
-
const t = {}, n = Object.keys(e);
|
828
|
-
let r;
|
829
|
-
const s = n.length;
|
830
|
-
let o;
|
831
|
-
for (r = 0; r < s; r++)
|
832
|
-
o = n[r], t[o] = e[o];
|
833
|
-
return t;
|
834
|
-
}
|
835
|
-
function mt(e) {
|
836
|
-
function t(n, r, s, o) {
|
837
|
-
let i = n[o++];
|
838
|
-
if (i === "__proto__") return !0;
|
839
|
-
const c = Number.isFinite(+i), f = o >= n.length;
|
840
|
-
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] = Zn(s[i])), !c);
|
841
|
-
}
|
842
|
-
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
843
|
-
const n = {};
|
844
|
-
return a.forEachEntry(e, (r, s) => {
|
845
|
-
t(Xn(r), s, n, 0);
|
846
|
-
}), n;
|
847
|
-
}
|
848
|
-
return null;
|
849
|
-
}
|
850
|
-
function Qn(e, t, n) {
|
851
|
-
if (a.isString(e))
|
852
|
-
try {
|
853
|
-
return (t || JSON.parse)(e), a.trim(e);
|
854
|
-
} catch (r) {
|
855
|
-
if (r.name !== "SyntaxError")
|
856
|
-
throw r;
|
857
|
-
}
|
858
|
-
return (n || JSON.stringify)(e);
|
859
|
-
}
|
860
|
-
const Q = {
|
861
|
-
transitional: pt,
|
862
|
-
adapter: ["xhr", "http", "fetch"],
|
863
|
-
transformRequest: [function(t, n) {
|
864
|
-
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
865
|
-
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
866
|
-
return s ? JSON.stringify(mt(t)) : t;
|
867
|
-
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
868
|
-
return t;
|
869
|
-
if (a.isArrayBufferView(t))
|
870
|
-
return t.buffer;
|
871
|
-
if (a.isURLSearchParams(t))
|
872
|
-
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
873
|
-
let c;
|
874
|
-
if (o) {
|
875
|
-
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
876
|
-
return Gn(t, this.formSerializer).toString();
|
877
|
-
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
878
|
-
const f = this.env && this.env.FormData;
|
879
|
-
return le(
|
880
|
-
c ? { "files[]": t } : t,
|
881
|
-
f && new f(),
|
882
|
-
this.formSerializer
|
883
|
-
);
|
884
|
-
}
|
885
|
-
}
|
886
|
-
return o || s ? (n.setContentType("application/json", !1), Qn(t)) : t;
|
887
|
-
}],
|
888
|
-
transformResponse: [function(t) {
|
889
|
-
const n = this.transitional || Q.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
890
|
-
if (a.isResponse(t) || a.isReadableStream(t))
|
891
|
-
return t;
|
892
|
-
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
893
|
-
const i = !(n && n.silentJSONParsing) && s;
|
894
|
-
try {
|
895
|
-
return JSON.parse(t);
|
896
|
-
} catch (c) {
|
897
|
-
if (i)
|
898
|
-
throw c.name === "SyntaxError" ? w.from(c, w.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
899
|
-
}
|
900
|
-
}
|
901
|
-
return t;
|
902
|
-
}],
|
903
|
-
/**
|
904
|
-
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
905
|
-
* timeout is not created.
|
906
|
-
*/
|
907
|
-
timeout: 0,
|
908
|
-
xsrfCookieName: "XSRF-TOKEN",
|
909
|
-
xsrfHeaderName: "X-XSRF-TOKEN",
|
910
|
-
maxContentLength: -1,
|
911
|
-
maxBodyLength: -1,
|
912
|
-
env: {
|
913
|
-
FormData: _.classes.FormData,
|
914
|
-
Blob: _.classes.Blob
|
915
|
-
},
|
916
|
-
validateStatus: function(t) {
|
917
|
-
return t >= 200 && t < 300;
|
918
|
-
},
|
919
|
-
headers: {
|
920
|
-
common: {
|
921
|
-
Accept: "application/json, text/plain, */*",
|
922
|
-
"Content-Type": void 0
|
923
|
-
}
|
924
|
-
}
|
925
|
-
};
|
926
|
-
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
927
|
-
Q.headers[e] = {};
|
928
|
-
});
|
929
|
-
const Yn = a.toObjectSet([
|
930
|
-
"age",
|
931
|
-
"authorization",
|
932
|
-
"content-length",
|
933
|
-
"content-type",
|
934
|
-
"etag",
|
935
|
-
"expires",
|
936
|
-
"from",
|
937
|
-
"host",
|
938
|
-
"if-modified-since",
|
939
|
-
"if-unmodified-since",
|
940
|
-
"last-modified",
|
941
|
-
"location",
|
942
|
-
"max-forwards",
|
943
|
-
"proxy-authorization",
|
944
|
-
"referer",
|
945
|
-
"retry-after",
|
946
|
-
"user-agent"
|
947
|
-
]), er = (e) => {
|
948
|
-
const t = {};
|
949
|
-
let n, r, s;
|
950
|
-
return e && e.split(`
|
951
|
-
`).forEach(function(i) {
|
952
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Yn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
953
|
-
}), t;
|
954
|
-
}, qe = Symbol("internals");
|
955
|
-
function W(e) {
|
956
|
-
return e && String(e).trim().toLowerCase();
|
957
|
-
}
|
958
|
-
function re(e) {
|
959
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(re) : String(e);
|
960
|
-
}
|
961
|
-
function tr(e) {
|
962
|
-
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
963
|
-
let r;
|
964
|
-
for (; r = n.exec(e); )
|
965
|
-
t[r[1]] = r[2];
|
966
|
-
return t;
|
967
|
-
}
|
968
|
-
const nr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
969
|
-
function ge(e, t, n, r, s) {
|
970
|
-
if (a.isFunction(r))
|
971
|
-
return r.call(this, t, n);
|
972
|
-
if (s && (t = n), !!a.isString(t)) {
|
973
|
-
if (a.isString(r))
|
974
|
-
return t.indexOf(r) !== -1;
|
975
|
-
if (a.isRegExp(r))
|
976
|
-
return r.test(t);
|
977
|
-
}
|
978
|
-
}
|
979
|
-
function rr(e) {
|
980
|
-
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
981
|
-
}
|
982
|
-
function sr(e, t) {
|
983
|
-
const n = a.toCamelCase(" " + t);
|
984
|
-
["get", "set", "has"].forEach((r) => {
|
985
|
-
Object.defineProperty(e, r + n, {
|
986
|
-
value: function(s, o, i) {
|
987
|
-
return this[r].call(this, t, s, o, i);
|
988
|
-
},
|
989
|
-
configurable: !0
|
990
|
-
});
|
991
|
-
});
|
992
|
-
}
|
993
|
-
class P {
|
994
|
-
constructor(t) {
|
995
|
-
t && this.set(t);
|
996
|
-
}
|
997
|
-
set(t, n, r) {
|
998
|
-
const s = this;
|
999
|
-
function o(c, f, l) {
|
1000
|
-
const u = W(f);
|
1001
|
-
if (!u)
|
1002
|
-
throw new Error("header name must be a non-empty string");
|
1003
|
-
const m = a.findKey(s, u);
|
1004
|
-
(!m || s[m] === void 0 || l === !0 || l === void 0 && s[m] !== !1) && (s[m || f] = re(c));
|
1005
|
-
}
|
1006
|
-
const i = (c, f) => a.forEach(c, (l, u) => o(l, u, f));
|
1007
|
-
if (a.isPlainObject(t) || t instanceof this.constructor)
|
1008
|
-
i(t, n);
|
1009
|
-
else if (a.isString(t) && (t = t.trim()) && !nr(t))
|
1010
|
-
i(er(t), n);
|
1011
|
-
else if (a.isHeaders(t))
|
1012
|
-
for (const [c, f] of t.entries())
|
1013
|
-
o(f, c, r);
|
1014
|
-
else
|
1015
|
-
t != null && o(n, t, r);
|
1016
|
-
return this;
|
1017
|
-
}
|
1018
|
-
get(t, n) {
|
1019
|
-
if (t = W(t), t) {
|
1020
|
-
const r = a.findKey(this, t);
|
1021
|
-
if (r) {
|
1022
|
-
const s = this[r];
|
1023
|
-
if (!n)
|
1024
|
-
return s;
|
1025
|
-
if (n === !0)
|
1026
|
-
return tr(s);
|
1027
|
-
if (a.isFunction(n))
|
1028
|
-
return n.call(this, s, r);
|
1029
|
-
if (a.isRegExp(n))
|
1030
|
-
return n.exec(s);
|
1031
|
-
throw new TypeError("parser must be boolean|regexp|function");
|
1032
|
-
}
|
1033
|
-
}
|
1034
|
-
}
|
1035
|
-
has(t, n) {
|
1036
|
-
if (t = W(t), t) {
|
1037
|
-
const r = a.findKey(this, t);
|
1038
|
-
return !!(r && this[r] !== void 0 && (!n || ge(this, this[r], r, n)));
|
1039
|
-
}
|
1040
|
-
return !1;
|
1041
|
-
}
|
1042
|
-
delete(t, n) {
|
1043
|
-
const r = this;
|
1044
|
-
let s = !1;
|
1045
|
-
function o(i) {
|
1046
|
-
if (i = W(i), i) {
|
1047
|
-
const c = a.findKey(r, i);
|
1048
|
-
c && (!n || ge(r, r[c], c, n)) && (delete r[c], s = !0);
|
1049
|
-
}
|
1050
|
-
}
|
1051
|
-
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
1052
|
-
}
|
1053
|
-
clear(t) {
|
1054
|
-
const n = Object.keys(this);
|
1055
|
-
let r = n.length, s = !1;
|
1056
|
-
for (; r--; ) {
|
1057
|
-
const o = n[r];
|
1058
|
-
(!t || ge(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
1059
|
-
}
|
1060
|
-
return s;
|
1061
|
-
}
|
1062
|
-
normalize(t) {
|
1063
|
-
const n = this, r = {};
|
1064
|
-
return a.forEach(this, (s, o) => {
|
1065
|
-
const i = a.findKey(r, o);
|
1066
|
-
if (i) {
|
1067
|
-
n[i] = re(s), delete n[o];
|
1068
|
-
return;
|
1069
|
-
}
|
1070
|
-
const c = t ? rr(o) : String(o).trim();
|
1071
|
-
c !== o && delete n[o], n[c] = re(s), r[c] = !0;
|
1072
|
-
}), this;
|
1073
|
-
}
|
1074
|
-
concat(...t) {
|
1075
|
-
return this.constructor.concat(this, ...t);
|
1076
|
-
}
|
1077
|
-
toJSON(t) {
|
1078
|
-
const n = /* @__PURE__ */ Object.create(null);
|
1079
|
-
return a.forEach(this, (r, s) => {
|
1080
|
-
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
1081
|
-
}), n;
|
1082
|
-
}
|
1083
|
-
[Symbol.iterator]() {
|
1084
|
-
return Object.entries(this.toJSON())[Symbol.iterator]();
|
1085
|
-
}
|
1086
|
-
toString() {
|
1087
|
-
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
1088
|
-
`);
|
1089
|
-
}
|
1090
|
-
get [Symbol.toStringTag]() {
|
1091
|
-
return "AxiosHeaders";
|
1092
|
-
}
|
1093
|
-
static from(t) {
|
1094
|
-
return t instanceof this ? t : new this(t);
|
1095
|
-
}
|
1096
|
-
static concat(t, ...n) {
|
1097
|
-
const r = new this(t);
|
1098
|
-
return n.forEach((s) => r.set(s)), r;
|
1099
|
-
}
|
1100
|
-
static accessor(t) {
|
1101
|
-
const r = (this[qe] = this[qe] = {
|
1102
|
-
accessors: {}
|
1103
|
-
}).accessors, s = this.prototype;
|
1104
|
-
function o(i) {
|
1105
|
-
const c = W(i);
|
1106
|
-
r[c] || (sr(s, i), r[c] = !0);
|
1107
|
-
}
|
1108
|
-
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
1109
|
-
}
|
1110
|
-
}
|
1111
|
-
P.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
1112
|
-
a.reduceDescriptors(P.prototype, ({ value: e }, t) => {
|
1113
|
-
let n = t[0].toUpperCase() + t.slice(1);
|
1114
|
-
return {
|
1115
|
-
get: () => e,
|
1116
|
-
set(r) {
|
1117
|
-
this[n] = r;
|
1118
|
-
}
|
1119
|
-
};
|
1120
|
-
});
|
1121
|
-
a.freezeMethods(P);
|
1122
|
-
function be(e, t) {
|
1123
|
-
const n = this || Q, r = t || n, s = P.from(r.headers);
|
1124
|
-
let o = r.data;
|
1125
|
-
return a.forEach(e, function(c) {
|
1126
|
-
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
1127
|
-
}), s.normalize(), o;
|
1128
|
-
}
|
1129
|
-
function yt(e) {
|
1130
|
-
return !!(e && e.__CANCEL__);
|
1131
|
-
}
|
1132
|
-
function J(e, t, n) {
|
1133
|
-
w.call(this, e ?? "canceled", w.ERR_CANCELED, t, n), this.name = "CanceledError";
|
1134
|
-
}
|
1135
|
-
a.inherits(J, w, {
|
1136
|
-
__CANCEL__: !0
|
1137
|
-
});
|
1138
|
-
function gt(e, t, n) {
|
1139
|
-
const r = n.config.validateStatus;
|
1140
|
-
!n.status || !r || r(n.status) ? e(n) : t(new w(
|
1141
|
-
"Request failed with status code " + n.status,
|
1142
|
-
[w.ERR_BAD_REQUEST, w.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
1143
|
-
n.config,
|
1144
|
-
n.request,
|
1145
|
-
n
|
1146
|
-
));
|
1147
|
-
}
|
1148
|
-
function or(e) {
|
1149
|
-
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
1150
|
-
return t && t[1] || "";
|
1151
|
-
}
|
1152
|
-
function ir(e, t) {
|
1153
|
-
e = e || 10;
|
1154
|
-
const n = new Array(e), r = new Array(e);
|
1155
|
-
let s = 0, o = 0, i;
|
1156
|
-
return t = t !== void 0 ? t : 1e3, function(f) {
|
1157
|
-
const l = Date.now(), u = r[o];
|
1158
|
-
i || (i = l), n[s] = f, r[s] = l;
|
1159
|
-
let m = o, b = 0;
|
1160
|
-
for (; m !== s; )
|
1161
|
-
b += n[m++], m = m % e;
|
1162
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
1163
|
-
return;
|
1164
|
-
const y = u && l - u;
|
1165
|
-
return y ? Math.round(b * 1e3 / y) : void 0;
|
1166
|
-
};
|
1167
|
-
}
|
1168
|
-
function ar(e, t) {
|
1169
|
-
let n = 0, r = 1e3 / t, s, o;
|
1170
|
-
const i = (l, u = Date.now()) => {
|
1171
|
-
n = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
1172
|
-
};
|
1173
|
-
return [(...l) => {
|
1174
|
-
const u = Date.now(), m = u - n;
|
1175
|
-
m >= r ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
1176
|
-
o = null, i(s);
|
1177
|
-
}, r - m)));
|
1178
|
-
}, () => s && i(s)];
|
1179
|
-
}
|
1180
|
-
const oe = (e, t, n = 3) => {
|
1181
|
-
let r = 0;
|
1182
|
-
const s = ir(50, 250);
|
1183
|
-
return ar((o) => {
|
1184
|
-
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), u = i <= c;
|
1185
|
-
r = i;
|
1186
|
-
const m = {
|
1187
|
-
loaded: i,
|
1188
|
-
total: c,
|
1189
|
-
progress: c ? i / c : void 0,
|
1190
|
-
bytes: f,
|
1191
|
-
rate: l || void 0,
|
1192
|
-
estimated: l && c && u ? (c - i) / l : void 0,
|
1193
|
-
event: o,
|
1194
|
-
lengthComputable: c != null,
|
1195
|
-
[t ? "download" : "upload"]: !0
|
1196
|
-
};
|
1197
|
-
e(m);
|
1198
|
-
}, n);
|
1199
|
-
}, He = (e, t) => {
|
1200
|
-
const n = e != null;
|
1201
|
-
return [(r) => t[0]({
|
1202
|
-
lengthComputable: n,
|
1203
|
-
total: e,
|
1204
|
-
loaded: r
|
1205
|
-
}), t[1]];
|
1206
|
-
}, ze = (e) => (...t) => a.asap(() => e(...t)), cr = _.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, _.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
1207
|
-
new URL(_.origin),
|
1208
|
-
_.navigator && /(msie|trident)/i.test(_.navigator.userAgent)
|
1209
|
-
) : () => !0, ur = _.hasStandardBrowserEnv ? (
|
1210
|
-
// Standard browser envs support document.cookie
|
1211
|
-
{
|
1212
|
-
write(e, t, n, r, s, o) {
|
1213
|
-
const i = [e + "=" + encodeURIComponent(t)];
|
1214
|
-
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("; ");
|
1215
|
-
},
|
1216
|
-
read(e) {
|
1217
|
-
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
1218
|
-
return t ? decodeURIComponent(t[3]) : null;
|
1219
|
-
},
|
1220
|
-
remove(e) {
|
1221
|
-
this.write(e, "", Date.now() - 864e5);
|
1222
|
-
}
|
1223
|
-
}
|
1224
|
-
) : (
|
1225
|
-
// Non-standard browser env (web workers, react-native) lack needed support.
|
1226
|
-
{
|
1227
|
-
write() {
|
1228
|
-
},
|
1229
|
-
read() {
|
1230
|
-
return null;
|
1231
|
-
},
|
1232
|
-
remove() {
|
1233
|
-
}
|
1234
|
-
}
|
1235
|
-
);
|
1236
|
-
function lr(e) {
|
1237
|
-
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
1238
|
-
}
|
1239
|
-
function fr(e, t) {
|
1240
|
-
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
1241
|
-
}
|
1242
|
-
function bt(e, t) {
|
1243
|
-
return e && !lr(t) ? fr(e, t) : t;
|
1244
|
-
}
|
1245
|
-
const Je = (e) => e instanceof P ? { ...e } : e;
|
1246
|
-
function $(e, t) {
|
1247
|
-
t = t || {};
|
1248
|
-
const n = {};
|
1249
|
-
function r(l, u, m, b) {
|
1250
|
-
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: b }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
1251
|
-
}
|
1252
|
-
function s(l, u, m, b) {
|
1253
|
-
if (a.isUndefined(u)) {
|
1254
|
-
if (!a.isUndefined(l))
|
1255
|
-
return r(void 0, l, m, b);
|
1256
|
-
} else return r(l, u, m, b);
|
1257
|
-
}
|
1258
|
-
function o(l, u) {
|
1259
|
-
if (!a.isUndefined(u))
|
1260
|
-
return r(void 0, u);
|
1261
|
-
}
|
1262
|
-
function i(l, u) {
|
1263
|
-
if (a.isUndefined(u)) {
|
1264
|
-
if (!a.isUndefined(l))
|
1265
|
-
return r(void 0, l);
|
1266
|
-
} else return r(void 0, u);
|
1267
|
-
}
|
1268
|
-
function c(l, u, m) {
|
1269
|
-
if (m in t)
|
1270
|
-
return r(l, u);
|
1271
|
-
if (m in e)
|
1272
|
-
return r(void 0, l);
|
1273
|
-
}
|
1274
|
-
const f = {
|
1275
|
-
url: o,
|
1276
|
-
method: o,
|
1277
|
-
data: o,
|
1278
|
-
baseURL: i,
|
1279
|
-
transformRequest: i,
|
1280
|
-
transformResponse: i,
|
1281
|
-
paramsSerializer: i,
|
1282
|
-
timeout: i,
|
1283
|
-
timeoutMessage: i,
|
1284
|
-
withCredentials: i,
|
1285
|
-
withXSRFToken: i,
|
1286
|
-
adapter: i,
|
1287
|
-
responseType: i,
|
1288
|
-
xsrfCookieName: i,
|
1289
|
-
xsrfHeaderName: i,
|
1290
|
-
onUploadProgress: i,
|
1291
|
-
onDownloadProgress: i,
|
1292
|
-
decompress: i,
|
1293
|
-
maxContentLength: i,
|
1294
|
-
maxBodyLength: i,
|
1295
|
-
beforeRedirect: i,
|
1296
|
-
transport: i,
|
1297
|
-
httpAgent: i,
|
1298
|
-
httpsAgent: i,
|
1299
|
-
cancelToken: i,
|
1300
|
-
socketPath: i,
|
1301
|
-
responseEncoding: i,
|
1302
|
-
validateStatus: c,
|
1303
|
-
headers: (l, u, m) => s(Je(l), Je(u), m, !0)
|
1304
|
-
};
|
1305
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
1306
|
-
const m = f[u] || s, b = m(e[u], t[u], u);
|
1307
|
-
a.isUndefined(b) && m !== c || (n[u] = b);
|
1308
|
-
}), n;
|
1309
|
-
}
|
1310
|
-
const wt = (e) => {
|
1311
|
-
const t = $({}, e);
|
1312
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
1313
|
-
t.headers = i = P.from(i), t.url = ht(bt(t.baseURL, t.url), e.params, e.paramsSerializer), c && i.set(
|
1314
|
-
"Authorization",
|
1315
|
-
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
1316
|
-
);
|
1317
|
-
let f;
|
1318
|
-
if (a.isFormData(n)) {
|
1319
|
-
if (_.hasStandardBrowserEnv || _.hasStandardBrowserWebWorkerEnv)
|
1320
|
-
i.setContentType(void 0);
|
1321
|
-
else if ((f = i.getContentType()) !== !1) {
|
1322
|
-
const [l, ...u] = f ? f.split(";").map((m) => m.trim()).filter(Boolean) : [];
|
1323
|
-
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
1324
|
-
}
|
1325
|
-
}
|
1326
|
-
if (_.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && cr(t.url))) {
|
1327
|
-
const l = s && o && ur.read(o);
|
1328
|
-
l && i.set(s, l);
|
1329
|
-
}
|
1330
|
-
return t;
|
1331
|
-
}, dr = typeof XMLHttpRequest < "u", hr = dr && function(e) {
|
1332
|
-
return new Promise(function(n, r) {
|
1333
|
-
const s = wt(e);
|
1334
|
-
let o = s.data;
|
1335
|
-
const i = P.from(s.headers).normalize();
|
1336
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, m, b, y, h;
|
1337
|
-
function d() {
|
1338
|
-
y && y(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
1339
|
-
}
|
1340
|
-
let p = new XMLHttpRequest();
|
1341
|
-
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
1342
|
-
function S() {
|
1343
|
-
if (!p)
|
1344
|
-
return;
|
1345
|
-
const E = P.from(
|
1346
|
-
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
1347
|
-
), R = {
|
1348
|
-
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
1349
|
-
status: p.status,
|
1350
|
-
statusText: p.statusText,
|
1351
|
-
headers: E,
|
1352
|
-
config: e,
|
1353
|
-
request: p
|
1354
|
-
};
|
1355
|
-
gt(function(k) {
|
1356
|
-
n(k), d();
|
1357
|
-
}, function(k) {
|
1358
|
-
r(k), d();
|
1359
|
-
}, R), p = null;
|
1360
|
-
}
|
1361
|
-
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
1362
|
-
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
1363
|
-
}, p.onabort = function() {
|
1364
|
-
p && (r(new w("Request aborted", w.ECONNABORTED, e, p)), p = null);
|
1365
|
-
}, p.onerror = function() {
|
1366
|
-
r(new w("Network Error", w.ERR_NETWORK, e, p)), p = null;
|
1367
|
-
}, p.ontimeout = function() {
|
1368
|
-
let O = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
1369
|
-
const R = s.transitional || pt;
|
1370
|
-
s.timeoutErrorMessage && (O = s.timeoutErrorMessage), r(new w(
|
1371
|
-
O,
|
1372
|
-
R.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
1373
|
-
e,
|
1374
|
-
p
|
1375
|
-
)), p = null;
|
1376
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(O, R) {
|
1377
|
-
p.setRequestHeader(R, O);
|
1378
|
-
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), l && ([b, h] = oe(l, !0), p.addEventListener("progress", b)), f && p.upload && ([m, y] = oe(f), p.upload.addEventListener("progress", m), p.upload.addEventListener("loadend", y)), (s.cancelToken || s.signal) && (u = (E) => {
|
1379
|
-
p && (r(!E || E.type ? new J(null, e, p) : E), p.abort(), p = null);
|
1380
|
-
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
1381
|
-
const g = or(s.url);
|
1382
|
-
if (g && _.protocols.indexOf(g) === -1) {
|
1383
|
-
r(new w("Unsupported protocol " + g + ":", w.ERR_BAD_REQUEST, e));
|
1384
|
-
return;
|
1385
|
-
}
|
1386
|
-
p.send(o || null);
|
1387
|
-
});
|
1388
|
-
}, pr = (e, t) => {
|
1389
|
-
const { length: n } = e = e ? e.filter(Boolean) : [];
|
1390
|
-
if (t || n) {
|
1391
|
-
let r = new AbortController(), s;
|
1392
|
-
const o = function(l) {
|
1393
|
-
if (!s) {
|
1394
|
-
s = !0, c();
|
1395
|
-
const u = l instanceof Error ? l : this.reason;
|
1396
|
-
r.abort(u instanceof w ? u : new J(u instanceof Error ? u.message : u));
|
1397
|
-
}
|
1398
|
-
};
|
1399
|
-
let i = t && setTimeout(() => {
|
1400
|
-
i = null, o(new w(`timeout ${t} of ms exceeded`, w.ETIMEDOUT));
|
1401
|
-
}, t);
|
1402
|
-
const c = () => {
|
1403
|
-
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
1404
|
-
l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
|
1405
|
-
}), e = null);
|
1406
|
-
};
|
1407
|
-
e.forEach((l) => l.addEventListener("abort", o));
|
1408
|
-
const { signal: f } = r;
|
1409
|
-
return f.unsubscribe = () => a.asap(c), f;
|
1410
|
-
}
|
1411
|
-
}, mr = function* (e, t) {
|
1412
|
-
let n = e.byteLength;
|
1413
|
-
if (n < t) {
|
1414
|
-
yield e;
|
1415
|
-
return;
|
1416
|
-
}
|
1417
|
-
let r = 0, s;
|
1418
|
-
for (; r < n; )
|
1419
|
-
s = r + t, yield e.slice(r, s), r = s;
|
1420
|
-
}, yr = async function* (e, t) {
|
1421
|
-
for await (const n of gr(e))
|
1422
|
-
yield* mr(n, t);
|
1423
|
-
}, gr = async function* (e) {
|
1424
|
-
if (e[Symbol.asyncIterator]) {
|
1425
|
-
yield* e;
|
1426
|
-
return;
|
1427
|
-
}
|
1428
|
-
const t = e.getReader();
|
1429
|
-
try {
|
1430
|
-
for (; ; ) {
|
1431
|
-
const { done: n, value: r } = await t.read();
|
1432
|
-
if (n)
|
1433
|
-
break;
|
1434
|
-
yield r;
|
1435
|
-
}
|
1436
|
-
} finally {
|
1437
|
-
await t.cancel();
|
1438
|
-
}
|
1439
|
-
}, Ve = (e, t, n, r) => {
|
1440
|
-
const s = yr(e, t);
|
1441
|
-
let o = 0, i, c = (f) => {
|
1442
|
-
i || (i = !0, r && r(f));
|
1443
|
-
};
|
1444
|
-
return new ReadableStream({
|
1445
|
-
async pull(f) {
|
1446
|
-
try {
|
1447
|
-
const { done: l, value: u } = await s.next();
|
1448
|
-
if (l) {
|
1449
|
-
c(), f.close();
|
1450
|
-
return;
|
1451
|
-
}
|
1452
|
-
let m = u.byteLength;
|
1453
|
-
if (n) {
|
1454
|
-
let b = o += m;
|
1455
|
-
n(b);
|
1456
|
-
}
|
1457
|
-
f.enqueue(new Uint8Array(u));
|
1458
|
-
} catch (l) {
|
1459
|
-
throw c(l), l;
|
1460
|
-
}
|
1461
|
-
},
|
1462
|
-
cancel(f) {
|
1463
|
-
return c(f), s.return();
|
1464
|
-
}
|
1465
|
-
}, {
|
1466
|
-
highWaterMark: 2
|
1467
|
-
});
|
1468
|
-
}, fe = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Et = fe && typeof ReadableStream == "function", br = fe && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), St = (e, ...t) => {
|
1469
|
-
try {
|
1470
|
-
return !!e(...t);
|
1471
|
-
} catch {
|
1472
|
-
return !1;
|
1473
|
-
}
|
1474
|
-
}, wr = Et && St(() => {
|
1475
|
-
let e = !1;
|
1476
|
-
const t = new Request(_.origin, {
|
1477
|
-
body: new ReadableStream(),
|
1478
|
-
method: "POST",
|
1479
|
-
get duplex() {
|
1480
|
-
return e = !0, "half";
|
1481
|
-
}
|
1482
|
-
}).headers.has("Content-Type");
|
1483
|
-
return e && !t;
|
1484
|
-
}), We = 64 * 1024, Te = Et && St(() => a.isReadableStream(new Response("").body)), ie = {
|
1485
|
-
stream: Te && ((e) => e.body)
|
1486
|
-
};
|
1487
|
-
fe && ((e) => {
|
1488
|
-
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
1489
|
-
!ie[t] && (ie[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
1490
|
-
throw new w(`Response type '${t}' is not supported`, w.ERR_NOT_SUPPORT, r);
|
1491
|
-
});
|
1492
|
-
});
|
1493
|
-
})(new Response());
|
1494
|
-
const Er = async (e) => {
|
1495
|
-
if (e == null)
|
1496
|
-
return 0;
|
1497
|
-
if (a.isBlob(e))
|
1498
|
-
return e.size;
|
1499
|
-
if (a.isSpecCompliantForm(e))
|
1500
|
-
return (await new Request(_.origin, {
|
1501
|
-
method: "POST",
|
1502
|
-
body: e
|
1503
|
-
}).arrayBuffer()).byteLength;
|
1504
|
-
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
1505
|
-
return e.byteLength;
|
1506
|
-
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
1507
|
-
return (await br(e)).byteLength;
|
1508
|
-
}, Sr = async (e, t) => {
|
1509
|
-
const n = a.toFiniteNumber(e.getContentLength());
|
1510
|
-
return n ?? Er(t);
|
1511
|
-
}, Or = fe && (async (e) => {
|
1512
|
-
let {
|
1513
|
-
url: t,
|
1514
|
-
method: n,
|
1515
|
-
data: r,
|
1516
|
-
signal: s,
|
1517
|
-
cancelToken: o,
|
1518
|
-
timeout: i,
|
1519
|
-
onDownloadProgress: c,
|
1520
|
-
onUploadProgress: f,
|
1521
|
-
responseType: l,
|
1522
|
-
headers: u,
|
1523
|
-
withCredentials: m = "same-origin",
|
1524
|
-
fetchOptions: b
|
1525
|
-
} = wt(e);
|
1526
|
-
l = l ? (l + "").toLowerCase() : "text";
|
1527
|
-
let y = pr([s, o && o.toAbortSignal()], i), h;
|
1528
|
-
const d = y && y.unsubscribe && (() => {
|
1529
|
-
y.unsubscribe();
|
1530
|
-
});
|
1531
|
-
let p;
|
1532
|
-
try {
|
1533
|
-
if (f && wr && n !== "get" && n !== "head" && (p = await Sr(u, r)) !== 0) {
|
1534
|
-
let R = new Request(t, {
|
1535
|
-
method: "POST",
|
1536
|
-
body: r,
|
1537
|
-
duplex: "half"
|
1538
|
-
}), N;
|
1539
|
-
if (a.isFormData(r) && (N = R.headers.get("content-type")) && u.setContentType(N), R.body) {
|
1540
|
-
const [k, x] = He(
|
1541
|
-
p,
|
1542
|
-
oe(ze(f))
|
1543
|
-
);
|
1544
|
-
r = Ve(R.body, We, k, x);
|
1545
|
-
}
|
1546
|
-
}
|
1547
|
-
a.isString(m) || (m = m ? "include" : "omit");
|
1548
|
-
const S = "credentials" in Request.prototype;
|
1549
|
-
h = new Request(t, {
|
1550
|
-
...b,
|
1551
|
-
signal: y,
|
1552
|
-
method: n.toUpperCase(),
|
1553
|
-
headers: u.normalize().toJSON(),
|
1554
|
-
body: r,
|
1555
|
-
duplex: "half",
|
1556
|
-
credentials: S ? m : void 0
|
1557
|
-
});
|
1558
|
-
let g = await fetch(h);
|
1559
|
-
const E = Te && (l === "stream" || l === "response");
|
1560
|
-
if (Te && (c || E && d)) {
|
1561
|
-
const R = {};
|
1562
|
-
["status", "statusText", "headers"].forEach((F) => {
|
1563
|
-
R[F] = g[F];
|
1564
|
-
});
|
1565
|
-
const N = a.toFiniteNumber(g.headers.get("content-length")), [k, x] = c && He(
|
1566
|
-
N,
|
1567
|
-
oe(ze(c), !0)
|
1568
|
-
) || [];
|
1569
|
-
g = new Response(
|
1570
|
-
Ve(g.body, We, k, () => {
|
1571
|
-
x && x(), d && d();
|
1572
|
-
}),
|
1573
|
-
R
|
1574
|
-
);
|
1575
|
-
}
|
1576
|
-
l = l || "text";
|
1577
|
-
let O = await ie[a.findKey(ie, l) || "text"](g, e);
|
1578
|
-
return !E && d && d(), await new Promise((R, N) => {
|
1579
|
-
gt(R, N, {
|
1580
|
-
data: O,
|
1581
|
-
headers: P.from(g.headers),
|
1582
|
-
status: g.status,
|
1583
|
-
statusText: g.statusText,
|
1584
|
-
config: e,
|
1585
|
-
request: h
|
1586
|
-
});
|
1587
|
-
});
|
1588
|
-
} catch (S) {
|
1589
|
-
throw d && d(), S && S.name === "TypeError" && /fetch/i.test(S.message) ? Object.assign(
|
1590
|
-
new w("Network Error", w.ERR_NETWORK, e, h),
|
1591
|
-
{
|
1592
|
-
cause: S.cause || S
|
1593
|
-
}
|
1594
|
-
) : w.from(S, S && S.code, e, h);
|
1595
|
-
}
|
1596
|
-
}), Ce = {
|
1597
|
-
http: Bn,
|
1598
|
-
xhr: hr,
|
1599
|
-
fetch: Or
|
1600
|
-
};
|
1601
|
-
a.forEach(Ce, (e, t) => {
|
1602
|
-
if (e) {
|
1603
|
-
try {
|
1604
|
-
Object.defineProperty(e, "name", { value: t });
|
1605
|
-
} catch {
|
1606
|
-
}
|
1607
|
-
Object.defineProperty(e, "adapterName", { value: t });
|
1608
|
-
}
|
1609
|
-
});
|
1610
|
-
const Ke = (e) => `- ${e}`, Rr = (e) => a.isFunction(e) || e === null || e === !1, Ot = {
|
1611
|
-
getAdapter: (e) => {
|
1612
|
-
e = a.isArray(e) ? e : [e];
|
1613
|
-
const { length: t } = e;
|
1614
|
-
let n, r;
|
1615
|
-
const s = {};
|
1616
|
-
for (let o = 0; o < t; o++) {
|
1617
|
-
n = e[o];
|
1618
|
-
let i;
|
1619
|
-
if (r = n, !Rr(n) && (r = Ce[(i = String(n)).toLowerCase()], r === void 0))
|
1620
|
-
throw new w(`Unknown adapter '${i}'`);
|
1621
|
-
if (r)
|
1622
|
-
break;
|
1623
|
-
s[i || "#" + o] = r;
|
1624
|
-
}
|
1625
|
-
if (!r) {
|
1626
|
-
const o = Object.entries(s).map(
|
1627
|
-
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
1628
|
-
);
|
1629
|
-
let i = t ? o.length > 1 ? `since :
|
1630
|
-
` + o.map(Ke).join(`
|
1631
|
-
`) : " " + Ke(o[0]) : "as no adapter specified";
|
1632
|
-
throw new w(
|
1633
|
-
"There is no suitable adapter to dispatch the request " + i,
|
1634
|
-
"ERR_NOT_SUPPORT"
|
1635
|
-
);
|
1636
|
-
}
|
1637
|
-
return r;
|
1638
|
-
},
|
1639
|
-
adapters: Ce
|
1640
|
-
};
|
1641
|
-
function we(e) {
|
1642
|
-
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
1643
|
-
throw new J(null, e);
|
1644
|
-
}
|
1645
|
-
function Ge(e) {
|
1646
|
-
return we(e), e.headers = P.from(e.headers), e.data = be.call(
|
1647
|
-
e,
|
1648
|
-
e.transformRequest
|
1649
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ot.getAdapter(e.adapter || Q.adapter)(e).then(function(r) {
|
1650
|
-
return we(e), r.data = be.call(
|
1651
|
-
e,
|
1652
|
-
e.transformResponse,
|
1653
|
-
r
|
1654
|
-
), r.headers = P.from(r.headers), r;
|
1655
|
-
}, function(r) {
|
1656
|
-
return yt(r) || (we(e), r && r.response && (r.response.data = be.call(
|
1657
|
-
e,
|
1658
|
-
e.transformResponse,
|
1659
|
-
r.response
|
1660
|
-
), r.response.headers = P.from(r.response.headers))), Promise.reject(r);
|
1661
|
-
});
|
1662
|
-
}
|
1663
|
-
const Rt = "1.7.9", de = {};
|
1664
|
-
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
1665
|
-
de[e] = function(r) {
|
1666
|
-
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
1667
|
-
};
|
1668
|
-
});
|
1669
|
-
const Xe = {};
|
1670
|
-
de.transitional = function(t, n, r) {
|
1671
|
-
function s(o, i) {
|
1672
|
-
return "[Axios v" + Rt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
1673
|
-
}
|
1674
|
-
return (o, i, c) => {
|
1675
|
-
if (t === !1)
|
1676
|
-
throw new w(
|
1677
|
-
s(i, " has been removed" + (n ? " in " + n : "")),
|
1678
|
-
w.ERR_DEPRECATED
|
1679
|
-
);
|
1680
|
-
return n && !Xe[i] && (Xe[i] = !0, console.warn(
|
1681
|
-
s(
|
1682
|
-
i,
|
1683
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
1684
|
-
)
|
1685
|
-
)), t ? t(o, i, c) : !0;
|
1686
|
-
};
|
1687
|
-
};
|
1688
|
-
de.spelling = function(t) {
|
1689
|
-
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
1690
|
-
};
|
1691
|
-
function Tr(e, t, n) {
|
1692
|
-
if (typeof e != "object")
|
1693
|
-
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
1694
|
-
const r = Object.keys(e);
|
1695
|
-
let s = r.length;
|
1696
|
-
for (; s-- > 0; ) {
|
1697
|
-
const o = r[s], i = t[o];
|
1698
|
-
if (i) {
|
1699
|
-
const c = e[o], f = c === void 0 || i(c, o, e);
|
1700
|
-
if (f !== !0)
|
1701
|
-
throw new w("option " + o + " must be " + f, w.ERR_BAD_OPTION_VALUE);
|
1702
|
-
continue;
|
1703
|
-
}
|
1704
|
-
if (n !== !0)
|
1705
|
-
throw new w("Unknown option " + o, w.ERR_BAD_OPTION);
|
1706
|
-
}
|
1707
|
-
}
|
1708
|
-
const se = {
|
1709
|
-
assertOptions: Tr,
|
1710
|
-
validators: de
|
1711
|
-
}, D = se.validators;
|
1712
|
-
class I {
|
1713
|
-
constructor(t) {
|
1714
|
-
this.defaults = t, this.interceptors = {
|
1715
|
-
request: new Me(),
|
1716
|
-
response: new Me()
|
1717
|
-
};
|
1718
|
-
}
|
1719
|
-
/**
|
1720
|
-
* Dispatch a request
|
1721
|
-
*
|
1722
|
-
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
1723
|
-
* @param {?Object} config
|
1724
|
-
*
|
1725
|
-
* @returns {Promise} The Promise to be fulfilled
|
1726
|
-
*/
|
1727
|
-
async request(t, n) {
|
1728
|
-
try {
|
1729
|
-
return await this._request(t, n);
|
1730
|
-
} catch (r) {
|
1731
|
-
if (r instanceof Error) {
|
1732
|
-
let s = {};
|
1733
|
-
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
1734
|
-
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
1735
|
-
try {
|
1736
|
-
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
1737
|
-
` + o) : r.stack = o;
|
1738
|
-
} catch {
|
1739
|
-
}
|
1740
|
-
}
|
1741
|
-
throw r;
|
1742
|
-
}
|
1743
|
-
}
|
1744
|
-
_request(t, n) {
|
1745
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = $(this.defaults, n);
|
1746
|
-
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
1747
|
-
r !== void 0 && se.assertOptions(r, {
|
1748
|
-
silentJSONParsing: D.transitional(D.boolean),
|
1749
|
-
forcedJSONParsing: D.transitional(D.boolean),
|
1750
|
-
clarifyTimeoutError: D.transitional(D.boolean)
|
1751
|
-
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
1752
|
-
serialize: s
|
1753
|
-
} : se.assertOptions(s, {
|
1754
|
-
encode: D.function,
|
1755
|
-
serialize: D.function
|
1756
|
-
}, !0)), se.assertOptions(n, {
|
1757
|
-
baseUrl: D.spelling("baseURL"),
|
1758
|
-
withXsrfToken: D.spelling("withXSRFToken")
|
1759
|
-
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
1760
|
-
let i = o && a.merge(
|
1761
|
-
o.common,
|
1762
|
-
o[n.method]
|
1763
|
-
);
|
1764
|
-
o && a.forEach(
|
1765
|
-
["delete", "get", "head", "post", "put", "patch", "common"],
|
1766
|
-
(h) => {
|
1767
|
-
delete o[h];
|
1768
|
-
}
|
1769
|
-
), n.headers = P.concat(i, o);
|
1770
|
-
const c = [];
|
1771
|
-
let f = !0;
|
1772
|
-
this.interceptors.request.forEach(function(d) {
|
1773
|
-
typeof d.runWhen == "function" && d.runWhen(n) === !1 || (f = f && d.synchronous, c.unshift(d.fulfilled, d.rejected));
|
1774
|
-
});
|
1775
|
-
const l = [];
|
1776
|
-
this.interceptors.response.forEach(function(d) {
|
1777
|
-
l.push(d.fulfilled, d.rejected);
|
1778
|
-
});
|
1779
|
-
let u, m = 0, b;
|
1780
|
-
if (!f) {
|
1781
|
-
const h = [Ge.bind(this), void 0];
|
1782
|
-
for (h.unshift.apply(h, c), h.push.apply(h, l), b = h.length, u = Promise.resolve(n); m < b; )
|
1783
|
-
u = u.then(h[m++], h[m++]);
|
1784
|
-
return u;
|
1785
|
-
}
|
1786
|
-
b = c.length;
|
1787
|
-
let y = n;
|
1788
|
-
for (m = 0; m < b; ) {
|
1789
|
-
const h = c[m++], d = c[m++];
|
1790
|
-
try {
|
1791
|
-
y = h(y);
|
1792
|
-
} catch (p) {
|
1793
|
-
d.call(this, p);
|
1794
|
-
break;
|
1795
|
-
}
|
1796
|
-
}
|
1797
|
-
try {
|
1798
|
-
u = Ge.call(this, y);
|
1799
|
-
} catch (h) {
|
1800
|
-
return Promise.reject(h);
|
1801
|
-
}
|
1802
|
-
for (m = 0, b = l.length; m < b; )
|
1803
|
-
u = u.then(l[m++], l[m++]);
|
1804
|
-
return u;
|
1805
|
-
}
|
1806
|
-
getUri(t) {
|
1807
|
-
t = $(this.defaults, t);
|
1808
|
-
const n = bt(t.baseURL, t.url);
|
1809
|
-
return ht(n, t.params, t.paramsSerializer);
|
1810
|
-
}
|
1811
|
-
}
|
1812
|
-
a.forEach(["delete", "get", "head", "options"], function(t) {
|
1813
|
-
I.prototype[t] = function(n, r) {
|
1814
|
-
return this.request($(r || {}, {
|
1815
|
-
method: t,
|
1816
|
-
url: n,
|
1817
|
-
data: (r || {}).data
|
1818
|
-
}));
|
1819
|
-
};
|
1820
|
-
});
|
1821
|
-
a.forEach(["post", "put", "patch"], function(t) {
|
1822
|
-
function n(r) {
|
1823
|
-
return function(o, i, c) {
|
1824
|
-
return this.request($(c || {}, {
|
1825
|
-
method: t,
|
1826
|
-
headers: r ? {
|
1827
|
-
"Content-Type": "multipart/form-data"
|
1828
|
-
} : {},
|
1829
|
-
url: o,
|
1830
|
-
data: i
|
1831
|
-
}));
|
1832
|
-
};
|
1833
|
-
}
|
1834
|
-
I.prototype[t] = n(), I.prototype[t + "Form"] = n(!0);
|
1835
|
-
});
|
1836
|
-
class ve {
|
1837
|
-
constructor(t) {
|
1838
|
-
if (typeof t != "function")
|
1839
|
-
throw new TypeError("executor must be a function.");
|
1840
|
-
let n;
|
1841
|
-
this.promise = new Promise(function(o) {
|
1842
|
-
n = o;
|
1843
|
-
});
|
1844
|
-
const r = this;
|
1845
|
-
this.promise.then((s) => {
|
1846
|
-
if (!r._listeners) return;
|
1847
|
-
let o = r._listeners.length;
|
1848
|
-
for (; o-- > 0; )
|
1849
|
-
r._listeners[o](s);
|
1850
|
-
r._listeners = null;
|
1851
|
-
}), this.promise.then = (s) => {
|
1852
|
-
let o;
|
1853
|
-
const i = new Promise((c) => {
|
1854
|
-
r.subscribe(c), o = c;
|
1855
|
-
}).then(s);
|
1856
|
-
return i.cancel = function() {
|
1857
|
-
r.unsubscribe(o);
|
1858
|
-
}, i;
|
1859
|
-
}, t(function(o, i, c) {
|
1860
|
-
r.reason || (r.reason = new J(o, i, c), n(r.reason));
|
1861
|
-
});
|
1862
|
-
}
|
1863
|
-
/**
|
1864
|
-
* Throws a `CanceledError` if cancellation has been requested.
|
1865
|
-
*/
|
1866
|
-
throwIfRequested() {
|
1867
|
-
if (this.reason)
|
1868
|
-
throw this.reason;
|
1869
|
-
}
|
1870
|
-
/**
|
1871
|
-
* Subscribe to the cancel signal
|
1872
|
-
*/
|
1873
|
-
subscribe(t) {
|
1874
|
-
if (this.reason) {
|
1875
|
-
t(this.reason);
|
1876
|
-
return;
|
1877
|
-
}
|
1878
|
-
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
1879
|
-
}
|
1880
|
-
/**
|
1881
|
-
* Unsubscribe from the cancel signal
|
1882
|
-
*/
|
1883
|
-
unsubscribe(t) {
|
1884
|
-
if (!this._listeners)
|
1885
|
-
return;
|
1886
|
-
const n = this._listeners.indexOf(t);
|
1887
|
-
n !== -1 && this._listeners.splice(n, 1);
|
1888
|
-
}
|
1889
|
-
toAbortSignal() {
|
1890
|
-
const t = new AbortController(), n = (r) => {
|
1891
|
-
t.abort(r);
|
1892
|
-
};
|
1893
|
-
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
1894
|
-
}
|
1895
|
-
/**
|
1896
|
-
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
1897
|
-
* cancels the `CancelToken`.
|
1898
|
-
*/
|
1899
|
-
static source() {
|
1900
|
-
let t;
|
1901
|
-
return {
|
1902
|
-
token: new ve(function(s) {
|
1903
|
-
t = s;
|
1904
|
-
}),
|
1905
|
-
cancel: t
|
1906
|
-
};
|
1907
|
-
}
|
1908
|
-
}
|
1909
|
-
function Cr(e) {
|
1910
|
-
return function(n) {
|
1911
|
-
return e.apply(null, n);
|
1912
|
-
};
|
1913
|
-
}
|
1914
|
-
function Ar(e) {
|
1915
|
-
return a.isObject(e) && e.isAxiosError === !0;
|
1916
|
-
}
|
1917
|
-
const Ae = {
|
1918
|
-
Continue: 100,
|
1919
|
-
SwitchingProtocols: 101,
|
1920
|
-
Processing: 102,
|
1921
|
-
EarlyHints: 103,
|
1922
|
-
Ok: 200,
|
1923
|
-
Created: 201,
|
1924
|
-
Accepted: 202,
|
1925
|
-
NonAuthoritativeInformation: 203,
|
1926
|
-
NoContent: 204,
|
1927
|
-
ResetContent: 205,
|
1928
|
-
PartialContent: 206,
|
1929
|
-
MultiStatus: 207,
|
1930
|
-
AlreadyReported: 208,
|
1931
|
-
ImUsed: 226,
|
1932
|
-
MultipleChoices: 300,
|
1933
|
-
MovedPermanently: 301,
|
1934
|
-
Found: 302,
|
1935
|
-
SeeOther: 303,
|
1936
|
-
NotModified: 304,
|
1937
|
-
UseProxy: 305,
|
1938
|
-
Unused: 306,
|
1939
|
-
TemporaryRedirect: 307,
|
1940
|
-
PermanentRedirect: 308,
|
1941
|
-
BadRequest: 400,
|
1942
|
-
Unauthorized: 401,
|
1943
|
-
PaymentRequired: 402,
|
1944
|
-
Forbidden: 403,
|
1945
|
-
NotFound: 404,
|
1946
|
-
MethodNotAllowed: 405,
|
1947
|
-
NotAcceptable: 406,
|
1948
|
-
ProxyAuthenticationRequired: 407,
|
1949
|
-
RequestTimeout: 408,
|
1950
|
-
Conflict: 409,
|
1951
|
-
Gone: 410,
|
1952
|
-
LengthRequired: 411,
|
1953
|
-
PreconditionFailed: 412,
|
1954
|
-
PayloadTooLarge: 413,
|
1955
|
-
UriTooLong: 414,
|
1956
|
-
UnsupportedMediaType: 415,
|
1957
|
-
RangeNotSatisfiable: 416,
|
1958
|
-
ExpectationFailed: 417,
|
1959
|
-
ImATeapot: 418,
|
1960
|
-
MisdirectedRequest: 421,
|
1961
|
-
UnprocessableEntity: 422,
|
1962
|
-
Locked: 423,
|
1963
|
-
FailedDependency: 424,
|
1964
|
-
TooEarly: 425,
|
1965
|
-
UpgradeRequired: 426,
|
1966
|
-
PreconditionRequired: 428,
|
1967
|
-
TooManyRequests: 429,
|
1968
|
-
RequestHeaderFieldsTooLarge: 431,
|
1969
|
-
UnavailableForLegalReasons: 451,
|
1970
|
-
InternalServerError: 500,
|
1971
|
-
NotImplemented: 501,
|
1972
|
-
BadGateway: 502,
|
1973
|
-
ServiceUnavailable: 503,
|
1974
|
-
GatewayTimeout: 504,
|
1975
|
-
HttpVersionNotSupported: 505,
|
1976
|
-
VariantAlsoNegotiates: 506,
|
1977
|
-
InsufficientStorage: 507,
|
1978
|
-
LoopDetected: 508,
|
1979
|
-
NotExtended: 510,
|
1980
|
-
NetworkAuthenticationRequired: 511
|
1981
|
-
};
|
1982
|
-
Object.entries(Ae).forEach(([e, t]) => {
|
1983
|
-
Ae[t] = e;
|
1984
|
-
});
|
1985
|
-
function Tt(e) {
|
1986
|
-
const t = new I(e), n = tt(I.prototype.request, t);
|
1987
|
-
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
1988
|
-
return Tt($(e, s));
|
1989
|
-
}, n;
|
1990
|
-
}
|
1991
|
-
const T = Tt(Q);
|
1992
|
-
T.Axios = I;
|
1993
|
-
T.CanceledError = J;
|
1994
|
-
T.CancelToken = ve;
|
1995
|
-
T.isCancel = yt;
|
1996
|
-
T.VERSION = Rt;
|
1997
|
-
T.toFormData = le;
|
1998
|
-
T.AxiosError = w;
|
1999
|
-
T.Cancel = T.CanceledError;
|
2000
|
-
T.all = function(t) {
|
2001
|
-
return Promise.all(t);
|
2002
|
-
};
|
2003
|
-
T.spread = Cr;
|
2004
|
-
T.isAxiosError = Ar;
|
2005
|
-
T.mergeConfig = $;
|
2006
|
-
T.AxiosHeaders = P;
|
2007
|
-
T.formToJSON = (e) => mt(a.isHTMLForm(e) ? new FormData(e) : e);
|
2008
|
-
T.getAdapter = Ot.getAdapter;
|
2009
|
-
T.HttpStatusCode = Ae;
|
2010
|
-
T.default = T;
|
2011
|
-
const _r = H ? window : void 0;
|
2012
|
-
function xr(e) {
|
2013
|
-
var t;
|
2014
|
-
const n = K(e);
|
2015
|
-
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
2016
|
-
}
|
2017
|
-
function Nr(...e) {
|
2018
|
-
let t, n, r, s;
|
2019
|
-
if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, r, s] = e, t = _r) : [t, n, r, s] = e, !t)
|
2020
|
-
return Ye;
|
2021
|
-
n = Ue(n), r = Ue(r);
|
2022
|
-
const o = [], i = () => {
|
2023
|
-
o.forEach((u) => u()), o.length = 0;
|
2024
|
-
}, c = (u, m, b, y) => (u.addEventListener(m, b, y), () => u.removeEventListener(m, b, y)), f = xe(
|
2025
|
-
() => [xr(t), K(s)],
|
2026
|
-
([u, m]) => {
|
2027
|
-
if (i(), !u)
|
2028
|
-
return;
|
2029
|
-
const b = Bt(m) ? { ...m } : m;
|
2030
|
-
o.push(
|
2031
|
-
...n.flatMap((y) => r.map((h) => c(u, y, h, b)))
|
2032
|
-
);
|
2033
|
-
},
|
2034
|
-
{ immediate: !0, flush: "post" }
|
2035
|
-
), l = () => {
|
2036
|
-
f(), i();
|
2037
|
-
};
|
2038
|
-
return G(l), l;
|
2039
|
-
}
|
2040
|
-
const Ze = "ping";
|
2041
|
-
function Ee(e) {
|
2042
|
-
return e === !0 ? {} : e;
|
2043
|
-
}
|
2044
|
-
function Pr(e, t = {}) {
|
2045
|
-
const {
|
2046
|
-
onConnected: n,
|
2047
|
-
onDisconnected: r,
|
2048
|
-
onError: s,
|
2049
|
-
onMessage: o,
|
2050
|
-
immediate: i = !0,
|
2051
|
-
autoConnect: c = !0,
|
2052
|
-
autoClose: f = !0,
|
2053
|
-
protocols: l = []
|
2054
|
-
} = t, u = q(null), m = q("CLOSED"), b = q(), y = jt(e);
|
2055
|
-
let h, d, p = !1, S = 0, g = [], E, O;
|
2056
|
-
const R = () => {
|
2057
|
-
if (g.length && b.value && m.value === "OPEN") {
|
2058
|
-
for (const C of g)
|
2059
|
-
b.value.send(C);
|
2060
|
-
g = [];
|
2061
|
-
}
|
2062
|
-
}, N = () => {
|
2063
|
-
E != null && (clearTimeout(E), E = void 0);
|
2064
|
-
}, k = () => {
|
2065
|
-
clearTimeout(O), O = void 0;
|
2066
|
-
}, x = (C = 1e3, v) => {
|
2067
|
-
N(), !(!H && !Le || !b.value) && (p = !0, k(), h == null || h(), b.value.close(C, v), b.value = void 0);
|
2068
|
-
}, F = (C, v = !0) => !b.value || m.value !== "OPEN" ? (v && g.push(C), !1) : (R(), b.value.send(C), !0), V = () => {
|
2069
|
-
if (p || typeof y.value > "u")
|
2070
|
-
return;
|
2071
|
-
const C = new WebSocket(y.value, l);
|
2072
|
-
b.value = C, m.value = "CONNECTING", C.onopen = () => {
|
2073
|
-
m.value = "OPEN", S = 0, n == null || n(C), d == null || d(), R();
|
2074
|
-
}, C.onclose = (v) => {
|
2075
|
-
if (m.value = "CLOSED", r == null || r(C, v), !p && t.autoReconnect && (b.value == null || C === b.value)) {
|
2076
|
-
const {
|
2077
|
-
retries: B = -1,
|
2078
|
-
delay: M = 1e3,
|
2079
|
-
onFailed: Y
|
2080
|
-
} = Ee(t.autoReconnect);
|
2081
|
-
typeof B == "number" && (B < 0 || S < B) ? (S += 1, E = setTimeout(V, M)) : typeof B == "function" && B() ? E = setTimeout(V, M) : Y == null || Y();
|
2082
|
-
}
|
2083
|
-
}, C.onerror = (v) => {
|
2084
|
-
s == null || s(C, v);
|
2085
|
-
}, C.onmessage = (v) => {
|
2086
|
-
if (t.heartbeat) {
|
2087
|
-
k();
|
2088
|
-
const {
|
2089
|
-
message: B = Ze,
|
2090
|
-
responseMessage: M = B
|
2091
|
-
} = Ee(t.heartbeat);
|
2092
|
-
if (v.data === K(M))
|
2093
|
-
return;
|
2094
|
-
}
|
2095
|
-
u.value = v.data, o == null || o(C, v);
|
2096
|
-
};
|
2097
|
-
};
|
2098
|
-
if (t.heartbeat) {
|
2099
|
-
const {
|
2100
|
-
message: C = Ze,
|
2101
|
-
interval: v = 1e3,
|
2102
|
-
pongTimeout: B = 1e3
|
2103
|
-
} = Ee(t.heartbeat), { pause: M, resume: Y } = It(
|
2104
|
-
() => {
|
2105
|
-
F(K(C), !1), O == null && (O = setTimeout(() => {
|
2106
|
-
x(), p = !1;
|
2107
|
-
}, B));
|
2108
|
-
},
|
2109
|
-
v,
|
2110
|
-
{ immediate: !1 }
|
2111
|
-
);
|
2112
|
-
h = M, d = Y;
|
2113
|
-
}
|
2114
|
-
f && (H && Nr("beforeunload", () => x()), G(x));
|
2115
|
-
const he = () => {
|
2116
|
-
!H && !Le || (x(), p = !1, S = 0, V());
|
2117
|
-
};
|
2118
|
-
return i && he(), c && xe(y, he), {
|
2119
|
-
data: u,
|
2120
|
-
status: m,
|
2121
|
-
close: x,
|
2122
|
-
send: F,
|
2123
|
-
open: he,
|
2124
|
-
ws: b
|
2125
|
-
};
|
2126
|
-
}
|
2127
|
-
const _e = "CLIENT", Qe = 1500, kr = (e) => {
|
2128
|
-
const t = Lr(e), n = vr(e), r = T.create({
|
2129
|
-
baseURL: t,
|
2130
|
-
timeout: Qe
|
2131
|
-
}), s = T.create({
|
2132
|
-
baseURL: n,
|
2133
|
-
timeout: Qe
|
2134
|
-
}), o = Ur(), i = Dr(e), c = Pr(i);
|
2135
|
-
return { $$http: t, $http: r, $$files: n, $files: s, $cookies: o, $socket: c };
|
2136
|
-
};
|
2137
|
-
function vr(e) {
|
2138
|
-
let {
|
2139
|
-
minio_proxy: t,
|
2140
|
-
valar_host: n,
|
2141
|
-
minio_host: r,
|
2142
|
-
minio_port: s,
|
2143
|
-
minio_ssl: o
|
2144
|
-
} = e;
|
2145
|
-
return t || `${o ? "https" : "http"}://${r || n}:${s || 9e3}/`;
|
2146
|
-
}
|
2147
|
-
function Lr(e) {
|
2148
|
-
let {
|
2149
|
-
valar_host: t,
|
2150
|
-
valar_port: n,
|
2151
|
-
valar_ssl: r,
|
2152
|
-
valar_proxy: s
|
2153
|
-
} = e;
|
2154
|
-
return s || `${r ? "https" : "http"}://${t}:${n}/`;
|
2155
|
-
}
|
2156
|
-
function Ur() {
|
2157
|
-
const { get: e, set: t, remove: n } = et(["locale"]);
|
2158
|
-
let r = e(_e);
|
2159
|
-
return r || (r = Xt().toString().replace("-", ""), t(_e, r)), { get: e, set: t, remove: n };
|
2160
|
-
}
|
2161
|
-
function Dr(e) {
|
2162
|
-
const { get: t } = et(["locale"]), n = t(_e);
|
2163
|
-
let {
|
2164
|
-
valar_host: r,
|
2165
|
-
valar_port: s,
|
2166
|
-
socket_ssl: o
|
2167
|
-
} = e;
|
2168
|
-
return `${o ? "wss" : "ws"}://${r}:${s}/base/${n}/`;
|
2169
|
-
}
|
2170
|
-
const Br = (e, t) => {
|
2171
|
-
e.component("MorTable", Dt);
|
2172
|
-
const { $$http: n, $http: r, $$files: s, $files: o, $cookies: i, $socket: c } = kr(t);
|
2173
|
-
e.config.globalProperties.$$http = n, e.config.globalProperties.$http = r, e.config.globalProperties.$$files = s, e.config.globalProperties.$files = o, e.config.globalProperties.$cookies = i, e.config.globalProperties.$socket = c;
|
2174
|
-
};
|
2175
|
-
export {
|
2176
|
-
Br as morghulisPlugin
|
2177
|
-
};
|