@flyfish-group/file-viewer 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/components/ImageViewer.js +841 -584
- package/dist/components/MarkdownViewer.js +432 -413
- package/dist/components/PdfView.js +6641 -6474
- package/dist/components/PptxRender.js +1800 -1787
- package/dist/components/XlsxTable.js +25698 -20699
- package/dist/components/_commonjsHelpers.js +1 -1
- package/dist/components/docx-preview.js +5622 -0
- package/dist/components/index.js +736 -646
- package/dist/components/worker-ref.js +8 -8
- package/dist/index.umd.js +144 -209
- package/dist/style.css +10 -10
- package/dist/worker/pdf.worker.js +31 -31
- package/dist/worker/pptx.worker.js +7 -7
- package/dist/worker/sheet.worker.js +24 -24
- package/dist/worker/xlsx.worker.js +17 -17
- package/package.json +10 -10
- package/dist/components/docx-preview.min.js +0 -5354
package/dist/components/index.js
CHANGED
|
@@ -1,106 +1,153 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
var Ye = Object.defineProperty;
|
|
2
|
+
var fe = Object.getOwnPropertySymbols;
|
|
3
|
+
var et = Object.prototype.hasOwnProperty, tt = Object.prototype.propertyIsEnumerable;
|
|
4
|
+
var K = (e, t, n) => t in e ? Ye(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, X = (e, t) => {
|
|
5
|
+
for (var n in t || (t = {}))
|
|
6
|
+
et.call(t, n) && K(e, n, t[n]);
|
|
7
|
+
if (fe)
|
|
8
|
+
for (var n of fe(t))
|
|
9
|
+
tt.call(t, n) && K(e, n, t[n]);
|
|
10
|
+
return e;
|
|
11
|
+
};
|
|
12
|
+
var de = (e, t, n) => (K(e, typeof t != "symbol" ? t + "" : t, n), n);
|
|
13
|
+
var b = (e, t, n) => new Promise((r, s) => {
|
|
14
|
+
var o = (u) => {
|
|
15
|
+
try {
|
|
16
|
+
l(n.next(u));
|
|
17
|
+
} catch (f) {
|
|
18
|
+
s(f);
|
|
19
|
+
}
|
|
20
|
+
}, i = (u) => {
|
|
21
|
+
try {
|
|
22
|
+
l(n.throw(u));
|
|
23
|
+
} catch (f) {
|
|
24
|
+
s(f);
|
|
25
|
+
}
|
|
26
|
+
}, l = (u) => u.done ? r(u.value) : Promise.resolve(u.value).then(o, i);
|
|
27
|
+
l((n = n.apply(e, t)).next());
|
|
28
|
+
});
|
|
29
|
+
import N, { defineAsyncComponent as v, defineComponent as Te, ref as L, onMounted as nt, watch as pe } from "vue";
|
|
30
|
+
const rt = (() => {
|
|
6
31
|
const e = {
|
|
7
32
|
module: null,
|
|
8
|
-
|
|
9
|
-
return this
|
|
33
|
+
load() {
|
|
34
|
+
return b(this, null, function* () {
|
|
35
|
+
return this.module || (this.module = import("./docx-preview.js")), this.module;
|
|
36
|
+
});
|
|
10
37
|
}
|
|
11
38
|
};
|
|
12
|
-
return
|
|
39
|
+
return () => b(void 0, null, function* () {
|
|
40
|
+
return yield e.load();
|
|
41
|
+
});
|
|
13
42
|
})();
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
43
|
+
function st(e, t) {
|
|
44
|
+
return b(this, null, function* () {
|
|
45
|
+
const { defaultOptions: n, renderAsync: r } = yield rt(), s = Object.assign(n, {
|
|
46
|
+
debug: !0,
|
|
47
|
+
experimental: !0
|
|
48
|
+
});
|
|
49
|
+
yield r(e, t, void 0, s);
|
|
18
50
|
});
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
}
|
|
31
|
-
const nt = U(() => import("./XlsxTable.js"));
|
|
32
|
-
async function ue(e, t, n) {
|
|
33
|
-
return new P({
|
|
34
|
-
render: (r) => r(nt, {
|
|
35
|
-
props: {
|
|
36
|
-
data: e,
|
|
37
|
-
type: n
|
|
38
|
-
}
|
|
39
|
-
})
|
|
40
|
-
}).$mount(t);
|
|
41
|
-
}
|
|
42
|
-
const rt = U(() => import("./PdfView.js"));
|
|
43
|
-
async function st(e, t) {
|
|
44
|
-
return new P({
|
|
45
|
-
render: (n) => n(rt, {
|
|
46
|
-
props: {
|
|
47
|
-
data: e
|
|
48
|
-
}
|
|
49
|
-
})
|
|
50
|
-
}).$mount(t);
|
|
51
|
-
}
|
|
52
|
-
async function ot(e) {
|
|
53
|
-
return new Promise((t, n) => {
|
|
54
|
-
const r = new FileReader();
|
|
55
|
-
r.onload = (s) => {
|
|
56
|
-
var o;
|
|
57
|
-
return t((o = s.target) == null ? void 0 : o.result);
|
|
58
|
-
}, r.onerror = (s) => n(s), r.readAsArrayBuffer(e);
|
|
51
|
+
}
|
|
52
|
+
const ot = v(() => import("./PptxRender.js"));
|
|
53
|
+
function it(e, t) {
|
|
54
|
+
return b(this, null, function* () {
|
|
55
|
+
return new N({
|
|
56
|
+
render: (n) => n(ot, {
|
|
57
|
+
props: {
|
|
58
|
+
data: e
|
|
59
|
+
}
|
|
60
|
+
})
|
|
61
|
+
}).$mount(t);
|
|
59
62
|
});
|
|
60
63
|
}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
64
|
+
const at = v(() => import("./XlsxTable.js"));
|
|
65
|
+
function he(e, t, n) {
|
|
66
|
+
return b(this, null, function* () {
|
|
67
|
+
return new N({
|
|
68
|
+
render: (r) => r(at, {
|
|
69
|
+
props: {
|
|
70
|
+
data: e,
|
|
71
|
+
type: n
|
|
72
|
+
}
|
|
73
|
+
})
|
|
74
|
+
}).$mount(t);
|
|
69
75
|
});
|
|
70
76
|
}
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
77
|
+
const ct = v(() => import("./PdfView.js"));
|
|
78
|
+
function lt(e, t) {
|
|
79
|
+
return b(this, null, function* () {
|
|
80
|
+
return new N({
|
|
81
|
+
render: (n) => n(ct, {
|
|
82
|
+
props: {
|
|
83
|
+
data: e
|
|
84
|
+
}
|
|
85
|
+
})
|
|
86
|
+
}).$mount(t);
|
|
79
87
|
});
|
|
80
88
|
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
}
|
|
89
|
-
})
|
|
90
|
-
})
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
89
|
+
function ut(e) {
|
|
90
|
+
return b(this, null, function* () {
|
|
91
|
+
return new Promise((t, n) => {
|
|
92
|
+
const r = new FileReader();
|
|
93
|
+
r.onload = (s) => {
|
|
94
|
+
var o;
|
|
95
|
+
return t((o = s.target) == null ? void 0 : o.result);
|
|
96
|
+
}, r.onerror = (s) => n(s), r.readAsArrayBuffer(e);
|
|
97
|
+
});
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
function ft(e) {
|
|
101
|
+
return b(this, null, function* () {
|
|
102
|
+
return new Promise((t, n) => {
|
|
103
|
+
const r = new FileReader();
|
|
104
|
+
r.onload = (s) => {
|
|
105
|
+
var i;
|
|
106
|
+
const o = (i = s.target) == null ? void 0 : i.result;
|
|
107
|
+
typeof o == "string" && t(o);
|
|
108
|
+
}, r.onerror = (s) => n(s), r.readAsDataURL(new Blob([e]));
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
function Ce(e) {
|
|
113
|
+
return b(this, null, function* () {
|
|
114
|
+
return new Promise((t, n) => {
|
|
115
|
+
const r = new FileReader();
|
|
116
|
+
r.onload = (s) => {
|
|
117
|
+
var i;
|
|
118
|
+
const o = (i = s.target) == null ? void 0 : i.result;
|
|
119
|
+
typeof o == "string" && t(o);
|
|
120
|
+
}, r.onerror = (s) => n(s), r.readAsText(new Blob([e]), "utf-8");
|
|
121
|
+
});
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
const dt = v(() => import("./ImageViewer.js"));
|
|
125
|
+
function pt(e, t) {
|
|
126
|
+
return b(this, null, function* () {
|
|
127
|
+
const n = yield ft(e);
|
|
128
|
+
return new N({
|
|
129
|
+
render: (r) => r(dt, {
|
|
130
|
+
props: {
|
|
131
|
+
image: n
|
|
132
|
+
}
|
|
133
|
+
})
|
|
134
|
+
}).$mount(t);
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
const ht = v(() => import("./MarkdownViewer.js"));
|
|
138
|
+
function mt(e, t) {
|
|
139
|
+
return b(this, null, function* () {
|
|
140
|
+
const n = yield Ce(e);
|
|
141
|
+
return new N({
|
|
142
|
+
render: (r) => r(ht, {
|
|
143
|
+
props: {
|
|
144
|
+
data: n
|
|
145
|
+
}
|
|
146
|
+
})
|
|
147
|
+
}).$mount(t);
|
|
148
|
+
});
|
|
102
149
|
}
|
|
103
|
-
const
|
|
150
|
+
const yt = /* @__PURE__ */ Te({
|
|
104
151
|
__name: "CodeViewer",
|
|
105
152
|
props: {
|
|
106
153
|
value: null
|
|
@@ -109,165 +156,189 @@ const ft = /* @__PURE__ */ ge({
|
|
|
109
156
|
return { __sfc: !0 };
|
|
110
157
|
}
|
|
111
158
|
});
|
|
112
|
-
function
|
|
113
|
-
var
|
|
114
|
-
t && (
|
|
115
|
-
var
|
|
116
|
-
if (i ? (
|
|
159
|
+
function Pe(e, t, n, r, s, o, i, l) {
|
|
160
|
+
var u = typeof e == "function" ? e.options : e;
|
|
161
|
+
t && (u.render = t, u.staticRenderFns = n, u._compiled = !0), r && (u.functional = !0), o && (u._scopeId = "data-v-" + o);
|
|
162
|
+
var f;
|
|
163
|
+
if (i ? (f = function(m) {
|
|
117
164
|
m = m || // cached call
|
|
118
165
|
this.$vnode && this.$vnode.ssrContext || // stateful
|
|
119
|
-
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !m && typeof __VUE_SSR_CONTEXT__
|
|
120
|
-
},
|
|
166
|
+
this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext, !m && typeof __VUE_SSR_CONTEXT__ != "undefined" && (m = __VUE_SSR_CONTEXT__), s && s.call(this, m), m && m._registeredComponents && m._registeredComponents.add(i);
|
|
167
|
+
}, u._ssrRegister = f) : s && (f = l ? function() {
|
|
121
168
|
s.call(
|
|
122
169
|
this,
|
|
123
|
-
(
|
|
170
|
+
(u.functional ? this.parent : this).$root.$options.shadowRoot
|
|
124
171
|
);
|
|
125
|
-
} : s),
|
|
126
|
-
if (
|
|
127
|
-
|
|
128
|
-
var
|
|
129
|
-
|
|
130
|
-
return
|
|
172
|
+
} : s), f)
|
|
173
|
+
if (u.functional) {
|
|
174
|
+
u._injectStyles = f;
|
|
175
|
+
var d = u.render;
|
|
176
|
+
u.render = function(w, p) {
|
|
177
|
+
return f.call(p), d(w, p);
|
|
131
178
|
};
|
|
132
179
|
} else {
|
|
133
|
-
var c =
|
|
134
|
-
|
|
180
|
+
var c = u.beforeCreate;
|
|
181
|
+
u.beforeCreate = c ? [].concat(c, f) : [f];
|
|
135
182
|
}
|
|
136
183
|
return {
|
|
137
184
|
exports: e,
|
|
138
|
-
options:
|
|
185
|
+
options: u
|
|
139
186
|
};
|
|
140
187
|
}
|
|
141
|
-
var
|
|
188
|
+
var wt = function() {
|
|
142
189
|
var t = this, n = t._self._c;
|
|
143
190
|
return t._self._setupProxy, n("pre", { staticClass: "code-area" }, [t._v(" " + t._s(t.value) + `
|
|
144
191
|
`)]);
|
|
145
|
-
},
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
192
|
+
}, bt = [], Et = /* @__PURE__ */ Pe(
|
|
193
|
+
yt,
|
|
194
|
+
wt,
|
|
195
|
+
bt,
|
|
149
196
|
!1,
|
|
150
197
|
null,
|
|
151
198
|
"3be501eb",
|
|
152
199
|
null,
|
|
153
200
|
null
|
|
154
201
|
);
|
|
155
|
-
const
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
202
|
+
const _t = Et.exports;
|
|
203
|
+
function Rt(e, t) {
|
|
204
|
+
return b(this, null, function* () {
|
|
205
|
+
const n = yield Ce(e);
|
|
206
|
+
return new N({
|
|
207
|
+
render: (r) => r(_t, {
|
|
208
|
+
props: {
|
|
209
|
+
value: n
|
|
210
|
+
}
|
|
211
|
+
})
|
|
212
|
+
}).$mount(t);
|
|
213
|
+
});
|
|
165
214
|
}
|
|
166
|
-
function
|
|
215
|
+
function St(e, t) {
|
|
167
216
|
const n = document.createElement("video");
|
|
168
217
|
n.width = 840, n.height = 480, n.controls = !0;
|
|
169
218
|
const r = document.createElement("source");
|
|
170
219
|
r.src = URL.createObjectURL(new Blob([e])), n.appendChild(r), t.appendChild(n);
|
|
171
220
|
}
|
|
172
|
-
const
|
|
221
|
+
const k = (e) => ({
|
|
173
222
|
$el: e,
|
|
174
223
|
$destroy() {
|
|
175
224
|
}
|
|
176
|
-
}),
|
|
225
|
+
}), gt = [
|
|
177
226
|
// 使用docxjs支持,目前效果最好的渲染器
|
|
178
227
|
{
|
|
179
228
|
accepts: ["docx"],
|
|
180
|
-
handler:
|
|
229
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
230
|
+
return yield st(e, t), window.dispatchEvent(new Event("resize")), k(t);
|
|
231
|
+
})
|
|
181
232
|
},
|
|
182
233
|
// 使用pptx2html,已通过默认值更替
|
|
183
234
|
{
|
|
184
235
|
accepts: ["pptx"],
|
|
185
|
-
handler:
|
|
236
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
237
|
+
return yield it(e, t), window.dispatchEvent(new Event("resize")), k(t);
|
|
238
|
+
})
|
|
186
239
|
},
|
|
187
240
|
// 使用exceljs + handsontable,全部样式
|
|
188
241
|
{
|
|
189
242
|
accepts: ["xlsx"],
|
|
190
|
-
handler:
|
|
243
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
244
|
+
return he(e, t, "xml");
|
|
245
|
+
})
|
|
191
246
|
},
|
|
192
247
|
// 使用js-xlsx + handsontable,无样式
|
|
193
248
|
{
|
|
194
249
|
accepts: ["xlsm", "xlsb", "xls", "csv", "ods", "fods", "numbers"],
|
|
195
|
-
handler:
|
|
250
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
251
|
+
return he(e, t, "binary");
|
|
252
|
+
})
|
|
196
253
|
},
|
|
197
254
|
// 使用pdfjs,渲染pdf,效果最好
|
|
198
255
|
{
|
|
199
256
|
accepts: ["pdf"],
|
|
200
|
-
handler:
|
|
257
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
258
|
+
return lt(e, t);
|
|
259
|
+
})
|
|
201
260
|
},
|
|
202
261
|
// 图片过滤器
|
|
203
262
|
{
|
|
204
263
|
accepts: ["gif", "jpg", "jpeg", "bmp", "tiff", "tif", "png", "svg"],
|
|
205
|
-
handler:
|
|
264
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
265
|
+
return pt(e, t);
|
|
266
|
+
})
|
|
206
267
|
},
|
|
207
268
|
{
|
|
208
269
|
accepts: ["md", "markdown"],
|
|
209
|
-
handler:
|
|
270
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
271
|
+
return mt(e, t);
|
|
272
|
+
})
|
|
210
273
|
},
|
|
211
274
|
// 纯文本预览
|
|
212
275
|
{
|
|
213
276
|
accepts: ["txt", "json", "js", "css", "java", "py", "html", "jsx", "ts", "tsx", "xml", "log"],
|
|
214
|
-
handler:
|
|
277
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
278
|
+
return Rt(e, t);
|
|
279
|
+
})
|
|
215
280
|
},
|
|
216
281
|
// 视频预览,仅支持MP4
|
|
217
282
|
{
|
|
218
283
|
accepts: ["mp4"],
|
|
219
|
-
handler:
|
|
284
|
+
handler: (e, t) => b(void 0, null, function* () {
|
|
285
|
+
return St(e, t), k(t);
|
|
286
|
+
})
|
|
220
287
|
},
|
|
221
288
|
// 错误处理
|
|
222
289
|
{
|
|
223
290
|
accepts: ["error"],
|
|
224
|
-
handler:
|
|
225
|
-
|
|
291
|
+
handler: (e, t, n) => b(void 0, null, function* () {
|
|
292
|
+
return t.innerHTML = `<div style='text-align: center; margin-top: 80px'>不支持.${n}格式的在线预览,请下载后预览或转换为支持的格式</div>
|
|
293
|
+
<div style='text-align: center'>支持docx, xlsx, pptx, pdf, 以及纯文本格式和各种图片格式的在线预览</div>`, k(t);
|
|
294
|
+
})
|
|
226
295
|
}
|
|
227
|
-
],
|
|
228
|
-
function
|
|
296
|
+
], Ne = gt.reduce((e, { accepts: t, handler: n }) => (t.forEach((r) => e.set(r, n)), e), /* @__PURE__ */ new Map()), me = Ne.get("error");
|
|
297
|
+
function Ot(e) {
|
|
229
298
|
const t = e.lastIndexOf(".");
|
|
230
299
|
return e.substring(t + 1);
|
|
231
300
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
301
|
+
function At(e, t, n) {
|
|
302
|
+
return b(this, null, function* () {
|
|
303
|
+
const r = Ne.get(t.toLowerCase());
|
|
304
|
+
if (r)
|
|
305
|
+
return r(e, n);
|
|
306
|
+
if (me)
|
|
307
|
+
return me(e, n, t);
|
|
308
|
+
});
|
|
238
309
|
}
|
|
239
|
-
function
|
|
310
|
+
function Fe(e, t) {
|
|
240
311
|
return function() {
|
|
241
312
|
return e.apply(t, arguments);
|
|
242
313
|
};
|
|
243
314
|
}
|
|
244
|
-
const { toString:
|
|
245
|
-
const n =
|
|
315
|
+
const { toString: xt } = Object.prototype, { getPrototypeOf: oe } = Object, q = ((e) => (t) => {
|
|
316
|
+
const n = xt.call(t);
|
|
246
317
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
247
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
248
|
-
function
|
|
249
|
-
return e !== null && !
|
|
318
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => q(t) === e), z = (e) => (t) => typeof t === e, { isArray: F } = Array, U = z("undefined");
|
|
319
|
+
function Tt(e) {
|
|
320
|
+
return e !== null && !U(e) && e.constructor !== null && !U(e.constructor) && S(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
250
321
|
}
|
|
251
|
-
const
|
|
252
|
-
function
|
|
322
|
+
const Le = x("ArrayBuffer");
|
|
323
|
+
function Ct(e) {
|
|
253
324
|
let t;
|
|
254
|
-
return typeof ArrayBuffer
|
|
325
|
+
return typeof ArrayBuffer != "undefined" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Le(e.buffer), t;
|
|
255
326
|
}
|
|
256
|
-
const
|
|
257
|
-
if (
|
|
327
|
+
const Pt = z("string"), S = z("function"), Be = z("number"), V = (e) => e !== null && typeof e == "object", Nt = (e) => e === !0 || e === !1, I = (e) => {
|
|
328
|
+
if (q(e) !== "object")
|
|
258
329
|
return !1;
|
|
259
|
-
const t =
|
|
330
|
+
const t = oe(e);
|
|
260
331
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
261
|
-
},
|
|
332
|
+
}, Ft = x("Date"), Lt = x("File"), Bt = x("Blob"), Ut = x("FileList"), vt = (e) => V(e) && S(e.pipe), Dt = (e) => {
|
|
262
333
|
let t;
|
|
263
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
264
|
-
t === "object" &&
|
|
265
|
-
},
|
|
266
|
-
function
|
|
267
|
-
if (e === null || typeof e
|
|
334
|
+
return e && (typeof FormData == "function" && e instanceof FormData || S(e.append) && ((t = q(e)) === "formdata" || // detect form-data instance
|
|
335
|
+
t === "object" && S(e.toString) && e.toString() === "[object FormData]"));
|
|
336
|
+
}, jt = x("URLSearchParams"), kt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
337
|
+
function D(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
338
|
+
if (e === null || typeof e == "undefined")
|
|
268
339
|
return;
|
|
269
340
|
let r, s;
|
|
270
|
-
if (typeof e != "object" && (e = [e]),
|
|
341
|
+
if (typeof e != "object" && (e = [e]), F(e))
|
|
271
342
|
for (r = 0, s = e.length; r < s; r++)
|
|
272
343
|
t.call(null, e[r], r, e);
|
|
273
344
|
else {
|
|
@@ -277,7 +348,7 @@ function v(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
277
348
|
l = o[r], t.call(null, e[l], l, e);
|
|
278
349
|
}
|
|
279
350
|
}
|
|
280
|
-
function
|
|
351
|
+
function Ue(e, t) {
|
|
281
352
|
t = t.toLowerCase();
|
|
282
353
|
const n = Object.keys(e);
|
|
283
354
|
let r = n.length, s;
|
|
@@ -286,23 +357,23 @@ function Ne(e, t) {
|
|
|
286
357
|
return s;
|
|
287
358
|
return null;
|
|
288
359
|
}
|
|
289
|
-
const
|
|
290
|
-
function
|
|
291
|
-
const { caseless: e } =
|
|
292
|
-
const o = e &&
|
|
293
|
-
|
|
360
|
+
const ve = (() => typeof globalThis != "undefined" ? globalThis : typeof self != "undefined" ? self : typeof window != "undefined" ? window : global)(), De = (e) => !U(e) && e !== ve;
|
|
361
|
+
function ee() {
|
|
362
|
+
const { caseless: e } = De(this) && this || {}, t = {}, n = (r, s) => {
|
|
363
|
+
const o = e && Ue(t, s) || s;
|
|
364
|
+
I(t[o]) && I(r) ? t[o] = ee(t[o], r) : I(r) ? t[o] = ee({}, r) : F(r) ? t[o] = r.slice() : t[o] = r;
|
|
294
365
|
};
|
|
295
366
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
296
|
-
arguments[r] &&
|
|
367
|
+
arguments[r] && D(arguments[r], n);
|
|
297
368
|
return t;
|
|
298
369
|
}
|
|
299
|
-
const
|
|
300
|
-
n &&
|
|
301
|
-
}, { allOwnKeys: r }), e),
|
|
370
|
+
const It = (e, t, n, { allOwnKeys: r } = {}) => (D(t, (s, o) => {
|
|
371
|
+
n && S(s) ? e[o] = Fe(s, n) : e[o] = s;
|
|
372
|
+
}, { allOwnKeys: r }), e), Ht = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), $t = (e, t, n, r) => {
|
|
302
373
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
303
374
|
value: t.prototype
|
|
304
375
|
}), n && Object.assign(e.prototype, n);
|
|
305
|
-
},
|
|
376
|
+
}, Mt = (e, t, n, r) => {
|
|
306
377
|
let s, o, i;
|
|
307
378
|
const l = {};
|
|
308
379
|
if (t = t || {}, e == null)
|
|
@@ -310,55 +381,55 @@ const Ut = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
|
310
381
|
do {
|
|
311
382
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
312
383
|
i = s[o], (!r || r(i, e, t)) && !l[i] && (t[i] = e[i], l[i] = !0);
|
|
313
|
-
e = n !== !1 &&
|
|
384
|
+
e = n !== !1 && oe(e);
|
|
314
385
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
315
386
|
return t;
|
|
316
|
-
},
|
|
387
|
+
}, qt = (e, t, n) => {
|
|
317
388
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
318
389
|
const r = e.indexOf(t, n);
|
|
319
390
|
return r !== -1 && r === n;
|
|
320
|
-
},
|
|
391
|
+
}, zt = (e) => {
|
|
321
392
|
if (!e)
|
|
322
393
|
return null;
|
|
323
|
-
if (
|
|
394
|
+
if (F(e))
|
|
324
395
|
return e;
|
|
325
396
|
let t = e.length;
|
|
326
|
-
if (!
|
|
397
|
+
if (!Be(t))
|
|
327
398
|
return null;
|
|
328
399
|
const n = new Array(t);
|
|
329
400
|
for (; t-- > 0; )
|
|
330
401
|
n[t] = e[t];
|
|
331
402
|
return n;
|
|
332
|
-
},
|
|
403
|
+
}, Vt = ((e) => (t) => e && t instanceof e)(typeof Uint8Array != "undefined" && oe(Uint8Array)), Jt = (e, t) => {
|
|
333
404
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
334
405
|
let s;
|
|
335
406
|
for (; (s = r.next()) && !s.done; ) {
|
|
336
407
|
const o = s.value;
|
|
337
408
|
t.call(e, o[0], o[1]);
|
|
338
409
|
}
|
|
339
|
-
},
|
|
410
|
+
}, Wt = (e, t) => {
|
|
340
411
|
let n;
|
|
341
412
|
const r = [];
|
|
342
413
|
for (; (n = e.exec(t)) !== null; )
|
|
343
414
|
r.push(n);
|
|
344
415
|
return r;
|
|
345
|
-
},
|
|
416
|
+
}, Kt = x("HTMLFormElement"), Xt = (e) => e.toLowerCase().replace(
|
|
346
417
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
347
418
|
function(n, r, s) {
|
|
348
419
|
return r.toUpperCase() + s;
|
|
349
420
|
}
|
|
350
|
-
),
|
|
421
|
+
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Gt = x("RegExp"), je = (e, t) => {
|
|
351
422
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
352
|
-
|
|
423
|
+
D(n, (s, o) => {
|
|
353
424
|
let i;
|
|
354
425
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
355
426
|
}), Object.defineProperties(e, r);
|
|
356
|
-
},
|
|
357
|
-
|
|
358
|
-
if (
|
|
427
|
+
}, Qt = (e) => {
|
|
428
|
+
je(e, (t, n) => {
|
|
429
|
+
if (S(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
359
430
|
return !1;
|
|
360
431
|
const r = e[n];
|
|
361
|
-
if (
|
|
432
|
+
if (S(r)) {
|
|
362
433
|
if (t.enumerable = !1, "writable" in t) {
|
|
363
434
|
t.writable = !1;
|
|
364
435
|
return;
|
|
@@ -368,98 +439,98 @@ const Ut = (e, t, n, { allOwnKeys: r } = {}) => (v(t, (s, o) => {
|
|
|
368
439
|
});
|
|
369
440
|
}
|
|
370
441
|
});
|
|
371
|
-
},
|
|
442
|
+
}, Zt = (e, t) => {
|
|
372
443
|
const n = {}, r = (s) => {
|
|
373
444
|
s.forEach((o) => {
|
|
374
445
|
n[o] = !0;
|
|
375
446
|
});
|
|
376
447
|
};
|
|
377
|
-
return
|
|
378
|
-
},
|
|
379
|
-
},
|
|
380
|
-
DIGIT:
|
|
381
|
-
ALPHA:
|
|
382
|
-
ALPHA_DIGIT:
|
|
383
|
-
},
|
|
448
|
+
return F(e) ? r(e) : r(String(e).split(t)), n;
|
|
449
|
+
}, Yt = () => {
|
|
450
|
+
}, en = (e, t) => (e = +e, Number.isFinite(e) ? e : t), G = "abcdefghijklmnopqrstuvwxyz", we = "0123456789", ke = {
|
|
451
|
+
DIGIT: we,
|
|
452
|
+
ALPHA: G,
|
|
453
|
+
ALPHA_DIGIT: G + G.toUpperCase() + we
|
|
454
|
+
}, tn = (e = 16, t = ke.ALPHA_DIGIT) => {
|
|
384
455
|
let n = "";
|
|
385
456
|
const { length: r } = t;
|
|
386
457
|
for (; e--; )
|
|
387
458
|
n += t[Math.random() * r | 0];
|
|
388
459
|
return n;
|
|
389
460
|
};
|
|
390
|
-
function
|
|
391
|
-
return !!(e &&
|
|
461
|
+
function nn(e) {
|
|
462
|
+
return !!(e && S(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
392
463
|
}
|
|
393
|
-
const
|
|
464
|
+
const rn = (e) => {
|
|
394
465
|
const t = new Array(10), n = (r, s) => {
|
|
395
|
-
if (
|
|
466
|
+
if (V(r)) {
|
|
396
467
|
if (t.indexOf(r) >= 0)
|
|
397
468
|
return;
|
|
398
469
|
if (!("toJSON" in r)) {
|
|
399
470
|
t[s] = r;
|
|
400
|
-
const o =
|
|
401
|
-
return
|
|
402
|
-
const
|
|
403
|
-
!
|
|
471
|
+
const o = F(r) ? [] : {};
|
|
472
|
+
return D(r, (i, l) => {
|
|
473
|
+
const u = n(i, s + 1);
|
|
474
|
+
!U(u) && (o[l] = u);
|
|
404
475
|
}), t[s] = void 0, o;
|
|
405
476
|
}
|
|
406
477
|
}
|
|
407
478
|
return r;
|
|
408
479
|
};
|
|
409
480
|
return n(e, 0);
|
|
410
|
-
},
|
|
411
|
-
isArray:
|
|
412
|
-
isArrayBuffer:
|
|
413
|
-
isBuffer:
|
|
414
|
-
isFormData:
|
|
415
|
-
isArrayBufferView:
|
|
416
|
-
isString:
|
|
417
|
-
isNumber:
|
|
418
|
-
isBoolean:
|
|
419
|
-
isObject:
|
|
420
|
-
isPlainObject:
|
|
421
|
-
isUndefined:
|
|
422
|
-
isDate:
|
|
423
|
-
isFile:
|
|
424
|
-
isBlob:
|
|
425
|
-
isRegExp:
|
|
426
|
-
isFunction:
|
|
427
|
-
isStream:
|
|
428
|
-
isURLSearchParams:
|
|
429
|
-
isTypedArray:
|
|
430
|
-
isFileList:
|
|
431
|
-
forEach:
|
|
432
|
-
merge:
|
|
433
|
-
extend:
|
|
434
|
-
trim:
|
|
435
|
-
stripBOM:
|
|
436
|
-
inherits:
|
|
437
|
-
toFlatObject:
|
|
438
|
-
kindOf:
|
|
439
|
-
kindOfTest:
|
|
440
|
-
endsWith:
|
|
441
|
-
toArray:
|
|
442
|
-
forEachEntry:
|
|
443
|
-
matchAll:
|
|
444
|
-
isHTMLForm:
|
|
445
|
-
hasOwnProperty:
|
|
446
|
-
hasOwnProp:
|
|
481
|
+
}, sn = x("AsyncFunction"), on = (e) => e && (V(e) || S(e)) && S(e.then) && S(e.catch), a = {
|
|
482
|
+
isArray: F,
|
|
483
|
+
isArrayBuffer: Le,
|
|
484
|
+
isBuffer: Tt,
|
|
485
|
+
isFormData: Dt,
|
|
486
|
+
isArrayBufferView: Ct,
|
|
487
|
+
isString: Pt,
|
|
488
|
+
isNumber: Be,
|
|
489
|
+
isBoolean: Nt,
|
|
490
|
+
isObject: V,
|
|
491
|
+
isPlainObject: I,
|
|
492
|
+
isUndefined: U,
|
|
493
|
+
isDate: Ft,
|
|
494
|
+
isFile: Lt,
|
|
495
|
+
isBlob: Bt,
|
|
496
|
+
isRegExp: Gt,
|
|
497
|
+
isFunction: S,
|
|
498
|
+
isStream: vt,
|
|
499
|
+
isURLSearchParams: jt,
|
|
500
|
+
isTypedArray: Vt,
|
|
501
|
+
isFileList: Ut,
|
|
502
|
+
forEach: D,
|
|
503
|
+
merge: ee,
|
|
504
|
+
extend: It,
|
|
505
|
+
trim: kt,
|
|
506
|
+
stripBOM: Ht,
|
|
507
|
+
inherits: $t,
|
|
508
|
+
toFlatObject: Mt,
|
|
509
|
+
kindOf: q,
|
|
510
|
+
kindOfTest: x,
|
|
511
|
+
endsWith: qt,
|
|
512
|
+
toArray: zt,
|
|
513
|
+
forEachEntry: Jt,
|
|
514
|
+
matchAll: Wt,
|
|
515
|
+
isHTMLForm: Kt,
|
|
516
|
+
hasOwnProperty: ye,
|
|
517
|
+
hasOwnProp: ye,
|
|
447
518
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
448
|
-
reduceDescriptors:
|
|
449
|
-
freezeMethods:
|
|
450
|
-
toObjectSet:
|
|
451
|
-
toCamelCase:
|
|
452
|
-
noop:
|
|
453
|
-
toFiniteNumber:
|
|
454
|
-
findKey:
|
|
455
|
-
global:
|
|
456
|
-
isContextDefined:
|
|
457
|
-
ALPHABET:
|
|
458
|
-
generateString:
|
|
459
|
-
isSpecCompliantForm:
|
|
460
|
-
toJSONObject:
|
|
461
|
-
isAsyncFn:
|
|
462
|
-
isThenable:
|
|
519
|
+
reduceDescriptors: je,
|
|
520
|
+
freezeMethods: Qt,
|
|
521
|
+
toObjectSet: Zt,
|
|
522
|
+
toCamelCase: Xt,
|
|
523
|
+
noop: Yt,
|
|
524
|
+
toFiniteNumber: en,
|
|
525
|
+
findKey: Ue,
|
|
526
|
+
global: ve,
|
|
527
|
+
isContextDefined: De,
|
|
528
|
+
ALPHABET: ke,
|
|
529
|
+
generateString: tn,
|
|
530
|
+
isSpecCompliantForm: nn,
|
|
531
|
+
toJSONObject: rn,
|
|
532
|
+
isAsyncFn: sn,
|
|
533
|
+
isThenable: on
|
|
463
534
|
};
|
|
464
535
|
function y(e, t, n, r, s) {
|
|
465
536
|
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);
|
|
@@ -485,7 +556,7 @@ a.inherits(y, Error, {
|
|
|
485
556
|
};
|
|
486
557
|
}
|
|
487
558
|
});
|
|
488
|
-
const
|
|
559
|
+
const Ie = y.prototype, He = {};
|
|
489
560
|
[
|
|
490
561
|
"ERR_BAD_OPTION_VALUE",
|
|
491
562
|
"ERR_BAD_OPTION",
|
|
@@ -501,97 +572,97 @@ const ve = y.prototype, De = {};
|
|
|
501
572
|
"ERR_INVALID_URL"
|
|
502
573
|
// eslint-disable-next-line func-names
|
|
503
574
|
].forEach((e) => {
|
|
504
|
-
|
|
575
|
+
He[e] = { value: e };
|
|
505
576
|
});
|
|
506
|
-
Object.defineProperties(y,
|
|
507
|
-
Object.defineProperty(
|
|
577
|
+
Object.defineProperties(y, He);
|
|
578
|
+
Object.defineProperty(Ie, "isAxiosError", { value: !0 });
|
|
508
579
|
y.from = (e, t, n, r, s, o) => {
|
|
509
|
-
const i = Object.create(
|
|
510
|
-
return a.toFlatObject(e, i, function(
|
|
511
|
-
return
|
|
580
|
+
const i = Object.create(Ie);
|
|
581
|
+
return a.toFlatObject(e, i, function(u) {
|
|
582
|
+
return u !== Error.prototype;
|
|
512
583
|
}, (l) => l !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
513
584
|
};
|
|
514
|
-
const
|
|
515
|
-
function
|
|
585
|
+
const an = null;
|
|
586
|
+
function te(e) {
|
|
516
587
|
return a.isPlainObject(e) || a.isArray(e);
|
|
517
588
|
}
|
|
518
|
-
function
|
|
589
|
+
function $e(e) {
|
|
519
590
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
520
591
|
}
|
|
521
|
-
function
|
|
592
|
+
function be(e, t, n) {
|
|
522
593
|
return e ? e.concat(t).map(function(s, o) {
|
|
523
|
-
return s =
|
|
594
|
+
return s = $e(s), !n && o ? "[" + s + "]" : s;
|
|
524
595
|
}).join(n ? "." : "") : t;
|
|
525
596
|
}
|
|
526
|
-
function
|
|
527
|
-
return a.isArray(e) && !e.some(
|
|
597
|
+
function cn(e) {
|
|
598
|
+
return a.isArray(e) && !e.some(te);
|
|
528
599
|
}
|
|
529
|
-
const
|
|
600
|
+
const ln = a.toFlatObject(a, {}, null, function(t) {
|
|
530
601
|
return /^is[A-Z]/.test(t);
|
|
531
602
|
});
|
|
532
|
-
function
|
|
603
|
+
function J(e, t, n) {
|
|
533
604
|
if (!a.isObject(e))
|
|
534
605
|
throw new TypeError("target must be an object");
|
|
535
606
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
536
607
|
metaTokens: !0,
|
|
537
608
|
dots: !1,
|
|
538
609
|
indexes: !1
|
|
539
|
-
}, !1, function(h,
|
|
540
|
-
return !a.isUndefined(
|
|
610
|
+
}, !1, function(h, E) {
|
|
611
|
+
return !a.isUndefined(E[h]);
|
|
541
612
|
});
|
|
542
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
613
|
+
const r = n.metaTokens, s = n.visitor || d, o = n.dots, i = n.indexes, u = (n.Blob || typeof Blob != "undefined" && Blob) && a.isSpecCompliantForm(t);
|
|
543
614
|
if (!a.isFunction(s))
|
|
544
615
|
throw new TypeError("visitor must be a function");
|
|
545
|
-
function
|
|
616
|
+
function f(p) {
|
|
546
617
|
if (p === null)
|
|
547
618
|
return "";
|
|
548
619
|
if (a.isDate(p))
|
|
549
620
|
return p.toISOString();
|
|
550
|
-
if (!
|
|
621
|
+
if (!u && a.isBlob(p))
|
|
551
622
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
552
|
-
return a.isArrayBuffer(p) || a.isTypedArray(p) ?
|
|
623
|
+
return a.isArrayBuffer(p) || a.isTypedArray(p) ? u && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
553
624
|
}
|
|
554
|
-
function
|
|
625
|
+
function d(p, h, E) {
|
|
555
626
|
let R = p;
|
|
556
|
-
if (p && !
|
|
627
|
+
if (p && !E && typeof p == "object") {
|
|
557
628
|
if (a.endsWith(h, "{}"))
|
|
558
629
|
h = r ? h : h.slice(0, -2), p = JSON.stringify(p);
|
|
559
|
-
else if (a.isArray(p) &&
|
|
560
|
-
return h =
|
|
561
|
-
!(a.isUndefined(
|
|
630
|
+
else if (a.isArray(p) && cn(p) || (a.isFileList(p) || a.endsWith(h, "[]")) && (R = a.toArray(p)))
|
|
631
|
+
return h = $e(h), R.forEach(function(O, Ze) {
|
|
632
|
+
!(a.isUndefined(O) || O === null) && t.append(
|
|
562
633
|
// eslint-disable-next-line no-nested-ternary
|
|
563
|
-
i === !0 ?
|
|
564
|
-
|
|
634
|
+
i === !0 ? be([h], Ze, o) : i === null ? h : h + "[]",
|
|
635
|
+
f(O)
|
|
565
636
|
);
|
|
566
637
|
}), !1;
|
|
567
638
|
}
|
|
568
|
-
return
|
|
639
|
+
return te(p) ? !0 : (t.append(be(E, h, o), f(p)), !1);
|
|
569
640
|
}
|
|
570
|
-
const c = [], m = Object.assign(
|
|
571
|
-
defaultVisitor:
|
|
572
|
-
convertValue:
|
|
573
|
-
isVisitable:
|
|
641
|
+
const c = [], m = Object.assign(ln, {
|
|
642
|
+
defaultVisitor: d,
|
|
643
|
+
convertValue: f,
|
|
644
|
+
isVisitable: te
|
|
574
645
|
});
|
|
575
|
-
function
|
|
646
|
+
function w(p, h) {
|
|
576
647
|
if (!a.isUndefined(p)) {
|
|
577
648
|
if (c.indexOf(p) !== -1)
|
|
578
649
|
throw Error("Circular reference detected in " + h.join("."));
|
|
579
|
-
c.push(p), a.forEach(p, function(R,
|
|
650
|
+
c.push(p), a.forEach(p, function(R, g) {
|
|
580
651
|
(!(a.isUndefined(R) || R === null) && s.call(
|
|
581
652
|
t,
|
|
582
653
|
R,
|
|
583
|
-
a.isString(
|
|
654
|
+
a.isString(g) ? g.trim() : g,
|
|
584
655
|
h,
|
|
585
656
|
m
|
|
586
|
-
)) === !0 &&
|
|
657
|
+
)) === !0 && w(R, h ? h.concat(g) : [g]);
|
|
587
658
|
}), c.pop();
|
|
588
659
|
}
|
|
589
660
|
}
|
|
590
661
|
if (!a.isObject(e))
|
|
591
662
|
throw new TypeError("data must be an object");
|
|
592
|
-
return
|
|
663
|
+
return w(e), t;
|
|
593
664
|
}
|
|
594
|
-
function
|
|
665
|
+
function Ee(e) {
|
|
595
666
|
const t = {
|
|
596
667
|
"!": "%21",
|
|
597
668
|
"'": "%27",
|
|
@@ -605,36 +676,36 @@ function me(e) {
|
|
|
605
676
|
return t[r];
|
|
606
677
|
});
|
|
607
678
|
}
|
|
608
|
-
function
|
|
609
|
-
this._pairs = [], e &&
|
|
679
|
+
function ie(e, t) {
|
|
680
|
+
this._pairs = [], e && J(e, this, t);
|
|
610
681
|
}
|
|
611
|
-
const
|
|
612
|
-
|
|
682
|
+
const Me = ie.prototype;
|
|
683
|
+
Me.append = function(t, n) {
|
|
613
684
|
this._pairs.push([t, n]);
|
|
614
685
|
};
|
|
615
|
-
|
|
686
|
+
Me.toString = function(t) {
|
|
616
687
|
const n = t ? function(r) {
|
|
617
|
-
return t.call(this, r,
|
|
618
|
-
} :
|
|
688
|
+
return t.call(this, r, Ee);
|
|
689
|
+
} : Ee;
|
|
619
690
|
return this._pairs.map(function(s) {
|
|
620
691
|
return n(s[0]) + "=" + n(s[1]);
|
|
621
692
|
}, "").join("&");
|
|
622
693
|
};
|
|
623
|
-
function
|
|
694
|
+
function un(e) {
|
|
624
695
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
625
696
|
}
|
|
626
|
-
function
|
|
697
|
+
function qe(e, t, n) {
|
|
627
698
|
if (!t)
|
|
628
699
|
return e;
|
|
629
|
-
const r = n && n.encode ||
|
|
700
|
+
const r = n && n.encode || un, s = n && n.serialize;
|
|
630
701
|
let o;
|
|
631
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
702
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new ie(t, n).toString(r), o) {
|
|
632
703
|
const i = e.indexOf("#");
|
|
633
704
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
634
705
|
}
|
|
635
706
|
return e;
|
|
636
707
|
}
|
|
637
|
-
class
|
|
708
|
+
class fn {
|
|
638
709
|
constructor() {
|
|
639
710
|
this.handlers = [];
|
|
640
711
|
}
|
|
@@ -688,39 +759,36 @@ class on {
|
|
|
688
759
|
});
|
|
689
760
|
}
|
|
690
761
|
}
|
|
691
|
-
const
|
|
762
|
+
const _e = fn, ze = {
|
|
692
763
|
silentJSONParsing: !0,
|
|
693
764
|
forcedJSONParsing: !0,
|
|
694
765
|
clarifyTimeoutError: !1
|
|
695
|
-
},
|
|
766
|
+
}, dn = typeof URLSearchParams != "undefined" ? URLSearchParams : ie, pn = typeof FormData != "undefined" ? FormData : null, hn = typeof Blob != "undefined" ? Blob : null, mn = {
|
|
696
767
|
isBrowser: !0,
|
|
697
768
|
classes: {
|
|
698
|
-
URLSearchParams:
|
|
699
|
-
FormData:
|
|
700
|
-
Blob:
|
|
769
|
+
URLSearchParams: dn,
|
|
770
|
+
FormData: pn,
|
|
771
|
+
Blob: hn
|
|
701
772
|
},
|
|
702
773
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
703
|
-
},
|
|
704
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(),
|
|
774
|
+
}, Ve = typeof window != "undefined" && typeof document != "undefined", yn = ((e) => Ve && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator != "undefined" && navigator.product), wn = (() => typeof WorkerGlobalScope != "undefined" && // eslint-disable-next-line no-undef
|
|
775
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function")(), bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
705
776
|
__proto__: null,
|
|
706
|
-
hasBrowserEnv:
|
|
707
|
-
hasStandardBrowserEnv:
|
|
708
|
-
hasStandardBrowserWebWorkerEnv:
|
|
709
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
};
|
|
713
|
-
function hn(e, t) {
|
|
714
|
-
return V(e, new g.classes.URLSearchParams(), Object.assign({
|
|
777
|
+
hasBrowserEnv: Ve,
|
|
778
|
+
hasStandardBrowserEnv: yn,
|
|
779
|
+
hasStandardBrowserWebWorkerEnv: wn
|
|
780
|
+
}, Symbol.toStringTag, { value: "Module" })), A = X(X({}, bn), mn);
|
|
781
|
+
function En(e, t) {
|
|
782
|
+
return J(e, new A.classes.URLSearchParams(), Object.assign({
|
|
715
783
|
visitor: function(n, r, s, o) {
|
|
716
|
-
return
|
|
784
|
+
return A.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
717
785
|
}
|
|
718
786
|
}, t));
|
|
719
787
|
}
|
|
720
|
-
function
|
|
788
|
+
function _n(e) {
|
|
721
789
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
722
790
|
}
|
|
723
|
-
function
|
|
791
|
+
function Rn(e) {
|
|
724
792
|
const t = {}, n = Object.keys(e);
|
|
725
793
|
let r;
|
|
726
794
|
const s = n.length;
|
|
@@ -729,21 +797,23 @@ function yn(e) {
|
|
|
729
797
|
o = n[r], t[o] = e[o];
|
|
730
798
|
return t;
|
|
731
799
|
}
|
|
732
|
-
function
|
|
800
|
+
function Je(e) {
|
|
733
801
|
function t(n, r, s, o) {
|
|
734
802
|
let i = n[o++];
|
|
735
|
-
|
|
736
|
-
|
|
803
|
+
if (i === "__proto__")
|
|
804
|
+
return !0;
|
|
805
|
+
const l = Number.isFinite(+i), u = o >= n.length;
|
|
806
|
+
return i = !i && a.isArray(s) ? s.length : i, u ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !l) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Rn(s[i])), !l);
|
|
737
807
|
}
|
|
738
808
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
739
809
|
const n = {};
|
|
740
810
|
return a.forEachEntry(e, (r, s) => {
|
|
741
|
-
t(
|
|
811
|
+
t(_n(r), s, n, 0);
|
|
742
812
|
}), n;
|
|
743
813
|
}
|
|
744
814
|
return null;
|
|
745
815
|
}
|
|
746
|
-
function
|
|
816
|
+
function Sn(e, t, n) {
|
|
747
817
|
if (a.isString(e))
|
|
748
818
|
try {
|
|
749
819
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -753,13 +823,13 @@ function wn(e, t, n) {
|
|
|
753
823
|
}
|
|
754
824
|
return (n || JSON.stringify)(e);
|
|
755
825
|
}
|
|
756
|
-
const
|
|
757
|
-
transitional:
|
|
826
|
+
const ae = {
|
|
827
|
+
transitional: ze,
|
|
758
828
|
adapter: ["xhr", "http"],
|
|
759
829
|
transformRequest: [function(t, n) {
|
|
760
830
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
761
831
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
762
|
-
return s
|
|
832
|
+
return s ? JSON.stringify(Je(t)) : t;
|
|
763
833
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
764
834
|
return t;
|
|
765
835
|
if (a.isArrayBufferView(t))
|
|
@@ -769,20 +839,20 @@ const se = {
|
|
|
769
839
|
let l;
|
|
770
840
|
if (o) {
|
|
771
841
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
772
|
-
return
|
|
842
|
+
return En(t, this.formSerializer).toString();
|
|
773
843
|
if ((l = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
774
|
-
const
|
|
775
|
-
return
|
|
844
|
+
const u = this.env && this.env.FormData;
|
|
845
|
+
return J(
|
|
776
846
|
l ? { "files[]": t } : t,
|
|
777
|
-
|
|
847
|
+
u && new u(),
|
|
778
848
|
this.formSerializer
|
|
779
849
|
);
|
|
780
850
|
}
|
|
781
851
|
}
|
|
782
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
852
|
+
return o || s ? (n.setContentType("application/json", !1), Sn(t)) : t;
|
|
783
853
|
}],
|
|
784
854
|
transformResponse: [function(t) {
|
|
785
|
-
const n = this.transitional ||
|
|
855
|
+
const n = this.transitional || ae.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
786
856
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
787
857
|
const i = !(n && n.silentJSONParsing) && s;
|
|
788
858
|
try {
|
|
@@ -804,8 +874,8 @@ const se = {
|
|
|
804
874
|
maxContentLength: -1,
|
|
805
875
|
maxBodyLength: -1,
|
|
806
876
|
env: {
|
|
807
|
-
FormData:
|
|
808
|
-
Blob:
|
|
877
|
+
FormData: A.classes.FormData,
|
|
878
|
+
Blob: A.classes.Blob
|
|
809
879
|
},
|
|
810
880
|
validateStatus: function(t) {
|
|
811
881
|
return t >= 200 && t < 300;
|
|
@@ -818,9 +888,9 @@ const se = {
|
|
|
818
888
|
}
|
|
819
889
|
};
|
|
820
890
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
821
|
-
|
|
891
|
+
ae.headers[e] = {};
|
|
822
892
|
});
|
|
823
|
-
const
|
|
893
|
+
const ce = ae, gn = a.toObjectSet([
|
|
824
894
|
"age",
|
|
825
895
|
"authorization",
|
|
826
896
|
"content-length",
|
|
@@ -838,29 +908,29 @@ const oe = se, bn = a.toObjectSet([
|
|
|
838
908
|
"referer",
|
|
839
909
|
"retry-after",
|
|
840
910
|
"user-agent"
|
|
841
|
-
]),
|
|
911
|
+
]), On = (e) => {
|
|
842
912
|
const t = {};
|
|
843
913
|
let n, r, s;
|
|
844
914
|
return e && e.split(`
|
|
845
915
|
`).forEach(function(i) {
|
|
846
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
916
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && gn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
847
917
|
}), t;
|
|
848
|
-
},
|
|
849
|
-
function
|
|
918
|
+
}, Re = Symbol("internals");
|
|
919
|
+
function B(e) {
|
|
850
920
|
return e && String(e).trim().toLowerCase();
|
|
851
921
|
}
|
|
852
|
-
function
|
|
853
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
922
|
+
function H(e) {
|
|
923
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(H) : String(e);
|
|
854
924
|
}
|
|
855
|
-
function
|
|
925
|
+
function An(e) {
|
|
856
926
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
857
927
|
let r;
|
|
858
928
|
for (; r = n.exec(e); )
|
|
859
929
|
t[r[1]] = r[2];
|
|
860
930
|
return t;
|
|
861
931
|
}
|
|
862
|
-
const
|
|
863
|
-
function
|
|
932
|
+
const xn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
933
|
+
function Q(e, t, n, r, s) {
|
|
864
934
|
if (a.isFunction(r))
|
|
865
935
|
return r.call(this, t, n);
|
|
866
936
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -870,10 +940,10 @@ function K(e, t, n, r, s) {
|
|
|
870
940
|
return r.test(t);
|
|
871
941
|
}
|
|
872
942
|
}
|
|
873
|
-
function
|
|
943
|
+
function Tn(e) {
|
|
874
944
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
875
945
|
}
|
|
876
|
-
function
|
|
946
|
+
function Cn(e, t) {
|
|
877
947
|
const n = a.toCamelCase(" " + t);
|
|
878
948
|
["get", "set", "has"].forEach((r) => {
|
|
879
949
|
Object.defineProperty(e, r + n, {
|
|
@@ -884,31 +954,31 @@ function gn(e, t) {
|
|
|
884
954
|
});
|
|
885
955
|
});
|
|
886
956
|
}
|
|
887
|
-
class
|
|
957
|
+
class W {
|
|
888
958
|
constructor(t) {
|
|
889
959
|
t && this.set(t);
|
|
890
960
|
}
|
|
891
961
|
set(t, n, r) {
|
|
892
962
|
const s = this;
|
|
893
|
-
function o(l,
|
|
894
|
-
const
|
|
895
|
-
if (!
|
|
963
|
+
function o(l, u, f) {
|
|
964
|
+
const d = B(u);
|
|
965
|
+
if (!d)
|
|
896
966
|
throw new Error("header name must be a non-empty string");
|
|
897
|
-
const c = a.findKey(s,
|
|
898
|
-
(!c || s[c] === void 0 ||
|
|
967
|
+
const c = a.findKey(s, d);
|
|
968
|
+
(!c || s[c] === void 0 || f === !0 || f === void 0 && s[c] !== !1) && (s[c || u] = H(l));
|
|
899
969
|
}
|
|
900
|
-
const i = (l,
|
|
901
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
970
|
+
const i = (l, u) => a.forEach(l, (f, d) => o(f, d, u));
|
|
971
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !xn(t) ? i(On(t), n) : t != null && o(n, t, r), this;
|
|
902
972
|
}
|
|
903
973
|
get(t, n) {
|
|
904
|
-
if (t =
|
|
974
|
+
if (t = B(t), t) {
|
|
905
975
|
const r = a.findKey(this, t);
|
|
906
976
|
if (r) {
|
|
907
977
|
const s = this[r];
|
|
908
978
|
if (!n)
|
|
909
979
|
return s;
|
|
910
980
|
if (n === !0)
|
|
911
|
-
return
|
|
981
|
+
return An(s);
|
|
912
982
|
if (a.isFunction(n))
|
|
913
983
|
return n.call(this, s, r);
|
|
914
984
|
if (a.isRegExp(n))
|
|
@@ -918,9 +988,9 @@ class J {
|
|
|
918
988
|
}
|
|
919
989
|
}
|
|
920
990
|
has(t, n) {
|
|
921
|
-
if (t =
|
|
991
|
+
if (t = B(t), t) {
|
|
922
992
|
const r = a.findKey(this, t);
|
|
923
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
993
|
+
return !!(r && this[r] !== void 0 && (!n || Q(this, this[r], r, n)));
|
|
924
994
|
}
|
|
925
995
|
return !1;
|
|
926
996
|
}
|
|
@@ -928,9 +998,9 @@ class J {
|
|
|
928
998
|
const r = this;
|
|
929
999
|
let s = !1;
|
|
930
1000
|
function o(i) {
|
|
931
|
-
if (i =
|
|
1001
|
+
if (i = B(i), i) {
|
|
932
1002
|
const l = a.findKey(r, i);
|
|
933
|
-
l && (!n ||
|
|
1003
|
+
l && (!n || Q(r, r[l], l, n)) && (delete r[l], s = !0);
|
|
934
1004
|
}
|
|
935
1005
|
}
|
|
936
1006
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -940,7 +1010,7 @@ class J {
|
|
|
940
1010
|
let r = n.length, s = !1;
|
|
941
1011
|
for (; r--; ) {
|
|
942
1012
|
const o = n[r];
|
|
943
|
-
(!t ||
|
|
1013
|
+
(!t || Q(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
944
1014
|
}
|
|
945
1015
|
return s;
|
|
946
1016
|
}
|
|
@@ -949,11 +1019,11 @@ class J {
|
|
|
949
1019
|
return a.forEach(this, (s, o) => {
|
|
950
1020
|
const i = a.findKey(r, o);
|
|
951
1021
|
if (i) {
|
|
952
|
-
n[i] =
|
|
1022
|
+
n[i] = H(s), delete n[o];
|
|
953
1023
|
return;
|
|
954
1024
|
}
|
|
955
|
-
const l = t ?
|
|
956
|
-
l !== o && delete n[o], n[l] =
|
|
1025
|
+
const l = t ? Tn(o) : String(o).trim();
|
|
1026
|
+
l !== o && delete n[o], n[l] = H(s), r[l] = !0;
|
|
957
1027
|
}), this;
|
|
958
1028
|
}
|
|
959
1029
|
concat(...t) {
|
|
@@ -983,18 +1053,18 @@ class J {
|
|
|
983
1053
|
return n.forEach((s) => r.set(s)), r;
|
|
984
1054
|
}
|
|
985
1055
|
static accessor(t) {
|
|
986
|
-
const r = (this[
|
|
1056
|
+
const r = (this[Re] = this[Re] = {
|
|
987
1057
|
accessors: {}
|
|
988
1058
|
}).accessors, s = this.prototype;
|
|
989
1059
|
function o(i) {
|
|
990
|
-
const l =
|
|
991
|
-
r[l] || (
|
|
1060
|
+
const l = B(i);
|
|
1061
|
+
r[l] || (Cn(s, i), r[l] = !0);
|
|
992
1062
|
}
|
|
993
1063
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
994
1064
|
}
|
|
995
1065
|
}
|
|
996
|
-
|
|
997
|
-
a.reduceDescriptors(
|
|
1066
|
+
W.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
1067
|
+
a.reduceDescriptors(W.prototype, ({ value: e }, t) => {
|
|
998
1068
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
999
1069
|
return {
|
|
1000
1070
|
get: () => e,
|
|
@@ -1003,25 +1073,25 @@ a.reduceDescriptors(J.prototype, ({ value: e }, t) => {
|
|
|
1003
1073
|
}
|
|
1004
1074
|
};
|
|
1005
1075
|
});
|
|
1006
|
-
a.freezeMethods(
|
|
1007
|
-
const
|
|
1008
|
-
function
|
|
1009
|
-
const n = this ||
|
|
1076
|
+
a.freezeMethods(W);
|
|
1077
|
+
const T = W;
|
|
1078
|
+
function Z(e, t) {
|
|
1079
|
+
const n = this || ce, r = t || n, s = T.from(r.headers);
|
|
1010
1080
|
let o = r.data;
|
|
1011
1081
|
return a.forEach(e, function(l) {
|
|
1012
1082
|
o = l.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
1013
1083
|
}), s.normalize(), o;
|
|
1014
1084
|
}
|
|
1015
|
-
function
|
|
1085
|
+
function We(e) {
|
|
1016
1086
|
return !!(e && e.__CANCEL__);
|
|
1017
1087
|
}
|
|
1018
|
-
function
|
|
1019
|
-
y.call(this, e
|
|
1088
|
+
function j(e, t, n) {
|
|
1089
|
+
y.call(this, e == null ? "canceled" : e, y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
1020
1090
|
}
|
|
1021
|
-
a.inherits(
|
|
1091
|
+
a.inherits(j, y, {
|
|
1022
1092
|
__CANCEL__: !0
|
|
1023
1093
|
});
|
|
1024
|
-
function
|
|
1094
|
+
function Pn(e, t, n) {
|
|
1025
1095
|
const r = n.config.validateStatus;
|
|
1026
1096
|
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
1027
1097
|
"Request failed with status code " + n.status,
|
|
@@ -1031,7 +1101,7 @@ function On(e, t, n) {
|
|
|
1031
1101
|
n
|
|
1032
1102
|
));
|
|
1033
1103
|
}
|
|
1034
|
-
const
|
|
1104
|
+
const Nn = A.hasStandardBrowserEnv ? (
|
|
1035
1105
|
// Standard browser envs support document.cookie
|
|
1036
1106
|
{
|
|
1037
1107
|
write(e, t, n, r, s, o) {
|
|
@@ -1058,16 +1128,16 @@ const An = g.hasStandardBrowserEnv ? (
|
|
|
1058
1128
|
}
|
|
1059
1129
|
}
|
|
1060
1130
|
);
|
|
1061
|
-
function
|
|
1131
|
+
function Fn(e) {
|
|
1062
1132
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1063
1133
|
}
|
|
1064
|
-
function
|
|
1065
|
-
return t ? e.replace(
|
|
1134
|
+
function Ln(e, t) {
|
|
1135
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1066
1136
|
}
|
|
1067
|
-
function
|
|
1068
|
-
return e && !
|
|
1137
|
+
function Ke(e, t) {
|
|
1138
|
+
return e && !Fn(t) ? Ln(e, t) : t;
|
|
1069
1139
|
}
|
|
1070
|
-
const
|
|
1140
|
+
const Bn = A.hasStandardBrowserEnv ? (
|
|
1071
1141
|
// Standard browser envs have full support of the APIs needed to test
|
|
1072
1142
|
// whether the request URL is of the same origin as current location.
|
|
1073
1143
|
function() {
|
|
@@ -1099,72 +1169,72 @@ const Cn = g.hasStandardBrowserEnv ? (
|
|
|
1099
1169
|
};
|
|
1100
1170
|
}()
|
|
1101
1171
|
);
|
|
1102
|
-
function
|
|
1172
|
+
function Un(e) {
|
|
1103
1173
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
1104
1174
|
return t && t[1] || "";
|
|
1105
1175
|
}
|
|
1106
|
-
function
|
|
1176
|
+
function vn(e, t) {
|
|
1107
1177
|
e = e || 10;
|
|
1108
1178
|
const n = new Array(e), r = new Array(e);
|
|
1109
1179
|
let s = 0, o = 0, i;
|
|
1110
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
1111
|
-
const
|
|
1112
|
-
i || (i =
|
|
1180
|
+
return t = t !== void 0 ? t : 1e3, function(u) {
|
|
1181
|
+
const f = Date.now(), d = r[o];
|
|
1182
|
+
i || (i = f), n[s] = u, r[s] = f;
|
|
1113
1183
|
let c = o, m = 0;
|
|
1114
1184
|
for (; c !== s; )
|
|
1115
1185
|
m += n[c++], c = c % e;
|
|
1116
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
1186
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), f - i < t)
|
|
1117
1187
|
return;
|
|
1118
|
-
const
|
|
1119
|
-
return
|
|
1188
|
+
const w = d && f - d;
|
|
1189
|
+
return w ? Math.round(m * 1e3 / w) : void 0;
|
|
1120
1190
|
};
|
|
1121
1191
|
}
|
|
1122
|
-
function
|
|
1192
|
+
function Se(e, t) {
|
|
1123
1193
|
let n = 0;
|
|
1124
|
-
const r =
|
|
1194
|
+
const r = vn(50, 250);
|
|
1125
1195
|
return (s) => {
|
|
1126
|
-
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, l = o - n,
|
|
1196
|
+
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, l = o - n, u = r(l), f = o <= i;
|
|
1127
1197
|
n = o;
|
|
1128
|
-
const
|
|
1198
|
+
const d = {
|
|
1129
1199
|
loaded: o,
|
|
1130
1200
|
total: i,
|
|
1131
1201
|
progress: i ? o / i : void 0,
|
|
1132
1202
|
bytes: l,
|
|
1133
|
-
rate:
|
|
1134
|
-
estimated:
|
|
1203
|
+
rate: u || void 0,
|
|
1204
|
+
estimated: u && i && f ? (i - o) / u : void 0,
|
|
1135
1205
|
event: s
|
|
1136
1206
|
};
|
|
1137
|
-
|
|
1207
|
+
d[t ? "download" : "upload"] = !0, e(d);
|
|
1138
1208
|
};
|
|
1139
1209
|
}
|
|
1140
|
-
const
|
|
1210
|
+
const Dn = typeof XMLHttpRequest != "undefined", jn = Dn && function(e) {
|
|
1141
1211
|
return new Promise(function(n, r) {
|
|
1142
1212
|
let s = e.data;
|
|
1143
|
-
const o =
|
|
1144
|
-
let { responseType: i, withXSRFToken: l } = e,
|
|
1145
|
-
function
|
|
1146
|
-
e.cancelToken && e.cancelToken.unsubscribe(
|
|
1213
|
+
const o = T.from(e.headers).normalize();
|
|
1214
|
+
let { responseType: i, withXSRFToken: l } = e, u;
|
|
1215
|
+
function f() {
|
|
1216
|
+
e.cancelToken && e.cancelToken.unsubscribe(u), e.signal && e.signal.removeEventListener("abort", u);
|
|
1147
1217
|
}
|
|
1148
|
-
let
|
|
1218
|
+
let d;
|
|
1149
1219
|
if (a.isFormData(s)) {
|
|
1150
|
-
if (
|
|
1220
|
+
if (A.hasStandardBrowserEnv || A.hasStandardBrowserWebWorkerEnv)
|
|
1151
1221
|
o.setContentType(!1);
|
|
1152
|
-
else if ((
|
|
1153
|
-
const [h, ...
|
|
1154
|
-
o.setContentType([h || "multipart/form-data", ...
|
|
1222
|
+
else if ((d = o.getContentType()) !== !1) {
|
|
1223
|
+
const [h, ...E] = d ? d.split(";").map((R) => R.trim()).filter(Boolean) : [];
|
|
1224
|
+
o.setContentType([h || "multipart/form-data", ...E].join("; "));
|
|
1155
1225
|
}
|
|
1156
1226
|
}
|
|
1157
1227
|
let c = new XMLHttpRequest();
|
|
1158
1228
|
if (e.auth) {
|
|
1159
|
-
const h = e.auth.username || "",
|
|
1160
|
-
o.set("Authorization", "Basic " + btoa(h + ":" +
|
|
1229
|
+
const h = e.auth.username || "", E = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
1230
|
+
o.set("Authorization", "Basic " + btoa(h + ":" + E));
|
|
1161
1231
|
}
|
|
1162
|
-
const m =
|
|
1163
|
-
c.open(e.method.toUpperCase(),
|
|
1164
|
-
function
|
|
1232
|
+
const m = Ke(e.baseURL, e.url);
|
|
1233
|
+
c.open(e.method.toUpperCase(), qe(m, e.params, e.paramsSerializer), !0), c.timeout = e.timeout;
|
|
1234
|
+
function w() {
|
|
1165
1235
|
if (!c)
|
|
1166
1236
|
return;
|
|
1167
|
-
const h =
|
|
1237
|
+
const h = T.from(
|
|
1168
1238
|
"getAllResponseHeaders" in c && c.getAllResponseHeaders()
|
|
1169
1239
|
), R = {
|
|
1170
1240
|
data: !i || i === "text" || i === "json" ? c.responseText : c.response,
|
|
@@ -1174,57 +1244,57 @@ const Fn = typeof XMLHttpRequest < "u", Ln = Fn && function(e) {
|
|
|
1174
1244
|
config: e,
|
|
1175
1245
|
request: c
|
|
1176
1246
|
};
|
|
1177
|
-
|
|
1178
|
-
n(
|
|
1179
|
-
}, function(
|
|
1180
|
-
r(
|
|
1247
|
+
Pn(function(O) {
|
|
1248
|
+
n(O), f();
|
|
1249
|
+
}, function(O) {
|
|
1250
|
+
r(O), f();
|
|
1181
1251
|
}, R), c = null;
|
|
1182
1252
|
}
|
|
1183
|
-
if ("onloadend" in c ? c.onloadend =
|
|
1184
|
-
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1253
|
+
if ("onloadend" in c ? c.onloadend = w : c.onreadystatechange = function() {
|
|
1254
|
+
!c || c.readyState !== 4 || c.status === 0 && !(c.responseURL && c.responseURL.indexOf("file:") === 0) || setTimeout(w);
|
|
1185
1255
|
}, c.onabort = function() {
|
|
1186
1256
|
c && (r(new y("Request aborted", y.ECONNABORTED, e, c)), c = null);
|
|
1187
1257
|
}, c.onerror = function() {
|
|
1188
1258
|
r(new y("Network Error", y.ERR_NETWORK, e, c)), c = null;
|
|
1189
1259
|
}, c.ontimeout = function() {
|
|
1190
|
-
let
|
|
1191
|
-
const R = e.transitional ||
|
|
1192
|
-
e.timeoutErrorMessage && (
|
|
1193
|
-
|
|
1260
|
+
let E = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
1261
|
+
const R = e.transitional || ze;
|
|
1262
|
+
e.timeoutErrorMessage && (E = e.timeoutErrorMessage), r(new y(
|
|
1263
|
+
E,
|
|
1194
1264
|
R.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1195
1265
|
e,
|
|
1196
1266
|
c
|
|
1197
1267
|
)), c = null;
|
|
1198
|
-
},
|
|
1199
|
-
const h = e.xsrfHeaderName && e.xsrfCookieName &&
|
|
1268
|
+
}, A.hasStandardBrowserEnv && (l && a.isFunction(l) && (l = l(e)), l || l !== !1 && Bn(m))) {
|
|
1269
|
+
const h = e.xsrfHeaderName && e.xsrfCookieName && Nn.read(e.xsrfCookieName);
|
|
1200
1270
|
h && o.set(e.xsrfHeaderName, h);
|
|
1201
1271
|
}
|
|
1202
|
-
s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(
|
|
1203
|
-
c.setRequestHeader(R,
|
|
1204
|
-
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress",
|
|
1205
|
-
c && (r(!h || h.type ? new
|
|
1206
|
-
}, e.cancelToken && e.cancelToken.subscribe(
|
|
1207
|
-
const p =
|
|
1208
|
-
if (p &&
|
|
1272
|
+
s === void 0 && o.setContentType(null), "setRequestHeader" in c && a.forEach(o.toJSON(), function(E, R) {
|
|
1273
|
+
c.setRequestHeader(R, E);
|
|
1274
|
+
}), a.isUndefined(e.withCredentials) || (c.withCredentials = !!e.withCredentials), i && i !== "json" && (c.responseType = e.responseType), typeof e.onDownloadProgress == "function" && c.addEventListener("progress", Se(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && c.upload && c.upload.addEventListener("progress", Se(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (h) => {
|
|
1275
|
+
c && (r(!h || h.type ? new j(null, e, c) : h), c.abort(), c = null);
|
|
1276
|
+
}, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
|
|
1277
|
+
const p = Un(m);
|
|
1278
|
+
if (p && A.protocols.indexOf(p) === -1) {
|
|
1209
1279
|
r(new y("Unsupported protocol " + p + ":", y.ERR_BAD_REQUEST, e));
|
|
1210
1280
|
return;
|
|
1211
1281
|
}
|
|
1212
1282
|
c.send(s || null);
|
|
1213
1283
|
});
|
|
1214
|
-
},
|
|
1215
|
-
http:
|
|
1216
|
-
xhr:
|
|
1284
|
+
}, ne = {
|
|
1285
|
+
http: an,
|
|
1286
|
+
xhr: jn
|
|
1217
1287
|
};
|
|
1218
|
-
a.forEach(
|
|
1288
|
+
a.forEach(ne, (e, t) => {
|
|
1219
1289
|
if (e) {
|
|
1220
1290
|
try {
|
|
1221
1291
|
Object.defineProperty(e, "name", { value: t });
|
|
1222
|
-
} catch {
|
|
1292
|
+
} catch (n) {
|
|
1223
1293
|
}
|
|
1224
1294
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1225
1295
|
}
|
|
1226
1296
|
});
|
|
1227
|
-
const
|
|
1297
|
+
const ge = (e) => `- ${e}`, kn = (e) => a.isFunction(e) || e === null || e === !1, Xe = {
|
|
1228
1298
|
getAdapter: (e) => {
|
|
1229
1299
|
e = a.isArray(e) ? e : [e];
|
|
1230
1300
|
const { length: t } = e;
|
|
@@ -1233,7 +1303,7 @@ const Ee = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1233
1303
|
for (let o = 0; o < t; o++) {
|
|
1234
1304
|
n = e[o];
|
|
1235
1305
|
let i;
|
|
1236
|
-
if (r = n, !
|
|
1306
|
+
if (r = n, !kn(n) && (r = ne[(i = String(n)).toLowerCase()], r === void 0))
|
|
1237
1307
|
throw new y(`Unknown adapter '${i}'`);
|
|
1238
1308
|
if (r)
|
|
1239
1309
|
break;
|
|
@@ -1241,11 +1311,11 @@ const Ee = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1241
1311
|
}
|
|
1242
1312
|
if (!r) {
|
|
1243
1313
|
const o = Object.entries(s).map(
|
|
1244
|
-
([l,
|
|
1314
|
+
([l, u]) => `adapter ${l} ` + (u === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1245
1315
|
);
|
|
1246
1316
|
let i = t ? o.length > 1 ? `since :
|
|
1247
|
-
` + o.map(
|
|
1248
|
-
`) : " " +
|
|
1317
|
+
` + o.map(ge).join(`
|
|
1318
|
+
`) : " " + ge(o[0]) : "as no adapter specified";
|
|
1249
1319
|
throw new y(
|
|
1250
1320
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1251
1321
|
"ERR_NOT_SUPPORT"
|
|
@@ -1253,62 +1323,62 @@ const Ee = (e) => `- ${e}`, Bn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1253
1323
|
}
|
|
1254
1324
|
return r;
|
|
1255
1325
|
},
|
|
1256
|
-
adapters:
|
|
1326
|
+
adapters: ne
|
|
1257
1327
|
};
|
|
1258
|
-
function
|
|
1328
|
+
function Y(e) {
|
|
1259
1329
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1260
|
-
throw new
|
|
1330
|
+
throw new j(null, e);
|
|
1261
1331
|
}
|
|
1262
|
-
function
|
|
1263
|
-
return
|
|
1332
|
+
function Oe(e) {
|
|
1333
|
+
return Y(e), e.headers = T.from(e.headers), e.data = Z.call(
|
|
1264
1334
|
e,
|
|
1265
1335
|
e.transformRequest
|
|
1266
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1267
|
-
return
|
|
1336
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Xe.getAdapter(e.adapter || ce.adapter)(e).then(function(r) {
|
|
1337
|
+
return Y(e), r.data = Z.call(
|
|
1268
1338
|
e,
|
|
1269
1339
|
e.transformResponse,
|
|
1270
1340
|
r
|
|
1271
|
-
), r.headers =
|
|
1341
|
+
), r.headers = T.from(r.headers), r;
|
|
1272
1342
|
}, function(r) {
|
|
1273
|
-
return
|
|
1343
|
+
return We(r) || (Y(e), r && r.response && (r.response.data = Z.call(
|
|
1274
1344
|
e,
|
|
1275
1345
|
e.transformResponse,
|
|
1276
1346
|
r.response
|
|
1277
|
-
), r.response.headers =
|
|
1347
|
+
), r.response.headers = T.from(r.response.headers))), Promise.reject(r);
|
|
1278
1348
|
});
|
|
1279
1349
|
}
|
|
1280
|
-
const
|
|
1281
|
-
function
|
|
1350
|
+
const Ae = (e) => e instanceof T ? e.toJSON() : e;
|
|
1351
|
+
function P(e, t) {
|
|
1282
1352
|
t = t || {};
|
|
1283
1353
|
const n = {};
|
|
1284
|
-
function r(
|
|
1285
|
-
return a.isPlainObject(
|
|
1354
|
+
function r(f, d, c) {
|
|
1355
|
+
return a.isPlainObject(f) && a.isPlainObject(d) ? a.merge.call({ caseless: c }, f, d) : a.isPlainObject(d) ? a.merge({}, d) : a.isArray(d) ? d.slice() : d;
|
|
1286
1356
|
}
|
|
1287
|
-
function s(
|
|
1288
|
-
if (a.isUndefined(
|
|
1289
|
-
if (!a.isUndefined(
|
|
1290
|
-
return r(void 0,
|
|
1357
|
+
function s(f, d, c) {
|
|
1358
|
+
if (a.isUndefined(d)) {
|
|
1359
|
+
if (!a.isUndefined(f))
|
|
1360
|
+
return r(void 0, f, c);
|
|
1291
1361
|
} else
|
|
1292
|
-
return r(
|
|
1362
|
+
return r(f, d, c);
|
|
1293
1363
|
}
|
|
1294
|
-
function o(
|
|
1295
|
-
if (!a.isUndefined(
|
|
1296
|
-
return r(void 0,
|
|
1364
|
+
function o(f, d) {
|
|
1365
|
+
if (!a.isUndefined(d))
|
|
1366
|
+
return r(void 0, d);
|
|
1297
1367
|
}
|
|
1298
|
-
function i(
|
|
1299
|
-
if (a.isUndefined(
|
|
1300
|
-
if (!a.isUndefined(
|
|
1301
|
-
return r(void 0,
|
|
1368
|
+
function i(f, d) {
|
|
1369
|
+
if (a.isUndefined(d)) {
|
|
1370
|
+
if (!a.isUndefined(f))
|
|
1371
|
+
return r(void 0, f);
|
|
1302
1372
|
} else
|
|
1303
|
-
return r(void 0,
|
|
1373
|
+
return r(void 0, d);
|
|
1304
1374
|
}
|
|
1305
|
-
function l(
|
|
1375
|
+
function l(f, d, c) {
|
|
1306
1376
|
if (c in t)
|
|
1307
|
-
return r(
|
|
1377
|
+
return r(f, d);
|
|
1308
1378
|
if (c in e)
|
|
1309
|
-
return r(void 0,
|
|
1379
|
+
return r(void 0, f);
|
|
1310
1380
|
}
|
|
1311
|
-
const
|
|
1381
|
+
const u = {
|
|
1312
1382
|
url: o,
|
|
1313
1383
|
method: o,
|
|
1314
1384
|
data: o,
|
|
@@ -1337,23 +1407,23 @@ function C(e, t) {
|
|
|
1337
1407
|
socketPath: i,
|
|
1338
1408
|
responseEncoding: i,
|
|
1339
1409
|
validateStatus: l,
|
|
1340
|
-
headers: (
|
|
1410
|
+
headers: (f, d) => s(Ae(f), Ae(d), !0)
|
|
1341
1411
|
};
|
|
1342
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
1343
|
-
const c =
|
|
1344
|
-
a.isUndefined(m) && c !== l || (n[
|
|
1412
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(d) {
|
|
1413
|
+
const c = u[d] || s, m = c(e[d], t[d], d);
|
|
1414
|
+
a.isUndefined(m) && c !== l || (n[d] = m);
|
|
1345
1415
|
}), n;
|
|
1346
1416
|
}
|
|
1347
|
-
const
|
|
1417
|
+
const Ge = "1.6.7", le = {};
|
|
1348
1418
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1349
|
-
|
|
1419
|
+
le[e] = function(r) {
|
|
1350
1420
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1351
1421
|
};
|
|
1352
1422
|
});
|
|
1353
|
-
const
|
|
1354
|
-
|
|
1423
|
+
const xe = {};
|
|
1424
|
+
le.transitional = function(t, n, r) {
|
|
1355
1425
|
function s(o, i) {
|
|
1356
|
-
return "[Axios v" +
|
|
1426
|
+
return "[Axios v" + Ge + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1357
1427
|
}
|
|
1358
1428
|
return (o, i, l) => {
|
|
1359
1429
|
if (t === !1)
|
|
@@ -1361,7 +1431,7 @@ ie.transitional = function(t, n, r) {
|
|
|
1361
1431
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1362
1432
|
y.ERR_DEPRECATED
|
|
1363
1433
|
);
|
|
1364
|
-
return n && !
|
|
1434
|
+
return n && !xe[i] && (xe[i] = !0, console.warn(
|
|
1365
1435
|
s(
|
|
1366
1436
|
i,
|
|
1367
1437
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1369,7 +1439,7 @@ ie.transitional = function(t, n, r) {
|
|
|
1369
1439
|
)), t ? t(o, i, l) : !0;
|
|
1370
1440
|
};
|
|
1371
1441
|
};
|
|
1372
|
-
function
|
|
1442
|
+
function In(e, t, n) {
|
|
1373
1443
|
if (typeof e != "object")
|
|
1374
1444
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1375
1445
|
const r = Object.keys(e);
|
|
@@ -1377,24 +1447,24 @@ function Un(e, t, n) {
|
|
|
1377
1447
|
for (; s-- > 0; ) {
|
|
1378
1448
|
const o = r[s], i = t[o];
|
|
1379
1449
|
if (i) {
|
|
1380
|
-
const l = e[o],
|
|
1381
|
-
if (
|
|
1382
|
-
throw new y("option " + o + " must be " +
|
|
1450
|
+
const l = e[o], u = l === void 0 || i(l, o, e);
|
|
1451
|
+
if (u !== !0)
|
|
1452
|
+
throw new y("option " + o + " must be " + u, y.ERR_BAD_OPTION_VALUE);
|
|
1383
1453
|
continue;
|
|
1384
1454
|
}
|
|
1385
1455
|
if (n !== !0)
|
|
1386
1456
|
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1387
1457
|
}
|
|
1388
1458
|
}
|
|
1389
|
-
const
|
|
1390
|
-
assertOptions:
|
|
1391
|
-
validators:
|
|
1392
|
-
},
|
|
1393
|
-
class
|
|
1459
|
+
const re = {
|
|
1460
|
+
assertOptions: In,
|
|
1461
|
+
validators: le
|
|
1462
|
+
}, C = re.validators;
|
|
1463
|
+
class M {
|
|
1394
1464
|
constructor(t) {
|
|
1395
1465
|
this.defaults = t, this.interceptors = {
|
|
1396
|
-
request: new
|
|
1397
|
-
response: new
|
|
1466
|
+
request: new _e(),
|
|
1467
|
+
response: new _e()
|
|
1398
1468
|
};
|
|
1399
1469
|
}
|
|
1400
1470
|
/**
|
|
@@ -1406,17 +1476,33 @@ class $ {
|
|
|
1406
1476
|
* @returns {Promise} The Promise to be fulfilled
|
|
1407
1477
|
*/
|
|
1408
1478
|
request(t, n) {
|
|
1409
|
-
|
|
1479
|
+
return b(this, null, function* () {
|
|
1480
|
+
try {
|
|
1481
|
+
return yield this._request(t, n);
|
|
1482
|
+
} catch (r) {
|
|
1483
|
+
if (r instanceof Error) {
|
|
1484
|
+
let s;
|
|
1485
|
+
Error.captureStackTrace ? Error.captureStackTrace(s = {}) : s = new Error();
|
|
1486
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1487
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1488
|
+
` + o) : r.stack = o;
|
|
1489
|
+
}
|
|
1490
|
+
throw r;
|
|
1491
|
+
}
|
|
1492
|
+
});
|
|
1493
|
+
}
|
|
1494
|
+
_request(t, n) {
|
|
1495
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = P(this.defaults, n);
|
|
1410
1496
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1411
|
-
r !== void 0 &&
|
|
1412
|
-
silentJSONParsing:
|
|
1413
|
-
forcedJSONParsing:
|
|
1414
|
-
clarifyTimeoutError:
|
|
1497
|
+
r !== void 0 && re.assertOptions(r, {
|
|
1498
|
+
silentJSONParsing: C.transitional(C.boolean),
|
|
1499
|
+
forcedJSONParsing: C.transitional(C.boolean),
|
|
1500
|
+
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1415
1501
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1416
1502
|
serialize: s
|
|
1417
|
-
} :
|
|
1418
|
-
encode:
|
|
1419
|
-
serialize:
|
|
1503
|
+
} : re.assertOptions(s, {
|
|
1504
|
+
encode: C.function,
|
|
1505
|
+
serialize: C.function
|
|
1420
1506
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1421
1507
|
let i = o && a.merge(
|
|
1422
1508
|
o.common,
|
|
@@ -1427,52 +1513,52 @@ class $ {
|
|
|
1427
1513
|
(p) => {
|
|
1428
1514
|
delete o[p];
|
|
1429
1515
|
}
|
|
1430
|
-
), n.headers =
|
|
1516
|
+
), n.headers = T.concat(i, o);
|
|
1431
1517
|
const l = [];
|
|
1432
|
-
let
|
|
1518
|
+
let u = !0;
|
|
1433
1519
|
this.interceptors.request.forEach(function(h) {
|
|
1434
|
-
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (
|
|
1520
|
+
typeof h.runWhen == "function" && h.runWhen(n) === !1 || (u = u && h.synchronous, l.unshift(h.fulfilled, h.rejected));
|
|
1435
1521
|
});
|
|
1436
|
-
const
|
|
1522
|
+
const f = [];
|
|
1437
1523
|
this.interceptors.response.forEach(function(h) {
|
|
1438
|
-
|
|
1524
|
+
f.push(h.fulfilled, h.rejected);
|
|
1439
1525
|
});
|
|
1440
|
-
let
|
|
1441
|
-
if (!
|
|
1442
|
-
const p = [
|
|
1443
|
-
for (p.unshift.apply(p, l), p.push.apply(p,
|
|
1444
|
-
|
|
1445
|
-
return
|
|
1526
|
+
let d, c = 0, m;
|
|
1527
|
+
if (!u) {
|
|
1528
|
+
const p = [Oe.bind(this), void 0];
|
|
1529
|
+
for (p.unshift.apply(p, l), p.push.apply(p, f), m = p.length, d = Promise.resolve(n); c < m; )
|
|
1530
|
+
d = d.then(p[c++], p[c++]);
|
|
1531
|
+
return d;
|
|
1446
1532
|
}
|
|
1447
1533
|
m = l.length;
|
|
1448
|
-
let
|
|
1534
|
+
let w = n;
|
|
1449
1535
|
for (c = 0; c < m; ) {
|
|
1450
1536
|
const p = l[c++], h = l[c++];
|
|
1451
1537
|
try {
|
|
1452
|
-
|
|
1453
|
-
} catch (
|
|
1454
|
-
h.call(this,
|
|
1538
|
+
w = p(w);
|
|
1539
|
+
} catch (E) {
|
|
1540
|
+
h.call(this, E);
|
|
1455
1541
|
break;
|
|
1456
1542
|
}
|
|
1457
1543
|
}
|
|
1458
1544
|
try {
|
|
1459
|
-
|
|
1545
|
+
d = Oe.call(this, w);
|
|
1460
1546
|
} catch (p) {
|
|
1461
1547
|
return Promise.reject(p);
|
|
1462
1548
|
}
|
|
1463
|
-
for (c = 0, m =
|
|
1464
|
-
|
|
1465
|
-
return
|
|
1549
|
+
for (c = 0, m = f.length; c < m; )
|
|
1550
|
+
d = d.then(f[c++], f[c++]);
|
|
1551
|
+
return d;
|
|
1466
1552
|
}
|
|
1467
1553
|
getUri(t) {
|
|
1468
|
-
t =
|
|
1469
|
-
const n =
|
|
1470
|
-
return
|
|
1554
|
+
t = P(this.defaults, t);
|
|
1555
|
+
const n = Ke(t.baseURL, t.url);
|
|
1556
|
+
return qe(n, t.params, t.paramsSerializer);
|
|
1471
1557
|
}
|
|
1472
1558
|
}
|
|
1473
1559
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1474
|
-
|
|
1475
|
-
return this.request(
|
|
1560
|
+
M.prototype[t] = function(n, r) {
|
|
1561
|
+
return this.request(P(r || {}, {
|
|
1476
1562
|
method: t,
|
|
1477
1563
|
url: n,
|
|
1478
1564
|
data: (r || {}).data
|
|
@@ -1482,7 +1568,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1482
1568
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1483
1569
|
function n(r) {
|
|
1484
1570
|
return function(o, i, l) {
|
|
1485
|
-
return this.request(
|
|
1571
|
+
return this.request(P(l || {}, {
|
|
1486
1572
|
method: t,
|
|
1487
1573
|
headers: r ? {
|
|
1488
1574
|
"Content-Type": "multipart/form-data"
|
|
@@ -1492,10 +1578,10 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1492
1578
|
}));
|
|
1493
1579
|
};
|
|
1494
1580
|
}
|
|
1495
|
-
|
|
1581
|
+
M.prototype[t] = n(), M.prototype[t + "Form"] = n(!0);
|
|
1496
1582
|
});
|
|
1497
|
-
const
|
|
1498
|
-
class
|
|
1583
|
+
const $ = M;
|
|
1584
|
+
class ue {
|
|
1499
1585
|
constructor(t) {
|
|
1500
1586
|
if (typeof t != "function")
|
|
1501
1587
|
throw new TypeError("executor must be a function.");
|
|
@@ -1520,7 +1606,7 @@ class ae {
|
|
|
1520
1606
|
r.unsubscribe(o);
|
|
1521
1607
|
}, i;
|
|
1522
1608
|
}, t(function(o, i, l) {
|
|
1523
|
-
r.reason || (r.reason = new
|
|
1609
|
+
r.reason || (r.reason = new j(o, i, l), n(r.reason));
|
|
1524
1610
|
});
|
|
1525
1611
|
}
|
|
1526
1612
|
/**
|
|
@@ -1556,23 +1642,23 @@ class ae {
|
|
|
1556
1642
|
static source() {
|
|
1557
1643
|
let t;
|
|
1558
1644
|
return {
|
|
1559
|
-
token: new
|
|
1645
|
+
token: new ue(function(s) {
|
|
1560
1646
|
t = s;
|
|
1561
1647
|
}),
|
|
1562
1648
|
cancel: t
|
|
1563
1649
|
};
|
|
1564
1650
|
}
|
|
1565
1651
|
}
|
|
1566
|
-
const
|
|
1567
|
-
function
|
|
1652
|
+
const Hn = ue;
|
|
1653
|
+
function $n(e) {
|
|
1568
1654
|
return function(n) {
|
|
1569
1655
|
return e.apply(null, n);
|
|
1570
1656
|
};
|
|
1571
1657
|
}
|
|
1572
|
-
function
|
|
1658
|
+
function Mn(e) {
|
|
1573
1659
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1574
1660
|
}
|
|
1575
|
-
const
|
|
1661
|
+
const se = {
|
|
1576
1662
|
Continue: 100,
|
|
1577
1663
|
SwitchingProtocols: 101,
|
|
1578
1664
|
Processing: 102,
|
|
@@ -1637,151 +1723,155 @@ const te = {
|
|
|
1637
1723
|
NotExtended: 510,
|
|
1638
1724
|
NetworkAuthenticationRequired: 511
|
|
1639
1725
|
};
|
|
1640
|
-
Object.entries(
|
|
1641
|
-
|
|
1726
|
+
Object.entries(se).forEach(([e, t]) => {
|
|
1727
|
+
se[t] = e;
|
|
1642
1728
|
});
|
|
1643
|
-
const
|
|
1644
|
-
function
|
|
1645
|
-
const t = new
|
|
1646
|
-
return a.extend(n,
|
|
1647
|
-
return
|
|
1729
|
+
const qn = se;
|
|
1730
|
+
function Qe(e) {
|
|
1731
|
+
const t = new $(e), n = Fe($.prototype.request, t);
|
|
1732
|
+
return a.extend(n, $.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1733
|
+
return Qe(P(e, s));
|
|
1648
1734
|
}, n;
|
|
1649
1735
|
}
|
|
1650
|
-
const
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1736
|
+
const _ = Qe(ce);
|
|
1737
|
+
_.Axios = $;
|
|
1738
|
+
_.CanceledError = j;
|
|
1739
|
+
_.CancelToken = Hn;
|
|
1740
|
+
_.isCancel = We;
|
|
1741
|
+
_.VERSION = Ge;
|
|
1742
|
+
_.toFormData = J;
|
|
1743
|
+
_.AxiosError = y;
|
|
1744
|
+
_.Cancel = _.CanceledError;
|
|
1745
|
+
_.all = function(t) {
|
|
1660
1746
|
return Promise.all(t);
|
|
1661
1747
|
};
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
const
|
|
1748
|
+
_.spread = $n;
|
|
1749
|
+
_.isAxiosError = Mn;
|
|
1750
|
+
_.mergeConfig = P;
|
|
1751
|
+
_.AxiosHeaders = T;
|
|
1752
|
+
_.formToJSON = (e) => Je(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1753
|
+
_.getAdapter = Xe.getAdapter;
|
|
1754
|
+
_.HttpStatusCode = qn;
|
|
1755
|
+
_.default = _;
|
|
1756
|
+
const zn = _, Vn = /* @__PURE__ */ Te({
|
|
1671
1757
|
__name: "FileViewer",
|
|
1672
1758
|
props: {
|
|
1673
1759
|
file: null,
|
|
1674
1760
|
url: null
|
|
1675
1761
|
},
|
|
1676
1762
|
setup(e) {
|
|
1677
|
-
const t = e, n =
|
|
1763
|
+
const t = e, n = L(!1), r = L(""), s = L(""), o = L(""), i = L();
|
|
1678
1764
|
return (() => {
|
|
1679
1765
|
const l = {
|
|
1680
1766
|
loading: "正在加载中,请耐心等待...",
|
|
1681
1767
|
reading: "正在努力解析文件...",
|
|
1682
|
-
errorLoading: (
|
|
1683
|
-
errorReading: (
|
|
1768
|
+
errorLoading: (c) => `加载文件异常:${c}`,
|
|
1769
|
+
errorReading: (c) => `读取文件异常:${c}`
|
|
1684
1770
|
};
|
|
1685
|
-
let
|
|
1686
|
-
const
|
|
1771
|
+
let u;
|
|
1772
|
+
const f = {
|
|
1687
1773
|
// 从url加载
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1774
|
+
loadFromUrl() {
|
|
1775
|
+
return b(this, null, function* () {
|
|
1776
|
+
const { url: c } = t;
|
|
1777
|
+
if (!c)
|
|
1778
|
+
return;
|
|
1779
|
+
this.startLoading(l.loading);
|
|
1780
|
+
const m = c.substring(c.lastIndexOf("/") + 1);
|
|
1781
|
+
try {
|
|
1782
|
+
const { data: w } = yield zn({ url: c, method: "get", responseType: "blob" });
|
|
1783
|
+
if (!w)
|
|
1784
|
+
return this.showError("文件下载失败");
|
|
1785
|
+
const p = this.wrap(w, m);
|
|
1786
|
+
return this.resolveFile(p);
|
|
1787
|
+
} catch (w) {
|
|
1788
|
+
this.showError(l.errorLoading(w));
|
|
1789
|
+
} finally {
|
|
1790
|
+
this.endLoading();
|
|
1791
|
+
}
|
|
1792
|
+
});
|
|
1705
1793
|
},
|
|
1706
1794
|
// 包装file
|
|
1707
|
-
wrap(
|
|
1708
|
-
if (
|
|
1709
|
-
return
|
|
1710
|
-
if (
|
|
1711
|
-
return new File([
|
|
1712
|
-
if (
|
|
1713
|
-
return this.wrap(new Blob([
|
|
1795
|
+
wrap(c, m) {
|
|
1796
|
+
if (c instanceof File)
|
|
1797
|
+
return c;
|
|
1798
|
+
if (c instanceof Blob && m)
|
|
1799
|
+
return new File([c], m, {});
|
|
1800
|
+
if (c instanceof ArrayBuffer)
|
|
1801
|
+
return this.wrap(new Blob([c]));
|
|
1714
1802
|
throw new Error("不支持的文件类型格式!");
|
|
1715
1803
|
},
|
|
1716
1804
|
// 处理并解析文件
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1805
|
+
resolveFile(c) {
|
|
1806
|
+
return b(this, null, function* () {
|
|
1807
|
+
n.value && this.endLoading();
|
|
1808
|
+
const m = this.wrap(c);
|
|
1809
|
+
this.startLoading(l.reading);
|
|
1810
|
+
try {
|
|
1811
|
+
o.value = m.name && decodeURIComponent(m.name) || "";
|
|
1812
|
+
const w = yield ut(m);
|
|
1813
|
+
w instanceof ArrayBuffer && (u = yield this.displayResult(w, m));
|
|
1814
|
+
} catch (w) {
|
|
1815
|
+
console.error(w), this.showError(l.errorReading(w));
|
|
1816
|
+
} finally {
|
|
1817
|
+
this.endLoading();
|
|
1818
|
+
}
|
|
1819
|
+
});
|
|
1730
1820
|
},
|
|
1731
1821
|
// 展示渲染最终效果
|
|
1732
|
-
displayResult(
|
|
1733
|
-
const { name:
|
|
1734
|
-
if (!
|
|
1822
|
+
displayResult(c, m) {
|
|
1823
|
+
const { name: w } = m, p = Ot(w), h = i.value;
|
|
1824
|
+
if (!h)
|
|
1735
1825
|
return Promise.resolve();
|
|
1736
|
-
|
|
1737
|
-
const
|
|
1738
|
-
|
|
1739
|
-
const
|
|
1740
|
-
return new Promise((
|
|
1826
|
+
u && (h.lastChild && h.removeChild(h.lastChild), u.$destroy());
|
|
1827
|
+
const E = document.createElement("div");
|
|
1828
|
+
E.className = "file-render";
|
|
1829
|
+
const R = h.appendChild(E);
|
|
1830
|
+
return new Promise((g, O) => At(c, p, R).then(g).catch(O));
|
|
1741
1831
|
},
|
|
1742
|
-
showError(
|
|
1743
|
-
r.value =
|
|
1832
|
+
showError(c) {
|
|
1833
|
+
r.value = c;
|
|
1744
1834
|
},
|
|
1745
|
-
startLoading(
|
|
1746
|
-
n.value = !0, s.value =
|
|
1835
|
+
startLoading(c) {
|
|
1836
|
+
n.value = !0, s.value = c, r.value = "";
|
|
1747
1837
|
},
|
|
1748
1838
|
endLoading() {
|
|
1749
1839
|
n.value = !1, s.value = "";
|
|
1750
1840
|
}
|
|
1751
1841
|
};
|
|
1752
|
-
|
|
1753
|
-
t.file &&
|
|
1754
|
-
}),
|
|
1842
|
+
nt(() => {
|
|
1843
|
+
t.file && f.resolveFile(t.file), f.loadFromUrl();
|
|
1844
|
+
}), pe(() => t.url, () => f.loadFromUrl()), pe(() => t.file, (c) => c && f.resolveFile(c));
|
|
1755
1845
|
})(), { __sfc: !0, props: t, loading: n, error: r, message: s, filename: o, output: i };
|
|
1756
1846
|
}
|
|
1757
1847
|
});
|
|
1758
|
-
var
|
|
1848
|
+
var Jn = function() {
|
|
1759
1849
|
var t = this, n = t._self._c, r = t._self._setupProxy;
|
|
1760
1850
|
return n("div", { staticClass: "file-viewer" }, [n("div", { staticClass: "name" }, [t._v(t._s(r.filename))]), r.error ? n("div", { staticClass: "content loading" }, [t._v(t._s(r.error))]) : [n("div", { directives: [{ name: "show", rawName: "v-show", value: r.loading, expression: "loading" }], staticClass: "content loading" }, [t._v(t._s(r.message))]), n("div", { directives: [{ name: "show", rawName: "v-show", value: !r.loading, expression: "!loading" }], ref: "output", staticClass: "content" })]], 2);
|
|
1761
|
-
},
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1851
|
+
}, Wn = [], Kn = /* @__PURE__ */ Pe(
|
|
1852
|
+
Vn,
|
|
1853
|
+
Jn,
|
|
1854
|
+
Wn,
|
|
1765
1855
|
!1,
|
|
1766
1856
|
null,
|
|
1767
1857
|
"ab17bda9",
|
|
1768
1858
|
null,
|
|
1769
1859
|
null
|
|
1770
1860
|
);
|
|
1771
|
-
const
|
|
1772
|
-
["file-viewer",
|
|
1861
|
+
const Xn = Kn.exports, Gn = [
|
|
1862
|
+
["file-viewer", Xn]
|
|
1773
1863
|
];
|
|
1774
|
-
class
|
|
1864
|
+
class Qn {
|
|
1775
1865
|
constructor() {
|
|
1776
|
-
|
|
1866
|
+
de(this, "installed", !1);
|
|
1777
1867
|
}
|
|
1778
1868
|
install(t) {
|
|
1779
|
-
this.installed || (
|
|
1869
|
+
this.installed || (Gn.forEach(([n, r]) => t.component(n, r)), this.installed = !0);
|
|
1780
1870
|
}
|
|
1781
1871
|
}
|
|
1782
|
-
const
|
|
1872
|
+
const er = new Qn();
|
|
1783
1873
|
export {
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1874
|
+
Xn as F,
|
|
1875
|
+
er as i,
|
|
1876
|
+
Pe as n
|
|
1787
1877
|
};
|