@iankibetsh/vue-streamline 1.1.4 → 1.1.5
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/vue-streamline.es.js +339 -314
- package/dist/vue-streamline.umd.js +5 -5
- package/package.json +1 -1
- package/src/App.vue +9 -10
- package/src/composables/useStreamline.js +22 -52
|
@@ -1,36 +1,36 @@
|
|
|
1
|
-
import { inject as me } from "vue";
|
|
1
|
+
import { ref as et, inject as me, reactive as tt, onMounted as nt } from "vue";
|
|
2
2
|
function Fe(e, t) {
|
|
3
3
|
return function() {
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const n =
|
|
7
|
+
const { toString: rt } = Object.prototype, { getPrototypeOf: ue } = Object, V = /* @__PURE__ */ ((e) => (t) => {
|
|
8
|
+
const n = rt.call(t);
|
|
9
9
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
11
|
-
function
|
|
10
|
+
})(/* @__PURE__ */ Object.create(null)), P = (e) => (e = e.toLowerCase(), (t) => V(t) === e), W = (e) => (t) => typeof t === e, { isArray: D } = Array, q = W("undefined");
|
|
11
|
+
function st(e) {
|
|
12
12
|
return e !== null && !q(e) && e.constructor !== null && !q(e.constructor) && T(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
13
|
}
|
|
14
|
-
const _e =
|
|
15
|
-
function
|
|
14
|
+
const _e = P("ArrayBuffer");
|
|
15
|
+
function ot(e) {
|
|
16
16
|
let t;
|
|
17
17
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && _e(e.buffer), t;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
19
|
+
const it = W("string"), T = W("function"), Le = W("number"), K = (e) => e !== null && typeof e == "object", at = (e) => e === !0 || e === !1, z = (e) => {
|
|
20
|
+
if (V(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
22
|
const t = ue(e);
|
|
23
23
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
24
|
-
},
|
|
24
|
+
}, ct = P("Date"), ut = P("File"), lt = P("Blob"), ft = P("FileList"), dt = (e) => K(e) && T(e.pipe), pt = (e) => {
|
|
25
25
|
let t;
|
|
26
|
-
return e && (typeof FormData == "function" && e instanceof FormData || T(e.append) && ((t =
|
|
26
|
+
return e && (typeof FormData == "function" && e instanceof FormData || T(e.append) && ((t = V(e)) === "formdata" || // detect form-data instance
|
|
27
27
|
t === "object" && T(e.toString) && e.toString() === "[object FormData]"));
|
|
28
|
-
},
|
|
28
|
+
}, ht = P("URLSearchParams"), [mt, yt, wt, Et] = ["ReadableStream", "Request", "Response", "Headers"].map(P), bt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
29
29
|
function H(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
30
30
|
if (e === null || typeof e > "u")
|
|
31
31
|
return;
|
|
32
32
|
let r, s;
|
|
33
|
-
if (typeof e != "object" && (e = [e]),
|
|
33
|
+
if (typeof e != "object" && (e = [e]), D(e))
|
|
34
34
|
for (r = 0, s = e.length; r < s; r++)
|
|
35
35
|
t.call(null, e[r], r, e);
|
|
36
36
|
else {
|
|
@@ -40,7 +40,7 @@ function H(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
40
40
|
c = o[r], t.call(null, e[c], c, e);
|
|
41
41
|
}
|
|
42
42
|
}
|
|
43
|
-
function
|
|
43
|
+
function Ue(e, t) {
|
|
44
44
|
t = t.toLowerCase();
|
|
45
45
|
const n = Object.keys(e);
|
|
46
46
|
let r = n.length, s;
|
|
@@ -52,20 +52,20 @@ function De(e, t) {
|
|
|
52
52
|
const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Be = (e) => !q(e) && e !== L;
|
|
53
53
|
function ne() {
|
|
54
54
|
const { caseless: e } = Be(this) && this || {}, t = {}, n = (r, s) => {
|
|
55
|
-
const o = e &&
|
|
56
|
-
z(t[o]) && z(r) ? t[o] = ne(t[o], r) : z(r) ? t[o] = ne({}, r) :
|
|
55
|
+
const o = e && Ue(t, s) || s;
|
|
56
|
+
z(t[o]) && z(r) ? t[o] = ne(t[o], r) : z(r) ? t[o] = ne({}, r) : D(r) ? t[o] = r.slice() : t[o] = r;
|
|
57
57
|
};
|
|
58
58
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
59
59
|
arguments[r] && H(arguments[r], n);
|
|
60
60
|
return t;
|
|
61
61
|
}
|
|
62
|
-
const
|
|
62
|
+
const Rt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
63
63
|
n && T(s) ? e[o] = Fe(s, n) : e[o] = s;
|
|
64
|
-
}, { allOwnKeys: r }), e),
|
|
64
|
+
}, { allOwnKeys: r }), e), St = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), gt = (e, t, n, r) => {
|
|
65
65
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
66
66
|
value: t.prototype
|
|
67
67
|
}), n && Object.assign(e.prototype, n);
|
|
68
|
-
},
|
|
68
|
+
}, Ot = (e, t, n, r) => {
|
|
69
69
|
let s, o, i;
|
|
70
70
|
const c = {};
|
|
71
71
|
if (t = t || {}, e == null) return t;
|
|
@@ -75,45 +75,45 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
|
75
75
|
e = n !== !1 && ue(e);
|
|
76
76
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
77
77
|
return t;
|
|
78
|
-
},
|
|
78
|
+
}, Tt = (e, t, n) => {
|
|
79
79
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
80
80
|
const r = e.indexOf(t, n);
|
|
81
81
|
return r !== -1 && r === n;
|
|
82
|
-
},
|
|
82
|
+
}, At = (e) => {
|
|
83
83
|
if (!e) return null;
|
|
84
|
-
if (
|
|
84
|
+
if (D(e)) return e;
|
|
85
85
|
let t = e.length;
|
|
86
86
|
if (!Le(t)) return null;
|
|
87
87
|
const n = new Array(t);
|
|
88
88
|
for (; t-- > 0; )
|
|
89
89
|
n[t] = e[t];
|
|
90
90
|
return n;
|
|
91
|
-
},
|
|
91
|
+
}, xt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ue(Uint8Array)), Pt = (e, t) => {
|
|
92
92
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
93
93
|
let s;
|
|
94
94
|
for (; (s = r.next()) && !s.done; ) {
|
|
95
95
|
const o = s.value;
|
|
96
96
|
t.call(e, o[0], o[1]);
|
|
97
97
|
}
|
|
98
|
-
},
|
|
98
|
+
}, Ct = (e, t) => {
|
|
99
99
|
let n;
|
|
100
100
|
const r = [];
|
|
101
101
|
for (; (n = e.exec(t)) !== null; )
|
|
102
102
|
r.push(n);
|
|
103
103
|
return r;
|
|
104
|
-
},
|
|
104
|
+
}, Nt = P("HTMLFormElement"), Ft = (e) => e.toLowerCase().replace(
|
|
105
105
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
106
106
|
function(n, r, s) {
|
|
107
107
|
return r.toUpperCase() + s;
|
|
108
108
|
}
|
|
109
|
-
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
109
|
+
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), _t = P("RegExp"), De = (e, t) => {
|
|
110
110
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
111
111
|
H(n, (s, o) => {
|
|
112
112
|
let i;
|
|
113
113
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
114
114
|
}), Object.defineProperties(e, r);
|
|
115
|
-
},
|
|
116
|
-
|
|
115
|
+
}, Lt = (e) => {
|
|
116
|
+
De(e, (t, n) => {
|
|
117
117
|
if (T(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
118
118
|
return !1;
|
|
119
119
|
const r = e[n];
|
|
@@ -127,36 +127,36 @@ const wt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (s, o) => {
|
|
|
127
127
|
});
|
|
128
128
|
}
|
|
129
129
|
});
|
|
130
|
-
},
|
|
130
|
+
}, Ut = (e, t) => {
|
|
131
131
|
const n = {}, r = (s) => {
|
|
132
132
|
s.forEach((o) => {
|
|
133
133
|
n[o] = !0;
|
|
134
134
|
});
|
|
135
135
|
};
|
|
136
|
-
return
|
|
137
|
-
},
|
|
138
|
-
},
|
|
136
|
+
return D(e) ? r(e) : r(String(e).split(t)), n;
|
|
137
|
+
}, Bt = () => {
|
|
138
|
+
}, Dt = (e, t) => e != null && Number.isFinite(e = +e) ? e : t, Z = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", ke = {
|
|
139
139
|
DIGIT: we,
|
|
140
140
|
ALPHA: Z,
|
|
141
141
|
ALPHA_DIGIT: Z + Z.toUpperCase() + we
|
|
142
|
-
},
|
|
142
|
+
}, kt = (e = 16, t = ke.ALPHA_DIGIT) => {
|
|
143
143
|
let n = "";
|
|
144
144
|
const { length: r } = t;
|
|
145
145
|
for (; e--; )
|
|
146
146
|
n += t[Math.random() * r | 0];
|
|
147
147
|
return n;
|
|
148
148
|
};
|
|
149
|
-
function
|
|
149
|
+
function jt(e) {
|
|
150
150
|
return !!(e && T(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
151
151
|
}
|
|
152
|
-
const
|
|
152
|
+
const qt = (e) => {
|
|
153
153
|
const t = new Array(10), n = (r, s) => {
|
|
154
154
|
if (K(r)) {
|
|
155
155
|
if (t.indexOf(r) >= 0)
|
|
156
156
|
return;
|
|
157
157
|
if (!("toJSON" in r)) {
|
|
158
158
|
t[s] = r;
|
|
159
|
-
const o =
|
|
159
|
+
const o = D(r) ? [] : {};
|
|
160
160
|
return H(r, (i, c) => {
|
|
161
161
|
const f = n(i, s + 1);
|
|
162
162
|
!q(f) && (o[c] = f);
|
|
@@ -166,72 +166,72 @@ const Ut = (e) => {
|
|
|
166
166
|
return r;
|
|
167
167
|
};
|
|
168
168
|
return n(e, 0);
|
|
169
|
-
},
|
|
169
|
+
}, Ht = P("AsyncFunction"), It = (e) => e && (K(e) || T(e)) && T(e.then) && T(e.catch), je = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: s, data: o }) => {
|
|
170
170
|
s === L && o === n && r.length && r.shift()();
|
|
171
171
|
}, !1), (s) => {
|
|
172
172
|
r.push(s), L.postMessage(n, "*");
|
|
173
173
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
174
174
|
typeof setImmediate == "function",
|
|
175
175
|
T(L.postMessage)
|
|
176
|
-
),
|
|
177
|
-
isArray:
|
|
176
|
+
), Mt = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || je, a = {
|
|
177
|
+
isArray: D,
|
|
178
178
|
isArrayBuffer: _e,
|
|
179
|
-
isBuffer:
|
|
180
|
-
isFormData:
|
|
181
|
-
isArrayBufferView:
|
|
182
|
-
isString:
|
|
179
|
+
isBuffer: st,
|
|
180
|
+
isFormData: pt,
|
|
181
|
+
isArrayBufferView: ot,
|
|
182
|
+
isString: it,
|
|
183
183
|
isNumber: Le,
|
|
184
|
-
isBoolean:
|
|
184
|
+
isBoolean: at,
|
|
185
185
|
isObject: K,
|
|
186
186
|
isPlainObject: z,
|
|
187
|
-
isReadableStream:
|
|
188
|
-
isRequest:
|
|
189
|
-
isResponse:
|
|
190
|
-
isHeaders:
|
|
187
|
+
isReadableStream: mt,
|
|
188
|
+
isRequest: yt,
|
|
189
|
+
isResponse: wt,
|
|
190
|
+
isHeaders: Et,
|
|
191
191
|
isUndefined: q,
|
|
192
|
-
isDate:
|
|
193
|
-
isFile:
|
|
194
|
-
isBlob:
|
|
195
|
-
isRegExp:
|
|
192
|
+
isDate: ct,
|
|
193
|
+
isFile: ut,
|
|
194
|
+
isBlob: lt,
|
|
195
|
+
isRegExp: _t,
|
|
196
196
|
isFunction: T,
|
|
197
|
-
isStream:
|
|
198
|
-
isURLSearchParams:
|
|
199
|
-
isTypedArray:
|
|
200
|
-
isFileList:
|
|
197
|
+
isStream: dt,
|
|
198
|
+
isURLSearchParams: ht,
|
|
199
|
+
isTypedArray: xt,
|
|
200
|
+
isFileList: ft,
|
|
201
201
|
forEach: H,
|
|
202
202
|
merge: ne,
|
|
203
|
-
extend:
|
|
204
|
-
trim:
|
|
205
|
-
stripBOM:
|
|
206
|
-
inherits:
|
|
207
|
-
toFlatObject:
|
|
208
|
-
kindOf:
|
|
209
|
-
kindOfTest:
|
|
210
|
-
endsWith:
|
|
211
|
-
toArray:
|
|
212
|
-
forEachEntry:
|
|
213
|
-
matchAll:
|
|
214
|
-
isHTMLForm:
|
|
203
|
+
extend: Rt,
|
|
204
|
+
trim: bt,
|
|
205
|
+
stripBOM: St,
|
|
206
|
+
inherits: gt,
|
|
207
|
+
toFlatObject: Ot,
|
|
208
|
+
kindOf: V,
|
|
209
|
+
kindOfTest: P,
|
|
210
|
+
endsWith: Tt,
|
|
211
|
+
toArray: At,
|
|
212
|
+
forEachEntry: Pt,
|
|
213
|
+
matchAll: Ct,
|
|
214
|
+
isHTMLForm: Nt,
|
|
215
215
|
hasOwnProperty: ye,
|
|
216
216
|
hasOwnProp: ye,
|
|
217
217
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
218
|
-
reduceDescriptors:
|
|
219
|
-
freezeMethods:
|
|
220
|
-
toObjectSet:
|
|
221
|
-
toCamelCase:
|
|
222
|
-
noop:
|
|
223
|
-
toFiniteNumber:
|
|
224
|
-
findKey:
|
|
218
|
+
reduceDescriptors: De,
|
|
219
|
+
freezeMethods: Lt,
|
|
220
|
+
toObjectSet: Ut,
|
|
221
|
+
toCamelCase: Ft,
|
|
222
|
+
noop: Bt,
|
|
223
|
+
toFiniteNumber: Dt,
|
|
224
|
+
findKey: Ue,
|
|
225
225
|
global: L,
|
|
226
226
|
isContextDefined: Be,
|
|
227
227
|
ALPHABET: ke,
|
|
228
|
-
generateString:
|
|
229
|
-
isSpecCompliantForm:
|
|
230
|
-
toJSONObject:
|
|
231
|
-
isAsyncFn:
|
|
232
|
-
isThenable:
|
|
228
|
+
generateString: kt,
|
|
229
|
+
isSpecCompliantForm: jt,
|
|
230
|
+
toJSONObject: qt,
|
|
231
|
+
isAsyncFn: Ht,
|
|
232
|
+
isThenable: It,
|
|
233
233
|
setImmediate: je,
|
|
234
|
-
asap:
|
|
234
|
+
asap: Mt
|
|
235
235
|
};
|
|
236
236
|
function m(e, t, n, r, s) {
|
|
237
237
|
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);
|
|
@@ -283,22 +283,22 @@ m.from = (e, t, n, r, s, o) => {
|
|
|
283
283
|
return f !== Error.prototype;
|
|
284
284
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
285
285
|
};
|
|
286
|
-
const
|
|
286
|
+
const zt = null;
|
|
287
287
|
function re(e) {
|
|
288
288
|
return a.isPlainObject(e) || a.isArray(e);
|
|
289
289
|
}
|
|
290
290
|
function Ie(e) {
|
|
291
291
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function Ee(e, t, n) {
|
|
294
294
|
return e ? e.concat(t).map(function(s, o) {
|
|
295
295
|
return s = Ie(s), !n && o ? "[" + s + "]" : s;
|
|
296
296
|
}).join(n ? "." : "") : t;
|
|
297
297
|
}
|
|
298
|
-
function
|
|
298
|
+
function Jt(e) {
|
|
299
299
|
return a.isArray(e) && !e.some(re);
|
|
300
300
|
}
|
|
301
|
-
const
|
|
301
|
+
const vt = a.toFlatObject(a, {}, null, function(t) {
|
|
302
302
|
return /^is[A-Z]/.test(t);
|
|
303
303
|
});
|
|
304
304
|
function G(e, t, n) {
|
|
@@ -308,8 +308,8 @@ function G(e, t, n) {
|
|
|
308
308
|
metaTokens: !0,
|
|
309
309
|
dots: !1,
|
|
310
310
|
indexes: !1
|
|
311
|
-
}, !1, function(y,
|
|
312
|
-
return !a.isUndefined(
|
|
311
|
+
}, !1, function(y, p) {
|
|
312
|
+
return !a.isUndefined(p[y]);
|
|
313
313
|
});
|
|
314
314
|
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
315
315
|
if (!a.isFunction(s))
|
|
@@ -322,47 +322,47 @@ function G(e, t, n) {
|
|
|
322
322
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
323
323
|
return a.isArrayBuffer(h) || a.isTypedArray(h) ? f && typeof Blob == "function" ? new Blob([h]) : Buffer.from(h) : h;
|
|
324
324
|
}
|
|
325
|
-
function l(h, y,
|
|
325
|
+
function l(h, y, p) {
|
|
326
326
|
let S = h;
|
|
327
|
-
if (h && !
|
|
327
|
+
if (h && !p && typeof h == "object") {
|
|
328
328
|
if (a.endsWith(y, "{}"))
|
|
329
329
|
y = r ? y : y.slice(0, -2), h = JSON.stringify(h);
|
|
330
|
-
else if (a.isArray(h) &&
|
|
330
|
+
else if (a.isArray(h) && Jt(h) || (a.isFileList(h) || a.endsWith(y, "[]")) && (S = a.toArray(h)))
|
|
331
331
|
return y = Ie(y), S.forEach(function(w, A) {
|
|
332
332
|
!(a.isUndefined(w) || w === null) && t.append(
|
|
333
333
|
// eslint-disable-next-line no-nested-ternary
|
|
334
|
-
i === !0 ?
|
|
334
|
+
i === !0 ? Ee([y], A, o) : i === null ? y : y + "[]",
|
|
335
335
|
u(w)
|
|
336
336
|
);
|
|
337
337
|
}), !1;
|
|
338
338
|
}
|
|
339
|
-
return re(h) ? !0 : (t.append(
|
|
339
|
+
return re(h) ? !0 : (t.append(Ee(p, y, o), u(h)), !1);
|
|
340
340
|
}
|
|
341
|
-
const
|
|
341
|
+
const d = [], E = Object.assign(vt, {
|
|
342
342
|
defaultVisitor: l,
|
|
343
343
|
convertValue: u,
|
|
344
344
|
isVisitable: re
|
|
345
345
|
});
|
|
346
|
-
function
|
|
346
|
+
function b(h, y) {
|
|
347
347
|
if (!a.isUndefined(h)) {
|
|
348
|
-
if (
|
|
348
|
+
if (d.indexOf(h) !== -1)
|
|
349
349
|
throw Error("Circular reference detected in " + y.join("."));
|
|
350
|
-
|
|
350
|
+
d.push(h), a.forEach(h, function(S, O) {
|
|
351
351
|
(!(a.isUndefined(S) || S === null) && s.call(
|
|
352
352
|
t,
|
|
353
353
|
S,
|
|
354
354
|
a.isString(O) ? O.trim() : O,
|
|
355
355
|
y,
|
|
356
|
-
|
|
357
|
-
)) === !0 &&
|
|
358
|
-
}),
|
|
356
|
+
E
|
|
357
|
+
)) === !0 && b(S, y ? y.concat(O) : [O]);
|
|
358
|
+
}), d.pop();
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
361
|
if (!a.isObject(e))
|
|
362
362
|
throw new TypeError("data must be an object");
|
|
363
|
-
return
|
|
363
|
+
return b(e), t;
|
|
364
364
|
}
|
|
365
|
-
function
|
|
365
|
+
function be(e) {
|
|
366
366
|
const t = {
|
|
367
367
|
"!": "%21",
|
|
368
368
|
"'": "%27",
|
|
@@ -385,19 +385,19 @@ Me.append = function(t, n) {
|
|
|
385
385
|
};
|
|
386
386
|
Me.toString = function(t) {
|
|
387
387
|
const n = t ? function(r) {
|
|
388
|
-
return t.call(this, r,
|
|
389
|
-
} :
|
|
388
|
+
return t.call(this, r, be);
|
|
389
|
+
} : be;
|
|
390
390
|
return this._pairs.map(function(s) {
|
|
391
391
|
return n(s[0]) + "=" + n(s[1]);
|
|
392
392
|
}, "").join("&");
|
|
393
393
|
};
|
|
394
|
-
function
|
|
394
|
+
function $t(e) {
|
|
395
395
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
396
396
|
}
|
|
397
397
|
function ze(e, t, n) {
|
|
398
398
|
if (!t)
|
|
399
399
|
return e;
|
|
400
|
-
const r = n && n.encode ||
|
|
400
|
+
const r = n && n.encode || $t, s = n && n.serialize;
|
|
401
401
|
let o;
|
|
402
402
|
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new le(t, n).toString(r), o) {
|
|
403
403
|
const i = e.indexOf("#");
|
|
@@ -463,36 +463,36 @@ const Je = {
|
|
|
463
463
|
silentJSONParsing: !0,
|
|
464
464
|
forcedJSONParsing: !0,
|
|
465
465
|
clarifyTimeoutError: !1
|
|
466
|
-
},
|
|
466
|
+
}, Vt = typeof URLSearchParams < "u" ? URLSearchParams : le, Wt = typeof FormData < "u" ? FormData : null, Kt = typeof Blob < "u" ? Blob : null, Gt = {
|
|
467
467
|
isBrowser: !0,
|
|
468
468
|
classes: {
|
|
469
|
-
URLSearchParams:
|
|
470
|
-
FormData:
|
|
471
|
-
Blob:
|
|
469
|
+
URLSearchParams: Vt,
|
|
470
|
+
FormData: Wt,
|
|
471
|
+
Blob: Kt
|
|
472
472
|
},
|
|
473
473
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
474
|
-
}, fe = typeof window < "u" && typeof document < "u",
|
|
475
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
474
|
+
}, fe = typeof window < "u" && typeof document < "u", Xt = ((e) => fe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), Qt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
475
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Zt = fe && window.location.href || "http://localhost", Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
476
476
|
__proto__: null,
|
|
477
477
|
hasBrowserEnv: fe,
|
|
478
|
-
hasStandardBrowserEnv:
|
|
479
|
-
hasStandardBrowserWebWorkerEnv:
|
|
480
|
-
origin:
|
|
478
|
+
hasStandardBrowserEnv: Xt,
|
|
479
|
+
hasStandardBrowserWebWorkerEnv: Qt,
|
|
480
|
+
origin: Zt
|
|
481
481
|
}, Symbol.toStringTag, { value: "Module" })), x = {
|
|
482
|
-
...
|
|
483
|
-
...
|
|
482
|
+
...Yt,
|
|
483
|
+
...Gt
|
|
484
484
|
};
|
|
485
|
-
function
|
|
485
|
+
function en(e, t) {
|
|
486
486
|
return G(e, new x.classes.URLSearchParams(), Object.assign({
|
|
487
487
|
visitor: function(n, r, s, o) {
|
|
488
488
|
return x.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
489
489
|
}
|
|
490
490
|
}, t));
|
|
491
491
|
}
|
|
492
|
-
function
|
|
492
|
+
function tn(e) {
|
|
493
493
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
494
494
|
}
|
|
495
|
-
function
|
|
495
|
+
function nn(e) {
|
|
496
496
|
const t = {}, n = Object.keys(e);
|
|
497
497
|
let r;
|
|
498
498
|
const s = n.length;
|
|
@@ -501,22 +501,22 @@ function Yt(e) {
|
|
|
501
501
|
o = n[r], t[o] = e[o];
|
|
502
502
|
return t;
|
|
503
503
|
}
|
|
504
|
-
function
|
|
504
|
+
function ve(e) {
|
|
505
505
|
function t(n, r, s, o) {
|
|
506
506
|
let i = n[o++];
|
|
507
507
|
if (i === "__proto__") return !0;
|
|
508
508
|
const c = Number.isFinite(+i), f = o >= n.length;
|
|
509
|
-
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] =
|
|
509
|
+
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] = nn(s[i])), !c);
|
|
510
510
|
}
|
|
511
511
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
512
512
|
const n = {};
|
|
513
513
|
return a.forEachEntry(e, (r, s) => {
|
|
514
|
-
t(
|
|
514
|
+
t(tn(r), s, n, 0);
|
|
515
515
|
}), n;
|
|
516
516
|
}
|
|
517
517
|
return null;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function rn(e, t, n) {
|
|
520
520
|
if (a.isString(e))
|
|
521
521
|
try {
|
|
522
522
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -532,7 +532,7 @@ const I = {
|
|
|
532
532
|
transformRequest: [function(t, n) {
|
|
533
533
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
534
534
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
535
|
-
return s ? JSON.stringify(
|
|
535
|
+
return s ? JSON.stringify(ve(t)) : t;
|
|
536
536
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
537
537
|
return t;
|
|
538
538
|
if (a.isArrayBufferView(t))
|
|
@@ -542,7 +542,7 @@ const I = {
|
|
|
542
542
|
let c;
|
|
543
543
|
if (o) {
|
|
544
544
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
545
|
-
return
|
|
545
|
+
return en(t, this.formSerializer).toString();
|
|
546
546
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
547
547
|
const f = this.env && this.env.FormData;
|
|
548
548
|
return G(
|
|
@@ -552,7 +552,7 @@ const I = {
|
|
|
552
552
|
);
|
|
553
553
|
}
|
|
554
554
|
}
|
|
555
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
555
|
+
return o || s ? (n.setContentType("application/json", !1), rn(t)) : t;
|
|
556
556
|
}],
|
|
557
557
|
transformResponse: [function(t) {
|
|
558
558
|
const n = this.transitional || I.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
@@ -595,7 +595,7 @@ const I = {
|
|
|
595
595
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
596
596
|
I.headers[e] = {};
|
|
597
597
|
});
|
|
598
|
-
const
|
|
598
|
+
const sn = a.toObjectSet([
|
|
599
599
|
"age",
|
|
600
600
|
"authorization",
|
|
601
601
|
"content-length",
|
|
@@ -613,12 +613,12 @@ const tn = a.toObjectSet([
|
|
|
613
613
|
"referer",
|
|
614
614
|
"retry-after",
|
|
615
615
|
"user-agent"
|
|
616
|
-
]),
|
|
616
|
+
]), on = (e) => {
|
|
617
617
|
const t = {};
|
|
618
618
|
let n, r, s;
|
|
619
619
|
return e && e.split(`
|
|
620
620
|
`).forEach(function(i) {
|
|
621
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
621
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && sn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
622
622
|
}), t;
|
|
623
623
|
}, Se = Symbol("internals");
|
|
624
624
|
function j(e) {
|
|
@@ -627,14 +627,14 @@ function j(e) {
|
|
|
627
627
|
function J(e) {
|
|
628
628
|
return e === !1 || e == null ? e : a.isArray(e) ? e.map(J) : String(e);
|
|
629
629
|
}
|
|
630
|
-
function
|
|
630
|
+
function an(e) {
|
|
631
631
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
632
632
|
let r;
|
|
633
633
|
for (; r = n.exec(e); )
|
|
634
634
|
t[r[1]] = r[2];
|
|
635
635
|
return t;
|
|
636
636
|
}
|
|
637
|
-
const
|
|
637
|
+
const cn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
638
638
|
function Y(e, t, n, r, s) {
|
|
639
639
|
if (a.isFunction(r))
|
|
640
640
|
return r.call(this, t, n);
|
|
@@ -645,10 +645,10 @@ function Y(e, t, n, r, s) {
|
|
|
645
645
|
return r.test(t);
|
|
646
646
|
}
|
|
647
647
|
}
|
|
648
|
-
function
|
|
648
|
+
function un(e) {
|
|
649
649
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
650
650
|
}
|
|
651
|
-
function
|
|
651
|
+
function ln(e, t) {
|
|
652
652
|
const n = a.toCamelCase(" " + t);
|
|
653
653
|
["get", "set", "has"].forEach((r) => {
|
|
654
654
|
Object.defineProperty(e, r + n, {
|
|
@@ -669,14 +669,14 @@ class g {
|
|
|
669
669
|
const l = j(f);
|
|
670
670
|
if (!l)
|
|
671
671
|
throw new Error("header name must be a non-empty string");
|
|
672
|
-
const
|
|
673
|
-
(!
|
|
672
|
+
const d = a.findKey(s, l);
|
|
673
|
+
(!d || s[d] === void 0 || u === !0 || u === void 0 && s[d] !== !1) && (s[d || f] = J(c));
|
|
674
674
|
}
|
|
675
675
|
const i = (c, f) => a.forEach(c, (u, l) => o(u, l, f));
|
|
676
676
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
677
677
|
i(t, n);
|
|
678
|
-
else if (a.isString(t) && (t = t.trim()) && !
|
|
679
|
-
i(
|
|
678
|
+
else if (a.isString(t) && (t = t.trim()) && !cn(t))
|
|
679
|
+
i(on(t), n);
|
|
680
680
|
else if (a.isHeaders(t))
|
|
681
681
|
for (const [c, f] of t.entries())
|
|
682
682
|
o(f, c, r);
|
|
@@ -692,7 +692,7 @@ class g {
|
|
|
692
692
|
if (!n)
|
|
693
693
|
return s;
|
|
694
694
|
if (n === !0)
|
|
695
|
-
return
|
|
695
|
+
return an(s);
|
|
696
696
|
if (a.isFunction(n))
|
|
697
697
|
return n.call(this, s, r);
|
|
698
698
|
if (a.isRegExp(n))
|
|
@@ -736,7 +736,7 @@ class g {
|
|
|
736
736
|
n[i] = J(s), delete n[o];
|
|
737
737
|
return;
|
|
738
738
|
}
|
|
739
|
-
const c = t ?
|
|
739
|
+
const c = t ? un(o) : String(o).trim();
|
|
740
740
|
c !== o && delete n[o], n[c] = J(s), r[c] = !0;
|
|
741
741
|
}), this;
|
|
742
742
|
}
|
|
@@ -772,7 +772,7 @@ class g {
|
|
|
772
772
|
}).accessors, s = this.prototype;
|
|
773
773
|
function o(i) {
|
|
774
774
|
const c = j(i);
|
|
775
|
-
r[c] || (
|
|
775
|
+
r[c] || (ln(s, i), r[c] = !0);
|
|
776
776
|
}
|
|
777
777
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
778
778
|
}
|
|
@@ -804,7 +804,7 @@ function k(e, t, n) {
|
|
|
804
804
|
a.inherits(k, m, {
|
|
805
805
|
__CANCEL__: !0
|
|
806
806
|
});
|
|
807
|
-
function
|
|
807
|
+
function Ve(e, t, n) {
|
|
808
808
|
const r = n.config.validateStatus;
|
|
809
809
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
810
810
|
"Request failed with status code " + n.status,
|
|
@@ -814,45 +814,45 @@ function ve(e, t, n) {
|
|
|
814
814
|
n
|
|
815
815
|
));
|
|
816
816
|
}
|
|
817
|
-
function
|
|
817
|
+
function fn(e) {
|
|
818
818
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
819
819
|
return t && t[1] || "";
|
|
820
820
|
}
|
|
821
|
-
function
|
|
821
|
+
function dn(e, t) {
|
|
822
822
|
e = e || 10;
|
|
823
823
|
const n = new Array(e), r = new Array(e);
|
|
824
824
|
let s = 0, o = 0, i;
|
|
825
825
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
826
826
|
const u = Date.now(), l = r[o];
|
|
827
827
|
i || (i = u), n[s] = f, r[s] = u;
|
|
828
|
-
let
|
|
829
|
-
for (;
|
|
830
|
-
|
|
828
|
+
let d = o, E = 0;
|
|
829
|
+
for (; d !== s; )
|
|
830
|
+
E += n[d++], d = d % e;
|
|
831
831
|
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t)
|
|
832
832
|
return;
|
|
833
|
-
const
|
|
834
|
-
return
|
|
833
|
+
const b = l && u - l;
|
|
834
|
+
return b ? Math.round(E * 1e3 / b) : void 0;
|
|
835
835
|
};
|
|
836
836
|
}
|
|
837
|
-
function
|
|
837
|
+
function pn(e, t) {
|
|
838
838
|
let n = 0, r = 1e3 / t, s, o;
|
|
839
839
|
const i = (u, l = Date.now()) => {
|
|
840
840
|
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
841
841
|
};
|
|
842
842
|
return [(...u) => {
|
|
843
|
-
const l = Date.now(),
|
|
844
|
-
|
|
843
|
+
const l = Date.now(), d = l - n;
|
|
844
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(() => {
|
|
845
845
|
o = null, i(s);
|
|
846
|
-
}, r -
|
|
846
|
+
}, r - d)));
|
|
847
847
|
}, () => s && i(s)];
|
|
848
848
|
}
|
|
849
|
-
const
|
|
849
|
+
const v = (e, t, n = 3) => {
|
|
850
850
|
let r = 0;
|
|
851
|
-
const s =
|
|
852
|
-
return
|
|
851
|
+
const s = dn(50, 250);
|
|
852
|
+
return pn((o) => {
|
|
853
853
|
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, u = s(f), l = i <= c;
|
|
854
854
|
r = i;
|
|
855
|
-
const
|
|
855
|
+
const d = {
|
|
856
856
|
loaded: i,
|
|
857
857
|
total: c,
|
|
858
858
|
progress: c ? i / c : void 0,
|
|
@@ -863,7 +863,7 @@ const V = (e, t, n = 3) => {
|
|
|
863
863
|
lengthComputable: c != null,
|
|
864
864
|
[t ? "download" : "upload"]: !0
|
|
865
865
|
};
|
|
866
|
-
e(
|
|
866
|
+
e(d);
|
|
867
867
|
}, n);
|
|
868
868
|
}, ge = (e, t) => {
|
|
869
869
|
const n = e != null;
|
|
@@ -872,7 +872,7 @@ const V = (e, t, n = 3) => {
|
|
|
872
872
|
total: e,
|
|
873
873
|
loaded: r
|
|
874
874
|
}), t[1]];
|
|
875
|
-
}, Oe = (e) => (...t) => a.asap(() => e(...t)),
|
|
875
|
+
}, Oe = (e) => (...t) => a.asap(() => e(...t)), hn = x.hasStandardBrowserEnv ? (
|
|
876
876
|
// Standard browser envs have full support of the APIs needed to test
|
|
877
877
|
// whether the request URL is of the same origin as current location.
|
|
878
878
|
function() {
|
|
@@ -903,7 +903,7 @@ const V = (e, t, n = 3) => {
|
|
|
903
903
|
return !0;
|
|
904
904
|
};
|
|
905
905
|
}()
|
|
906
|
-
),
|
|
906
|
+
), mn = x.hasStandardBrowserEnv ? (
|
|
907
907
|
// Standard browser envs support document.cookie
|
|
908
908
|
{
|
|
909
909
|
write(e, t, n, r, s, o) {
|
|
@@ -930,27 +930,27 @@ const V = (e, t, n = 3) => {
|
|
|
930
930
|
}
|
|
931
931
|
}
|
|
932
932
|
);
|
|
933
|
-
function
|
|
933
|
+
function yn(e) {
|
|
934
934
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
935
935
|
}
|
|
936
|
-
function
|
|
936
|
+
function wn(e, t) {
|
|
937
937
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
938
938
|
}
|
|
939
939
|
function We(e, t) {
|
|
940
|
-
return e && !
|
|
940
|
+
return e && !yn(t) ? wn(e, t) : t;
|
|
941
941
|
}
|
|
942
942
|
const Te = (e) => e instanceof g ? { ...e } : e;
|
|
943
943
|
function B(e, t) {
|
|
944
944
|
t = t || {};
|
|
945
945
|
const n = {};
|
|
946
|
-
function r(u, l,
|
|
947
|
-
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless:
|
|
946
|
+
function r(u, l, d) {
|
|
947
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({ caseless: d }, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
948
948
|
}
|
|
949
|
-
function s(u, l,
|
|
949
|
+
function s(u, l, d) {
|
|
950
950
|
if (a.isUndefined(l)) {
|
|
951
951
|
if (!a.isUndefined(u))
|
|
952
|
-
return r(void 0, u,
|
|
953
|
-
} else return r(u, l,
|
|
952
|
+
return r(void 0, u, d);
|
|
953
|
+
} else return r(u, l, d);
|
|
954
954
|
}
|
|
955
955
|
function o(u, l) {
|
|
956
956
|
if (!a.isUndefined(l))
|
|
@@ -962,10 +962,10 @@ function B(e, t) {
|
|
|
962
962
|
return r(void 0, u);
|
|
963
963
|
} else return r(void 0, l);
|
|
964
964
|
}
|
|
965
|
-
function c(u, l,
|
|
966
|
-
if (
|
|
965
|
+
function c(u, l, d) {
|
|
966
|
+
if (d in t)
|
|
967
967
|
return r(u, l);
|
|
968
|
-
if (
|
|
968
|
+
if (d in e)
|
|
969
969
|
return r(void 0, u);
|
|
970
970
|
}
|
|
971
971
|
const f = {
|
|
@@ -1000,8 +1000,8 @@ function B(e, t) {
|
|
|
1000
1000
|
headers: (u, l) => s(Te(u), Te(l), !0)
|
|
1001
1001
|
};
|
|
1002
1002
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1003
|
-
const
|
|
1004
|
-
a.isUndefined(
|
|
1003
|
+
const d = f[l] || s, E = d(e[l], t[l], l);
|
|
1004
|
+
a.isUndefined(E) && d !== c || (n[l] = E);
|
|
1005
1005
|
}), n;
|
|
1006
1006
|
}
|
|
1007
1007
|
const Ke = (e) => {
|
|
@@ -1016,73 +1016,73 @@ const Ke = (e) => {
|
|
|
1016
1016
|
if (x.hasStandardBrowserEnv || x.hasStandardBrowserWebWorkerEnv)
|
|
1017
1017
|
i.setContentType(void 0);
|
|
1018
1018
|
else if ((f = i.getContentType()) !== !1) {
|
|
1019
|
-
const [u, ...l] = f ? f.split(";").map((
|
|
1019
|
+
const [u, ...l] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1020
1020
|
i.setContentType([u || "multipart/form-data", ...l].join("; "));
|
|
1021
1021
|
}
|
|
1022
1022
|
}
|
|
1023
|
-
if (x.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1024
|
-
const u = s && o &&
|
|
1023
|
+
if (x.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && hn(t.url))) {
|
|
1024
|
+
const u = s && o && mn.read(o);
|
|
1025
1025
|
u && i.set(s, u);
|
|
1026
1026
|
}
|
|
1027
1027
|
return t;
|
|
1028
|
-
},
|
|
1028
|
+
}, En = typeof XMLHttpRequest < "u", bn = En && function(e) {
|
|
1029
1029
|
return new Promise(function(n, r) {
|
|
1030
1030
|
const s = Ke(e);
|
|
1031
1031
|
let o = s.data;
|
|
1032
1032
|
const i = g.from(s.headers).normalize();
|
|
1033
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l,
|
|
1033
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: u } = s, l, d, E, b, h;
|
|
1034
1034
|
function y() {
|
|
1035
|
-
|
|
1035
|
+
b && b(), h && h(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1036
1036
|
}
|
|
1037
|
-
let
|
|
1038
|
-
|
|
1037
|
+
let p = new XMLHttpRequest();
|
|
1038
|
+
p.open(s.method.toUpperCase(), s.url, !0), p.timeout = s.timeout;
|
|
1039
1039
|
function S() {
|
|
1040
|
-
if (!
|
|
1040
|
+
if (!p)
|
|
1041
1041
|
return;
|
|
1042
1042
|
const w = g.from(
|
|
1043
|
-
"getAllResponseHeaders" in
|
|
1043
|
+
"getAllResponseHeaders" in p && p.getAllResponseHeaders()
|
|
1044
1044
|
), _ = {
|
|
1045
|
-
data: !c || c === "text" || c === "json" ?
|
|
1046
|
-
status:
|
|
1047
|
-
statusText:
|
|
1045
|
+
data: !c || c === "text" || c === "json" ? p.responseText : p.response,
|
|
1046
|
+
status: p.status,
|
|
1047
|
+
statusText: p.statusText,
|
|
1048
1048
|
headers: w,
|
|
1049
1049
|
config: e,
|
|
1050
|
-
request:
|
|
1050
|
+
request: p
|
|
1051
1051
|
};
|
|
1052
|
-
|
|
1053
|
-
n(
|
|
1054
|
-
}, function(
|
|
1055
|
-
r(
|
|
1056
|
-
}, _),
|
|
1052
|
+
Ve(function(N) {
|
|
1053
|
+
n(N), y();
|
|
1054
|
+
}, function(N) {
|
|
1055
|
+
r(N), y();
|
|
1056
|
+
}, _), p = null;
|
|
1057
1057
|
}
|
|
1058
|
-
"onloadend" in
|
|
1059
|
-
!
|
|
1060
|
-
},
|
|
1061
|
-
|
|
1062
|
-
},
|
|
1063
|
-
r(new m("Network Error", m.ERR_NETWORK, e,
|
|
1064
|
-
},
|
|
1058
|
+
"onloadend" in p ? p.onloadend = S : p.onreadystatechange = function() {
|
|
1059
|
+
!p || p.readyState !== 4 || p.status === 0 && !(p.responseURL && p.responseURL.indexOf("file:") === 0) || setTimeout(S);
|
|
1060
|
+
}, p.onabort = function() {
|
|
1061
|
+
p && (r(new m("Request aborted", m.ECONNABORTED, e, p)), p = null);
|
|
1062
|
+
}, p.onerror = function() {
|
|
1063
|
+
r(new m("Network Error", m.ERR_NETWORK, e, p)), p = null;
|
|
1064
|
+
}, p.ontimeout = function() {
|
|
1065
1065
|
let A = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1066
1066
|
const _ = s.transitional || Je;
|
|
1067
1067
|
s.timeoutErrorMessage && (A = s.timeoutErrorMessage), r(new m(
|
|
1068
1068
|
A,
|
|
1069
1069
|
_.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
1070
1070
|
e,
|
|
1071
|
-
|
|
1072
|
-
)),
|
|
1073
|
-
}, o === void 0 && i.setContentType(null), "setRequestHeader" in
|
|
1074
|
-
|
|
1075
|
-
}), a.isUndefined(s.withCredentials) || (
|
|
1076
|
-
|
|
1071
|
+
p
|
|
1072
|
+
)), p = null;
|
|
1073
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in p && a.forEach(i.toJSON(), function(A, _) {
|
|
1074
|
+
p.setRequestHeader(_, A);
|
|
1075
|
+
}), a.isUndefined(s.withCredentials) || (p.withCredentials = !!s.withCredentials), c && c !== "json" && (p.responseType = s.responseType), u && ([E, h] = v(u, !0), p.addEventListener("progress", E)), f && p.upload && ([d, b] = v(f), p.upload.addEventListener("progress", d), p.upload.addEventListener("loadend", b)), (s.cancelToken || s.signal) && (l = (w) => {
|
|
1076
|
+
p && (r(!w || w.type ? new k(null, e, p) : w), p.abort(), p = null);
|
|
1077
1077
|
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1078
|
-
const O =
|
|
1078
|
+
const O = fn(s.url);
|
|
1079
1079
|
if (O && x.protocols.indexOf(O) === -1) {
|
|
1080
1080
|
r(new m("Unsupported protocol " + O + ":", m.ERR_BAD_REQUEST, e));
|
|
1081
1081
|
return;
|
|
1082
1082
|
}
|
|
1083
|
-
|
|
1083
|
+
p.send(o || null);
|
|
1084
1084
|
});
|
|
1085
|
-
},
|
|
1085
|
+
}, Rn = (e, t) => {
|
|
1086
1086
|
let n = new AbortController(), r;
|
|
1087
1087
|
const s = function(f) {
|
|
1088
1088
|
if (!r) {
|
|
@@ -1104,7 +1104,7 @@ const Ke = (e) => {
|
|
|
1104
1104
|
return c.unsubscribe = i, [c, () => {
|
|
1105
1105
|
o && clearTimeout(o), o = null;
|
|
1106
1106
|
}];
|
|
1107
|
-
},
|
|
1107
|
+
}, Sn = function* (e, t) {
|
|
1108
1108
|
let n = e.byteLength;
|
|
1109
1109
|
if (!t || n < t) {
|
|
1110
1110
|
yield e;
|
|
@@ -1113,28 +1113,28 @@ const Ke = (e) => {
|
|
|
1113
1113
|
let r = 0, s;
|
|
1114
1114
|
for (; r < n; )
|
|
1115
1115
|
s = r + t, yield e.slice(r, s), r = s;
|
|
1116
|
-
},
|
|
1116
|
+
}, gn = async function* (e, t, n) {
|
|
1117
1117
|
for await (const r of e)
|
|
1118
|
-
yield*
|
|
1118
|
+
yield* Sn(ArrayBuffer.isView(r) ? r : await n(String(r)), t);
|
|
1119
1119
|
}, Ae = (e, t, n, r, s) => {
|
|
1120
|
-
const o =
|
|
1120
|
+
const o = gn(e, t, s);
|
|
1121
1121
|
let i = 0, c, f = (u) => {
|
|
1122
1122
|
c || (c = !0, r && r(u));
|
|
1123
1123
|
};
|
|
1124
1124
|
return new ReadableStream({
|
|
1125
1125
|
async pull(u) {
|
|
1126
1126
|
try {
|
|
1127
|
-
const { done: l, value:
|
|
1127
|
+
const { done: l, value: d } = await o.next();
|
|
1128
1128
|
if (l) {
|
|
1129
1129
|
f(), u.close();
|
|
1130
1130
|
return;
|
|
1131
1131
|
}
|
|
1132
|
-
let
|
|
1132
|
+
let E = d.byteLength;
|
|
1133
1133
|
if (n) {
|
|
1134
|
-
let
|
|
1135
|
-
n(
|
|
1134
|
+
let b = i += E;
|
|
1135
|
+
n(b);
|
|
1136
1136
|
}
|
|
1137
|
-
u.enqueue(new Uint8Array(
|
|
1137
|
+
u.enqueue(new Uint8Array(d));
|
|
1138
1138
|
} catch (l) {
|
|
1139
1139
|
throw f(l), l;
|
|
1140
1140
|
}
|
|
@@ -1151,7 +1151,7 @@ const Ke = (e) => {
|
|
|
1151
1151
|
} catch {
|
|
1152
1152
|
return !1;
|
|
1153
1153
|
}
|
|
1154
|
-
},
|
|
1154
|
+
}, On = Ge && Xe(() => {
|
|
1155
1155
|
let e = !1;
|
|
1156
1156
|
const t = new Request(x.origin, {
|
|
1157
1157
|
body: new ReadableStream(),
|
|
@@ -1171,7 +1171,7 @@ X && ((e) => {
|
|
|
1171
1171
|
});
|
|
1172
1172
|
});
|
|
1173
1173
|
})(new Response());
|
|
1174
|
-
const
|
|
1174
|
+
const Tn = async (e) => {
|
|
1175
1175
|
if (e == null)
|
|
1176
1176
|
return 0;
|
|
1177
1177
|
if (a.isBlob(e))
|
|
@@ -1182,10 +1182,10 @@ const Sn = async (e) => {
|
|
|
1182
1182
|
return e.byteLength;
|
|
1183
1183
|
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1184
1184
|
return (await se(e)).byteLength;
|
|
1185
|
-
},
|
|
1185
|
+
}, An = async (e, t) => {
|
|
1186
1186
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1187
|
-
return n ??
|
|
1188
|
-
},
|
|
1187
|
+
return n ?? Tn(t);
|
|
1188
|
+
}, xn = X && (async (e) => {
|
|
1189
1189
|
let {
|
|
1190
1190
|
url: t,
|
|
1191
1191
|
method: n,
|
|
@@ -1197,83 +1197,83 @@ const Sn = async (e) => {
|
|
|
1197
1197
|
onUploadProgress: f,
|
|
1198
1198
|
responseType: u,
|
|
1199
1199
|
headers: l,
|
|
1200
|
-
withCredentials:
|
|
1201
|
-
fetchOptions:
|
|
1200
|
+
withCredentials: d = "same-origin",
|
|
1201
|
+
fetchOptions: E
|
|
1202
1202
|
} = Ke(e);
|
|
1203
1203
|
u = u ? (u + "").toLowerCase() : "text";
|
|
1204
|
-
let [
|
|
1204
|
+
let [b, h] = s || o || i ? Rn([s, o], i) : [], y, p;
|
|
1205
1205
|
const S = () => {
|
|
1206
1206
|
!y && setTimeout(() => {
|
|
1207
|
-
|
|
1207
|
+
b && b.unsubscribe();
|
|
1208
1208
|
}), y = !0;
|
|
1209
1209
|
};
|
|
1210
1210
|
let O;
|
|
1211
1211
|
try {
|
|
1212
|
-
if (f &&
|
|
1213
|
-
let
|
|
1212
|
+
if (f && On && n !== "get" && n !== "head" && (O = await An(l, r)) !== 0) {
|
|
1213
|
+
let C = new Request(t, {
|
|
1214
1214
|
method: "POST",
|
|
1215
1215
|
body: r,
|
|
1216
1216
|
duplex: "half"
|
|
1217
|
-
}),
|
|
1218
|
-
if (a.isFormData(r) && (
|
|
1217
|
+
}), N;
|
|
1218
|
+
if (a.isFormData(r) && (N = C.headers.get("content-type")) && l.setContentType(N), C.body) {
|
|
1219
1219
|
const [Q, M] = ge(
|
|
1220
1220
|
O,
|
|
1221
|
-
|
|
1221
|
+
v(Oe(f))
|
|
1222
1222
|
);
|
|
1223
|
-
r = Ae(
|
|
1223
|
+
r = Ae(C.body, xe, Q, M, se);
|
|
1224
1224
|
}
|
|
1225
1225
|
}
|
|
1226
|
-
a.isString(
|
|
1227
|
-
...
|
|
1228
|
-
signal:
|
|
1226
|
+
a.isString(d) || (d = d ? "include" : "omit"), p = new Request(t, {
|
|
1227
|
+
...E,
|
|
1228
|
+
signal: b,
|
|
1229
1229
|
method: n.toUpperCase(),
|
|
1230
1230
|
headers: l.normalize().toJSON(),
|
|
1231
1231
|
body: r,
|
|
1232
1232
|
duplex: "half",
|
|
1233
|
-
credentials:
|
|
1233
|
+
credentials: d
|
|
1234
1234
|
});
|
|
1235
|
-
let w = await fetch(
|
|
1235
|
+
let w = await fetch(p);
|
|
1236
1236
|
const A = oe && (u === "stream" || u === "response");
|
|
1237
1237
|
if (oe && (c || A)) {
|
|
1238
|
-
const
|
|
1238
|
+
const C = {};
|
|
1239
1239
|
["status", "statusText", "headers"].forEach((he) => {
|
|
1240
|
-
|
|
1240
|
+
C[he] = w[he];
|
|
1241
1241
|
});
|
|
1242
|
-
const
|
|
1243
|
-
|
|
1244
|
-
|
|
1242
|
+
const N = a.toFiniteNumber(w.headers.get("content-length")), [Q, M] = c && ge(
|
|
1243
|
+
N,
|
|
1244
|
+
v(Oe(c), !0)
|
|
1245
1245
|
) || [];
|
|
1246
1246
|
w = new Response(
|
|
1247
1247
|
Ae(w.body, xe, Q, () => {
|
|
1248
1248
|
M && M(), A && S();
|
|
1249
1249
|
}, se),
|
|
1250
|
-
|
|
1250
|
+
C
|
|
1251
1251
|
);
|
|
1252
1252
|
}
|
|
1253
1253
|
u = u || "text";
|
|
1254
1254
|
let _ = await $[a.findKey($, u) || "text"](w, e);
|
|
1255
|
-
return !A && S(), h && h(), await new Promise((
|
|
1256
|
-
|
|
1255
|
+
return !A && S(), h && h(), await new Promise((C, N) => {
|
|
1256
|
+
Ve(C, N, {
|
|
1257
1257
|
data: _,
|
|
1258
1258
|
headers: g.from(w.headers),
|
|
1259
1259
|
status: w.status,
|
|
1260
1260
|
statusText: w.statusText,
|
|
1261
1261
|
config: e,
|
|
1262
|
-
request:
|
|
1262
|
+
request: p
|
|
1263
1263
|
});
|
|
1264
1264
|
});
|
|
1265
1265
|
} catch (w) {
|
|
1266
1266
|
throw S(), w && w.name === "TypeError" && /fetch/i.test(w.message) ? Object.assign(
|
|
1267
|
-
new m("Network Error", m.ERR_NETWORK, e,
|
|
1267
|
+
new m("Network Error", m.ERR_NETWORK, e, p),
|
|
1268
1268
|
{
|
|
1269
1269
|
cause: w.cause || w
|
|
1270
1270
|
}
|
|
1271
|
-
) : m.from(w, w && w.code, e,
|
|
1271
|
+
) : m.from(w, w && w.code, e, p);
|
|
1272
1272
|
}
|
|
1273
1273
|
}), ie = {
|
|
1274
|
-
http:
|
|
1275
|
-
xhr:
|
|
1276
|
-
fetch:
|
|
1274
|
+
http: zt,
|
|
1275
|
+
xhr: bn,
|
|
1276
|
+
fetch: xn
|
|
1277
1277
|
};
|
|
1278
1278
|
a.forEach(ie, (e, t) => {
|
|
1279
1279
|
if (e) {
|
|
@@ -1284,7 +1284,7 @@ a.forEach(ie, (e, t) => {
|
|
|
1284
1284
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1285
1285
|
}
|
|
1286
1286
|
});
|
|
1287
|
-
const
|
|
1287
|
+
const Pe = (e) => `- ${e}`, Pn = (e) => a.isFunction(e) || e === null || e === !1, Qe = {
|
|
1288
1288
|
getAdapter: (e) => {
|
|
1289
1289
|
e = a.isArray(e) ? e : [e];
|
|
1290
1290
|
const { length: t } = e;
|
|
@@ -1293,7 +1293,7 @@ const Ce = (e) => `- ${e}`, Tn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1293
1293
|
for (let o = 0; o < t; o++) {
|
|
1294
1294
|
n = e[o];
|
|
1295
1295
|
let i;
|
|
1296
|
-
if (r = n, !
|
|
1296
|
+
if (r = n, !Pn(n) && (r = ie[(i = String(n)).toLowerCase()], r === void 0))
|
|
1297
1297
|
throw new m(`Unknown adapter '${i}'`);
|
|
1298
1298
|
if (r)
|
|
1299
1299
|
break;
|
|
@@ -1304,8 +1304,8 @@ const Ce = (e) => `- ${e}`, Tn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1304
1304
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1305
1305
|
);
|
|
1306
1306
|
let i = t ? o.length > 1 ? `since :
|
|
1307
|
-
` + o.map(
|
|
1308
|
-
`) : " " +
|
|
1307
|
+
` + o.map(Pe).join(`
|
|
1308
|
+
`) : " " + Pe(o[0]) : "as no adapter specified";
|
|
1309
1309
|
throw new m(
|
|
1310
1310
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1311
1311
|
"ERR_NOT_SUPPORT"
|
|
@@ -1319,7 +1319,7 @@ function te(e) {
|
|
|
1319
1319
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1320
1320
|
throw new k(null, e);
|
|
1321
1321
|
}
|
|
1322
|
-
function
|
|
1322
|
+
function Ce(e) {
|
|
1323
1323
|
return te(e), e.headers = g.from(e.headers), e.data = ee.call(
|
|
1324
1324
|
e,
|
|
1325
1325
|
e.transformRequest
|
|
@@ -1343,7 +1343,7 @@ const Ze = "1.7.4", de = {};
|
|
|
1343
1343
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1344
1344
|
};
|
|
1345
1345
|
});
|
|
1346
|
-
const
|
|
1346
|
+
const Ne = {};
|
|
1347
1347
|
de.transitional = function(t, n, r) {
|
|
1348
1348
|
function s(o, i) {
|
|
1349
1349
|
return "[Axios v" + Ze + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
@@ -1354,7 +1354,7 @@ de.transitional = function(t, n, r) {
|
|
|
1354
1354
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1355
1355
|
m.ERR_DEPRECATED
|
|
1356
1356
|
);
|
|
1357
|
-
return n && !
|
|
1357
|
+
return n && !Ne[i] && (Ne[i] = !0, console.warn(
|
|
1358
1358
|
s(
|
|
1359
1359
|
i,
|
|
1360
1360
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1362,7 +1362,7 @@ de.transitional = function(t, n, r) {
|
|
|
1362
1362
|
)), t ? t(o, i, c) : !0;
|
|
1363
1363
|
};
|
|
1364
1364
|
};
|
|
1365
|
-
function
|
|
1365
|
+
function Cn(e, t, n) {
|
|
1366
1366
|
if (typeof e != "object")
|
|
1367
1367
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1368
1368
|
const r = Object.keys(e);
|
|
@@ -1380,10 +1380,10 @@ function An(e, t, n) {
|
|
|
1380
1380
|
}
|
|
1381
1381
|
}
|
|
1382
1382
|
const ae = {
|
|
1383
|
-
assertOptions:
|
|
1383
|
+
assertOptions: Cn,
|
|
1384
1384
|
validators: de
|
|
1385
1385
|
}, F = ae.validators;
|
|
1386
|
-
class
|
|
1386
|
+
class U {
|
|
1387
1387
|
constructor(t) {
|
|
1388
1388
|
this.defaults = t, this.interceptors = {
|
|
1389
1389
|
request: new Re(),
|
|
@@ -1447,31 +1447,31 @@ class D {
|
|
|
1447
1447
|
this.interceptors.response.forEach(function(y) {
|
|
1448
1448
|
u.push(y.fulfilled, y.rejected);
|
|
1449
1449
|
});
|
|
1450
|
-
let l,
|
|
1450
|
+
let l, d = 0, E;
|
|
1451
1451
|
if (!f) {
|
|
1452
|
-
const h = [
|
|
1453
|
-
for (h.unshift.apply(h, c), h.push.apply(h, u),
|
|
1454
|
-
l = l.then(h[
|
|
1452
|
+
const h = [Ce.bind(this), void 0];
|
|
1453
|
+
for (h.unshift.apply(h, c), h.push.apply(h, u), E = h.length, l = Promise.resolve(n); d < E; )
|
|
1454
|
+
l = l.then(h[d++], h[d++]);
|
|
1455
1455
|
return l;
|
|
1456
1456
|
}
|
|
1457
|
-
|
|
1458
|
-
let
|
|
1459
|
-
for (
|
|
1460
|
-
const h = c[
|
|
1457
|
+
E = c.length;
|
|
1458
|
+
let b = n;
|
|
1459
|
+
for (d = 0; d < E; ) {
|
|
1460
|
+
const h = c[d++], y = c[d++];
|
|
1461
1461
|
try {
|
|
1462
|
-
|
|
1463
|
-
} catch (
|
|
1464
|
-
y.call(this,
|
|
1462
|
+
b = h(b);
|
|
1463
|
+
} catch (p) {
|
|
1464
|
+
y.call(this, p);
|
|
1465
1465
|
break;
|
|
1466
1466
|
}
|
|
1467
1467
|
}
|
|
1468
1468
|
try {
|
|
1469
|
-
l =
|
|
1469
|
+
l = Ce.call(this, b);
|
|
1470
1470
|
} catch (h) {
|
|
1471
1471
|
return Promise.reject(h);
|
|
1472
1472
|
}
|
|
1473
|
-
for (
|
|
1474
|
-
l = l.then(u[
|
|
1473
|
+
for (d = 0, E = u.length; d < E; )
|
|
1474
|
+
l = l.then(u[d++], u[d++]);
|
|
1475
1475
|
return l;
|
|
1476
1476
|
}
|
|
1477
1477
|
getUri(t) {
|
|
@@ -1481,7 +1481,7 @@ class D {
|
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1484
|
-
|
|
1484
|
+
U.prototype[t] = function(n, r) {
|
|
1485
1485
|
return this.request(B(r || {}, {
|
|
1486
1486
|
method: t,
|
|
1487
1487
|
url: n,
|
|
@@ -1502,7 +1502,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1502
1502
|
}));
|
|
1503
1503
|
};
|
|
1504
1504
|
}
|
|
1505
|
-
|
|
1505
|
+
U.prototype[t] = n(), U.prototype[t + "Form"] = n(!0);
|
|
1506
1506
|
});
|
|
1507
1507
|
class pe {
|
|
1508
1508
|
constructor(t) {
|
|
@@ -1571,12 +1571,12 @@ class pe {
|
|
|
1571
1571
|
};
|
|
1572
1572
|
}
|
|
1573
1573
|
}
|
|
1574
|
-
function
|
|
1574
|
+
function Nn(e) {
|
|
1575
1575
|
return function(n) {
|
|
1576
1576
|
return e.apply(null, n);
|
|
1577
1577
|
};
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function Fn(e) {
|
|
1580
1580
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1581
1581
|
}
|
|
1582
1582
|
const ce = {
|
|
@@ -1648,13 +1648,13 @@ Object.entries(ce).forEach(([e, t]) => {
|
|
|
1648
1648
|
ce[t] = e;
|
|
1649
1649
|
});
|
|
1650
1650
|
function Ye(e) {
|
|
1651
|
-
const t = new
|
|
1652
|
-
return a.extend(n,
|
|
1651
|
+
const t = new U(e), n = Fe(U.prototype.request, t);
|
|
1652
|
+
return a.extend(n, U.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1653
1653
|
return Ye(B(e, s));
|
|
1654
1654
|
}, n;
|
|
1655
1655
|
}
|
|
1656
1656
|
const R = Ye(I);
|
|
1657
|
-
R.Axios =
|
|
1657
|
+
R.Axios = U;
|
|
1658
1658
|
R.CanceledError = k;
|
|
1659
1659
|
R.CancelToken = pe;
|
|
1660
1660
|
R.isCancel = $e;
|
|
@@ -1665,50 +1665,75 @@ R.Cancel = R.CanceledError;
|
|
|
1665
1665
|
R.all = function(t) {
|
|
1666
1666
|
return Promise.all(t);
|
|
1667
1667
|
};
|
|
1668
|
-
R.spread =
|
|
1669
|
-
R.isAxiosError =
|
|
1668
|
+
R.spread = Nn;
|
|
1669
|
+
R.isAxiosError = Fn;
|
|
1670
1670
|
R.mergeConfig = B;
|
|
1671
1671
|
R.AxiosHeaders = g;
|
|
1672
|
-
R.formToJSON = (e) =>
|
|
1672
|
+
R.formToJSON = (e) => ve(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1673
1673
|
R.getAdapter = Qe.getAdapter;
|
|
1674
1674
|
R.HttpStatusCode = ce;
|
|
1675
1675
|
R.default = R;
|
|
1676
|
-
const
|
|
1677
|
-
let
|
|
1678
|
-
const
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1676
|
+
const Ln = (e, ...t) => {
|
|
1677
|
+
let n = {};
|
|
1678
|
+
const r = et(!1), s = me("streamlineUrl"), o = me("streamlineHeaders"), i = R.create({
|
|
1679
|
+
headers: {
|
|
1680
|
+
...o
|
|
1681
|
+
}
|
|
1682
|
+
}), c = tt({}), f = async () => {
|
|
1683
|
+
try {
|
|
1684
|
+
r.value = !0;
|
|
1685
|
+
const d = await i.post(s, {
|
|
1686
|
+
action: "onMounted",
|
|
1687
|
+
stream: e,
|
|
1688
|
+
params: t
|
|
1689
|
+
});
|
|
1690
|
+
u(d.data);
|
|
1691
|
+
} catch (d) {
|
|
1692
|
+
throw console.error(`Error fetching properties for stream ${e}`, d), d;
|
|
1693
|
+
} finally {
|
|
1694
|
+
r.value = !1;
|
|
1695
|
+
}
|
|
1696
|
+
}, u = (d) => {
|
|
1697
|
+
Object.assign(c, d.properties);
|
|
1698
|
+
for (const E of d.methods) {
|
|
1699
|
+
const b = async (...h) => {
|
|
1700
|
+
r.value = !0;
|
|
1701
|
+
try {
|
|
1702
|
+
return (await i.post(s, {
|
|
1703
|
+
action: E,
|
|
1704
|
+
stream: e,
|
|
1705
|
+
...n,
|
|
1706
|
+
params: h
|
|
1707
|
+
})).data;
|
|
1708
|
+
} catch (y) {
|
|
1709
|
+
throw console.error(`Error calling ${E} on stream ${e}`, y), y;
|
|
1710
|
+
} finally {
|
|
1711
|
+
r.value = !1;
|
|
1712
|
+
}
|
|
1700
1713
|
};
|
|
1714
|
+
c[E] = b;
|
|
1701
1715
|
}
|
|
1702
|
-
})
|
|
1703
|
-
|
|
1704
|
-
|
|
1716
|
+
}, l = (d, ...E) => {
|
|
1717
|
+
const b = {
|
|
1718
|
+
action: d,
|
|
1719
|
+
stream: e,
|
|
1720
|
+
params: E
|
|
1721
|
+
};
|
|
1722
|
+
return s + "?" + new URLSearchParams(b).toString();
|
|
1723
|
+
};
|
|
1724
|
+
return nt(() => {
|
|
1725
|
+
f();
|
|
1726
|
+
}), {
|
|
1727
|
+
loading: r,
|
|
1728
|
+
service: c,
|
|
1729
|
+
getActionUrl: l
|
|
1705
1730
|
};
|
|
1706
|
-
},
|
|
1731
|
+
}, Un = {
|
|
1707
1732
|
install(e, t) {
|
|
1708
1733
|
e.provide("streamlineUrl", t.streamlineUrl), e.provide("streamlineHeaders", t.streamlineHeaders);
|
|
1709
1734
|
}
|
|
1710
1735
|
};
|
|
1711
1736
|
export {
|
|
1712
|
-
|
|
1713
|
-
|
|
1737
|
+
Un as streamline,
|
|
1738
|
+
Ln as useStreamline
|
|
1714
1739
|
};
|