workdesktop-ai 1.0.2 → 1.1.0
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/CHANGELOG.md +155 -93
- package/README.md +123 -25
- package/dist/api-button/index.mjs +7 -0
- package/dist/api-button/index.mjs.map +1 -0
- package/dist/assets/Select-CNzSyvlZ.css +1 -0
- package/dist/auto-complete/index.mjs +7 -0
- package/dist/auto-complete/index.mjs.map +1 -0
- package/dist/auto-complete/style.css +1 -0
- package/dist/base.css +1 -0
- package/dist/checkbox-list/index.mjs +7 -0
- package/dist/checkbox-list/index.mjs.map +1 -0
- package/dist/checkbox-list/style.css +1 -0
- package/dist/chunks/ApiButton.vue_vue_type_script_setup_true_lang-CweWFfDE.mjs +80 -0
- package/dist/chunks/ApiButton.vue_vue_type_script_setup_true_lang-CweWFfDE.mjs.map +1 -0
- package/dist/chunks/AutoComplete-B_L169hU.mjs +80 -0
- package/dist/chunks/AutoComplete-B_L169hU.mjs.map +1 -0
- package/dist/chunks/CheckboxList-bPqpbd8d.mjs +129 -0
- package/dist/chunks/CheckboxList-bPqpbd8d.mjs.map +1 -0
- package/dist/chunks/ConfirmButton.vue_vue_type_script_setup_true_lang-DpdMPkka.mjs +99 -0
- package/dist/chunks/ConfirmButton.vue_vue_type_script_setup_true_lang-DpdMPkka.mjs.map +1 -0
- package/dist/chunks/DataForm-C6UW92Ds.mjs +305 -0
- package/dist/chunks/DataForm-C6UW92Ds.mjs.map +1 -0
- package/dist/chunks/DataGrid-BhgND4G_.mjs +1124 -0
- package/dist/chunks/DataGrid-BhgND4G_.mjs.map +1 -0
- package/dist/chunks/DialogButton.vue_vue_type_script_setup_true_lang-CTXP79zc.mjs +117 -0
- package/dist/chunks/DialogButton.vue_vue_type_script_setup_true_lang-CTXP79zc.mjs.map +1 -0
- package/dist/chunks/Drawer-ucXKUecL.mjs +259 -0
- package/dist/chunks/Drawer-ucXKUecL.mjs.map +1 -0
- package/dist/chunks/DrawerButton.vue_vue_type_script_setup_true_lang-DUda4p7_.mjs +125 -0
- package/dist/chunks/DrawerButton.vue_vue_type_script_setup_true_lang-DUda4p7_.mjs.map +1 -0
- package/dist/chunks/EditableGrid-Cx7ScWkW.mjs +1783 -0
- package/dist/chunks/EditableGrid-Cx7ScWkW.mjs.map +1 -0
- package/dist/chunks/FormItem-C1q0opnk.mjs +79 -0
- package/dist/chunks/FormItem-C1q0opnk.mjs.map +1 -0
- package/dist/chunks/Iframe-CeSiMnvR.mjs +65 -0
- package/dist/chunks/Iframe-CeSiMnvR.mjs.map +1 -0
- package/dist/chunks/ImageUpload-D3JGJjVO.mjs +193 -0
- package/dist/chunks/ImageUpload-D3JGJjVO.mjs.map +1 -0
- package/dist/chunks/Panel-d4chdlTA.mjs +113 -0
- package/dist/chunks/Panel-d4chdlTA.mjs.map +1 -0
- package/dist/chunks/PromptButton.vue_vue_type_script_setup_true_lang-BqoNAUoo.mjs +118 -0
- package/dist/chunks/PromptButton.vue_vue_type_script_setup_true_lang-BqoNAUoo.mjs.map +1 -0
- package/dist/chunks/RadioList-DT-8WSN2.mjs +129 -0
- package/dist/chunks/RadioList-DT-8WSN2.mjs.map +1 -0
- package/dist/chunks/Requester.vue_vue_type_script_setup_true_lang-5B1V-53c.mjs +80 -0
- package/dist/chunks/Requester.vue_vue_type_script_setup_true_lang-5B1V-53c.mjs.map +1 -0
- package/dist/chunks/RouteButton.vue_vue_type_script_setup_true_lang-Da0D3tKA.mjs +73 -0
- package/dist/chunks/RouteButton.vue_vue_type_script_setup_true_lang-Da0D3tKA.mjs.map +1 -0
- package/dist/chunks/SearchItem-pFO57lEO.mjs +79 -0
- package/dist/chunks/SearchItem-pFO57lEO.mjs.map +1 -0
- package/dist/chunks/SearchPanel-xQ1hPaNq.mjs +158 -0
- package/dist/chunks/SearchPanel-xQ1hPaNq.mjs.map +1 -0
- package/dist/chunks/Select-CMw-tWYm.mjs +114 -0
- package/dist/chunks/Select-CMw-tWYm.mjs.map +1 -0
- package/dist/chunks/Station-BF_QlQ8c.mjs +796 -0
- package/dist/chunks/Station-BF_QlQ8c.mjs.map +1 -0
- package/dist/chunks/Switch.vue_vue_type_script_setup_true_lang-CCU_d3jW.mjs +71 -0
- package/dist/chunks/Switch.vue_vue_type_script_setup_true_lang-CCU_d3jW.mjs.map +1 -0
- package/dist/chunks/Tips-IWCZcR1K.mjs +63 -0
- package/dist/chunks/Tips-IWCZcR1K.mjs.map +1 -0
- package/dist/chunks/TipsButton.vue_vue_type_script_setup_true_lang-DvcpRSV1.mjs +51 -0
- package/dist/chunks/TipsButton.vue_vue_type_script_setup_true_lang-DvcpRSV1.mjs.map +1 -0
- package/dist/chunks/Upload.vue_vue_type_script_setup_true_lang-CkxGO85H.mjs +200 -0
- package/dist/chunks/Upload.vue_vue_type_script_setup_true_lang-CkxGO85H.mjs.map +1 -0
- package/dist/chunks/Viewer-COLbtcgF.mjs +381 -0
- package/dist/chunks/Viewer-COLbtcgF.mjs.map +1 -0
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs +10 -0
- package/dist/chunks/_plugin-vue_export-helper-CHgC5LLL.mjs.map +1 -0
- package/dist/chunks/containerContext-BgphFDeH.mjs +13 -0
- package/dist/chunks/containerContext-BgphFDeH.mjs.map +1 -0
- package/dist/chunks/http-DUPsbs2K.mjs +2951 -0
- package/dist/chunks/http-DUPsbs2K.mjs.map +1 -0
- package/dist/chunks/linkage-FbL1mcz3.mjs +66 -0
- package/dist/chunks/linkage-FbL1mcz3.mjs.map +1 -0
- package/dist/chunks/props-DAytpx7D.mjs +65 -0
- package/dist/chunks/props-DAytpx7D.mjs.map +1 -0
- package/dist/chunks/useApiAction-C1CdKGjt.mjs +30 -0
- package/dist/chunks/useApiAction-C1CdKGjt.mjs.map +1 -0
- package/dist/chunks/useColumnSettings-BDtF5-8R.mjs +216 -0
- package/dist/chunks/useColumnSettings-BDtF5-8R.mjs.map +1 -0
- package/dist/chunks/useOptionsLoader-D0RTB_ar.mjs +64 -0
- package/dist/chunks/useOptionsLoader-D0RTB_ar.mjs.map +1 -0
- package/dist/confirm-button/index.mjs +7 -0
- package/dist/confirm-button/index.mjs.map +1 -0
- package/dist/data-form/index.mjs +7 -0
- package/dist/data-form/index.mjs.map +1 -0
- package/dist/data-form/style.css +1 -0
- package/dist/data-grid/index.mjs +7 -0
- package/dist/data-grid/index.mjs.map +1 -0
- package/dist/data-grid/style.css +1 -0
- package/dist/dialog-button/index.mjs +7 -0
- package/dist/dialog-button/index.mjs.map +1 -0
- package/dist/drawer/index.mjs +7 -0
- package/dist/drawer/index.mjs.map +1 -0
- package/dist/drawer/style.css +1 -0
- package/dist/drawer-button/index.mjs +7 -0
- package/dist/drawer-button/index.mjs.map +1 -0
- package/dist/editable-grid/index.mjs +7 -0
- package/dist/editable-grid/index.mjs.map +1 -0
- package/dist/editable-grid/style.css +1 -0
- package/dist/form-item/index.mjs +7 -0
- package/dist/form-item/index.mjs.map +1 -0
- package/dist/form-item/style.css +1 -0
- package/dist/iframe/index.mjs +7 -0
- package/dist/iframe/index.mjs.map +1 -0
- package/dist/iframe/style.css +1 -0
- package/dist/image-upload/index.mjs +7 -0
- package/dist/image-upload/index.mjs.map +1 -0
- package/dist/image-upload/style.css +1 -0
- package/dist/index.esm.js +318 -6495
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +20 -9
- package/dist/index.umd.js.map +1 -1
- package/dist/panel/index.mjs +7 -0
- package/dist/panel/index.mjs.map +1 -0
- package/dist/panel/style.css +1 -0
- package/dist/prompt-button/index.mjs +7 -0
- package/dist/prompt-button/index.mjs.map +1 -0
- package/dist/radio-list/index.mjs +7 -0
- package/dist/radio-list/index.mjs.map +1 -0
- package/dist/radio-list/style.css +1 -0
- package/dist/requester/index.mjs +7 -0
- package/dist/requester/index.mjs.map +1 -0
- package/dist/route-button/index.mjs +7 -0
- package/dist/route-button/index.mjs.map +1 -0
- package/dist/search-item/index.mjs +7 -0
- package/dist/search-item/index.mjs.map +1 -0
- package/dist/search-item/style.css +1 -0
- package/dist/search-panel/index.mjs +7 -0
- package/dist/search-panel/index.mjs.map +1 -0
- package/dist/search-panel/style.css +1 -0
- package/dist/select/index.mjs +7 -0
- package/dist/select/index.mjs.map +1 -0
- package/dist/station/index.mjs +7 -0
- package/dist/station/index.mjs.map +1 -0
- package/dist/station/style.css +1 -0
- package/dist/style.css +1 -1
- package/dist/switch/index.mjs +7 -0
- package/dist/switch/index.mjs.map +1 -0
- package/dist/tips/index.mjs +7 -0
- package/dist/tips/index.mjs.map +1 -0
- package/dist/tips/style.css +1 -0
- package/dist/tips-button/index.mjs +7 -0
- package/dist/tips-button/index.mjs.map +1 -0
- package/dist/types/src/components/buttons/ApiButton.vue.d.ts +35 -6
- package/dist/types/src/components/buttons/ConfirmButton.vue.d.ts +37 -8
- package/dist/types/src/components/buttons/DialogButton.vue.d.ts +89 -29
- package/dist/types/src/components/buttons/DrawerButton.vue.d.ts +99 -31
- package/dist/types/src/components/buttons/PopconfirmButton.vue.d.ts +317 -0
- package/dist/types/src/components/buttons/PromptButton.vue.d.ts +45 -14
- package/dist/types/src/components/buttons/RouteButton.vue.d.ts +34 -5
- package/dist/types/src/components/buttons/TipsButton.vue.d.ts +8 -15
- package/dist/types/src/components/common/props.d.ts +32 -2
- package/dist/types/src/components/containers/Drawer.vue.d.ts +61 -8
- package/dist/types/src/components/containers/Iframe.vue.d.ts +39 -2
- package/dist/types/src/components/containers/containerContext.d.ts +1 -1
- package/dist/types/src/components/containers/useContainerController.d.ts +5 -0
- package/dist/types/src/components/containers/useIframeContainer.d.ts +20 -0
- package/dist/types/src/components/core/Requester.vue.d.ts +41 -0
- package/dist/types/src/components/data/datagrid/DataGrid.vue.d.ts +212 -5
- package/dist/types/src/components/data/datagrid/useColumnSettings.d.ts +14 -0
- package/dist/types/src/components/data/editable-grid/EditableGrid.vue.d.ts +586 -0
- package/dist/types/src/components/data/viewer/Viewer.vue.d.ts +187 -0
- package/dist/types/src/components/form/FormItem.vue.d.ts +62 -0
- package/dist/types/src/components/form/SearchItem.vue.d.ts +62 -0
- package/dist/types/src/components/{containers → form}/SearchPanel.vue.d.ts +17 -2
- package/dist/types/src/components/form/data-form/DataForm.vue.d.ts +6 -6
- package/dist/types/src/components/index.d.ts +10 -6
- package/dist/types/src/components/inputs/AutoComplete.vue.d.ts +10 -1
- package/dist/types/src/components/inputs/CheckboxList.vue.d.ts +28 -3
- package/dist/types/src/components/inputs/RadioList.vue.d.ts +28 -3
- package/dist/types/src/components/inputs/Select.vue.d.ts +11 -1
- package/dist/types/src/components/inputs/Switch.vue.d.ts +2 -2
- package/dist/types/src/components/inputs/useOptionsLoader.d.ts +3 -0
- package/dist/types/src/components/layout/Station.vue.d.ts +302 -0
- package/dist/types/src/components/layout/StationMenuNode.vue.d.ts +20 -0
- package/dist/types/src/components/layout/types.d.ts +54 -0
- package/dist/types/src/components/styles/Panel.vue.d.ts +47 -5
- package/dist/types/src/components/upload/ImageUpload.vue.d.ts +4 -4
- package/dist/types/src/components/upload/Upload.vue.d.ts +1 -1
- package/dist/types/src/entries/api-button.d.ts +9 -0
- package/dist/types/src/entries/auto-complete.d.ts +9 -0
- package/dist/types/src/entries/checkbox-list.d.ts +9 -0
- package/dist/types/src/entries/components-map.d.ts +8 -0
- package/dist/types/src/entries/confirm-button.d.ts +9 -0
- package/dist/types/src/entries/data-form.d.ts +9 -0
- package/dist/types/src/entries/data-grid.d.ts +9 -0
- package/dist/types/src/entries/dialog-button.d.ts +9 -0
- package/dist/types/src/entries/drawer-button.d.ts +9 -0
- package/dist/types/src/entries/drawer.d.ts +9 -0
- package/dist/types/src/entries/editable-grid.d.ts +9 -0
- package/dist/types/src/entries/form-item.d.ts +9 -0
- package/dist/types/src/entries/iframe.d.ts +9 -0
- package/dist/types/src/entries/image-upload.d.ts +9 -0
- package/dist/types/src/entries/panel.d.ts +9 -0
- package/dist/types/src/entries/prompt-button.d.ts +9 -0
- package/dist/types/src/entries/radio-list.d.ts +9 -0
- package/dist/types/src/entries/requester.d.ts +9 -0
- package/dist/types/src/entries/route-button.d.ts +9 -0
- package/dist/types/src/entries/search-item.d.ts +9 -0
- package/dist/types/src/entries/search-panel.d.ts +9 -0
- package/dist/types/src/entries/select.d.ts +9 -0
- package/dist/types/src/entries/station.d.ts +9 -0
- package/dist/types/src/entries/switch.d.ts +9 -0
- package/dist/types/src/entries/tips-button.d.ts +9 -0
- package/dist/types/src/entries/tips.d.ts +9 -0
- package/dist/types/src/entries/upload.d.ts +9 -0
- package/dist/types/src/entries/viewer.d.ts +9 -0
- package/dist/types/src/index.d.ts +2 -1
- package/dist/types/src/lib/composables/useDataGrid.d.ts +15 -0
- package/dist/types/src/lib/core/http.d.ts +21 -4
- package/dist/types/src/lib/core/station-linkage.d.ts +41 -0
- package/dist/types/src/types/config.d.ts +20 -3
- package/dist/types/vite.config.d.ts +6 -1
- package/dist/upload/index.mjs +7 -0
- package/dist/upload/index.mjs.map +1 -0
- package/dist/viewer/index.mjs +7 -0
- package/dist/viewer/index.mjs.map +1 -0
- package/dist/viewer/style.css +1 -0
- package/package.json +199 -68
- package/dist/types/src/components/containers/Dialog.vue.d.ts +0 -112
- package/dist/types/src/components/data/editable-table/EditableTable.vue.d.ts +0 -306
- package/dist/types/src/components/utils/Viewer.vue.d.ts +0 -131
|
@@ -0,0 +1,2951 @@
|
|
|
1
|
+
var pn = Object.defineProperty;
|
|
2
|
+
var hn = (t, e, n) => e in t ? pn(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
|
|
3
|
+
var Y = (t, e, n) => hn(t, typeof e != "symbol" ? e + "" : e, n);
|
|
4
|
+
import { ElLoading as mn, ElMessage as gn, ElNotification as yn, ElMessageBox as wn } from "element-plus";
|
|
5
|
+
function Dt(t, e) {
|
|
6
|
+
return function() {
|
|
7
|
+
return t.apply(e, arguments);
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
const { toString: bn } = Object.prototype, { getPrototypeOf: X } = Object, { iterator: we, toStringTag: Lt } = Symbol, ge = (({ hasOwnProperty: t }) => (e, n) => t.call(e, n))(Object.prototype), Ut = (t) => typeof t == "string" && (t === "__proto__" || t === "constructor" || t === "prototype"), Ft = (t, e, n) => t === Object.prototype || !n && e === null, En = (t) => {
|
|
11
|
+
if (!Object.isExtensible(t))
|
|
12
|
+
return !1;
|
|
13
|
+
const e = Object.getOwnPropertyNames(t);
|
|
14
|
+
return Object.getOwnPropertySymbols && e.push(...Object.getOwnPropertySymbols(t)), e.every((n) => {
|
|
15
|
+
if (Ut(n))
|
|
16
|
+
return !1;
|
|
17
|
+
const r = Object.getOwnPropertyDescriptor(t, n);
|
|
18
|
+
return !!r && r.configurable && r.writable === !0;
|
|
19
|
+
});
|
|
20
|
+
}, ye = (t, e) => {
|
|
21
|
+
let n = t;
|
|
22
|
+
const r = [];
|
|
23
|
+
for (; n != null; ) {
|
|
24
|
+
if (r.indexOf(n) !== -1)
|
|
25
|
+
return !1;
|
|
26
|
+
r.push(n);
|
|
27
|
+
const s = X(n);
|
|
28
|
+
if (Ft(n, s, n === t))
|
|
29
|
+
return !1;
|
|
30
|
+
if (ge(n, e))
|
|
31
|
+
return !0;
|
|
32
|
+
n = s;
|
|
33
|
+
}
|
|
34
|
+
return !1;
|
|
35
|
+
}, Rn = (t, e) => t != null && ye(t, e) ? t[e] : void 0, Sn = (t) => {
|
|
36
|
+
if (t == null || typeof t != "object" && typeof t != "function")
|
|
37
|
+
return t;
|
|
38
|
+
const e = X(t);
|
|
39
|
+
if (e === null && En(t))
|
|
40
|
+
return t;
|
|
41
|
+
const n = /* @__PURE__ */ Object.create(null), r = /* @__PURE__ */ Object.create(null), s = [];
|
|
42
|
+
let o = t;
|
|
43
|
+
for (; o != null && s.indexOf(o) === -1; ) {
|
|
44
|
+
s.push(o);
|
|
45
|
+
const i = o === t ? e : X(o);
|
|
46
|
+
if (Ft(o, i, o === t))
|
|
47
|
+
break;
|
|
48
|
+
const c = Object.getOwnPropertyNames(o);
|
|
49
|
+
Object.getOwnPropertySymbols && c.push(...Object.getOwnPropertySymbols(o));
|
|
50
|
+
for (const l of c)
|
|
51
|
+
Ut(l) || ge(r, l) || (n[l] = t[l], r[l] = !0);
|
|
52
|
+
o = i;
|
|
53
|
+
}
|
|
54
|
+
return n;
|
|
55
|
+
}, Ge = /* @__PURE__ */ ((t) => (e) => {
|
|
56
|
+
const n = bn.call(e);
|
|
57
|
+
return t[n] || (t[n] = n.slice(8, -1).toLowerCase());
|
|
58
|
+
})(/* @__PURE__ */ Object.create(null)), k = (t) => (t = t.toLowerCase(), (e) => Ge(e) === t), Le = (t) => (e) => typeof e === t, { isArray: ne } = Array, re = Le("undefined");
|
|
59
|
+
function ae(t) {
|
|
60
|
+
return t !== null && !re(t) && t.constructor !== null && !re(t.constructor) && j(t.constructor.isBuffer) && t.constructor.isBuffer(t);
|
|
61
|
+
}
|
|
62
|
+
const jt = k("ArrayBuffer");
|
|
63
|
+
function On(t) {
|
|
64
|
+
let e;
|
|
65
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? e = ArrayBuffer.isView(t) : e = t && t.buffer && jt(t.buffer), e;
|
|
66
|
+
}
|
|
67
|
+
const An = Le("string"), j = Le("function"), Bt = Le("number"), ce = (t) => t !== null && typeof t == "object", _n = (t) => t === !0 || t === !1, xe = (t) => {
|
|
68
|
+
if (!ce(t))
|
|
69
|
+
return !1;
|
|
70
|
+
const e = X(t);
|
|
71
|
+
return (e === null || e === Object.prototype || X(e) === null) && // Treat safe own/inherited Symbol.toStringTag or Symbol.iterator members as
|
|
72
|
+
// evidence the value is tagged/iterable, while ignoring members reachable
|
|
73
|
+
// only through shared or terminal prototype boundaries.
|
|
74
|
+
!ye(t, Lt) && !ye(t, we);
|
|
75
|
+
}, xn = (t) => {
|
|
76
|
+
if (!ce(t) || ae(t))
|
|
77
|
+
return !1;
|
|
78
|
+
try {
|
|
79
|
+
return Object.keys(t).length === 0 && Object.getPrototypeOf(t) === Object.prototype;
|
|
80
|
+
} catch {
|
|
81
|
+
return !1;
|
|
82
|
+
}
|
|
83
|
+
}, Pn = k("Date"), Tn = k("File"), Cn = (t) => !!(t && typeof t.uri < "u"), Nn = (t) => t && typeof t.getParts < "u", Dn = k("Blob"), Ln = k("FileList"), Un = k("Set"), Fn = (t) => ce(t) && j(t.pipe);
|
|
84
|
+
function jn() {
|
|
85
|
+
return typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : {};
|
|
86
|
+
}
|
|
87
|
+
const ft = jn(), dt = typeof ft.FormData < "u" ? ft.FormData : void 0, Bn = (t) => {
|
|
88
|
+
if (!t) return !1;
|
|
89
|
+
if (dt && t instanceof dt) return !0;
|
|
90
|
+
const e = X(t);
|
|
91
|
+
if (!e || e === Object.prototype || !j(t.append)) return !1;
|
|
92
|
+
const n = Ge(t);
|
|
93
|
+
return n === "formdata" || // detect form-data instance
|
|
94
|
+
n === "object" && j(t.toString) && t.toString() === "[object FormData]";
|
|
95
|
+
}, kn = k("URLSearchParams"), [In, Mn, Hn, $n] = [
|
|
96
|
+
"ReadableStream",
|
|
97
|
+
"Request",
|
|
98
|
+
"Response",
|
|
99
|
+
"Headers"
|
|
100
|
+
].map(k), qn = (t) => t.trim ? t.trim() : t.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
101
|
+
function be(t, e, { allOwnKeys: n = !1 } = {}) {
|
|
102
|
+
if (t === null || typeof t > "u")
|
|
103
|
+
return;
|
|
104
|
+
let r, s;
|
|
105
|
+
if (typeof t != "object" && (t = [t]), ne(t))
|
|
106
|
+
for (r = 0, s = t.length; r < s; r++)
|
|
107
|
+
e.call(null, t[r], r, t);
|
|
108
|
+
else {
|
|
109
|
+
if (ae(t))
|
|
110
|
+
return;
|
|
111
|
+
const o = n ? Object.getOwnPropertyNames(t) : Object.keys(t), i = o.length;
|
|
112
|
+
let c;
|
|
113
|
+
for (r = 0; r < i; r++)
|
|
114
|
+
c = o[r], e.call(null, t[c], c, t);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
function kt(t, e) {
|
|
118
|
+
if (ae(t))
|
|
119
|
+
return null;
|
|
120
|
+
e = e.toLowerCase();
|
|
121
|
+
const n = Object.keys(t);
|
|
122
|
+
let r = n.length, s;
|
|
123
|
+
for (; r-- > 0; )
|
|
124
|
+
if (s = n[r], e === s.toLowerCase())
|
|
125
|
+
return s;
|
|
126
|
+
return null;
|
|
127
|
+
}
|
|
128
|
+
const ee = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, It = (t) => !re(t) && t !== ee;
|
|
129
|
+
function Je(...t) {
|
|
130
|
+
const { caseless: e, skipUndefined: n } = It(this) && this || {}, r = {}, s = (o, i) => {
|
|
131
|
+
if (i === "__proto__" || i === "constructor" || i === "prototype")
|
|
132
|
+
return;
|
|
133
|
+
const c = e && typeof i == "string" && kt(r, i) || i, l = ge(r, c) ? r[c] : void 0;
|
|
134
|
+
xe(l) && xe(o) ? r[c] = Je(l, o) : xe(o) ? r[c] = Je({}, o) : ne(o) ? r[c] = o.slice() : (!n || !re(o)) && (r[c] = o);
|
|
135
|
+
};
|
|
136
|
+
for (let o = 0, i = t.length; o < i; o++) {
|
|
137
|
+
const c = t[o];
|
|
138
|
+
if (!c || ae(c) || (be(c, s), typeof c != "object" || ne(c)))
|
|
139
|
+
continue;
|
|
140
|
+
const l = Object.getOwnPropertySymbols(c);
|
|
141
|
+
for (let d = 0; d < l.length; d++) {
|
|
142
|
+
const u = l[d];
|
|
143
|
+
er.call(c, u) && s(c[u], u);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
return r;
|
|
147
|
+
}
|
|
148
|
+
const zn = (t, e, n, { allOwnKeys: r } = {}) => (be(
|
|
149
|
+
e,
|
|
150
|
+
(s, o) => {
|
|
151
|
+
n && j(s) ? Object.defineProperty(t, o, {
|
|
152
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot
|
|
153
|
+
// hijack defineProperty's accessor-vs-data resolution.
|
|
154
|
+
__proto__: null,
|
|
155
|
+
value: Dt(s, n),
|
|
156
|
+
writable: !0,
|
|
157
|
+
enumerable: !0,
|
|
158
|
+
configurable: !0
|
|
159
|
+
}) : Object.defineProperty(t, o, {
|
|
160
|
+
__proto__: null,
|
|
161
|
+
value: s,
|
|
162
|
+
writable: !0,
|
|
163
|
+
enumerable: !0,
|
|
164
|
+
configurable: !0
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
{ allOwnKeys: r }
|
|
168
|
+
), t), vn = (t) => (t.charCodeAt(0) === 65279 && (t = t.slice(1)), t), Wn = (t, e, n, r) => {
|
|
169
|
+
t.prototype = Object.create(e.prototype, r), Object.defineProperty(t.prototype, "constructor", {
|
|
170
|
+
__proto__: null,
|
|
171
|
+
value: t,
|
|
172
|
+
writable: !0,
|
|
173
|
+
enumerable: !1,
|
|
174
|
+
configurable: !0
|
|
175
|
+
}), Object.defineProperty(t, "super", {
|
|
176
|
+
__proto__: null,
|
|
177
|
+
value: e.prototype
|
|
178
|
+
}), n && Object.assign(t.prototype, n);
|
|
179
|
+
}, Vn = (t, e, n, r) => {
|
|
180
|
+
let s, o, i;
|
|
181
|
+
const c = {};
|
|
182
|
+
if (e = e || {}, t == null) return e;
|
|
183
|
+
do {
|
|
184
|
+
for (s = Object.getOwnPropertyNames(t), o = s.length; o-- > 0; )
|
|
185
|
+
i = s[o], (!r || r(i, t, e)) && !c[i] && (e[i] = t[i], c[i] = !0);
|
|
186
|
+
t = n !== !1 && X(t);
|
|
187
|
+
} while (t && (!n || n(t, e)) && t !== Object.prototype);
|
|
188
|
+
return e;
|
|
189
|
+
}, Jn = (t, e, n) => {
|
|
190
|
+
t = String(t), (n === void 0 || n > t.length) && (n = t.length), n -= e.length;
|
|
191
|
+
const r = t.indexOf(e, n);
|
|
192
|
+
return r !== -1 && r === n;
|
|
193
|
+
}, Kn = (t) => {
|
|
194
|
+
if (!t) return null;
|
|
195
|
+
if (ne(t)) return t;
|
|
196
|
+
let e = t.length;
|
|
197
|
+
if (!Bt(e)) return null;
|
|
198
|
+
const n = new Array(e);
|
|
199
|
+
for (; e-- > 0; )
|
|
200
|
+
n[e] = t[e];
|
|
201
|
+
return n;
|
|
202
|
+
}, Xn = /* @__PURE__ */ ((t) => (e) => t && e instanceof t)(typeof Uint8Array < "u" && X(Uint8Array)), Gn = (t, e) => {
|
|
203
|
+
const r = (t && t[we]).call(t);
|
|
204
|
+
let s;
|
|
205
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
206
|
+
const o = s.value;
|
|
207
|
+
e.call(t, o[0], o[1]);
|
|
208
|
+
}
|
|
209
|
+
}, Qn = (t, e) => {
|
|
210
|
+
let n;
|
|
211
|
+
const r = [];
|
|
212
|
+
for (; (n = t.exec(e)) !== null; )
|
|
213
|
+
r.push(n);
|
|
214
|
+
return r;
|
|
215
|
+
}, Zn = k("HTMLFormElement"), Yn = (t) => t.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function(n, r, s) {
|
|
216
|
+
return r.toUpperCase() + s;
|
|
217
|
+
}), { propertyIsEnumerable: er } = Object.prototype, tr = k("RegExp"), Mt = (t, e) => {
|
|
218
|
+
const n = Object.getOwnPropertyDescriptors(t), r = {};
|
|
219
|
+
be(n, (s, o) => {
|
|
220
|
+
let i;
|
|
221
|
+
(i = e(s, o, t)) !== !1 && (r[o] = i || s);
|
|
222
|
+
}), Object.defineProperties(t, r);
|
|
223
|
+
}, nr = (t) => {
|
|
224
|
+
Mt(t, (e, n) => {
|
|
225
|
+
if (j(t) && ["arguments", "caller", "callee"].includes(n))
|
|
226
|
+
return !1;
|
|
227
|
+
const r = t[n];
|
|
228
|
+
if (j(r)) {
|
|
229
|
+
if (e.enumerable = !1, "writable" in e) {
|
|
230
|
+
e.writable = !1;
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
e.set || (e.set = () => {
|
|
234
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
235
|
+
});
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
}, rr = (t, e) => {
|
|
239
|
+
const n = {}, r = (s) => {
|
|
240
|
+
s.forEach((o) => {
|
|
241
|
+
n[o] = !0;
|
|
242
|
+
});
|
|
243
|
+
};
|
|
244
|
+
return ne(t) ? r(t) : r(String(t).split(e)), n;
|
|
245
|
+
}, sr = () => {
|
|
246
|
+
}, or = (t, e) => t != null && Number.isFinite(t = +t) ? t : e;
|
|
247
|
+
function ir(t) {
|
|
248
|
+
return !!(t && j(t.append) && t[Lt] === "FormData" && t[we]);
|
|
249
|
+
}
|
|
250
|
+
const ar = (t) => {
|
|
251
|
+
const e = /* @__PURE__ */ new WeakSet(), n = (r) => {
|
|
252
|
+
if (ce(r)) {
|
|
253
|
+
if (e.has(r))
|
|
254
|
+
return;
|
|
255
|
+
if (ae(r))
|
|
256
|
+
return r;
|
|
257
|
+
if (!("toJSON" in r)) {
|
|
258
|
+
e.add(r);
|
|
259
|
+
let s;
|
|
260
|
+
if (Un(r)) {
|
|
261
|
+
s = [];
|
|
262
|
+
for (const o of r) {
|
|
263
|
+
const i = n(o);
|
|
264
|
+
!re(i) && s.push(i);
|
|
265
|
+
}
|
|
266
|
+
} else
|
|
267
|
+
s = ne(r) ? [] : {}, be(r, (o, i) => {
|
|
268
|
+
const c = n(o);
|
|
269
|
+
!re(c) && (s[i] = c);
|
|
270
|
+
});
|
|
271
|
+
return e.delete(r), s;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
return r;
|
|
275
|
+
};
|
|
276
|
+
return n(t);
|
|
277
|
+
}, cr = k("AsyncFunction"), lr = (t) => t && (ce(t) || j(t)) && j(t.then) && j(t.catch), Ht = ((t, e) => t ? setImmediate : e ? ((n, r) => (ee.addEventListener(
|
|
278
|
+
"message",
|
|
279
|
+
({ source: s, data: o }) => {
|
|
280
|
+
s === ee && o === n && r.length && r.shift()();
|
|
281
|
+
},
|
|
282
|
+
!1
|
|
283
|
+
), (s) => {
|
|
284
|
+
r.push(s), ee.postMessage(n, "*");
|
|
285
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(typeof setImmediate == "function", j(ee.postMessage)), ur = typeof queueMicrotask < "u" ? queueMicrotask.bind(ee) : typeof process < "u" && process.nextTick || Ht, $t = (t) => t != null && j(t[we]), fr = (t) => t != null && ye(t, we) && $t(t), a = {
|
|
286
|
+
isArray: ne,
|
|
287
|
+
isArrayBuffer: jt,
|
|
288
|
+
isBuffer: ae,
|
|
289
|
+
isFormData: Bn,
|
|
290
|
+
isArrayBufferView: On,
|
|
291
|
+
isString: An,
|
|
292
|
+
isNumber: Bt,
|
|
293
|
+
isBoolean: _n,
|
|
294
|
+
isObject: ce,
|
|
295
|
+
isPlainObject: xe,
|
|
296
|
+
isEmptyObject: xn,
|
|
297
|
+
isReadableStream: In,
|
|
298
|
+
isRequest: Mn,
|
|
299
|
+
isResponse: Hn,
|
|
300
|
+
isHeaders: $n,
|
|
301
|
+
isUndefined: re,
|
|
302
|
+
isDate: Pn,
|
|
303
|
+
isFile: Tn,
|
|
304
|
+
isReactNativeBlob: Cn,
|
|
305
|
+
isReactNative: Nn,
|
|
306
|
+
isBlob: Dn,
|
|
307
|
+
isRegExp: tr,
|
|
308
|
+
isFunction: j,
|
|
309
|
+
isStream: Fn,
|
|
310
|
+
isURLSearchParams: kn,
|
|
311
|
+
isTypedArray: Xn,
|
|
312
|
+
isFileList: Ln,
|
|
313
|
+
forEach: be,
|
|
314
|
+
merge: Je,
|
|
315
|
+
extend: zn,
|
|
316
|
+
trim: qn,
|
|
317
|
+
stripBOM: vn,
|
|
318
|
+
inherits: Wn,
|
|
319
|
+
toFlatObject: Vn,
|
|
320
|
+
kindOf: Ge,
|
|
321
|
+
kindOfTest: k,
|
|
322
|
+
endsWith: Jn,
|
|
323
|
+
toArray: Kn,
|
|
324
|
+
forEachEntry: Gn,
|
|
325
|
+
matchAll: Qn,
|
|
326
|
+
isHTMLForm: Zn,
|
|
327
|
+
hasOwnProperty: ge,
|
|
328
|
+
hasOwnProp: ge,
|
|
329
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
330
|
+
hasOwnInPrototypeChain: ye,
|
|
331
|
+
getSafeProp: Rn,
|
|
332
|
+
toSafeFlatObject: Sn,
|
|
333
|
+
reduceDescriptors: Mt,
|
|
334
|
+
freezeMethods: nr,
|
|
335
|
+
toObjectSet: rr,
|
|
336
|
+
toCamelCase: Yn,
|
|
337
|
+
noop: sr,
|
|
338
|
+
toFiniteNumber: or,
|
|
339
|
+
findKey: kt,
|
|
340
|
+
global: ee,
|
|
341
|
+
isContextDefined: It,
|
|
342
|
+
isSpecCompliantForm: ir,
|
|
343
|
+
toJSONObject: ar,
|
|
344
|
+
isAsyncFn: cr,
|
|
345
|
+
isThenable: lr,
|
|
346
|
+
setImmediate: Ht,
|
|
347
|
+
asap: ur,
|
|
348
|
+
isIterable: $t,
|
|
349
|
+
isSafeIterable: fr
|
|
350
|
+
}, dr = a.toObjectSet([
|
|
351
|
+
"age",
|
|
352
|
+
"authorization",
|
|
353
|
+
"content-length",
|
|
354
|
+
"content-type",
|
|
355
|
+
"etag",
|
|
356
|
+
"expires",
|
|
357
|
+
"from",
|
|
358
|
+
"host",
|
|
359
|
+
"if-modified-since",
|
|
360
|
+
"if-unmodified-since",
|
|
361
|
+
"last-modified",
|
|
362
|
+
"location",
|
|
363
|
+
"max-forwards",
|
|
364
|
+
"proxy-authorization",
|
|
365
|
+
"referer",
|
|
366
|
+
"retry-after",
|
|
367
|
+
"user-agent"
|
|
368
|
+
]), pr = (t) => {
|
|
369
|
+
const e = {};
|
|
370
|
+
let n, r, s;
|
|
371
|
+
return t && t.split(`
|
|
372
|
+
`).forEach(function(i) {
|
|
373
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim();
|
|
374
|
+
const c = a.hasOwnProp(e, n);
|
|
375
|
+
!n || c && a.hasOwnProp(dr, n) || (n === "set-cookie" ? c ? e[n].push(r) : e[n] = [r] : e[n] = c ? e[n] + ", " + r : r);
|
|
376
|
+
}), e;
|
|
377
|
+
};
|
|
378
|
+
function hr(t) {
|
|
379
|
+
let e = 0, n = t.length;
|
|
380
|
+
for (; e < n; ) {
|
|
381
|
+
const r = t.charCodeAt(e);
|
|
382
|
+
if (r !== 9 && r !== 32)
|
|
383
|
+
break;
|
|
384
|
+
e += 1;
|
|
385
|
+
}
|
|
386
|
+
for (; n > e; ) {
|
|
387
|
+
const r = t.charCodeAt(n - 1);
|
|
388
|
+
if (r !== 9 && r !== 32)
|
|
389
|
+
break;
|
|
390
|
+
n -= 1;
|
|
391
|
+
}
|
|
392
|
+
return e === 0 && n === t.length ? t : t.slice(e, n);
|
|
393
|
+
}
|
|
394
|
+
const mr = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g"), gr = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
395
|
+
function Qe(t, e) {
|
|
396
|
+
return a.isArray(t) ? t.map((n) => Qe(n, e)) : hr(String(t).replace(e, ""));
|
|
397
|
+
}
|
|
398
|
+
const yr = (t) => Qe(t, mr), wr = (t) => Qe(t, gr);
|
|
399
|
+
function qt(t) {
|
|
400
|
+
const e = /* @__PURE__ */ Object.create(null);
|
|
401
|
+
return a.forEach(t.toJSON(), (n, r) => {
|
|
402
|
+
e[r] = wr(n);
|
|
403
|
+
}), e;
|
|
404
|
+
}
|
|
405
|
+
const pt = Symbol("internals");
|
|
406
|
+
function de(t) {
|
|
407
|
+
return t && String(t).trim().toLowerCase();
|
|
408
|
+
}
|
|
409
|
+
function Pe(t) {
|
|
410
|
+
return t === !1 || t == null ? t : a.isArray(t) ? t.map(Pe) : yr(String(t));
|
|
411
|
+
}
|
|
412
|
+
function br(t) {
|
|
413
|
+
const e = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
414
|
+
let r;
|
|
415
|
+
for (; r = n.exec(t); )
|
|
416
|
+
e[r[1]] = r[2];
|
|
417
|
+
return e;
|
|
418
|
+
}
|
|
419
|
+
const Er = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
420
|
+
function Ie(t) {
|
|
421
|
+
let e = 0, n = t.length;
|
|
422
|
+
for (; e < n; ) {
|
|
423
|
+
const r = t.charCodeAt(e);
|
|
424
|
+
if (r !== 9 && r !== 32)
|
|
425
|
+
break;
|
|
426
|
+
e += 1;
|
|
427
|
+
}
|
|
428
|
+
for (; n > e; ) {
|
|
429
|
+
const r = t.charCodeAt(n - 1);
|
|
430
|
+
if (r !== 9 && r !== 32)
|
|
431
|
+
break;
|
|
432
|
+
n -= 1;
|
|
433
|
+
}
|
|
434
|
+
return e === 0 && n === t.length ? t : t.slice(e, n);
|
|
435
|
+
}
|
|
436
|
+
function Rr(t) {
|
|
437
|
+
const e = t.length - 1;
|
|
438
|
+
if (e < 1 || t.charCodeAt(0) !== 34 || t.charCodeAt(e) !== 34)
|
|
439
|
+
return t;
|
|
440
|
+
let n = "";
|
|
441
|
+
for (let r = 1; r < e; r++) {
|
|
442
|
+
const s = t.charCodeAt(r);
|
|
443
|
+
if (s === 34 || s === 92 && (r += 1, r >= e))
|
|
444
|
+
return t;
|
|
445
|
+
n += t[r];
|
|
446
|
+
}
|
|
447
|
+
return n;
|
|
448
|
+
}
|
|
449
|
+
function Sr(t) {
|
|
450
|
+
const e = /* @__PURE__ */ Object.create(null), n = String(t);
|
|
451
|
+
let r = 0, s = !1, o = !1;
|
|
452
|
+
function i(c) {
|
|
453
|
+
const l = Ie(n.slice(r, c)), d = l.indexOf("=");
|
|
454
|
+
if (d < 1)
|
|
455
|
+
return;
|
|
456
|
+
const u = Ie(l.slice(0, d));
|
|
457
|
+
if (!Er.test(u))
|
|
458
|
+
return;
|
|
459
|
+
const p = u.toLowerCase();
|
|
460
|
+
if (p === "__proto__" || p === "constructor" || p === "prototype")
|
|
461
|
+
return;
|
|
462
|
+
const g = Ie(l.slice(d + 1));
|
|
463
|
+
e[p] = Rr(g);
|
|
464
|
+
}
|
|
465
|
+
for (let c = 0; c < n.length; c++) {
|
|
466
|
+
const l = n.charCodeAt(c);
|
|
467
|
+
s ? o ? o = !1 : l === 92 ? o = !0 : l === 34 && (s = !1) : l === 34 ? s = !0 : (l === 44 || l === 59) && (i(c), r = c + 1);
|
|
468
|
+
}
|
|
469
|
+
return i(n.length), e;
|
|
470
|
+
}
|
|
471
|
+
const Or = (t) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(t.trim());
|
|
472
|
+
function Me(t, e, n, r, s) {
|
|
473
|
+
if (a.isFunction(r))
|
|
474
|
+
return r.call(this, e, n);
|
|
475
|
+
if (s && (e = n), !!a.isString(e)) {
|
|
476
|
+
if (a.isString(r))
|
|
477
|
+
return e.indexOf(r) !== -1;
|
|
478
|
+
if (a.isRegExp(r))
|
|
479
|
+
return r.test(e);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
function Ar(t) {
|
|
483
|
+
return t.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (e, n, r) => n.toUpperCase() + r);
|
|
484
|
+
}
|
|
485
|
+
function _r(t, e) {
|
|
486
|
+
const n = a.toCamelCase(" " + e);
|
|
487
|
+
["get", "set", "has"].forEach((r) => {
|
|
488
|
+
Object.defineProperty(t, r + n, {
|
|
489
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
490
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
491
|
+
__proto__: null,
|
|
492
|
+
value: function(s, o, i) {
|
|
493
|
+
return this[r].call(this, e, s, o, i);
|
|
494
|
+
},
|
|
495
|
+
configurable: !0
|
|
496
|
+
});
|
|
497
|
+
});
|
|
498
|
+
}
|
|
499
|
+
let F = class {
|
|
500
|
+
constructor(e) {
|
|
501
|
+
e && this.set(e);
|
|
502
|
+
}
|
|
503
|
+
set(e, n, r) {
|
|
504
|
+
const s = this;
|
|
505
|
+
function o(c, l, d) {
|
|
506
|
+
const u = de(l);
|
|
507
|
+
if (!u)
|
|
508
|
+
return;
|
|
509
|
+
const p = a.findKey(s, u);
|
|
510
|
+
(!p || s[p] === void 0 || d === !0 || d === void 0 && s[p] !== !1) && (s[p || l] = Pe(c));
|
|
511
|
+
}
|
|
512
|
+
const i = (c, l) => a.forEach(c, (d, u) => o(d, u, l));
|
|
513
|
+
if (a.isPlainObject(e) || e instanceof this.constructor)
|
|
514
|
+
i(e, n);
|
|
515
|
+
else if (a.isString(e) && (e = e.trim()) && !Or(e))
|
|
516
|
+
i(pr(e), n);
|
|
517
|
+
else if (a.isObject(e) && a.isSafeIterable(e)) {
|
|
518
|
+
let c = /* @__PURE__ */ Object.create(null), l, d;
|
|
519
|
+
for (const u of e) {
|
|
520
|
+
if (!a.isArray(u))
|
|
521
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
522
|
+
d = u[0], a.hasOwnProp(c, d) ? (l = c[d], c[d] = a.isArray(l) ? [...l, u[1]] : [l, u[1]]) : c[d] = u[1];
|
|
523
|
+
}
|
|
524
|
+
i(c, n);
|
|
525
|
+
} else
|
|
526
|
+
e != null && o(n, e, r);
|
|
527
|
+
return this;
|
|
528
|
+
}
|
|
529
|
+
get(e, n) {
|
|
530
|
+
if (e = de(e), e) {
|
|
531
|
+
const r = a.findKey(this, e);
|
|
532
|
+
if (r) {
|
|
533
|
+
const s = this[r];
|
|
534
|
+
if (!n)
|
|
535
|
+
return s;
|
|
536
|
+
if (n === !0)
|
|
537
|
+
return br(s);
|
|
538
|
+
if (a.isFunction(n))
|
|
539
|
+
return n.call(this, s, r);
|
|
540
|
+
if (a.isRegExp(n))
|
|
541
|
+
return n.exec(s);
|
|
542
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
543
|
+
}
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
has(e, n) {
|
|
547
|
+
if (e = de(e), e) {
|
|
548
|
+
const r = a.findKey(this, e);
|
|
549
|
+
return !!(r && this[r] !== void 0 && (!n || Me(this, this[r], r, n)));
|
|
550
|
+
}
|
|
551
|
+
return !1;
|
|
552
|
+
}
|
|
553
|
+
delete(e, n) {
|
|
554
|
+
const r = this;
|
|
555
|
+
let s = !1;
|
|
556
|
+
function o(i) {
|
|
557
|
+
if (i = de(i), i) {
|
|
558
|
+
const c = a.findKey(r, i);
|
|
559
|
+
c && (!n || Me(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
return a.isArray(e) ? e.forEach(o) : o(e), s;
|
|
563
|
+
}
|
|
564
|
+
clear(e) {
|
|
565
|
+
const n = Object.keys(this);
|
|
566
|
+
let r = n.length, s = !1;
|
|
567
|
+
for (; r--; ) {
|
|
568
|
+
const o = n[r];
|
|
569
|
+
(!e || Me(this, this[o], o, e, !0)) && (delete this[o], s = !0);
|
|
570
|
+
}
|
|
571
|
+
return s;
|
|
572
|
+
}
|
|
573
|
+
normalize(e) {
|
|
574
|
+
const n = this, r = {};
|
|
575
|
+
return a.forEach(this, (s, o) => {
|
|
576
|
+
const i = a.findKey(r, o);
|
|
577
|
+
if (i) {
|
|
578
|
+
n[i] = Pe(s), delete n[o];
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
const c = e ? Ar(o) : String(o).trim();
|
|
582
|
+
c !== o && delete n[o], n[c] = Pe(s), r[c] = !0;
|
|
583
|
+
}), this;
|
|
584
|
+
}
|
|
585
|
+
concat(...e) {
|
|
586
|
+
return this.constructor.concat(this, ...e);
|
|
587
|
+
}
|
|
588
|
+
toJSON(e) {
|
|
589
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
590
|
+
return a.forEach(this, (r, s) => {
|
|
591
|
+
r != null && r !== !1 && (n[s] = e && a.isArray(r) ? r.join(", ") : r);
|
|
592
|
+
}), n;
|
|
593
|
+
}
|
|
594
|
+
[Symbol.iterator]() {
|
|
595
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
596
|
+
}
|
|
597
|
+
toString() {
|
|
598
|
+
return Object.entries(this.toJSON()).map(([e, n]) => e + ": " + n).join(`
|
|
599
|
+
`);
|
|
600
|
+
}
|
|
601
|
+
getSetCookie() {
|
|
602
|
+
const e = this.get("set-cookie");
|
|
603
|
+
return a.isArray(e) ? e : e == null || e === !1 ? [] : [e];
|
|
604
|
+
}
|
|
605
|
+
get [Symbol.toStringTag]() {
|
|
606
|
+
return "AxiosHeaders";
|
|
607
|
+
}
|
|
608
|
+
static from(e) {
|
|
609
|
+
return e instanceof this ? e : new this(e);
|
|
610
|
+
}
|
|
611
|
+
static parseParameters(e) {
|
|
612
|
+
return Sr(e);
|
|
613
|
+
}
|
|
614
|
+
static concat(e, ...n) {
|
|
615
|
+
const r = new this(e);
|
|
616
|
+
return n.forEach((s) => r.set(s)), r;
|
|
617
|
+
}
|
|
618
|
+
static accessor(e) {
|
|
619
|
+
const r = (this[pt] = this[pt] = {
|
|
620
|
+
accessors: {}
|
|
621
|
+
}).accessors, s = this.prototype;
|
|
622
|
+
function o(i) {
|
|
623
|
+
const c = de(i);
|
|
624
|
+
r[c] || (_r(s, i), r[c] = !0);
|
|
625
|
+
}
|
|
626
|
+
return a.isArray(e) ? e.forEach(o) : o(e), this;
|
|
627
|
+
}
|
|
628
|
+
};
|
|
629
|
+
F.accessor([
|
|
630
|
+
"Content-Type",
|
|
631
|
+
"Content-Length",
|
|
632
|
+
"Accept",
|
|
633
|
+
"Accept-Encoding",
|
|
634
|
+
"User-Agent",
|
|
635
|
+
"Authorization"
|
|
636
|
+
]);
|
|
637
|
+
a.reduceDescriptors(F.prototype, ({ value: t }, e) => {
|
|
638
|
+
let n = e[0].toUpperCase() + e.slice(1);
|
|
639
|
+
return {
|
|
640
|
+
get: () => t,
|
|
641
|
+
set(r) {
|
|
642
|
+
this[n] = r;
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
});
|
|
646
|
+
a.freezeMethods(F);
|
|
647
|
+
const Ne = "[REDACTED ****]";
|
|
648
|
+
function xr(t) {
|
|
649
|
+
if (a.hasOwnProp(t, "toJSON"))
|
|
650
|
+
return !0;
|
|
651
|
+
let e = Object.getPrototypeOf(t);
|
|
652
|
+
for (; e && e !== Object.prototype; ) {
|
|
653
|
+
if (a.hasOwnProp(e, "toJSON"))
|
|
654
|
+
return !0;
|
|
655
|
+
e = Object.getPrototypeOf(e);
|
|
656
|
+
}
|
|
657
|
+
return !1;
|
|
658
|
+
}
|
|
659
|
+
function Pr(t, e) {
|
|
660
|
+
const n = new Set(e.map((o) => String(o).toLowerCase())), r = [], s = (o) => {
|
|
661
|
+
if (o === null || typeof o != "object" || a.isBuffer(o)) return o;
|
|
662
|
+
if (r.indexOf(o) !== -1) return;
|
|
663
|
+
o instanceof F && (o = o.toJSON()), r.push(o);
|
|
664
|
+
let i;
|
|
665
|
+
if (a.isArray(o))
|
|
666
|
+
i = [], o.forEach((c, l) => {
|
|
667
|
+
const d = s(c);
|
|
668
|
+
a.isUndefined(d) || (i[l] = d);
|
|
669
|
+
});
|
|
670
|
+
else {
|
|
671
|
+
if (!a.isPlainObject(o) && xr(o))
|
|
672
|
+
return r.pop(), o;
|
|
673
|
+
i = /* @__PURE__ */ Object.create(null);
|
|
674
|
+
for (const [c, l] of Object.entries(o)) {
|
|
675
|
+
const d = n.has(c.toLowerCase()) ? Ne : s(l);
|
|
676
|
+
a.isUndefined(d) || (i[c] = d);
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
return r.pop(), i;
|
|
680
|
+
};
|
|
681
|
+
return s(t);
|
|
682
|
+
}
|
|
683
|
+
function ht(t) {
|
|
684
|
+
try {
|
|
685
|
+
return String(t);
|
|
686
|
+
} catch {
|
|
687
|
+
return "";
|
|
688
|
+
}
|
|
689
|
+
}
|
|
690
|
+
function Tr(t) {
|
|
691
|
+
return t.errors.map((n) => {
|
|
692
|
+
try {
|
|
693
|
+
return n && n.message ? ht(n.message) : ht(n);
|
|
694
|
+
} catch {
|
|
695
|
+
return "";
|
|
696
|
+
}
|
|
697
|
+
}).filter(Boolean).join("; ") || t.name || "AggregateError";
|
|
698
|
+
}
|
|
699
|
+
let h = class zt extends Error {
|
|
700
|
+
static from(e, n, r, s, o, i) {
|
|
701
|
+
let c = e.message;
|
|
702
|
+
!c && a.isArray(e.errors) && e.errors.length && (c = Tr(e));
|
|
703
|
+
const l = new zt(c, n || e.code, r, s, o);
|
|
704
|
+
return Object.defineProperty(l, "cause", {
|
|
705
|
+
__proto__: null,
|
|
706
|
+
value: e,
|
|
707
|
+
writable: !0,
|
|
708
|
+
enumerable: !1,
|
|
709
|
+
configurable: !0
|
|
710
|
+
}), l.name = e.name, e.status != null && l.status == null && (l.status = e.status), i && Object.assign(l, i), l;
|
|
711
|
+
}
|
|
712
|
+
/**
|
|
713
|
+
* Create an Error with the specified message, config, error code, request and response.
|
|
714
|
+
*
|
|
715
|
+
* @param {string} message The error message.
|
|
716
|
+
* @param {string} [code] The error code (for example, 'ECONNABORTED').
|
|
717
|
+
* @param {Object} [config] The config.
|
|
718
|
+
* @param {Object} [request] The request.
|
|
719
|
+
* @param {Object} [response] The response.
|
|
720
|
+
*
|
|
721
|
+
* @returns {Error} The created error.
|
|
722
|
+
*/
|
|
723
|
+
constructor(e, n, r, s, o) {
|
|
724
|
+
super(e), Object.defineProperty(this, "message", {
|
|
725
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
726
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
727
|
+
__proto__: null,
|
|
728
|
+
value: e,
|
|
729
|
+
enumerable: !0,
|
|
730
|
+
writable: !0,
|
|
731
|
+
configurable: !0
|
|
732
|
+
}), this.name = "AxiosError", this.isAxiosError = !0, n && (this.code = n), r && (this.config = r), s && (this.request = s), o && (this.response = o, this.status = o.status);
|
|
733
|
+
}
|
|
734
|
+
toJSON() {
|
|
735
|
+
const e = this.config, n = e && a.hasOwnProp(e, "redact") ? e.redact : void 0, r = a.isArray(n) && n.length > 0 ? Pr(e, n) : a.toJSONObject(e);
|
|
736
|
+
return {
|
|
737
|
+
// Standard
|
|
738
|
+
message: this.message,
|
|
739
|
+
name: this.name,
|
|
740
|
+
// Microsoft
|
|
741
|
+
description: this.description,
|
|
742
|
+
number: this.number,
|
|
743
|
+
// Mozilla
|
|
744
|
+
fileName: this.fileName,
|
|
745
|
+
lineNumber: this.lineNumber,
|
|
746
|
+
columnNumber: this.columnNumber,
|
|
747
|
+
stack: this.stack,
|
|
748
|
+
// Axios
|
|
749
|
+
config: r,
|
|
750
|
+
code: this.code,
|
|
751
|
+
status: this.status
|
|
752
|
+
};
|
|
753
|
+
}
|
|
754
|
+
};
|
|
755
|
+
h.ERR_BAD_OPTION_VALUE = "ERR_BAD_OPTION_VALUE";
|
|
756
|
+
h.ERR_BAD_OPTION = "ERR_BAD_OPTION";
|
|
757
|
+
h.ECONNABORTED = "ECONNABORTED";
|
|
758
|
+
h.ETIMEDOUT = "ETIMEDOUT";
|
|
759
|
+
h.ECONNREFUSED = "ECONNREFUSED";
|
|
760
|
+
h.ERR_NETWORK = "ERR_NETWORK";
|
|
761
|
+
h.ERR_FR_TOO_MANY_REDIRECTS = "ERR_FR_TOO_MANY_REDIRECTS";
|
|
762
|
+
h.ERR_DEPRECATED = "ERR_DEPRECATED";
|
|
763
|
+
h.ERR_BAD_RESPONSE = "ERR_BAD_RESPONSE";
|
|
764
|
+
h.ERR_BAD_REQUEST = "ERR_BAD_REQUEST";
|
|
765
|
+
h.ERR_CANCELED = "ERR_CANCELED";
|
|
766
|
+
h.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
767
|
+
h.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
768
|
+
h.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
769
|
+
const Cr = null, vt = 100;
|
|
770
|
+
function Ke(t) {
|
|
771
|
+
return a.isPlainObject(t) || a.isArray(t);
|
|
772
|
+
}
|
|
773
|
+
function Wt(t) {
|
|
774
|
+
return a.endsWith(t, "[]") ? t.slice(0, -2) : t;
|
|
775
|
+
}
|
|
776
|
+
function He(t, e, n) {
|
|
777
|
+
return t ? t.concat(e).map(function(s, o) {
|
|
778
|
+
return s = Wt(s), !n && o ? "[" + s + "]" : s;
|
|
779
|
+
}).join(n ? "." : "") : e;
|
|
780
|
+
}
|
|
781
|
+
function Nr(t) {
|
|
782
|
+
return a.isArray(t) && !t.some(Ke);
|
|
783
|
+
}
|
|
784
|
+
const Dr = a.toFlatObject(a, {}, null, function(e) {
|
|
785
|
+
return /^is[A-Z]/.test(e);
|
|
786
|
+
});
|
|
787
|
+
function Ue(t, e, n) {
|
|
788
|
+
if (!a.isObject(t))
|
|
789
|
+
throw new TypeError("target must be an object");
|
|
790
|
+
e = e || new FormData();
|
|
791
|
+
const r = (m, E) => {
|
|
792
|
+
const w = a.getSafeProp(n, m);
|
|
793
|
+
return a.isUndefined(w) ? E : w;
|
|
794
|
+
}, s = r("metaTokens", !0), o = r("visitor") || S, i = r("dots", !1), c = r("indexes", !1), l = r("Blob") || typeof Blob < "u" && Blob, d = r("maxDepth", vt), u = l && a.isSpecCompliantForm(e), p = [];
|
|
795
|
+
if (!a.isFunction(o))
|
|
796
|
+
throw new TypeError("visitor must be a function");
|
|
797
|
+
function g(m) {
|
|
798
|
+
if (m === null) return "";
|
|
799
|
+
if (a.isDate(m))
|
|
800
|
+
return m.toISOString();
|
|
801
|
+
if (a.isBoolean(m))
|
|
802
|
+
return m.toString();
|
|
803
|
+
if (!u && a.isBlob(m))
|
|
804
|
+
throw new h("Blob is not supported. Use a Buffer instead.");
|
|
805
|
+
if (a.isArrayBuffer(m) || a.isTypedArray(m)) {
|
|
806
|
+
if (u && typeof l == "function")
|
|
807
|
+
return new l([m]);
|
|
808
|
+
throw new h(
|
|
809
|
+
"Blob is not supported. Use a Buffer instead.",
|
|
810
|
+
h.ERR_NOT_SUPPORT
|
|
811
|
+
);
|
|
812
|
+
}
|
|
813
|
+
return m;
|
|
814
|
+
}
|
|
815
|
+
function y(m) {
|
|
816
|
+
if (m > d)
|
|
817
|
+
throw new h(
|
|
818
|
+
"Object is too deeply nested (" + m + " levels). Max depth: " + d,
|
|
819
|
+
h.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
820
|
+
);
|
|
821
|
+
}
|
|
822
|
+
function R(m, E) {
|
|
823
|
+
if (d === 1 / 0)
|
|
824
|
+
return JSON.stringify(m);
|
|
825
|
+
const w = [];
|
|
826
|
+
return JSON.stringify(m, function(D, A) {
|
|
827
|
+
if (!a.isObject(A))
|
|
828
|
+
return A;
|
|
829
|
+
for (; w.length && w[w.length - 1] !== this; )
|
|
830
|
+
w.pop();
|
|
831
|
+
return w.push(A), y(E + w.length - 1), A;
|
|
832
|
+
});
|
|
833
|
+
}
|
|
834
|
+
function S(m, E, w) {
|
|
835
|
+
let P = m;
|
|
836
|
+
if (a.isReactNative(e) && a.isReactNativeBlob(m))
|
|
837
|
+
return e.append(He(w, E, i), g(m)), !1;
|
|
838
|
+
if (m && !w && typeof m == "object") {
|
|
839
|
+
if (a.endsWith(E, "{}"))
|
|
840
|
+
E = s ? E : E.slice(0, -2), m = R(m, 1);
|
|
841
|
+
else if (a.isArray(m) && Nr(m) || (a.isFileList(m) || a.endsWith(E, "[]")) && (P = a.toArray(m)))
|
|
842
|
+
return E = Wt(E), P.forEach(function(A, M) {
|
|
843
|
+
!(a.isUndefined(A) || A === null) && e.append(
|
|
844
|
+
// eslint-disable-next-line no-nested-ternary
|
|
845
|
+
c === !0 ? He([E], M, i) : c === null ? E : E + "[]",
|
|
846
|
+
g(A)
|
|
847
|
+
);
|
|
848
|
+
}), !1;
|
|
849
|
+
}
|
|
850
|
+
return Ke(m) ? !0 : (e.append(He(w, E, i), g(m)), !1);
|
|
851
|
+
}
|
|
852
|
+
const x = Object.assign(Dr, {
|
|
853
|
+
defaultVisitor: S,
|
|
854
|
+
convertValue: g,
|
|
855
|
+
isVisitable: Ke
|
|
856
|
+
});
|
|
857
|
+
function f(m, E, w = 0) {
|
|
858
|
+
if (!a.isUndefined(m)) {
|
|
859
|
+
if (y(w), p.indexOf(m) !== -1)
|
|
860
|
+
throw new Error("Circular reference detected in " + E.join("."));
|
|
861
|
+
p.push(m), a.forEach(m, function(D, A) {
|
|
862
|
+
(!(a.isUndefined(D) || D === null) && o.call(e, D, a.isString(A) ? A.trim() : A, E, x)) === !0 && f(D, E ? E.concat(A) : [A], w + 1);
|
|
863
|
+
}), p.pop();
|
|
864
|
+
}
|
|
865
|
+
}
|
|
866
|
+
if (!a.isObject(t))
|
|
867
|
+
throw new TypeError("data must be an object");
|
|
868
|
+
return f(t), e;
|
|
869
|
+
}
|
|
870
|
+
function mt(t) {
|
|
871
|
+
const e = {
|
|
872
|
+
"!": "%21",
|
|
873
|
+
"'": "%27",
|
|
874
|
+
"(": "%28",
|
|
875
|
+
")": "%29",
|
|
876
|
+
"~": "%7E",
|
|
877
|
+
"%20": "+"
|
|
878
|
+
};
|
|
879
|
+
return encodeURIComponent(t).replace(/[!'()~]|%20/g, function(r) {
|
|
880
|
+
return e[r];
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
function Ze(t, e) {
|
|
884
|
+
this._pairs = [], t && Ue(t, this, e);
|
|
885
|
+
}
|
|
886
|
+
const Vt = Ze.prototype;
|
|
887
|
+
Vt.append = function(e, n) {
|
|
888
|
+
this._pairs.push([e, n]);
|
|
889
|
+
};
|
|
890
|
+
Vt.toString = function(e) {
|
|
891
|
+
const n = e ? (r) => e.call(this, r, mt) : mt;
|
|
892
|
+
return this._pairs.map(function(s) {
|
|
893
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
894
|
+
}, "").join("&");
|
|
895
|
+
};
|
|
896
|
+
function Lr(t) {
|
|
897
|
+
return encodeURIComponent(t).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+");
|
|
898
|
+
}
|
|
899
|
+
function Jt(t, e, n) {
|
|
900
|
+
if (!e)
|
|
901
|
+
return t;
|
|
902
|
+
t = t || "";
|
|
903
|
+
const r = a.isFunction(n) ? {
|
|
904
|
+
serialize: n
|
|
905
|
+
} : n, s = a.getSafeProp(r, "encode") || Lr, o = a.getSafeProp(r, "serialize");
|
|
906
|
+
let i;
|
|
907
|
+
if (o ? i = o(e, r) : i = a.isURLSearchParams(e) ? e.toString() : new Ze(e, r).toString(s), i) {
|
|
908
|
+
const c = t.indexOf("#");
|
|
909
|
+
c !== -1 && (t = t.slice(0, c)), t += (t.indexOf("?") === -1 ? "?" : "&") + i;
|
|
910
|
+
}
|
|
911
|
+
return t;
|
|
912
|
+
}
|
|
913
|
+
const pe = Symbol("internals");
|
|
914
|
+
function Kt(t) {
|
|
915
|
+
return t ? t.length : 0;
|
|
916
|
+
}
|
|
917
|
+
function gt(t) {
|
|
918
|
+
if (t)
|
|
919
|
+
for (; t.length && t[t.length - 1] === null; )
|
|
920
|
+
t.pop();
|
|
921
|
+
}
|
|
922
|
+
function he(t, e) {
|
|
923
|
+
const n = t.handlers, r = Kt(n);
|
|
924
|
+
n !== e.handlersRef ? (e.handlersRef = n, e.handlerEntries.clear()) : r !== e.handlersLength && (r ? e.handlerEntries.forEach(function(o, i) {
|
|
925
|
+
n[o.index] !== o.handler && e.handlerEntries.delete(i);
|
|
926
|
+
}) : e.handlerEntries.clear()), e.handlersLength = r;
|
|
927
|
+
}
|
|
928
|
+
class yt {
|
|
929
|
+
constructor() {
|
|
930
|
+
this.handlers = [], this[pe] = {
|
|
931
|
+
handlersRef: this.handlers,
|
|
932
|
+
handlersLength: this.handlers.length,
|
|
933
|
+
handlerEntries: /* @__PURE__ */ new Map(),
|
|
934
|
+
iterationDepth: 0,
|
|
935
|
+
nextId: 0
|
|
936
|
+
};
|
|
937
|
+
}
|
|
938
|
+
/**
|
|
939
|
+
* Add a new interceptor to the stack
|
|
940
|
+
*
|
|
941
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
942
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
943
|
+
* @param {Object} options The options for the interceptor, synchronous and runWhen
|
|
944
|
+
*
|
|
945
|
+
* @return {Number} An ID used to remove interceptor later
|
|
946
|
+
*/
|
|
947
|
+
use(e, n, r) {
|
|
948
|
+
const s = {
|
|
949
|
+
fulfilled: e,
|
|
950
|
+
rejected: n,
|
|
951
|
+
synchronous: r ? r.synchronous : !1,
|
|
952
|
+
runWhen: r ? r.runWhen : null
|
|
953
|
+
}, o = this[pe];
|
|
954
|
+
this.handlers == null && (this.handlers = []), he(this, o);
|
|
955
|
+
const i = o.nextId++;
|
|
956
|
+
return this.handlers.push(s), o.handlerEntries.set(i, {
|
|
957
|
+
handler: s,
|
|
958
|
+
index: this.handlers.length - 1
|
|
959
|
+
}), o.handlersLength = this.handlers.length, i;
|
|
960
|
+
}
|
|
961
|
+
/**
|
|
962
|
+
* Remove an interceptor from the stack
|
|
963
|
+
*
|
|
964
|
+
* @param {Number} id The ID that was returned by `use`
|
|
965
|
+
*
|
|
966
|
+
* @returns {void}
|
|
967
|
+
*/
|
|
968
|
+
eject(e) {
|
|
969
|
+
const n = this[pe];
|
|
970
|
+
he(this, n);
|
|
971
|
+
const r = n.handlerEntries.get(e);
|
|
972
|
+
if (r) {
|
|
973
|
+
if (n.handlerEntries.delete(e), this.handlers[r.index] !== r.handler)
|
|
974
|
+
return;
|
|
975
|
+
this.handlers[r.index] = null, n.iterationDepth || (gt(this.handlers), n.handlersLength = this.handlers.length);
|
|
976
|
+
}
|
|
977
|
+
}
|
|
978
|
+
/**
|
|
979
|
+
* Clear all interceptors from the stack
|
|
980
|
+
*
|
|
981
|
+
* @returns {void}
|
|
982
|
+
*/
|
|
983
|
+
clear() {
|
|
984
|
+
this.handlers && (this.handlers = [], he(this, this[pe]));
|
|
985
|
+
}
|
|
986
|
+
/**
|
|
987
|
+
* Iterate over all the registered interceptors
|
|
988
|
+
*
|
|
989
|
+
* This method is particularly useful for skipping over any
|
|
990
|
+
* interceptors that may have become `null` calling `eject`.
|
|
991
|
+
*
|
|
992
|
+
* @param {Function} fn The function to call for each interceptor
|
|
993
|
+
*
|
|
994
|
+
* @returns {void}
|
|
995
|
+
*/
|
|
996
|
+
forEach(e) {
|
|
997
|
+
const n = this[pe];
|
|
998
|
+
he(this, n), n.iterationDepth++;
|
|
999
|
+
try {
|
|
1000
|
+
a.forEach(this.handlers, function(s) {
|
|
1001
|
+
s !== null && e(s);
|
|
1002
|
+
});
|
|
1003
|
+
} finally {
|
|
1004
|
+
--n.iterationDepth || (he(this, n), gt(this.handlers), n.handlersLength = Kt(this.handlers));
|
|
1005
|
+
}
|
|
1006
|
+
}
|
|
1007
|
+
}
|
|
1008
|
+
const Ye = {
|
|
1009
|
+
silentJSONParsing: !0,
|
|
1010
|
+
forcedJSONParsing: !0,
|
|
1011
|
+
clarifyTimeoutError: !1,
|
|
1012
|
+
legacyInterceptorReqResOrdering: !0,
|
|
1013
|
+
advertiseZstdAcceptEncoding: !1,
|
|
1014
|
+
validateStatusUndefinedResolves: !0
|
|
1015
|
+
}, Ur = typeof URLSearchParams < "u" ? URLSearchParams : Ze, Fr = typeof FormData < "u" ? FormData : null, jr = typeof Blob < "u" ? Blob : null, Br = {
|
|
1016
|
+
isBrowser: !0,
|
|
1017
|
+
classes: {
|
|
1018
|
+
URLSearchParams: Ur,
|
|
1019
|
+
FormData: Fr,
|
|
1020
|
+
Blob: jr
|
|
1021
|
+
},
|
|
1022
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
1023
|
+
}, et = typeof window < "u" && typeof document < "u", Xe = typeof navigator == "object" && navigator || void 0, kr = et && (!Xe || ["ReactNative", "NativeScript", "NS"].indexOf(Xe.product) < 0), Ir = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
1024
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Mr = et && window.location.href || "http://localhost", Hr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1025
|
+
__proto__: null,
|
|
1026
|
+
hasBrowserEnv: et,
|
|
1027
|
+
hasStandardBrowserEnv: kr,
|
|
1028
|
+
hasStandardBrowserWebWorkerEnv: Ir,
|
|
1029
|
+
navigator: Xe,
|
|
1030
|
+
origin: Mr
|
|
1031
|
+
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
1032
|
+
...Hr,
|
|
1033
|
+
...Br
|
|
1034
|
+
};
|
|
1035
|
+
function $r(t, e) {
|
|
1036
|
+
return Ue(t, new T.classes.URLSearchParams(), {
|
|
1037
|
+
visitor: function(n, r, s, o) {
|
|
1038
|
+
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
1039
|
+
},
|
|
1040
|
+
...e
|
|
1041
|
+
});
|
|
1042
|
+
}
|
|
1043
|
+
const wt = vt;
|
|
1044
|
+
function Xt(t) {
|
|
1045
|
+
if (t > wt)
|
|
1046
|
+
throw new h(
|
|
1047
|
+
"FormData field is too deeply nested (" + t + " levels). Max depth: " + wt,
|
|
1048
|
+
h.ERR_FORM_DATA_DEPTH_EXCEEDED
|
|
1049
|
+
);
|
|
1050
|
+
}
|
|
1051
|
+
function qr(t) {
|
|
1052
|
+
const e = [], n = /[^.[\]]+|\[([^.[\]]*)]/g;
|
|
1053
|
+
let r;
|
|
1054
|
+
for (; (r = n.exec(t)) !== null; )
|
|
1055
|
+
Xt(e.length), e.push(r[0] === "[]" ? "" : r[1] || r[0]);
|
|
1056
|
+
return e;
|
|
1057
|
+
}
|
|
1058
|
+
function zr(t) {
|
|
1059
|
+
const e = {}, n = Object.keys(t);
|
|
1060
|
+
let r;
|
|
1061
|
+
const s = n.length;
|
|
1062
|
+
let o;
|
|
1063
|
+
for (r = 0; r < s; r++)
|
|
1064
|
+
o = n[r], e[o] = t[o];
|
|
1065
|
+
return e;
|
|
1066
|
+
}
|
|
1067
|
+
function Gt(t) {
|
|
1068
|
+
function e(n, r, s, o) {
|
|
1069
|
+
Xt(o);
|
|
1070
|
+
let i = n[o++];
|
|
1071
|
+
if (i === "__proto__") return !0;
|
|
1072
|
+
const c = Number.isFinite(+i), l = o >= n.length;
|
|
1073
|
+
return i = !i && a.isArray(s) ? s.length : i, l ? (a.hasOwnProp(s, i) ? s[i] = a.isArray(s[i]) ? s[i].concat(r) : [s[i], r] : s[i] = r, !c) : ((!a.hasOwnProp(s, i) || !a.isObject(s[i])) && (s[i] = []), e(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = zr(s[i])), !c);
|
|
1074
|
+
}
|
|
1075
|
+
if (a.isFormData(t) && a.isFunction(t.entries)) {
|
|
1076
|
+
const n = {};
|
|
1077
|
+
return a.forEachEntry(t, (r, s) => {
|
|
1078
|
+
e(qr(r), s, n, 0);
|
|
1079
|
+
}), n;
|
|
1080
|
+
}
|
|
1081
|
+
return null;
|
|
1082
|
+
}
|
|
1083
|
+
const Qt = Object.freeze([
|
|
1084
|
+
"get",
|
|
1085
|
+
"delete",
|
|
1086
|
+
"head",
|
|
1087
|
+
"options",
|
|
1088
|
+
"post",
|
|
1089
|
+
"put",
|
|
1090
|
+
"patch",
|
|
1091
|
+
"purge",
|
|
1092
|
+
"link",
|
|
1093
|
+
"unlink",
|
|
1094
|
+
"query"
|
|
1095
|
+
]), ie = (t, e) => t != null && a.hasOwnProp(t, e) ? t[e] : void 0;
|
|
1096
|
+
function vr(t, e, n) {
|
|
1097
|
+
if (a.isString(t))
|
|
1098
|
+
try {
|
|
1099
|
+
return (e || JSON.parse)(t), a.trim(t);
|
|
1100
|
+
} catch (r) {
|
|
1101
|
+
if (r.name !== "SyntaxError")
|
|
1102
|
+
throw r;
|
|
1103
|
+
}
|
|
1104
|
+
return (n || JSON.stringify)(t);
|
|
1105
|
+
}
|
|
1106
|
+
const Ee = {
|
|
1107
|
+
transitional: Ye,
|
|
1108
|
+
adapter: ["xhr", "http", "fetch"],
|
|
1109
|
+
transformRequest: [
|
|
1110
|
+
function(e, n) {
|
|
1111
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(e);
|
|
1112
|
+
if (o && a.isHTMLForm(e) && (e = new FormData(e)), a.isFormData(e))
|
|
1113
|
+
return s ? JSON.stringify(Gt(e)) : e;
|
|
1114
|
+
if (a.isArrayBuffer(e) || a.isBuffer(e) || a.isStream(e) || a.isFile(e) || a.isBlob(e) || a.isReadableStream(e))
|
|
1115
|
+
return e;
|
|
1116
|
+
if (a.isArrayBufferView(e))
|
|
1117
|
+
return e.buffer;
|
|
1118
|
+
if (a.isURLSearchParams(e))
|
|
1119
|
+
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), e.toString();
|
|
1120
|
+
let c;
|
|
1121
|
+
if (o) {
|
|
1122
|
+
const l = ie(this, "formSerializer");
|
|
1123
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
1124
|
+
return $r(e, l).toString();
|
|
1125
|
+
if ((c = a.isFileList(e)) || r.indexOf("multipart/form-data") > -1) {
|
|
1126
|
+
const d = ie(this, "env"), u = d && d.FormData;
|
|
1127
|
+
return Ue(
|
|
1128
|
+
c ? { "files[]": e } : e,
|
|
1129
|
+
u && new u(),
|
|
1130
|
+
l
|
|
1131
|
+
);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
return o || s ? (n.setContentType("application/json", !1), vr(e)) : e;
|
|
1135
|
+
}
|
|
1136
|
+
],
|
|
1137
|
+
transformResponse: [
|
|
1138
|
+
function(e) {
|
|
1139
|
+
const n = ie(this, "transitional") || Ee.transitional, r = n && n.forcedJSONParsing, s = ie(this, "responseType"), o = s === "json";
|
|
1140
|
+
if (a.isResponse(e) || a.isReadableStream(e))
|
|
1141
|
+
return e;
|
|
1142
|
+
if (e && a.isString(e) && (r && !s || o)) {
|
|
1143
|
+
const c = !(n && n.silentJSONParsing) && o;
|
|
1144
|
+
try {
|
|
1145
|
+
return JSON.parse(e, ie(this, "parseReviver"));
|
|
1146
|
+
} catch (l) {
|
|
1147
|
+
if (c)
|
|
1148
|
+
throw l.name === "SyntaxError" ? h.from(l, h.ERR_BAD_RESPONSE, this, null, ie(this, "response")) : l;
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
return e;
|
|
1152
|
+
}
|
|
1153
|
+
],
|
|
1154
|
+
/**
|
|
1155
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
1156
|
+
* timeout is not created.
|
|
1157
|
+
*/
|
|
1158
|
+
timeout: 0,
|
|
1159
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
1160
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
1161
|
+
maxContentLength: -1,
|
|
1162
|
+
maxBodyLength: -1,
|
|
1163
|
+
env: {
|
|
1164
|
+
FormData: T.classes.FormData,
|
|
1165
|
+
Blob: T.classes.Blob
|
|
1166
|
+
},
|
|
1167
|
+
validateStatus: function(e) {
|
|
1168
|
+
return e >= 200 && e < 300;
|
|
1169
|
+
},
|
|
1170
|
+
headers: {
|
|
1171
|
+
common: {
|
|
1172
|
+
Accept: "application/json, text/plain, */*",
|
|
1173
|
+
"Content-Type": void 0
|
|
1174
|
+
}
|
|
1175
|
+
}
|
|
1176
|
+
};
|
|
1177
|
+
a.forEach(Qt, (t) => {
|
|
1178
|
+
Ee.headers[t] = {};
|
|
1179
|
+
});
|
|
1180
|
+
function $e(t, e) {
|
|
1181
|
+
const n = this || Ee, r = e || n, s = F.from(r.headers);
|
|
1182
|
+
let o = r.data;
|
|
1183
|
+
return a.forEach(t, function(c) {
|
|
1184
|
+
o = c.call(n, o, s.normalize(), e ? e.status : void 0);
|
|
1185
|
+
}), s.normalize(), o;
|
|
1186
|
+
}
|
|
1187
|
+
function Zt(t) {
|
|
1188
|
+
return !!(t && t.__CANCEL__);
|
|
1189
|
+
}
|
|
1190
|
+
let Re = class extends h {
|
|
1191
|
+
/**
|
|
1192
|
+
* A `CanceledError` is an object that is thrown when an operation is canceled.
|
|
1193
|
+
*
|
|
1194
|
+
* @param {string=} message The message.
|
|
1195
|
+
* @param {Object=} config The config.
|
|
1196
|
+
* @param {Object=} request The request.
|
|
1197
|
+
*
|
|
1198
|
+
* @returns {CanceledError} The created error.
|
|
1199
|
+
*/
|
|
1200
|
+
constructor(e, n, r) {
|
|
1201
|
+
super(e ?? "canceled", h.ERR_CANCELED, n, r), this.name = "CanceledError", this.__CANCEL__ = !0;
|
|
1202
|
+
}
|
|
1203
|
+
};
|
|
1204
|
+
function Yt(t, e, n) {
|
|
1205
|
+
const r = n.config.validateStatus;
|
|
1206
|
+
!n.status || !r || r(n.status) ? t(n) : e(new h(
|
|
1207
|
+
"Request failed with status code " + n.status,
|
|
1208
|
+
n.status >= 400 && n.status < 500 ? h.ERR_BAD_REQUEST : h.ERR_BAD_RESPONSE,
|
|
1209
|
+
n.config,
|
|
1210
|
+
n.request,
|
|
1211
|
+
n
|
|
1212
|
+
));
|
|
1213
|
+
}
|
|
1214
|
+
const Wr = /[\t\n\r]/g;
|
|
1215
|
+
function en(t) {
|
|
1216
|
+
if (typeof t != "string")
|
|
1217
|
+
return t;
|
|
1218
|
+
let e = 0;
|
|
1219
|
+
for (; e < t.length && t.charCodeAt(e) <= 32; )
|
|
1220
|
+
e++;
|
|
1221
|
+
return t.slice(e).replace(Wr, "");
|
|
1222
|
+
}
|
|
1223
|
+
function qe(t) {
|
|
1224
|
+
const e = /^([-+\w]{1,25}):(?:\/\/)?/.exec(t);
|
|
1225
|
+
return e && e[1] || "";
|
|
1226
|
+
}
|
|
1227
|
+
function Vr(t, e) {
|
|
1228
|
+
t = t || 10;
|
|
1229
|
+
const n = new Array(t), r = new Array(t);
|
|
1230
|
+
let s = 0, o = 0, i;
|
|
1231
|
+
return e = e !== void 0 ? e : 1e3, function(l) {
|
|
1232
|
+
const d = Date.now(), u = r[o];
|
|
1233
|
+
i || (i = d), n[s] = l, r[s] = d;
|
|
1234
|
+
let p = o, g = 0;
|
|
1235
|
+
for (; p !== s; )
|
|
1236
|
+
g += n[p++], p = p % t;
|
|
1237
|
+
if (s = (s + 1) % t, s === o && (o = (o + 1) % t), d - i < e)
|
|
1238
|
+
return;
|
|
1239
|
+
const y = u && d - u;
|
|
1240
|
+
return y ? Math.round(g * 1e3 / y) : void 0;
|
|
1241
|
+
};
|
|
1242
|
+
}
|
|
1243
|
+
function Jr(t, e) {
|
|
1244
|
+
let n = 0, r = 1e3 / e, s, o;
|
|
1245
|
+
const i = (u, p = Date.now()) => {
|
|
1246
|
+
n = p, s = null, o && (clearTimeout(o), o = null), t(...u);
|
|
1247
|
+
};
|
|
1248
|
+
return [(...u) => {
|
|
1249
|
+
const p = Date.now(), g = p - n;
|
|
1250
|
+
g >= r ? i(u, p) : (s = u, o || (o = setTimeout(() => {
|
|
1251
|
+
o = null, i(s);
|
|
1252
|
+
}, r - g)));
|
|
1253
|
+
}, () => s && i(s), (...u) => i(u)];
|
|
1254
|
+
}
|
|
1255
|
+
const De = (t, e, n = 3) => {
|
|
1256
|
+
let r = 0;
|
|
1257
|
+
const s = Vr(50, 250);
|
|
1258
|
+
return Jr((o) => {
|
|
1259
|
+
if (!o || !a.isNumber(o.loaded))
|
|
1260
|
+
return;
|
|
1261
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, l = Math.max(0, c != null ? Math.min(i, c) : i), d = Math.max(0, l - r), u = s(d);
|
|
1262
|
+
r = Math.max(r, l);
|
|
1263
|
+
const p = {
|
|
1264
|
+
loaded: l,
|
|
1265
|
+
total: c,
|
|
1266
|
+
progress: c ? l / c : void 0,
|
|
1267
|
+
bytes: d,
|
|
1268
|
+
rate: u || void 0,
|
|
1269
|
+
estimated: u && c ? (c - l) / u : void 0,
|
|
1270
|
+
event: o,
|
|
1271
|
+
lengthComputable: c != null,
|
|
1272
|
+
[e ? "download" : "upload"]: !0
|
|
1273
|
+
};
|
|
1274
|
+
t(p);
|
|
1275
|
+
}, n);
|
|
1276
|
+
}, bt = (t, e) => {
|
|
1277
|
+
const n = t != null;
|
|
1278
|
+
return [
|
|
1279
|
+
(r) => e[0]({
|
|
1280
|
+
lengthComputable: n,
|
|
1281
|
+
total: t,
|
|
1282
|
+
loaded: r
|
|
1283
|
+
}),
|
|
1284
|
+
e[1]
|
|
1285
|
+
];
|
|
1286
|
+
}, Et = (t, e = a.asap) => (...n) => e(() => t(...n)), Kr = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((t, e) => (n) => (n = new URL(n, T.origin), t.protocol === n.protocol && t.host === n.host && (e || t.port === n.port)))(
|
|
1287
|
+
new URL(T.origin),
|
|
1288
|
+
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
1289
|
+
) : () => !0, Xr = T.hasStandardBrowserEnv ? (
|
|
1290
|
+
// Standard browser envs support document.cookie
|
|
1291
|
+
{
|
|
1292
|
+
write(t, e, n, r, s, o, i) {
|
|
1293
|
+
if (typeof document > "u") return;
|
|
1294
|
+
const c = [`${t}=${encodeURIComponent(e)}`];
|
|
1295
|
+
a.isNumber(n) && c.push(`expires=${new Date(n).toUTCString()}`), a.isString(r) && c.push(`path=${r}`), a.isString(s) && c.push(`domain=${s}`), o === !0 && c.push("secure"), a.isString(i) && c.push(`SameSite=${i}`), document.cookie = c.join("; ");
|
|
1296
|
+
},
|
|
1297
|
+
read(t) {
|
|
1298
|
+
if (typeof document > "u") return null;
|
|
1299
|
+
const e = document.cookie.split(";");
|
|
1300
|
+
for (let n = 0; n < e.length; n++) {
|
|
1301
|
+
const r = e[n].replace(/^\s+/, ""), s = r.indexOf("=");
|
|
1302
|
+
if (s !== -1 && r.slice(0, s) === t)
|
|
1303
|
+
try {
|
|
1304
|
+
return decodeURIComponent(r.slice(s + 1));
|
|
1305
|
+
} catch {
|
|
1306
|
+
return r.slice(s + 1);
|
|
1307
|
+
}
|
|
1308
|
+
}
|
|
1309
|
+
return null;
|
|
1310
|
+
},
|
|
1311
|
+
remove(t) {
|
|
1312
|
+
this.write(t, "", Date.now() - 864e5, "/");
|
|
1313
|
+
}
|
|
1314
|
+
}
|
|
1315
|
+
) : (
|
|
1316
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1317
|
+
{
|
|
1318
|
+
write() {
|
|
1319
|
+
},
|
|
1320
|
+
read() {
|
|
1321
|
+
return null;
|
|
1322
|
+
},
|
|
1323
|
+
remove() {
|
|
1324
|
+
}
|
|
1325
|
+
}
|
|
1326
|
+
);
|
|
1327
|
+
function Gr(t) {
|
|
1328
|
+
return typeof t != "string" ? !1 : /^([a-z][a-z\d+\-.]*:)?\/\//i.test(t);
|
|
1329
|
+
}
|
|
1330
|
+
function Qr(t, e) {
|
|
1331
|
+
if (!e)
|
|
1332
|
+
return t;
|
|
1333
|
+
let n = t.length;
|
|
1334
|
+
for (; n > 0 && t.charCodeAt(n - 1) === 47; )
|
|
1335
|
+
n--;
|
|
1336
|
+
return t.slice(0, n) + "/" + e.replace(/^\/+/, "");
|
|
1337
|
+
}
|
|
1338
|
+
const Zr = /^https?:(?!\/\/)/i;
|
|
1339
|
+
function Yr(t) {
|
|
1340
|
+
return t && t.replace(/(^|&)([^=&]*=)?[^&]+/g, (e, n, r = "") => `${n}${r}${Ne}`);
|
|
1341
|
+
}
|
|
1342
|
+
function es(t) {
|
|
1343
|
+
const e = t.replace(/^(https?:\/{0,2})[^/?#]*@/i, `$1${Ne}@`), n = e.indexOf("#"), s = (n === -1 ? e : e.slice(0, n)).replace(
|
|
1344
|
+
/([?&][^=&#]*=)[^&#]*/g,
|
|
1345
|
+
`$1${Ne}`
|
|
1346
|
+
);
|
|
1347
|
+
return n === -1 ? s : `${s}#${Yr(e.slice(n + 1))}`;
|
|
1348
|
+
}
|
|
1349
|
+
function Rt(t, e) {
|
|
1350
|
+
if (typeof t == "string") {
|
|
1351
|
+
const n = en(t);
|
|
1352
|
+
if (Zr.test(n))
|
|
1353
|
+
throw new h(
|
|
1354
|
+
`Invalid URL ${JSON.stringify(es(n))}: missing "//" after protocol`,
|
|
1355
|
+
h.ERR_INVALID_URL,
|
|
1356
|
+
e
|
|
1357
|
+
);
|
|
1358
|
+
}
|
|
1359
|
+
}
|
|
1360
|
+
function tn(t, e, n, r) {
|
|
1361
|
+
Rt(e, r);
|
|
1362
|
+
let s = !Gr(e);
|
|
1363
|
+
return t && (s || n === !1) ? (Rt(t, r), Qr(t, e)) : e;
|
|
1364
|
+
}
|
|
1365
|
+
const St = (t) => t instanceof F ? { ...t } : t, ts = (t) => Object.getOwnPropertySymbols && Object.getOwnPropertyDescriptor ? Object.keys(t).concat(
|
|
1366
|
+
Object.getOwnPropertySymbols(t).filter(
|
|
1367
|
+
(e) => Object.getOwnPropertyDescriptor(t, e).enumerable
|
|
1368
|
+
)
|
|
1369
|
+
) : Object.keys(t);
|
|
1370
|
+
function se(t, e) {
|
|
1371
|
+
t = t || {}, e = e || {};
|
|
1372
|
+
const n = /* @__PURE__ */ Object.create(null);
|
|
1373
|
+
Object.defineProperty(n, "hasOwnProperty", {
|
|
1374
|
+
// Null-proto descriptor so a polluted Object.prototype.get cannot turn
|
|
1375
|
+
// this data descriptor into an accessor descriptor on the way in.
|
|
1376
|
+
__proto__: null,
|
|
1377
|
+
value: Object.prototype.hasOwnProperty,
|
|
1378
|
+
enumerable: !1,
|
|
1379
|
+
writable: !0,
|
|
1380
|
+
configurable: !0
|
|
1381
|
+
});
|
|
1382
|
+
function r(u, p, g, y) {
|
|
1383
|
+
return a.isPlainObject(u) && a.isPlainObject(p) ? a.merge.call({ caseless: y }, u, p) : a.isPlainObject(p) ? a.merge({}, p) : a.isArray(p) ? p.slice() : p;
|
|
1384
|
+
}
|
|
1385
|
+
function s(u, p, g, y) {
|
|
1386
|
+
if (a.isUndefined(p)) {
|
|
1387
|
+
if (!a.isUndefined(u))
|
|
1388
|
+
return r(void 0, u, g, y);
|
|
1389
|
+
} else return r(u, p, g, y);
|
|
1390
|
+
}
|
|
1391
|
+
function o(u, p) {
|
|
1392
|
+
if (!a.isUndefined(p))
|
|
1393
|
+
return r(void 0, p);
|
|
1394
|
+
}
|
|
1395
|
+
function i(u, p) {
|
|
1396
|
+
if (a.isUndefined(p)) {
|
|
1397
|
+
if (!a.isUndefined(u))
|
|
1398
|
+
return r(void 0, u);
|
|
1399
|
+
} else return r(void 0, p);
|
|
1400
|
+
}
|
|
1401
|
+
function c(u) {
|
|
1402
|
+
const p = a.hasOwnProp(e, "transitional") ? e.transitional : void 0;
|
|
1403
|
+
if (!a.isUndefined(p))
|
|
1404
|
+
if (a.isPlainObject(p)) {
|
|
1405
|
+
if (a.hasOwnProp(p, u))
|
|
1406
|
+
return p[u];
|
|
1407
|
+
} else
|
|
1408
|
+
return;
|
|
1409
|
+
const g = a.hasOwnProp(t, "transitional") ? t.transitional : void 0;
|
|
1410
|
+
if (a.isPlainObject(g) && a.hasOwnProp(g, u))
|
|
1411
|
+
return g[u];
|
|
1412
|
+
}
|
|
1413
|
+
function l(u, p, g) {
|
|
1414
|
+
if (a.hasOwnProp(e, g))
|
|
1415
|
+
return r(u, p);
|
|
1416
|
+
if (a.hasOwnProp(t, g))
|
|
1417
|
+
return r(void 0, u);
|
|
1418
|
+
}
|
|
1419
|
+
const d = {
|
|
1420
|
+
url: o,
|
|
1421
|
+
method: o,
|
|
1422
|
+
data: o,
|
|
1423
|
+
baseURL: i,
|
|
1424
|
+
transformRequest: i,
|
|
1425
|
+
transformResponse: i,
|
|
1426
|
+
paramsSerializer: i,
|
|
1427
|
+
timeout: i,
|
|
1428
|
+
timeoutErrorMessage: i,
|
|
1429
|
+
withCredentials: i,
|
|
1430
|
+
withXSRFToken: i,
|
|
1431
|
+
adapter: i,
|
|
1432
|
+
responseType: i,
|
|
1433
|
+
xsrfCookieName: i,
|
|
1434
|
+
xsrfHeaderName: i,
|
|
1435
|
+
onUploadProgress: i,
|
|
1436
|
+
onDownloadProgress: i,
|
|
1437
|
+
decompress: i,
|
|
1438
|
+
maxContentLength: i,
|
|
1439
|
+
maxBodyLength: i,
|
|
1440
|
+
beforeRedirect: i,
|
|
1441
|
+
transport: i,
|
|
1442
|
+
httpAgent: i,
|
|
1443
|
+
httpsAgent: i,
|
|
1444
|
+
cancelToken: i,
|
|
1445
|
+
socketPath: i,
|
|
1446
|
+
allowedSocketPaths: i,
|
|
1447
|
+
responseEncoding: i,
|
|
1448
|
+
validateStatus: l,
|
|
1449
|
+
headers: (u, p, g) => s(St(u), St(p), g, !0)
|
|
1450
|
+
};
|
|
1451
|
+
return a.forEach(ts({ ...t, ...e }), function(p) {
|
|
1452
|
+
if (p === "__proto__" || p === "constructor" || p === "prototype") return;
|
|
1453
|
+
const g = a.hasOwnProp(d, p) ? d[p] : s, y = a.hasOwnProp(t, p) ? t[p] : void 0, R = a.hasOwnProp(e, p) ? e[p] : void 0, S = g(y, R, p);
|
|
1454
|
+
a.isUndefined(S) && g !== l || (n[p] = S);
|
|
1455
|
+
}), a.hasOwnProp(e, "validateStatus") && a.isUndefined(e.validateStatus) && c("validateStatusUndefinedResolves") === !1 && (a.hasOwnProp(t, "validateStatus") ? n.validateStatus = r(void 0, t.validateStatus) : delete n.validateStatus), n;
|
|
1456
|
+
}
|
|
1457
|
+
const ns = ["content-type", "content-length"];
|
|
1458
|
+
function rs(t, e, n) {
|
|
1459
|
+
if (n !== "content-only") {
|
|
1460
|
+
t.set(e);
|
|
1461
|
+
return;
|
|
1462
|
+
}
|
|
1463
|
+
Object.entries(e || {}).forEach(([r, s]) => {
|
|
1464
|
+
ns.includes(r.toLowerCase()) && t.set(r, s);
|
|
1465
|
+
});
|
|
1466
|
+
}
|
|
1467
|
+
const ss = (t) => encodeURIComponent(t).replace(
|
|
1468
|
+
/%([0-9A-F]{2})/gi,
|
|
1469
|
+
(e, n) => String.fromCharCode(parseInt(n, 16))
|
|
1470
|
+
);
|
|
1471
|
+
function nn(t) {
|
|
1472
|
+
const e = se({}, t), n = (g) => a.hasOwnProp(e, g) ? e[g] : void 0, r = n("data");
|
|
1473
|
+
let s = n("withXSRFToken");
|
|
1474
|
+
const o = n("xsrfHeaderName"), i = n("xsrfCookieName");
|
|
1475
|
+
let c = n("headers");
|
|
1476
|
+
const l = n("auth"), d = n("baseURL"), u = n("allowAbsoluteUrls"), p = n("url");
|
|
1477
|
+
if (e.headers = c = F.from(c), e.url = Jt(
|
|
1478
|
+
tn(d, p, u, e),
|
|
1479
|
+
n("params"),
|
|
1480
|
+
n("paramsSerializer")
|
|
1481
|
+
), l) {
|
|
1482
|
+
const g = a.getSafeProp(l, "username") || "", y = a.getSafeProp(l, "password") || "";
|
|
1483
|
+
try {
|
|
1484
|
+
c.set(
|
|
1485
|
+
"Authorization",
|
|
1486
|
+
"Basic " + btoa(g + ":" + (y ? ss(y) : ""))
|
|
1487
|
+
);
|
|
1488
|
+
} catch (R) {
|
|
1489
|
+
throw h.from(R, h.ERR_BAD_OPTION_VALUE, t);
|
|
1490
|
+
}
|
|
1491
|
+
}
|
|
1492
|
+
if (a.isFormData(r)) {
|
|
1493
|
+
const g = a.getSafeProp(r, "getHeaders");
|
|
1494
|
+
T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv || a.isReactNative(r) ? c.setContentType(void 0) : a.isFunction(g) && rs(c, g.call(r), n("formDataHeaderPolicy"));
|
|
1495
|
+
}
|
|
1496
|
+
if (T.hasStandardBrowserEnv && (a.isFunction(s) && (s = s(e)), s === !0 || s == null && Kr(e.url))) {
|
|
1497
|
+
const y = o && i && Xr.read(i);
|
|
1498
|
+
y && c.set(o, y);
|
|
1499
|
+
}
|
|
1500
|
+
return e;
|
|
1501
|
+
}
|
|
1502
|
+
const os = typeof XMLHttpRequest < "u", is = os && function(t) {
|
|
1503
|
+
return new Promise(function(n, r) {
|
|
1504
|
+
const s = nn(t);
|
|
1505
|
+
let o = s.data;
|
|
1506
|
+
const i = F.from(s.headers).normalize();
|
|
1507
|
+
let { responseType: c, onUploadProgress: l, onDownloadProgress: d } = s, u, p, g, y, R, S;
|
|
1508
|
+
function x() {
|
|
1509
|
+
y && y(), R && R(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1510
|
+
}
|
|
1511
|
+
let f = new XMLHttpRequest();
|
|
1512
|
+
f.open(s.method.toUpperCase(), s.url, !0), f.timeout = s.timeout;
|
|
1513
|
+
function m(w) {
|
|
1514
|
+
if (!f)
|
|
1515
|
+
return;
|
|
1516
|
+
if (f.status === 0 && (qe(en(s.url)) || qe(T.origin)) !== "file" && !(f.responseURL && f.responseURL.startsWith("file:"))) {
|
|
1517
|
+
r(new h("Request aborted", h.ECONNABORTED, t, f)), x(), f = null;
|
|
1518
|
+
return;
|
|
1519
|
+
}
|
|
1520
|
+
try {
|
|
1521
|
+
w ? S && S(w) : R && R();
|
|
1522
|
+
} catch (M) {
|
|
1523
|
+
setTimeout(() => {
|
|
1524
|
+
throw M;
|
|
1525
|
+
});
|
|
1526
|
+
}
|
|
1527
|
+
if (!f)
|
|
1528
|
+
return;
|
|
1529
|
+
const P = F.from(
|
|
1530
|
+
"getAllResponseHeaders" in f && f.getAllResponseHeaders()
|
|
1531
|
+
), A = {
|
|
1532
|
+
data: !c || c === "text" || c === "json" ? f.responseText : f.response,
|
|
1533
|
+
status: f.status,
|
|
1534
|
+
statusText: f.statusText,
|
|
1535
|
+
headers: P,
|
|
1536
|
+
config: t,
|
|
1537
|
+
request: f
|
|
1538
|
+
};
|
|
1539
|
+
Yt(
|
|
1540
|
+
function(G) {
|
|
1541
|
+
n(G), x();
|
|
1542
|
+
},
|
|
1543
|
+
function(G) {
|
|
1544
|
+
r(G), x();
|
|
1545
|
+
},
|
|
1546
|
+
A
|
|
1547
|
+
), f = null;
|
|
1548
|
+
}
|
|
1549
|
+
"onloadend" in f ? f.onloadend = m : f.onreadystatechange = function() {
|
|
1550
|
+
!f || f.readyState !== 4 || f.status === 0 && !(f.responseURL && f.responseURL.startsWith("file:")) || setTimeout(m);
|
|
1551
|
+
}, f.onabort = function() {
|
|
1552
|
+
f && (r(new h("Request aborted", h.ECONNABORTED, t, f)), x(), f = null);
|
|
1553
|
+
}, f.onerror = function(P) {
|
|
1554
|
+
const D = P && P.message ? P.message : "Network Error", A = new h(D, h.ERR_NETWORK, t, f);
|
|
1555
|
+
A.event = P || null, r(A), x(), f = null;
|
|
1556
|
+
}, f.ontimeout = function() {
|
|
1557
|
+
let P = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1558
|
+
const D = s.transitional || Ye;
|
|
1559
|
+
s.timeoutErrorMessage && (P = s.timeoutErrorMessage), r(
|
|
1560
|
+
new h(
|
|
1561
|
+
P,
|
|
1562
|
+
D.clarifyTimeoutError ? h.ETIMEDOUT : h.ECONNABORTED,
|
|
1563
|
+
t,
|
|
1564
|
+
f
|
|
1565
|
+
)
|
|
1566
|
+
), x(), f = null;
|
|
1567
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in f && a.forEach(qt(i), function(P, D) {
|
|
1568
|
+
f.setRequestHeader(D, P);
|
|
1569
|
+
}), a.isUndefined(s.withCredentials) || (f.withCredentials = !!s.withCredentials), c && c !== "json" && (f.responseType = s.responseType), d && ([g, R, S] = De(
|
|
1570
|
+
d,
|
|
1571
|
+
!0
|
|
1572
|
+
), f.addEventListener("progress", g)), l && f.upload && ([p, y] = De(l), f.upload.addEventListener("progress", p), f.upload.addEventListener("loadend", y)), (s.cancelToken || s.signal) && (u = (w) => {
|
|
1573
|
+
f && (r(!w || w.type ? new Re(null, t, f) : w), f.abort(), x(), f = null);
|
|
1574
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1575
|
+
const E = qe(s.url);
|
|
1576
|
+
if (E && !T.protocols.includes(E)) {
|
|
1577
|
+
r(
|
|
1578
|
+
new h(
|
|
1579
|
+
"Unsupported protocol " + E + ":",
|
|
1580
|
+
h.ERR_BAD_REQUEST,
|
|
1581
|
+
t
|
|
1582
|
+
)
|
|
1583
|
+
), x();
|
|
1584
|
+
return;
|
|
1585
|
+
}
|
|
1586
|
+
f.send(o || null);
|
|
1587
|
+
});
|
|
1588
|
+
}, as = (t, e) => {
|
|
1589
|
+
if (t = t ? t.filter(Boolean) : [], !e && !t.length)
|
|
1590
|
+
return;
|
|
1591
|
+
const n = new AbortController();
|
|
1592
|
+
let r = !1;
|
|
1593
|
+
const s = function(l) {
|
|
1594
|
+
if (!r) {
|
|
1595
|
+
r = !0, i();
|
|
1596
|
+
const d = l instanceof Error ? l : this.reason;
|
|
1597
|
+
n.abort(
|
|
1598
|
+
d instanceof h ? d : new Re(d instanceof Error ? d.message : d)
|
|
1599
|
+
);
|
|
1600
|
+
}
|
|
1601
|
+
};
|
|
1602
|
+
let o = e && setTimeout(() => {
|
|
1603
|
+
o = null, s(new h(`timeout of ${e}ms exceeded`, h.ETIMEDOUT));
|
|
1604
|
+
}, e);
|
|
1605
|
+
const i = () => {
|
|
1606
|
+
t && (o && clearTimeout(o), o = null, t.forEach((l) => {
|
|
1607
|
+
l.unsubscribe ? l.unsubscribe(s) : l.removeEventListener("abort", s);
|
|
1608
|
+
}), t = null);
|
|
1609
|
+
};
|
|
1610
|
+
t.forEach((l) => {
|
|
1611
|
+
if (!r) {
|
|
1612
|
+
if (l.aborted) {
|
|
1613
|
+
s.call(l);
|
|
1614
|
+
return;
|
|
1615
|
+
}
|
|
1616
|
+
l.addEventListener("abort", s, { once: !0 });
|
|
1617
|
+
}
|
|
1618
|
+
});
|
|
1619
|
+
const { signal: c } = n;
|
|
1620
|
+
return c.unsubscribe = () => a.asap(i), c;
|
|
1621
|
+
}, cs = function* (t, e) {
|
|
1622
|
+
let n = t.byteLength;
|
|
1623
|
+
if (n < e) {
|
|
1624
|
+
yield t;
|
|
1625
|
+
return;
|
|
1626
|
+
}
|
|
1627
|
+
let r = 0, s;
|
|
1628
|
+
for (; r < n; )
|
|
1629
|
+
s = r + e, yield t.slice(r, s), r = s;
|
|
1630
|
+
}, ls = async function* (t, e) {
|
|
1631
|
+
for await (const n of us(t))
|
|
1632
|
+
yield* cs(n, e);
|
|
1633
|
+
}, us = async function* (t) {
|
|
1634
|
+
if (t[Symbol.asyncIterator]) {
|
|
1635
|
+
yield* t;
|
|
1636
|
+
return;
|
|
1637
|
+
}
|
|
1638
|
+
const e = t.getReader();
|
|
1639
|
+
try {
|
|
1640
|
+
for (; ; ) {
|
|
1641
|
+
const { done: n, value: r } = await e.read();
|
|
1642
|
+
if (n)
|
|
1643
|
+
break;
|
|
1644
|
+
yield r;
|
|
1645
|
+
}
|
|
1646
|
+
} finally {
|
|
1647
|
+
await e.cancel();
|
|
1648
|
+
}
|
|
1649
|
+
}, Ot = (t, e, n, r) => {
|
|
1650
|
+
const s = ls(t, e);
|
|
1651
|
+
let o = 0, i, c = (l) => {
|
|
1652
|
+
i || (i = !0, r && r(l));
|
|
1653
|
+
};
|
|
1654
|
+
return new ReadableStream(
|
|
1655
|
+
{
|
|
1656
|
+
async pull(l) {
|
|
1657
|
+
try {
|
|
1658
|
+
const { done: d, value: u } = await s.next();
|
|
1659
|
+
if (d) {
|
|
1660
|
+
c(), l.close();
|
|
1661
|
+
return;
|
|
1662
|
+
}
|
|
1663
|
+
let p = u.byteLength;
|
|
1664
|
+
if (n) {
|
|
1665
|
+
let g = o += p;
|
|
1666
|
+
n(g);
|
|
1667
|
+
}
|
|
1668
|
+
l.enqueue(new Uint8Array(u));
|
|
1669
|
+
} catch (d) {
|
|
1670
|
+
throw c(d), d;
|
|
1671
|
+
}
|
|
1672
|
+
},
|
|
1673
|
+
cancel(l) {
|
|
1674
|
+
return c(l), s.return();
|
|
1675
|
+
}
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
highWaterMark: 2
|
|
1679
|
+
}
|
|
1680
|
+
);
|
|
1681
|
+
}, At = (t) => t >= 48 && t <= 57 || t >= 65 && t <= 70 || t >= 97 && t <= 102, rn = (t, e, n) => e + 2 < n && At(t.charCodeAt(e + 1)) && At(t.charCodeAt(e + 2)), _t = (t) => t <= 57 ? t - 48 : (t & 223) - 55, fs = (t) => t >= 65 && t <= 90 || // A-Z
|
|
1682
|
+
t >= 97 && t <= 122 || // a-z
|
|
1683
|
+
t >= 48 && t <= 57 || // 0-9
|
|
1684
|
+
t === 43 || // +
|
|
1685
|
+
t === 47 || // /
|
|
1686
|
+
t === 45 || // - (base64url)
|
|
1687
|
+
t === 95, ds = (t) => t === 9 || t === 10 || t === 12 || t === 13 || t === 32, ps = (t) => {
|
|
1688
|
+
const e = Math.floor(t / 4), n = t % 4;
|
|
1689
|
+
return e * 3 + (n === 2 ? 1 : n === 3 ? 2 : 0);
|
|
1690
|
+
}, hs = (t) => {
|
|
1691
|
+
const e = t.length;
|
|
1692
|
+
let n = 0;
|
|
1693
|
+
return e > 0 && t.charCodeAt(e - 1) === 61 && (n++, e > 1 && t.charCodeAt(e - 2) === 61 && n++), Math.floor((e - n) * 3 / 4);
|
|
1694
|
+
}, ms = (t) => {
|
|
1695
|
+
const e = t.length;
|
|
1696
|
+
let n = 0, r = 0, s = !1;
|
|
1697
|
+
for (let o = 0; o < e; o++) {
|
|
1698
|
+
let i = t.charCodeAt(o);
|
|
1699
|
+
if (i === 37 && rn(t, o, e) && (i = _t(t.charCodeAt(o + 1)) * 16 + _t(t.charCodeAt(o + 2)), o += 2), !ds(i)) {
|
|
1700
|
+
if (i === 61) {
|
|
1701
|
+
r++;
|
|
1702
|
+
continue;
|
|
1703
|
+
}
|
|
1704
|
+
if (!fs(i) || r > 0) {
|
|
1705
|
+
s = !0;
|
|
1706
|
+
continue;
|
|
1707
|
+
}
|
|
1708
|
+
n++;
|
|
1709
|
+
}
|
|
1710
|
+
}
|
|
1711
|
+
return s || r > 2 || r > 0 && (n + r) % 4 !== 0 || n % 4 === 1 ? hs(t) : ps(n);
|
|
1712
|
+
}, gs = (t, e) => {
|
|
1713
|
+
if (!t || typeof t != "string" || !t.startsWith("data:")) return 0;
|
|
1714
|
+
const n = t.indexOf(",");
|
|
1715
|
+
if (n < 0) return 0;
|
|
1716
|
+
const r = t.slice(5, n), s = t.slice(n + 1);
|
|
1717
|
+
if (/;base64/i.test(r))
|
|
1718
|
+
return e(s);
|
|
1719
|
+
let i = 0;
|
|
1720
|
+
for (let c = 0, l = s.length; c < l; c++) {
|
|
1721
|
+
const d = s.charCodeAt(c);
|
|
1722
|
+
if (d === 37 && rn(s, c, l))
|
|
1723
|
+
i += 1, c += 2;
|
|
1724
|
+
else if (d < 128)
|
|
1725
|
+
i += 1;
|
|
1726
|
+
else if (d < 2048)
|
|
1727
|
+
i += 2;
|
|
1728
|
+
else if (d >= 55296 && d <= 56319 && c + 1 < l) {
|
|
1729
|
+
const u = s.charCodeAt(c + 1);
|
|
1730
|
+
u >= 56320 && u <= 57343 ? (i += 4, c++) : i += 3;
|
|
1731
|
+
} else
|
|
1732
|
+
i += 3;
|
|
1733
|
+
}
|
|
1734
|
+
return i;
|
|
1735
|
+
};
|
|
1736
|
+
function ys(t) {
|
|
1737
|
+
const e = typeof t == "string" ? t.indexOf("#") : -1;
|
|
1738
|
+
return gs(
|
|
1739
|
+
e === -1 ? t : t.slice(0, e),
|
|
1740
|
+
ms
|
|
1741
|
+
);
|
|
1742
|
+
}
|
|
1743
|
+
const tt = "1.20.0", xt = 64 * 1024, ws = {
|
|
1744
|
+
cache: "default",
|
|
1745
|
+
redirect: "follow",
|
|
1746
|
+
referrer: "about:client",
|
|
1747
|
+
referrerPolicy: "",
|
|
1748
|
+
mode: "cors",
|
|
1749
|
+
integrity: "",
|
|
1750
|
+
keepalive: !1,
|
|
1751
|
+
priority: "auto",
|
|
1752
|
+
window: null
|
|
1753
|
+
}, { isFunction: _e } = a, bs = (t) => encodeURIComponent(t).replace(
|
|
1754
|
+
/%([0-9A-F]{2})/gi,
|
|
1755
|
+
(e, n) => String.fromCharCode(parseInt(n, 16))
|
|
1756
|
+
), Pt = (t) => {
|
|
1757
|
+
if (!a.isString(t))
|
|
1758
|
+
return t;
|
|
1759
|
+
try {
|
|
1760
|
+
return decodeURIComponent(t);
|
|
1761
|
+
} catch {
|
|
1762
|
+
return t;
|
|
1763
|
+
}
|
|
1764
|
+
}, Tt = (t, ...e) => {
|
|
1765
|
+
try {
|
|
1766
|
+
return !!t(...e);
|
|
1767
|
+
} catch {
|
|
1768
|
+
return !1;
|
|
1769
|
+
}
|
|
1770
|
+
}, Es = (t) => {
|
|
1771
|
+
const e = t.indexOf("://");
|
|
1772
|
+
let n = t;
|
|
1773
|
+
return e !== -1 && (n = n.slice(e + 3)), n.includes("@") || n.includes(":");
|
|
1774
|
+
}, Rs = (t) => {
|
|
1775
|
+
const e = a.global !== void 0 && a.global !== null ? a.global : globalThis, { ReadableStream: n, TextEncoder: r } = e;
|
|
1776
|
+
t = a.merge.call(
|
|
1777
|
+
{
|
|
1778
|
+
skipUndefined: !0
|
|
1779
|
+
},
|
|
1780
|
+
{
|
|
1781
|
+
Request: e.Request,
|
|
1782
|
+
Response: e.Response
|
|
1783
|
+
},
|
|
1784
|
+
t
|
|
1785
|
+
);
|
|
1786
|
+
const { fetch: s, Request: o, Response: i } = t, c = s ? _e(s) : typeof fetch == "function", l = _e(o), d = _e(i);
|
|
1787
|
+
if (!c)
|
|
1788
|
+
return !1;
|
|
1789
|
+
const u = c && _e(n), p = c && (typeof r == "function" ? /* @__PURE__ */ ((f) => (m) => f.encode(m))(new r()) : async (f) => new Uint8Array(await new o(f).arrayBuffer())), g = l && u && Tt(() => {
|
|
1790
|
+
let f = !1;
|
|
1791
|
+
const m = new o(T.origin, {
|
|
1792
|
+
body: new n(),
|
|
1793
|
+
method: "POST",
|
|
1794
|
+
get duplex() {
|
|
1795
|
+
return f = !0, "half";
|
|
1796
|
+
}
|
|
1797
|
+
}), E = m.headers.has("Content-Type");
|
|
1798
|
+
return m.body != null && m.body.cancel(), f && !E;
|
|
1799
|
+
}), y = d && u && Tt(() => a.isReadableStream(new i("").body)), R = {
|
|
1800
|
+
stream: y && ((f) => f.body)
|
|
1801
|
+
};
|
|
1802
|
+
c && ["text", "arrayBuffer", "blob", "formData", "stream"].forEach((f) => {
|
|
1803
|
+
!R[f] && (R[f] = (m, E) => {
|
|
1804
|
+
let w = m && m[f];
|
|
1805
|
+
if (w)
|
|
1806
|
+
return w.call(m);
|
|
1807
|
+
throw new h(
|
|
1808
|
+
`Response type '${f}' is not supported`,
|
|
1809
|
+
h.ERR_NOT_SUPPORT,
|
|
1810
|
+
E
|
|
1811
|
+
);
|
|
1812
|
+
});
|
|
1813
|
+
});
|
|
1814
|
+
const S = async (f) => {
|
|
1815
|
+
if (f == null)
|
|
1816
|
+
return 0;
|
|
1817
|
+
if (a.isBlob(f))
|
|
1818
|
+
return f.size;
|
|
1819
|
+
if (a.isSpecCompliantForm(f))
|
|
1820
|
+
return (await new o(T.origin, {
|
|
1821
|
+
method: "POST",
|
|
1822
|
+
body: f
|
|
1823
|
+
}).arrayBuffer()).byteLength;
|
|
1824
|
+
if (a.isArrayBufferView(f) || a.isArrayBuffer(f))
|
|
1825
|
+
return f.byteLength;
|
|
1826
|
+
if (a.isURLSearchParams(f) && (f = f + ""), a.isString(f))
|
|
1827
|
+
return (await p(f)).byteLength;
|
|
1828
|
+
}, x = async (f, m) => {
|
|
1829
|
+
const E = a.toFiniteNumber(f.getContentLength());
|
|
1830
|
+
return E ?? S(m);
|
|
1831
|
+
};
|
|
1832
|
+
return async (f) => {
|
|
1833
|
+
let {
|
|
1834
|
+
url: m,
|
|
1835
|
+
method: E,
|
|
1836
|
+
data: w,
|
|
1837
|
+
signal: P,
|
|
1838
|
+
cancelToken: D,
|
|
1839
|
+
timeout: A,
|
|
1840
|
+
onDownloadProgress: M,
|
|
1841
|
+
onUploadProgress: G,
|
|
1842
|
+
responseType: W,
|
|
1843
|
+
headers: V,
|
|
1844
|
+
withCredentials: Se = "same-origin",
|
|
1845
|
+
fetchOptions: je,
|
|
1846
|
+
maxContentLength: H,
|
|
1847
|
+
maxBodyLength: Oe,
|
|
1848
|
+
maxRedirects: ln
|
|
1849
|
+
} = nn(f);
|
|
1850
|
+
const le = a.isNumber(H) && H > -1, Be = a.isNumber(Oe) && Oe > -1, un = (O) => a.hasOwnProp(f, O) ? f[O] : void 0;
|
|
1851
|
+
let it = s || fetch;
|
|
1852
|
+
W = W ? (W + "").toLowerCase() : "text";
|
|
1853
|
+
let J = as(
|
|
1854
|
+
[P, D && D.toAbortSignal()],
|
|
1855
|
+
A
|
|
1856
|
+
), C = null;
|
|
1857
|
+
const Q = J && J.unsubscribe && (() => {
|
|
1858
|
+
J.unsubscribe();
|
|
1859
|
+
});
|
|
1860
|
+
let oe, ue = null;
|
|
1861
|
+
const at = () => new h(
|
|
1862
|
+
"Request body larger than maxBodyLength limit",
|
|
1863
|
+
h.ERR_BAD_REQUEST,
|
|
1864
|
+
f,
|
|
1865
|
+
C
|
|
1866
|
+
);
|
|
1867
|
+
try {
|
|
1868
|
+
let O;
|
|
1869
|
+
const B = un("auth");
|
|
1870
|
+
if (B) {
|
|
1871
|
+
const b = a.getSafeProp(B, "username") || "", L = a.getSafeProp(B, "password") || "";
|
|
1872
|
+
O = {
|
|
1873
|
+
username: b,
|
|
1874
|
+
password: L
|
|
1875
|
+
};
|
|
1876
|
+
}
|
|
1877
|
+
if (Es(m)) {
|
|
1878
|
+
const b = new URL(m, T.origin);
|
|
1879
|
+
if (!O && (b.username || b.password)) {
|
|
1880
|
+
const L = Pt(b.username), K = Pt(b.password);
|
|
1881
|
+
O = {
|
|
1882
|
+
username: L,
|
|
1883
|
+
password: K
|
|
1884
|
+
};
|
|
1885
|
+
}
|
|
1886
|
+
(b.username || b.password) && (b.username = "", b.password = "", m = b.href);
|
|
1887
|
+
}
|
|
1888
|
+
if (O && (V.delete("authorization"), V.set(
|
|
1889
|
+
"Authorization",
|
|
1890
|
+
"Basic " + btoa(bs((O.username || "") + ":" + (O.password || "")))
|
|
1891
|
+
)), le && typeof m == "string" && m.startsWith("data:") && ys(m) > H)
|
|
1892
|
+
throw new h(
|
|
1893
|
+
"maxContentLength size of " + H + " exceeded",
|
|
1894
|
+
h.ERR_BAD_RESPONSE,
|
|
1895
|
+
f,
|
|
1896
|
+
C
|
|
1897
|
+
);
|
|
1898
|
+
if (Be && E !== "get" && E !== "head") {
|
|
1899
|
+
const b = await S(w);
|
|
1900
|
+
if (typeof b == "number" && isFinite(b) && (oe = b, b > Oe))
|
|
1901
|
+
throw at();
|
|
1902
|
+
}
|
|
1903
|
+
const Ae = Be && (a.isReadableStream(w) || a.isStream(w)), ct = (b, L, K) => Ot(
|
|
1904
|
+
b,
|
|
1905
|
+
xt,
|
|
1906
|
+
(Z) => {
|
|
1907
|
+
if (Be && Z > Oe)
|
|
1908
|
+
throw ue = at();
|
|
1909
|
+
L && L(Z);
|
|
1910
|
+
},
|
|
1911
|
+
K
|
|
1912
|
+
);
|
|
1913
|
+
if (g && E !== "get" && E !== "head" && (G || Ae)) {
|
|
1914
|
+
if (oe = oe ?? await x(V, w), oe !== 0 || Ae) {
|
|
1915
|
+
let b = new o(m, {
|
|
1916
|
+
method: "POST",
|
|
1917
|
+
body: w,
|
|
1918
|
+
duplex: "half"
|
|
1919
|
+
}), L;
|
|
1920
|
+
if (a.isFormData(w) && (L = b.headers.get("content-type")) && V.setContentType(L), b.body) {
|
|
1921
|
+
const [K, Z] = G && bt(
|
|
1922
|
+
oe,
|
|
1923
|
+
De(Et(G))
|
|
1924
|
+
) || [];
|
|
1925
|
+
w = ct(b.body, K, Z);
|
|
1926
|
+
}
|
|
1927
|
+
}
|
|
1928
|
+
} else if (Ae && !l && u && E !== "get" && E !== "head")
|
|
1929
|
+
w = ct(w);
|
|
1930
|
+
else if (Ae && l && !g && E !== "get" && E !== "head")
|
|
1931
|
+
throw new h(
|
|
1932
|
+
"Stream request bodies are not supported by the current fetch implementation",
|
|
1933
|
+
h.ERR_NOT_SUPPORT,
|
|
1934
|
+
f,
|
|
1935
|
+
C
|
|
1936
|
+
);
|
|
1937
|
+
a.isString(Se) || (Se = Se ? "include" : "omit");
|
|
1938
|
+
const fn = l && "credentials" in o.prototype;
|
|
1939
|
+
if (a.isFormData(w)) {
|
|
1940
|
+
const b = V.getContentType();
|
|
1941
|
+
b && /^multipart\/form-data/i.test(b) && !/boundary=/i.test(b) && V.delete("content-type");
|
|
1942
|
+
}
|
|
1943
|
+
V.set("User-Agent", "axios/" + tt, !1);
|
|
1944
|
+
const I = je == null ? je : Object.assign(/* @__PURE__ */ Object.create(null), je);
|
|
1945
|
+
I && (delete I.body, delete I.headers, delete I.method, delete I.signal, delete I.duplex, delete I.credentials);
|
|
1946
|
+
const $ = Object.assign(/* @__PURE__ */ Object.create(null), I, {
|
|
1947
|
+
signal: J,
|
|
1948
|
+
method: E.toUpperCase(),
|
|
1949
|
+
headers: qt(V.normalize()),
|
|
1950
|
+
body: w,
|
|
1951
|
+
duplex: "half",
|
|
1952
|
+
credentials: fn ? Se : void 0
|
|
1953
|
+
});
|
|
1954
|
+
l && (a.forEach(ws, (b, L) => {
|
|
1955
|
+
$[L] === void 0 && ($[L] = b);
|
|
1956
|
+
}), $.signal === void 0 && ($.signal = null), $.body === void 0 && ($.body = null)), ln === 0 && ($.redirect = "manual", I && (I.redirect = "manual")), C = l && new o(m, $);
|
|
1957
|
+
let q = await (l ? it(C, I) : it(m, $));
|
|
1958
|
+
const lt = F.from(q.headers);
|
|
1959
|
+
if (le) {
|
|
1960
|
+
const b = a.toFiniteNumber(lt.getContentLength());
|
|
1961
|
+
if (b != null && b > H)
|
|
1962
|
+
throw new h(
|
|
1963
|
+
"maxContentLength size of " + H + " exceeded",
|
|
1964
|
+
h.ERR_BAD_RESPONSE,
|
|
1965
|
+
f,
|
|
1966
|
+
C
|
|
1967
|
+
);
|
|
1968
|
+
}
|
|
1969
|
+
const ke = y && (W === "stream" || W === "response");
|
|
1970
|
+
if (y && q.body && (M || le || ke && Q)) {
|
|
1971
|
+
const b = {};
|
|
1972
|
+
["status", "statusText", "headers"].forEach((fe) => {
|
|
1973
|
+
b[fe] = q[fe];
|
|
1974
|
+
});
|
|
1975
|
+
const L = a.toFiniteNumber(lt.getContentLength()), [K, Z] = M && bt(
|
|
1976
|
+
L,
|
|
1977
|
+
De(Et(M), !0)
|
|
1978
|
+
) || [];
|
|
1979
|
+
let ut = 0;
|
|
1980
|
+
const dn = (fe) => {
|
|
1981
|
+
if (le && (ut = fe, ut > H))
|
|
1982
|
+
throw new h(
|
|
1983
|
+
"maxContentLength size of " + H + " exceeded",
|
|
1984
|
+
h.ERR_BAD_RESPONSE,
|
|
1985
|
+
f,
|
|
1986
|
+
C
|
|
1987
|
+
);
|
|
1988
|
+
K && K(fe);
|
|
1989
|
+
};
|
|
1990
|
+
q = new i(
|
|
1991
|
+
Ot(q.body, xt, dn, () => {
|
|
1992
|
+
Z && Z(), Q && Q();
|
|
1993
|
+
}),
|
|
1994
|
+
b
|
|
1995
|
+
);
|
|
1996
|
+
}
|
|
1997
|
+
W = W || "text";
|
|
1998
|
+
let z = await R[a.findKey(R, W) || "text"](
|
|
1999
|
+
q,
|
|
2000
|
+
f
|
|
2001
|
+
);
|
|
2002
|
+
if (le && !y && !ke) {
|
|
2003
|
+
let b;
|
|
2004
|
+
if (z != null && (typeof z.byteLength == "number" ? b = z.byteLength : typeof z.size == "number" ? b = z.size : typeof z == "string" && (b = typeof r == "function" ? new r().encode(z).byteLength : z.length)), typeof b == "number" && b > H)
|
|
2005
|
+
throw new h(
|
|
2006
|
+
"maxContentLength size of " + H + " exceeded",
|
|
2007
|
+
h.ERR_BAD_RESPONSE,
|
|
2008
|
+
f,
|
|
2009
|
+
C
|
|
2010
|
+
);
|
|
2011
|
+
}
|
|
2012
|
+
return !ke && Q && Q(), await new Promise((b, L) => {
|
|
2013
|
+
Yt(b, L, {
|
|
2014
|
+
data: z,
|
|
2015
|
+
headers: F.from(q.headers),
|
|
2016
|
+
status: q.status,
|
|
2017
|
+
statusText: q.statusText,
|
|
2018
|
+
config: f,
|
|
2019
|
+
request: C
|
|
2020
|
+
});
|
|
2021
|
+
});
|
|
2022
|
+
} catch (O) {
|
|
2023
|
+
if (Q && Q(), J && J.aborted && J.reason instanceof h) {
|
|
2024
|
+
const B = J.reason;
|
|
2025
|
+
throw B.config = f, C && (B.request = C), O !== B && Object.defineProperty(B, "cause", {
|
|
2026
|
+
__proto__: null,
|
|
2027
|
+
value: O,
|
|
2028
|
+
writable: !0,
|
|
2029
|
+
enumerable: !1,
|
|
2030
|
+
configurable: !0
|
|
2031
|
+
}), B;
|
|
2032
|
+
}
|
|
2033
|
+
if (ue)
|
|
2034
|
+
throw C && !ue.request && (ue.request = C), ue;
|
|
2035
|
+
if (O instanceof h)
|
|
2036
|
+
throw C && !O.request && (O.request = C), O;
|
|
2037
|
+
if (O && O.name === "TypeError" && /Load failed|fetch/i.test(O.message)) {
|
|
2038
|
+
const B = new h(
|
|
2039
|
+
"Network Error",
|
|
2040
|
+
h.ERR_NETWORK,
|
|
2041
|
+
f,
|
|
2042
|
+
C,
|
|
2043
|
+
O && O.response
|
|
2044
|
+
);
|
|
2045
|
+
throw Object.defineProperty(B, "cause", {
|
|
2046
|
+
__proto__: null,
|
|
2047
|
+
value: O.cause || O,
|
|
2048
|
+
writable: !0,
|
|
2049
|
+
enumerable: !1,
|
|
2050
|
+
configurable: !0
|
|
2051
|
+
}), B;
|
|
2052
|
+
}
|
|
2053
|
+
throw h.from(O, O && O.code, f, C, O && O.response);
|
|
2054
|
+
}
|
|
2055
|
+
};
|
|
2056
|
+
}, Ss = /* @__PURE__ */ new Map(), sn = (t) => {
|
|
2057
|
+
let e = t && t.env || {};
|
|
2058
|
+
const { fetch: n, Request: r, Response: s } = e, o = [r, s, n];
|
|
2059
|
+
let i = o.length, c = i, l, d, u = Ss;
|
|
2060
|
+
for (; c--; )
|
|
2061
|
+
l = o[c], d = u.get(l), d === void 0 && u.set(l, d = c ? /* @__PURE__ */ new Map() : Rs(e)), u = d;
|
|
2062
|
+
return d;
|
|
2063
|
+
};
|
|
2064
|
+
sn();
|
|
2065
|
+
const nt = {
|
|
2066
|
+
http: Cr,
|
|
2067
|
+
xhr: is,
|
|
2068
|
+
fetch: {
|
|
2069
|
+
get: sn
|
|
2070
|
+
}
|
|
2071
|
+
};
|
|
2072
|
+
a.forEach(nt, (t, e) => {
|
|
2073
|
+
if (t) {
|
|
2074
|
+
try {
|
|
2075
|
+
Object.defineProperty(t, "name", { __proto__: null, value: e });
|
|
2076
|
+
} catch {
|
|
2077
|
+
}
|
|
2078
|
+
Object.defineProperty(t, "adapterName", { __proto__: null, value: e });
|
|
2079
|
+
}
|
|
2080
|
+
});
|
|
2081
|
+
const Ct = (t) => `- ${t}`, Os = (t) => a.isFunction(t) || t === null || t === !1;
|
|
2082
|
+
function As(t, e) {
|
|
2083
|
+
t = a.isArray(t) ? t : [t];
|
|
2084
|
+
const { length: n } = t;
|
|
2085
|
+
let r, s;
|
|
2086
|
+
const o = {};
|
|
2087
|
+
for (let i = 0; i < n; i++) {
|
|
2088
|
+
r = t[i];
|
|
2089
|
+
let c;
|
|
2090
|
+
if (s = r, !Os(r) && (s = nt[(c = String(r)).toLowerCase()], s === void 0))
|
|
2091
|
+
throw new h(`Unknown adapter '${c}'`);
|
|
2092
|
+
if (s && (a.isFunction(s) || (s = s.get(e))))
|
|
2093
|
+
break;
|
|
2094
|
+
o[c || "#" + i] = s;
|
|
2095
|
+
}
|
|
2096
|
+
if (!s) {
|
|
2097
|
+
const i = Object.entries(o).map(
|
|
2098
|
+
([l, d]) => `adapter ${l} ` + (d === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
2099
|
+
);
|
|
2100
|
+
let c = n ? i.length > 1 ? `since :
|
|
2101
|
+
` + i.map(Ct).join(`
|
|
2102
|
+
`) : " " + Ct(i[0]) : "as no adapter specified";
|
|
2103
|
+
throw new h(
|
|
2104
|
+
"There is no suitable adapter to dispatch the request " + c,
|
|
2105
|
+
h.ERR_NOT_SUPPORT
|
|
2106
|
+
);
|
|
2107
|
+
}
|
|
2108
|
+
return s;
|
|
2109
|
+
}
|
|
2110
|
+
const on = {
|
|
2111
|
+
/**
|
|
2112
|
+
* Resolve an adapter from a list of adapter names or functions.
|
|
2113
|
+
* @type {Function}
|
|
2114
|
+
*/
|
|
2115
|
+
getAdapter: As,
|
|
2116
|
+
/**
|
|
2117
|
+
* Exposes all known adapters
|
|
2118
|
+
* @type {Object<string, Function|Object>}
|
|
2119
|
+
*/
|
|
2120
|
+
adapters: nt
|
|
2121
|
+
};
|
|
2122
|
+
function ze(t) {
|
|
2123
|
+
if (t.cancelToken && t.cancelToken.throwIfRequested(), t.signal && t.signal.aborted)
|
|
2124
|
+
throw new Re(null, t);
|
|
2125
|
+
}
|
|
2126
|
+
function ve(t) {
|
|
2127
|
+
const e = a.toSafeFlatObject(t);
|
|
2128
|
+
return ze(e), e.headers = F.from(a.getSafeProp(e, "headers")), e.data = $e.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), on.getAdapter(e.adapter || Ee.adapter, e)(e).then(
|
|
2129
|
+
function(s) {
|
|
2130
|
+
ze(e), e.response = s;
|
|
2131
|
+
try {
|
|
2132
|
+
s.data = $e.call(e, e.transformResponse, s);
|
|
2133
|
+
} finally {
|
|
2134
|
+
delete e.response;
|
|
2135
|
+
}
|
|
2136
|
+
return s.headers = F.from(s.headers), s;
|
|
2137
|
+
},
|
|
2138
|
+
function(s) {
|
|
2139
|
+
if (!Zt(s) && (ze(e), s && s.response)) {
|
|
2140
|
+
e.response = s.response;
|
|
2141
|
+
try {
|
|
2142
|
+
s.response.data = $e.call(
|
|
2143
|
+
e,
|
|
2144
|
+
e.transformResponse,
|
|
2145
|
+
s.response
|
|
2146
|
+
);
|
|
2147
|
+
} finally {
|
|
2148
|
+
delete e.response;
|
|
2149
|
+
}
|
|
2150
|
+
s.response.headers = F.from(s.response.headers);
|
|
2151
|
+
}
|
|
2152
|
+
return Promise.reject(s);
|
|
2153
|
+
}
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
2156
|
+
const Fe = {};
|
|
2157
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach((t, e) => {
|
|
2158
|
+
Fe[t] = function(r) {
|
|
2159
|
+
return typeof r === t || "a" + (e < 1 ? "n " : " ") + t;
|
|
2160
|
+
};
|
|
2161
|
+
});
|
|
2162
|
+
const Nt = {};
|
|
2163
|
+
Fe.transitional = function(e, n, r) {
|
|
2164
|
+
function s(o, i) {
|
|
2165
|
+
return "[Axios v" + tt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
2166
|
+
}
|
|
2167
|
+
return (o, i, c) => {
|
|
2168
|
+
if (e === !1)
|
|
2169
|
+
throw new h(
|
|
2170
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
2171
|
+
h.ERR_DEPRECATED
|
|
2172
|
+
);
|
|
2173
|
+
return n && !Nt[i] && (Nt[i] = !0, console.warn(
|
|
2174
|
+
s(
|
|
2175
|
+
i,
|
|
2176
|
+
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
2177
|
+
)
|
|
2178
|
+
)), e ? e(o, i, c) : !0;
|
|
2179
|
+
};
|
|
2180
|
+
};
|
|
2181
|
+
Fe.spelling = function(e) {
|
|
2182
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${e}`), !0);
|
|
2183
|
+
};
|
|
2184
|
+
function _s(t, e, n) {
|
|
2185
|
+
if (typeof t != "object" || t === null)
|
|
2186
|
+
throw new h("options must be an object", h.ERR_BAD_OPTION_VALUE);
|
|
2187
|
+
const r = Object.keys(t);
|
|
2188
|
+
let s = r.length;
|
|
2189
|
+
for (; s-- > 0; ) {
|
|
2190
|
+
const o = r[s], i = Object.prototype.hasOwnProperty.call(e, o) ? e[o] : void 0;
|
|
2191
|
+
if (i) {
|
|
2192
|
+
const c = t[o], l = c === void 0 || i(c, o, t);
|
|
2193
|
+
if (l !== !0)
|
|
2194
|
+
throw new h(
|
|
2195
|
+
"option " + o + " must be " + l,
|
|
2196
|
+
h.ERR_BAD_OPTION_VALUE
|
|
2197
|
+
);
|
|
2198
|
+
continue;
|
|
2199
|
+
}
|
|
2200
|
+
if (n !== !0)
|
|
2201
|
+
throw new h("Unknown option " + o, h.ERR_BAD_OPTION);
|
|
2202
|
+
}
|
|
2203
|
+
}
|
|
2204
|
+
const Te = {
|
|
2205
|
+
assertOptions: _s,
|
|
2206
|
+
validators: Fe
|
|
2207
|
+
}, U = Te.validators;
|
|
2208
|
+
let te = class {
|
|
2209
|
+
constructor(e) {
|
|
2210
|
+
this.defaults = e || {}, this.interceptors = {
|
|
2211
|
+
request: new yt(),
|
|
2212
|
+
response: new yt()
|
|
2213
|
+
};
|
|
2214
|
+
}
|
|
2215
|
+
/**
|
|
2216
|
+
* Dispatch a request
|
|
2217
|
+
*
|
|
2218
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
2219
|
+
* @param {?Object} config
|
|
2220
|
+
*
|
|
2221
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
2222
|
+
*/
|
|
2223
|
+
async request(e, n) {
|
|
2224
|
+
try {
|
|
2225
|
+
return await this._request(e, n);
|
|
2226
|
+
} catch (r) {
|
|
2227
|
+
if (r instanceof Error)
|
|
2228
|
+
try {
|
|
2229
|
+
let s = {};
|
|
2230
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
2231
|
+
const o = s.stack;
|
|
2232
|
+
let i = "";
|
|
2233
|
+
if (typeof o == "string") {
|
|
2234
|
+
const c = o.indexOf(`
|
|
2235
|
+
`);
|
|
2236
|
+
i = c === -1 ? "" : o.slice(c + 1);
|
|
2237
|
+
}
|
|
2238
|
+
if (!r.stack)
|
|
2239
|
+
r.stack = i;
|
|
2240
|
+
else if (i) {
|
|
2241
|
+
const c = i.indexOf(`
|
|
2242
|
+
`), l = c === -1 ? -1 : i.indexOf(`
|
|
2243
|
+
`, c + 1), d = l === -1 ? "" : i.slice(l + 1);
|
|
2244
|
+
String(r.stack).endsWith(d) || (r.stack += `
|
|
2245
|
+
` + i);
|
|
2246
|
+
}
|
|
2247
|
+
} catch {
|
|
2248
|
+
}
|
|
2249
|
+
throw r;
|
|
2250
|
+
}
|
|
2251
|
+
}
|
|
2252
|
+
_request(e, n) {
|
|
2253
|
+
typeof e == "string" ? (n = n || {}, n.url = e) : n = e || {}, n = se(this.defaults, n);
|
|
2254
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
2255
|
+
r !== void 0 && Te.assertOptions(
|
|
2256
|
+
r,
|
|
2257
|
+
{
|
|
2258
|
+
silentJSONParsing: U.transitional(U.boolean),
|
|
2259
|
+
forcedJSONParsing: U.transitional(U.boolean),
|
|
2260
|
+
clarifyTimeoutError: U.transitional(U.boolean),
|
|
2261
|
+
legacyInterceptorReqResOrdering: U.transitional(U.boolean),
|
|
2262
|
+
advertiseZstdAcceptEncoding: U.transitional(U.boolean),
|
|
2263
|
+
validateStatusUndefinedResolves: U.transitional(U.boolean)
|
|
2264
|
+
},
|
|
2265
|
+
!1
|
|
2266
|
+
), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
2267
|
+
serialize: s
|
|
2268
|
+
} : Te.assertOptions(
|
|
2269
|
+
s,
|
|
2270
|
+
{
|
|
2271
|
+
encode: U.function,
|
|
2272
|
+
serialize: U.function
|
|
2273
|
+
},
|
|
2274
|
+
!0
|
|
2275
|
+
)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Te.assertOptions(
|
|
2276
|
+
n,
|
|
2277
|
+
{
|
|
2278
|
+
baseUrl: U.spelling("baseURL"),
|
|
2279
|
+
withXsrfToken: U.spelling("withXSRFToken")
|
|
2280
|
+
},
|
|
2281
|
+
!0
|
|
2282
|
+
), n.method = (a.getSafeProp(n, "method") || a.getSafeProp(this.defaults, "method") || "get").toLowerCase();
|
|
2283
|
+
let i = o && a.merge(o.common, o[n.method]);
|
|
2284
|
+
o && a.forEach(Qt.concat("common"), (R) => {
|
|
2285
|
+
delete o[R];
|
|
2286
|
+
}), n.headers = F.concat(i, o);
|
|
2287
|
+
const c = [];
|
|
2288
|
+
let l = !0;
|
|
2289
|
+
this.interceptors.request.forEach(function(S) {
|
|
2290
|
+
if (typeof S.runWhen == "function" && S.runWhen(n) === !1)
|
|
2291
|
+
return;
|
|
2292
|
+
l = l && S.synchronous;
|
|
2293
|
+
const x = n.transitional || Ye;
|
|
2294
|
+
x && x.legacyInterceptorReqResOrdering ? c.unshift(S.fulfilled, S.rejected) : c.push(S.fulfilled, S.rejected);
|
|
2295
|
+
});
|
|
2296
|
+
const d = [];
|
|
2297
|
+
this.interceptors.response.forEach(function(S) {
|
|
2298
|
+
d.push(S.fulfilled, S.rejected);
|
|
2299
|
+
});
|
|
2300
|
+
let u, p = 0, g;
|
|
2301
|
+
if (!l) {
|
|
2302
|
+
const R = [ve.bind(this), void 0];
|
|
2303
|
+
for (R.unshift(...c), R.push(...d), g = R.length, u = Promise.resolve(n); p < g; )
|
|
2304
|
+
u = u.then(R[p++], R[p++]);
|
|
2305
|
+
return u;
|
|
2306
|
+
}
|
|
2307
|
+
g = c.length;
|
|
2308
|
+
let y = n;
|
|
2309
|
+
for (; p < g; ) {
|
|
2310
|
+
const R = c[p++], S = c[p++];
|
|
2311
|
+
try {
|
|
2312
|
+
y = R ? R(y) : y;
|
|
2313
|
+
} catch (x) {
|
|
2314
|
+
if (!S) {
|
|
2315
|
+
u = Promise.reject(x);
|
|
2316
|
+
break;
|
|
2317
|
+
}
|
|
2318
|
+
try {
|
|
2319
|
+
const f = S.call(this, x);
|
|
2320
|
+
a.isThenable(f) && (u = Promise.resolve(f).then(
|
|
2321
|
+
() => ve.call(this, y)
|
|
2322
|
+
));
|
|
2323
|
+
} catch (f) {
|
|
2324
|
+
u = Promise.reject(f);
|
|
2325
|
+
}
|
|
2326
|
+
break;
|
|
2327
|
+
}
|
|
2328
|
+
}
|
|
2329
|
+
if (!u)
|
|
2330
|
+
try {
|
|
2331
|
+
u = ve.call(this, y);
|
|
2332
|
+
} catch (R) {
|
|
2333
|
+
u = Promise.reject(R);
|
|
2334
|
+
}
|
|
2335
|
+
for (p = 0, g = d.length; p < g; )
|
|
2336
|
+
u = u.then(d[p++], d[p++]);
|
|
2337
|
+
return u;
|
|
2338
|
+
}
|
|
2339
|
+
getUri(e) {
|
|
2340
|
+
e = se(this.defaults, e);
|
|
2341
|
+
const n = tn(e.baseURL, e.url, e.allowAbsoluteUrls, e);
|
|
2342
|
+
return Jt(n, e.params, e.paramsSerializer);
|
|
2343
|
+
}
|
|
2344
|
+
};
|
|
2345
|
+
a.forEach(["delete", "get", "head", "options"], function(e) {
|
|
2346
|
+
te.prototype[e] = function(n, r) {
|
|
2347
|
+
return this.request(
|
|
2348
|
+
se(r || {}, {
|
|
2349
|
+
method: e,
|
|
2350
|
+
url: n,
|
|
2351
|
+
data: r && a.hasOwnProp(r, "data") ? r.data : void 0
|
|
2352
|
+
})
|
|
2353
|
+
);
|
|
2354
|
+
};
|
|
2355
|
+
});
|
|
2356
|
+
a.forEach(["post", "put", "patch", "query"], function(e) {
|
|
2357
|
+
function n(r) {
|
|
2358
|
+
return function(o, i, c) {
|
|
2359
|
+
return this.request(
|
|
2360
|
+
se(c || {}, {
|
|
2361
|
+
method: e,
|
|
2362
|
+
headers: r ? {
|
|
2363
|
+
"Content-Type": "multipart/form-data"
|
|
2364
|
+
} : {},
|
|
2365
|
+
url: o,
|
|
2366
|
+
data: i
|
|
2367
|
+
})
|
|
2368
|
+
);
|
|
2369
|
+
};
|
|
2370
|
+
}
|
|
2371
|
+
te.prototype[e] = n(), e !== "query" && (te.prototype[e + "Form"] = n(!0));
|
|
2372
|
+
});
|
|
2373
|
+
let xs = class an {
|
|
2374
|
+
constructor(e) {
|
|
2375
|
+
if (typeof e != "function")
|
|
2376
|
+
throw new TypeError("executor must be a function.");
|
|
2377
|
+
let n;
|
|
2378
|
+
this.promise = new Promise(function(o) {
|
|
2379
|
+
n = o;
|
|
2380
|
+
});
|
|
2381
|
+
const r = this;
|
|
2382
|
+
this.promise.then((s) => {
|
|
2383
|
+
if (!r._listeners) return;
|
|
2384
|
+
let o = r._listeners.length;
|
|
2385
|
+
for (; o-- > 0; )
|
|
2386
|
+
r._listeners[o](s);
|
|
2387
|
+
r._listeners = null;
|
|
2388
|
+
}), this.promise.then = (s) => {
|
|
2389
|
+
let o;
|
|
2390
|
+
const i = new Promise((c) => {
|
|
2391
|
+
r.subscribe(c), o = c;
|
|
2392
|
+
}).then(s);
|
|
2393
|
+
return i.cancel = function() {
|
|
2394
|
+
r.unsubscribe(o);
|
|
2395
|
+
}, i;
|
|
2396
|
+
}, e(function(o, i, c) {
|
|
2397
|
+
r.reason || (r.reason = new Re(o, i, c), n(r.reason));
|
|
2398
|
+
});
|
|
2399
|
+
}
|
|
2400
|
+
/**
|
|
2401
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
2402
|
+
*/
|
|
2403
|
+
throwIfRequested() {
|
|
2404
|
+
if (this.reason)
|
|
2405
|
+
throw this.reason;
|
|
2406
|
+
}
|
|
2407
|
+
/**
|
|
2408
|
+
* Subscribe to the cancel signal
|
|
2409
|
+
*/
|
|
2410
|
+
subscribe(e) {
|
|
2411
|
+
if (this.reason) {
|
|
2412
|
+
e(this.reason);
|
|
2413
|
+
return;
|
|
2414
|
+
}
|
|
2415
|
+
this._listeners ? this._listeners.push(e) : this._listeners = [e];
|
|
2416
|
+
}
|
|
2417
|
+
/**
|
|
2418
|
+
* Unsubscribe from the cancel signal
|
|
2419
|
+
*/
|
|
2420
|
+
unsubscribe(e) {
|
|
2421
|
+
if (!this._listeners)
|
|
2422
|
+
return;
|
|
2423
|
+
const n = this._listeners.indexOf(e);
|
|
2424
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2425
|
+
}
|
|
2426
|
+
toAbortSignal() {
|
|
2427
|
+
const e = new AbortController(), n = (r) => {
|
|
2428
|
+
e.abort(r);
|
|
2429
|
+
};
|
|
2430
|
+
return this.subscribe(n), e.signal.unsubscribe = () => this.unsubscribe(n), e.signal;
|
|
2431
|
+
}
|
|
2432
|
+
/**
|
|
2433
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2434
|
+
* cancels the `CancelToken`.
|
|
2435
|
+
*/
|
|
2436
|
+
static source() {
|
|
2437
|
+
let e;
|
|
2438
|
+
return {
|
|
2439
|
+
token: new an(function(s) {
|
|
2440
|
+
e = s;
|
|
2441
|
+
}),
|
|
2442
|
+
cancel: e
|
|
2443
|
+
};
|
|
2444
|
+
}
|
|
2445
|
+
};
|
|
2446
|
+
function Ps(t) {
|
|
2447
|
+
return function(n) {
|
|
2448
|
+
return t.apply(null, n);
|
|
2449
|
+
};
|
|
2450
|
+
}
|
|
2451
|
+
function Ts(t) {
|
|
2452
|
+
return a.isObject(t) && t.isAxiosError === !0;
|
|
2453
|
+
}
|
|
2454
|
+
const Ce = {
|
|
2455
|
+
Continue: 100,
|
|
2456
|
+
SwitchingProtocols: 101,
|
|
2457
|
+
Processing: 102,
|
|
2458
|
+
EarlyHints: 103,
|
|
2459
|
+
Ok: 200,
|
|
2460
|
+
Created: 201,
|
|
2461
|
+
Accepted: 202,
|
|
2462
|
+
NonAuthoritativeInformation: 203,
|
|
2463
|
+
NoContent: 204,
|
|
2464
|
+
ResetContent: 205,
|
|
2465
|
+
PartialContent: 206,
|
|
2466
|
+
MultiStatus: 207,
|
|
2467
|
+
AlreadyReported: 208,
|
|
2468
|
+
ImUsed: 226,
|
|
2469
|
+
MultipleChoices: 300,
|
|
2470
|
+
MovedPermanently: 301,
|
|
2471
|
+
Found: 302,
|
|
2472
|
+
SeeOther: 303,
|
|
2473
|
+
NotModified: 304,
|
|
2474
|
+
UseProxy: 305,
|
|
2475
|
+
Unused: 306,
|
|
2476
|
+
TemporaryRedirect: 307,
|
|
2477
|
+
PermanentRedirect: 308,
|
|
2478
|
+
BadRequest: 400,
|
|
2479
|
+
Unauthorized: 401,
|
|
2480
|
+
PaymentRequired: 402,
|
|
2481
|
+
Forbidden: 403,
|
|
2482
|
+
NotFound: 404,
|
|
2483
|
+
MethodNotAllowed: 405,
|
|
2484
|
+
NotAcceptable: 406,
|
|
2485
|
+
ProxyAuthenticationRequired: 407,
|
|
2486
|
+
RequestTimeout: 408,
|
|
2487
|
+
Conflict: 409,
|
|
2488
|
+
Gone: 410,
|
|
2489
|
+
LengthRequired: 411,
|
|
2490
|
+
PreconditionFailed: 412,
|
|
2491
|
+
/**
|
|
2492
|
+
* @deprecated Use `ContentTooLarge` instead.
|
|
2493
|
+
*/
|
|
2494
|
+
PayloadTooLarge: 413,
|
|
2495
|
+
ContentTooLarge: 413,
|
|
2496
|
+
UriTooLong: 414,
|
|
2497
|
+
UnsupportedMediaType: 415,
|
|
2498
|
+
RangeNotSatisfiable: 416,
|
|
2499
|
+
ExpectationFailed: 417,
|
|
2500
|
+
ImATeapot: 418,
|
|
2501
|
+
MisdirectedRequest: 421,
|
|
2502
|
+
/**
|
|
2503
|
+
* @deprecated Use `UnprocessableContent` instead.
|
|
2504
|
+
*/
|
|
2505
|
+
UnprocessableEntity: 422,
|
|
2506
|
+
UnprocessableContent: 422,
|
|
2507
|
+
Locked: 423,
|
|
2508
|
+
FailedDependency: 424,
|
|
2509
|
+
TooEarly: 425,
|
|
2510
|
+
UpgradeRequired: 426,
|
|
2511
|
+
PreconditionRequired: 428,
|
|
2512
|
+
TooManyRequests: 429,
|
|
2513
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
2514
|
+
UnavailableForLegalReasons: 451,
|
|
2515
|
+
InternalServerError: 500,
|
|
2516
|
+
NotImplemented: 501,
|
|
2517
|
+
BadGateway: 502,
|
|
2518
|
+
ServiceUnavailable: 503,
|
|
2519
|
+
GatewayTimeout: 504,
|
|
2520
|
+
HttpVersionNotSupported: 505,
|
|
2521
|
+
VariantAlsoNegotiates: 506,
|
|
2522
|
+
InsufficientStorage: 507,
|
|
2523
|
+
LoopDetected: 508,
|
|
2524
|
+
NotExtended: 510,
|
|
2525
|
+
NetworkAuthenticationRequired: 511,
|
|
2526
|
+
WebServerReturnsAnUnknownError: 520,
|
|
2527
|
+
WebServerIsDown: 521,
|
|
2528
|
+
ConnectionTimedOut: 522,
|
|
2529
|
+
OriginIsUnreachable: 523,
|
|
2530
|
+
TimeoutOccurred: 524,
|
|
2531
|
+
SslHandshakeFailed: 525,
|
|
2532
|
+
InvalidSslCertificate: 526
|
|
2533
|
+
};
|
|
2534
|
+
Object.entries(Ce).forEach(([t, e]) => {
|
|
2535
|
+
Ce[e] === void 0 && (Ce[e] = t);
|
|
2536
|
+
});
|
|
2537
|
+
function cn(t) {
|
|
2538
|
+
const e = new te(t), n = Dt(te.prototype.request, e);
|
|
2539
|
+
return a.extend(n, te.prototype, e, { allOwnKeys: !0 }), a.extend(n, e, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
2540
|
+
return cn(se(t, s));
|
|
2541
|
+
}, n;
|
|
2542
|
+
}
|
|
2543
|
+
const _ = cn(Ee);
|
|
2544
|
+
_.Axios = te;
|
|
2545
|
+
_.CanceledError = Re;
|
|
2546
|
+
_.CancelToken = xs;
|
|
2547
|
+
_.isCancel = Zt;
|
|
2548
|
+
_.VERSION = tt;
|
|
2549
|
+
_.toFormData = Ue;
|
|
2550
|
+
_.AxiosError = h;
|
|
2551
|
+
_.Cancel = _.CanceledError;
|
|
2552
|
+
_.all = function(e) {
|
|
2553
|
+
return Promise.all(e);
|
|
2554
|
+
};
|
|
2555
|
+
_.spread = Ps;
|
|
2556
|
+
_.isAxiosError = Ts;
|
|
2557
|
+
_.mergeConfig = se;
|
|
2558
|
+
_.AxiosHeaders = F;
|
|
2559
|
+
_.formToJSON = (t) => Gt(a.isHTMLForm(t) ? new FormData(t) : t);
|
|
2560
|
+
_.getAdapter = on.getAdapter;
|
|
2561
|
+
_.HttpStatusCode = Ce;
|
|
2562
|
+
_.default = _;
|
|
2563
|
+
const {
|
|
2564
|
+
Axios: Ms,
|
|
2565
|
+
AxiosError: Hs,
|
|
2566
|
+
CanceledError: $s,
|
|
2567
|
+
isCancel: qs,
|
|
2568
|
+
CancelToken: zs,
|
|
2569
|
+
VERSION: vs,
|
|
2570
|
+
all: Ws,
|
|
2571
|
+
Cancel: Vs,
|
|
2572
|
+
isAxiosError: Js,
|
|
2573
|
+
spread: Ks,
|
|
2574
|
+
toFormData: Xs,
|
|
2575
|
+
AxiosHeaders: Gs,
|
|
2576
|
+
HttpStatusCode: Qs,
|
|
2577
|
+
formToJSON: Zs,
|
|
2578
|
+
getAdapter: Ys,
|
|
2579
|
+
mergeConfig: eo,
|
|
2580
|
+
create: to
|
|
2581
|
+
} = _, Cs = "1.0.2", rt = {
|
|
2582
|
+
// 库版本号,界面版本号显示统一从这里读取
|
|
2583
|
+
version: Cs,
|
|
2584
|
+
page: {
|
|
2585
|
+
global: {
|
|
2586
|
+
size: "default"
|
|
2587
|
+
},
|
|
2588
|
+
componentDefault: {
|
|
2589
|
+
// Requester 请求触发组件默认值(开发者可通过全局配置覆盖)
|
|
2590
|
+
WdRequester: {
|
|
2591
|
+
method: "post"
|
|
2592
|
+
}
|
|
2593
|
+
},
|
|
2594
|
+
pager: {
|
|
2595
|
+
size: 32,
|
|
2596
|
+
pageSizes: [10, 20, 50, 100, 200],
|
|
2597
|
+
pageSize: 20,
|
|
2598
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
2599
|
+
hideOnSinglePage: !1,
|
|
2600
|
+
position: "right"
|
|
2601
|
+
}
|
|
2602
|
+
},
|
|
2603
|
+
request: {
|
|
2604
|
+
urlPrefix: "",
|
|
2605
|
+
throwException: !1,
|
|
2606
|
+
// 并发相同请求合并去重(method+url+params 一致只发一次),表列内请求组件等场景自动收敛为一次调用
|
|
2607
|
+
dedup: !0,
|
|
2608
|
+
loading: {
|
|
2609
|
+
enable: !0,
|
|
2610
|
+
props: {
|
|
2611
|
+
lock: !0,
|
|
2612
|
+
text: "加载中...",
|
|
2613
|
+
background: "rgba(255, 255, 255, 0.7)"
|
|
2614
|
+
}
|
|
2615
|
+
},
|
|
2616
|
+
axiosConfig: {
|
|
2617
|
+
timeout: 3e4
|
|
2618
|
+
},
|
|
2619
|
+
pageParam: {
|
|
2620
|
+
pageField: "currentPage",
|
|
2621
|
+
sizeField: "pageSize",
|
|
2622
|
+
searchField: "param"
|
|
2623
|
+
},
|
|
2624
|
+
transform: {}
|
|
2625
|
+
},
|
|
2626
|
+
response: {
|
|
2627
|
+
props: {
|
|
2628
|
+
codeName: "code",
|
|
2629
|
+
messageName: "message",
|
|
2630
|
+
dataName: "data"
|
|
2631
|
+
},
|
|
2632
|
+
successCode: 0,
|
|
2633
|
+
list: {
|
|
2634
|
+
listName: "list",
|
|
2635
|
+
totalName: "total",
|
|
2636
|
+
pageSizeName: "pageSize",
|
|
2637
|
+
currentPageName: "currentPage"
|
|
2638
|
+
},
|
|
2639
|
+
success: {
|
|
2640
|
+
tipsMode: "message",
|
|
2641
|
+
tipsType: "success",
|
|
2642
|
+
showTips: !1,
|
|
2643
|
+
props: {}
|
|
2644
|
+
},
|
|
2645
|
+
fail: {
|
|
2646
|
+
tipsMode: "messagebox",
|
|
2647
|
+
tipsType: "error",
|
|
2648
|
+
showTips: !0,
|
|
2649
|
+
title: "操作失败",
|
|
2650
|
+
props: {}
|
|
2651
|
+
},
|
|
2652
|
+
exception: {
|
|
2653
|
+
tipsMode: "messagebox",
|
|
2654
|
+
tipsType: "error",
|
|
2655
|
+
showTips: !0,
|
|
2656
|
+
title: "网络异常",
|
|
2657
|
+
props: {}
|
|
2658
|
+
},
|
|
2659
|
+
complete: {
|
|
2660
|
+
tipsType: "message"
|
|
2661
|
+
}
|
|
2662
|
+
},
|
|
2663
|
+
theme: {
|
|
2664
|
+
colors: {},
|
|
2665
|
+
cssVars: {}
|
|
2666
|
+
}
|
|
2667
|
+
};
|
|
2668
|
+
function We(t) {
|
|
2669
|
+
if (t === null || typeof t != "object") return !1;
|
|
2670
|
+
const e = Object.getPrototypeOf(t);
|
|
2671
|
+
return e === Object.prototype || e === null;
|
|
2672
|
+
}
|
|
2673
|
+
function v(...t) {
|
|
2674
|
+
const e = {};
|
|
2675
|
+
for (const n of t)
|
|
2676
|
+
if (We(n))
|
|
2677
|
+
for (const r of Object.keys(n)) {
|
|
2678
|
+
const s = e[r], o = n[r];
|
|
2679
|
+
Array.isArray(o) ? e[r] = o.slice() : We(o) ? e[r] = v(We(s) ? s : {}, o) : o !== void 0 && (e[r] = o);
|
|
2680
|
+
}
|
|
2681
|
+
return e;
|
|
2682
|
+
}
|
|
2683
|
+
function no(t, e) {
|
|
2684
|
+
if (!t) return e;
|
|
2685
|
+
try {
|
|
2686
|
+
return JSON.parse(t);
|
|
2687
|
+
} catch {
|
|
2688
|
+
return e;
|
|
2689
|
+
}
|
|
2690
|
+
}
|
|
2691
|
+
const Ns = {
|
|
2692
|
+
primary: { wd: "--wd-color-primary", el: "--el-color-primary" },
|
|
2693
|
+
success: { wd: "--wd-color-success", el: "--el-color-success" },
|
|
2694
|
+
warning: { wd: "--wd-color-warning", el: "--el-color-warning" },
|
|
2695
|
+
danger: { wd: "--wd-color-danger", el: "--el-color-danger" },
|
|
2696
|
+
error: { wd: "--wd-color-danger", el: "--el-color-danger" },
|
|
2697
|
+
info: { wd: "--wd-color-info", el: "--el-color-info" }
|
|
2698
|
+
};
|
|
2699
|
+
let me = null;
|
|
2700
|
+
function st(t) {
|
|
2701
|
+
if (typeof document > "u" || !t) return;
|
|
2702
|
+
me || (me = document.createElement("style"), me.setAttribute("data-workdesktop-theme", ""), document.head.appendChild(me));
|
|
2703
|
+
const e = [":root {"];
|
|
2704
|
+
if (t.colors)
|
|
2705
|
+
for (const [n, r] of Object.entries(t.colors)) {
|
|
2706
|
+
const s = Ns[n.toLowerCase()];
|
|
2707
|
+
if (s)
|
|
2708
|
+
e.push(` ${s.wd}: ${r};`), e.push(` ${s.el}: ${r};`);
|
|
2709
|
+
else {
|
|
2710
|
+
const o = n.startsWith("--") ? n : `--wd-color-${n}`;
|
|
2711
|
+
e.push(` ${o}: ${r};`);
|
|
2712
|
+
}
|
|
2713
|
+
}
|
|
2714
|
+
if (t.cssVars)
|
|
2715
|
+
for (const [n, r] of Object.entries(t.cssVars)) {
|
|
2716
|
+
const s = n.startsWith("--") ? n : `--${n}`;
|
|
2717
|
+
e.push(` ${s}: ${r};`);
|
|
2718
|
+
}
|
|
2719
|
+
e.push("}"), me.textContent = e.join(`
|
|
2720
|
+
`);
|
|
2721
|
+
}
|
|
2722
|
+
let N = v(rt);
|
|
2723
|
+
function Ds() {
|
|
2724
|
+
if (typeof window < "u" && window.workDesktopConfig)
|
|
2725
|
+
return window.workDesktopConfig;
|
|
2726
|
+
}
|
|
2727
|
+
function ro(t) {
|
|
2728
|
+
return t && (N = v(N, t)), st(N.theme), N;
|
|
2729
|
+
}
|
|
2730
|
+
function Ls() {
|
|
2731
|
+
return N;
|
|
2732
|
+
}
|
|
2733
|
+
function so() {
|
|
2734
|
+
return N = v(rt), st(N.theme), N;
|
|
2735
|
+
}
|
|
2736
|
+
function oo(t) {
|
|
2737
|
+
return t ? v(N, t) : N;
|
|
2738
|
+
}
|
|
2739
|
+
function io(t) {
|
|
2740
|
+
var n;
|
|
2741
|
+
const e = ((n = N.page) == null ? void 0 : n.componentDefault) || {};
|
|
2742
|
+
return e[t] || e[Us(t)] || {};
|
|
2743
|
+
}
|
|
2744
|
+
function Us(t) {
|
|
2745
|
+
return t.replace(/(^|-|_)(\w)/g, (e, n, r) => r.toUpperCase()).replace(/^wd/i, "Wd");
|
|
2746
|
+
}
|
|
2747
|
+
function ao(t) {
|
|
2748
|
+
N = v(rt);
|
|
2749
|
+
const e = Ds();
|
|
2750
|
+
return N = e ? v(N, e, t || {}) : v(N, t || {}), st(N.theme), N;
|
|
2751
|
+
}
|
|
2752
|
+
function Ve(t, e) {
|
|
2753
|
+
if (!t || t.showTips === !1) return;
|
|
2754
|
+
const n = t.tipsMode;
|
|
2755
|
+
if (!n || n === "none") return;
|
|
2756
|
+
const r = t.tipsType || "info", s = t.props || {};
|
|
2757
|
+
if (n === "message") {
|
|
2758
|
+
gn({ message: e, type: r, ...s });
|
|
2759
|
+
return;
|
|
2760
|
+
}
|
|
2761
|
+
if (n === "notify") {
|
|
2762
|
+
yn({ message: e, type: r, ...s });
|
|
2763
|
+
return;
|
|
2764
|
+
}
|
|
2765
|
+
if (n === "messagebox") {
|
|
2766
|
+
const o = t.title || "";
|
|
2767
|
+
wn.alert(e, o, { type: r, ...s }).catch(() => {
|
|
2768
|
+
});
|
|
2769
|
+
return;
|
|
2770
|
+
}
|
|
2771
|
+
}
|
|
2772
|
+
class ot {
|
|
2773
|
+
constructor(e) {
|
|
2774
|
+
Y(this, "axiosInstance");
|
|
2775
|
+
Y(this, "listeners", /* @__PURE__ */ new Set());
|
|
2776
|
+
/** 组件/实例级配置覆盖(request.create 使用) */
|
|
2777
|
+
Y(this, "instanceConfig", {});
|
|
2778
|
+
Y(this, "loadingInstance", null);
|
|
2779
|
+
Y(this, "loadingCount", 0);
|
|
2780
|
+
/** 进行中的请求(in-flight dedup):key = method:url:序列化params,并发相同请求合并为一次网络调用 */
|
|
2781
|
+
Y(this, "inFlightRequests", /* @__PURE__ */ new Map());
|
|
2782
|
+
this.axiosInstance = _.create(e || {});
|
|
2783
|
+
}
|
|
2784
|
+
/**
|
|
2785
|
+
* 创建绑定组件级配置的实例(PRD 5.1)
|
|
2786
|
+
* 子实例复用父级监听器与去重表:同族实例(全局单例 + 各组件 create 出来的子实例)
|
|
2787
|
+
* 之间并发相同请求同样合并,保证表列内多行组件发起的相同请求只打一次网络。
|
|
2788
|
+
*/
|
|
2789
|
+
create(e) {
|
|
2790
|
+
const n = new ot();
|
|
2791
|
+
return n.instanceConfig = e || {}, n.listeners = this.listeners, n.inFlightRequests = this.inFlightRequests, n;
|
|
2792
|
+
}
|
|
2793
|
+
on(e) {
|
|
2794
|
+
return this.listeners.add(e), () => this.listeners.delete(e);
|
|
2795
|
+
}
|
|
2796
|
+
off(e) {
|
|
2797
|
+
this.listeners.delete(e);
|
|
2798
|
+
}
|
|
2799
|
+
emit(e) {
|
|
2800
|
+
this.listeners.forEach((n) => {
|
|
2801
|
+
try {
|
|
2802
|
+
n(e);
|
|
2803
|
+
} catch (r) {
|
|
2804
|
+
console.error("[WorkDesktop] api event handler error:", r);
|
|
2805
|
+
}
|
|
2806
|
+
});
|
|
2807
|
+
}
|
|
2808
|
+
/**
|
|
2809
|
+
* 取有效配置:全局配置 + 实例级覆盖
|
|
2810
|
+
*/
|
|
2811
|
+
resolveConfig() {
|
|
2812
|
+
const e = Ls();
|
|
2813
|
+
return this.instanceConfig && Object.keys(this.instanceConfig).length ? v(e, this.instanceConfig) : e;
|
|
2814
|
+
}
|
|
2815
|
+
openLoading(e) {
|
|
2816
|
+
var s;
|
|
2817
|
+
const n = this.resolveConfig();
|
|
2818
|
+
((e == null ? void 0 : e.showLoading) ?? n.request.loading.enable) && (this.loadingCount += 1, this.loadingCount === 1 && (this.loadingInstance = mn.service({
|
|
2819
|
+
...n.request.loading.props,
|
|
2820
|
+
...((s = e == null ? void 0 : e.axiosConfig) == null ? void 0 : s.loadingProps) || {}
|
|
2821
|
+
})));
|
|
2822
|
+
}
|
|
2823
|
+
closeLoading(e) {
|
|
2824
|
+
const n = this.resolveConfig();
|
|
2825
|
+
((e == null ? void 0 : e.showLoading) ?? n.request.loading.enable) && (this.loadingCount = Math.max(0, this.loadingCount - 1), this.loadingCount === 0 && this.loadingInstance && (this.loadingInstance.close(), this.loadingInstance = null));
|
|
2826
|
+
}
|
|
2827
|
+
/**
|
|
2828
|
+
* 核心请求方法
|
|
2829
|
+
* 返回 Promise<ApiResult<T>>:业务失败也 resolve(success=false),仅网络异常 reject
|
|
2830
|
+
*/
|
|
2831
|
+
async request(e, n) {
|
|
2832
|
+
const r = this.resolveConfig(), s = (e.method || "get").toLowerCase(), o = this.buildUrl(e.url || "", r);
|
|
2833
|
+
if ((n == null ? void 0 : n.dedup) ?? r.request.dedup) {
|
|
2834
|
+
const c = this.buildDedupKey(s, o, e), l = this.inFlightRequests.get(c);
|
|
2835
|
+
if (l) return l;
|
|
2836
|
+
const d = this.executeRequest(e, n, o, s);
|
|
2837
|
+
return this.inFlightRequests.set(c, d), d.then(
|
|
2838
|
+
() => this.inFlightRequests.delete(c),
|
|
2839
|
+
() => this.inFlightRequests.delete(c)
|
|
2840
|
+
), d;
|
|
2841
|
+
}
|
|
2842
|
+
return this.executeRequest(e, n, o, s);
|
|
2843
|
+
}
|
|
2844
|
+
/** 去重 key:method + 解析后 url + 序列化请求体;请求体不可序列化时退化为固定后缀(该场景不合并) */
|
|
2845
|
+
buildDedupKey(e, n, r) {
|
|
2846
|
+
let s;
|
|
2847
|
+
try {
|
|
2848
|
+
s = JSON.stringify(r.data ?? r.params ?? null);
|
|
2849
|
+
} catch {
|
|
2850
|
+
s = "[unserializable]";
|
|
2851
|
+
}
|
|
2852
|
+
return `${e}:${n}:${s}`;
|
|
2853
|
+
}
|
|
2854
|
+
/** 真实请求执行体(含事件/loading/封解封),被 request() 去重包装后调用 */
|
|
2855
|
+
async executeRequest(e, n, r, s) {
|
|
2856
|
+
var d;
|
|
2857
|
+
const o = this.resolveConfig(), i = {
|
|
2858
|
+
type: "apiBefore",
|
|
2859
|
+
url: r,
|
|
2860
|
+
method: s,
|
|
2861
|
+
params: e.data ?? e.params
|
|
2862
|
+
};
|
|
2863
|
+
this.emit(i), this.openLoading(n);
|
|
2864
|
+
let c = {
|
|
2865
|
+
...o.request.axiosConfig,
|
|
2866
|
+
...e,
|
|
2867
|
+
url: r,
|
|
2868
|
+
method: s,
|
|
2869
|
+
signal: (n == null ? void 0 : n.signal) ?? e.signal
|
|
2870
|
+
};
|
|
2871
|
+
const l = o.request.transform.requestInterceptor;
|
|
2872
|
+
l && (c = await l(c) || c);
|
|
2873
|
+
try {
|
|
2874
|
+
let u = await this.axiosInstance.request(c);
|
|
2875
|
+
const p = o.request.transform.responseInterceptor;
|
|
2876
|
+
p && (u = await p(u) ?? u);
|
|
2877
|
+
const g = u.data, y = this.unpack(g, o, n, { url: r, method: s, params: i.params });
|
|
2878
|
+
return this.emit({
|
|
2879
|
+
type: y.success ? "apiSuccess" : "apiFail",
|
|
2880
|
+
url: r,
|
|
2881
|
+
method: s,
|
|
2882
|
+
params: i.params,
|
|
2883
|
+
data: y.data,
|
|
2884
|
+
code: y.code,
|
|
2885
|
+
message: y.message,
|
|
2886
|
+
raw: g
|
|
2887
|
+
}), this.emit({ type: "apiAfter", url: r, method: s, data: y.data, code: y.code, message: y.message }), y;
|
|
2888
|
+
} catch (u) {
|
|
2889
|
+
const p = (u == null ? void 0 : u.message) || "网络异常,请稍后重试", g = ((d = n == null ? void 0 : n.tipsConfig) == null ? void 0 : d.exception) ?? o.response.exception;
|
|
2890
|
+
if (Ve(g, p), this.emit({ type: "apiException", url: r, method: s, params: i.params, error: u, message: p }), this.emit({ type: "apiAfter", url: r, method: s, error: u, message: p }), o.request.throwException)
|
|
2891
|
+
throw u;
|
|
2892
|
+
return Promise.reject(
|
|
2893
|
+
Object.assign(new Error(p), { success: !1, data: null, message: p, error: u })
|
|
2894
|
+
);
|
|
2895
|
+
} finally {
|
|
2896
|
+
this.closeLoading(n);
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
/**
|
|
2900
|
+
* 解封响应体:按 resConfig 取 code/message/data
|
|
2901
|
+
*/
|
|
2902
|
+
unpack(e, n, r, s) {
|
|
2903
|
+
var y, R;
|
|
2904
|
+
if (e == null || typeof e != "object" || Array.isArray(e))
|
|
2905
|
+
return { success: !0, data: e, raw: e };
|
|
2906
|
+
const { codeName: o, messageName: i, dataName: c } = n.response.props, l = e[o], d = e[i] ?? "", u = e[c];
|
|
2907
|
+
if (this.checkSuccess(l, n)) {
|
|
2908
|
+
const S = ((y = r == null ? void 0 : r.tipsConfig) == null ? void 0 : y.success) ?? n.response.success;
|
|
2909
|
+
return S != null && S.showTips && Ve(S, d || "操作成功"), { success: !0, data: u, code: l, message: d, raw: e };
|
|
2910
|
+
}
|
|
2911
|
+
const g = ((R = r == null ? void 0 : r.tipsConfig) == null ? void 0 : R.fail) ?? n.response.fail;
|
|
2912
|
+
return (g == null ? void 0 : g.showTips) !== !1 && Ve(g, d || "操作失败"), { success: !1, data: null, code: l, message: d, raw: e };
|
|
2913
|
+
}
|
|
2914
|
+
checkSuccess(e, n) {
|
|
2915
|
+
if (e == null) return !0;
|
|
2916
|
+
const r = Number(e);
|
|
2917
|
+
return Number.isNaN(r) ? !0 : r >= n.response.successCode;
|
|
2918
|
+
}
|
|
2919
|
+
buildUrl(e, n) {
|
|
2920
|
+
if (!e || /^https?:\/\//.test(e)) return e;
|
|
2921
|
+
const r = n.request.urlPrefix || "";
|
|
2922
|
+
return r ? `${r.replace(/\/$/, "")}/${e.replace(/^\//, "")}` : e;
|
|
2923
|
+
}
|
|
2924
|
+
// 便捷方法。返回值已解封业务 data(成功场景)
|
|
2925
|
+
get(e, n, r) {
|
|
2926
|
+
return this.request({ url: e, method: "get", params: n }, r);
|
|
2927
|
+
}
|
|
2928
|
+
post(e, n, r) {
|
|
2929
|
+
return this.request({ url: e, method: "post", data: n }, r);
|
|
2930
|
+
}
|
|
2931
|
+
put(e, n, r) {
|
|
2932
|
+
return this.request({ url: e, method: "put", data: n }, r);
|
|
2933
|
+
}
|
|
2934
|
+
delete(e, n, r) {
|
|
2935
|
+
return this.request({ url: e, method: "delete", params: n }, r);
|
|
2936
|
+
}
|
|
2937
|
+
}
|
|
2938
|
+
const co = new ot();
|
|
2939
|
+
export {
|
|
2940
|
+
ot as R,
|
|
2941
|
+
Ls as a,
|
|
2942
|
+
so as b,
|
|
2943
|
+
no as c,
|
|
2944
|
+
v as d,
|
|
2945
|
+
io as g,
|
|
2946
|
+
ao as i,
|
|
2947
|
+
oo as m,
|
|
2948
|
+
co as r,
|
|
2949
|
+
ro as s
|
|
2950
|
+
};
|
|
2951
|
+
//# sourceMappingURL=http-DUPsbs2K.mjs.map
|