@das-fed/utils 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-services/index.d.ts +1 -0
- package/api-services/index.js +2 -6964
- package/api-services/modules/app-manage.d.ts +2 -0
- package/api-services/modules/app-manage.js +3 -6964
- package/api-services/modules/authentication.d.ts +2 -0
- package/api-services/modules/authentication.js +3 -6964
- package/api-services/modules/bems.d.ts +6 -0
- package/api-services/modules/bems.js +6 -6967
- package/api-services/modules/contract.d.ts +2 -0
- package/api-services/modules/contract.js +3 -6964
- package/api-services/modules/duty-manage.d.ts +7 -0
- package/api-services/modules/duty-manage.js +7 -6968
- package/api-services/modules/enterpriseright.d.ts +2 -0
- package/api-services/modules/enterpriseright.js +3 -6964
- package/api-services/modules/file.d.ts +36 -0
- package/api-services/modules/file.js +380 -7040
- package/api-services/modules/gateway-edge.d.ts +2 -0
- package/api-services/modules/gateway-edge.js +3 -6964
- package/api-services/modules/index.d.ts +21 -0
- package/api-services/modules/index.js +445 -7105
- package/api-services/modules/iot.d.ts +15 -0
- package/api-services/modules/iot.js +16 -6977
- package/api-services/modules/justauth.d.ts +3 -0
- package/api-services/modules/justauth.js +4 -6965
- package/api-services/modules/knowledge.d.ts +2 -0
- package/api-services/modules/knowledge.js +3 -6964
- package/api-services/modules/link.d.ts +2 -0
- package/api-services/modules/link.js +3 -6964
- package/api-services/modules/permission.d.ts +2 -0
- package/api-services/modules/permission.js +3 -6964
- package/api-services/modules/platformManage.d.ts +14 -0
- package/api-services/modules/platformManage.js +10 -6971
- package/api-services/modules/portal.d.ts +2 -0
- package/api-services/modules/portal.js +3 -6964
- package/api-services/modules/space-manage.d.ts +2 -0
- package/api-services/modules/space-manage.js +3 -6964
- package/api-services/modules/super-admin.d.ts +8 -0
- package/api-services/modules/super-admin.js +6 -6967
- package/api-services/modules/supplier.d.ts +6 -0
- package/api-services/modules/supplier.js +5 -6966
- package/api-services/modules/supplychain-manage.d.ts +2 -0
- package/api-services/modules/supplychain-manage.js +3 -6964
- package/api-services/modules/systemConfiguration.d.ts +2 -0
- package/api-services/modules/systemConfiguration.js +3 -6964
- package/api-services/modules/tool.d.ts +2 -0
- package/api-services/modules/tool.js +3 -6964
- package/api-services/src/create-service.d.ts +2 -0
- package/api-services/src/create-service.js +2286 -6013
- package/api-services/src/sso.d.ts +29 -0
- package/api-services/src/sso.js +506 -669
- package/api-services/src/util.d.ts +1 -0
- package/api-services/src/util.js +243 -247
- package/atob/index.d.ts +2 -0
- package/common-info/getIframeUrl.d.ts +9 -0
- package/common-info/getIframeUrl.js +6 -11
- package/common-info/index.d.ts +42 -0
- package/common-info/index.js +104 -163
- package/common-info/setInfoFromUrl.d.ts +8 -0
- package/common-tools/arr-tools.d.ts +15 -0
- package/common-tools/date-format.d.ts +7 -0
- package/common-tools/get-url-params.d.ts +33 -0
- package/common-tools/get-url-params.js +1 -0
- package/common-tools/handle-data.d.ts +6 -0
- package/common-tools/index.d.ts +7 -0
- package/common-tools/index.js +7 -117
- package/common-tools/nest-tree-format.d.ts +30 -0
- package/common-tools/obj-tools.d.ts +7 -0
- package/common-tools/setHtmlMinWH.d.ts +5 -0
- package/common-tools/throttled.d.ts +7 -0
- package/config/index.d.ts +2 -0
- package/curring-http/index.d.ts +11 -0
- package/directive/auth.d.ts +8 -0
- package/directive/auth.js +32 -190
- package/directive/clickOutside.d.ts +5 -0
- package/directive/clickOutside.js +19 -21
- package/directive/hoverInside.d.ts +5 -0
- package/directive/hoverInside.js +13 -15
- package/directive/index.d.ts +3 -0
- package/directive/index.js +6 -260
- package/directive/utils.d.ts +7 -0
- package/dom-check-in/index.d.ts +6 -0
- package/dom-watcher/index.d.ts +25 -0
- package/hooks/popup-manager/use-zindex.d.ts +5 -0
- package/index.d.ts +2 -0
- package/index.js +2 -266
- package/load-js/index.d.ts +3 -0
- package/load-js/index.js +8 -12
- package/oss/index.d.ts +2 -0
- package/oss/index.js +8 -12
- package/package.json +5 -6
- package/pinyin-first-character/index.d.ts +2 -0
- package/process-engine-info/index.d.ts +10 -0
- package/pure-image-src/index.d.ts +2 -0
- package/set-personal-info/index.d.ts +5 -0
- package/set-personal-info/index.js +516 -622
- package/size-watcher/index.d.ts +6 -0
- package/style/index.d.ts +2 -0
- package/style/math.d.ts +9 -0
- package/style/style.d.ts +30 -0
- package/token-tools/index.d.ts +18 -0
- package/token-tools/index.js +60 -1579
- package/vue/hooks/use-model-value.d.ts +3 -0
- package/vue/index.d.ts +1 -0
- package/vue/index.js +2 -8
- package/webSocket-service/index.d.ts +40 -0
- package/webSocket-service/index.js +35 -138
- package/with-install/index.d.ts +10 -0
package/api-services/src/sso.js
CHANGED
|
@@ -1,36 +1,42 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
|
|
1
|
+
import { ref as We, watch as Ge } from "vue";
|
|
2
|
+
import { encryption as Xe } from "@das-fed/utils/atob";
|
|
3
|
+
import { getConfig as ne } from "@das-fed/utils/config";
|
|
4
|
+
import { getUrlParams as Qe, funcUrlDel as Ze } from "@das-fed/utils/common-tools";
|
|
5
|
+
import { setAccessToken as Oe, getAccessToken as fe, removeAccessToken as Ye } from "@das-fed/utils/token-tools";
|
|
6
|
+
import { setProcessEngineToken as et } from "@das-fed/utils/process-engine-info";
|
|
7
|
+
import { setPersonalInfo as Ae } from "@das-fed/utils/set-personal-info";
|
|
8
|
+
function ke(e, t) {
|
|
3
9
|
return function() {
|
|
4
10
|
return e.apply(t, arguments);
|
|
5
11
|
};
|
|
6
12
|
}
|
|
7
|
-
const { toString:
|
|
8
|
-
const n =
|
|
13
|
+
const { toString: tt } = Object.prototype, { getPrototypeOf: re } = Object, M = /* @__PURE__ */ ((e) => (t) => {
|
|
14
|
+
const n = tt.call(t);
|
|
9
15
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
11
|
-
function
|
|
12
|
-
return e !== null && !
|
|
16
|
+
})(/* @__PURE__ */ Object.create(null)), T = (e) => (e = e.toLowerCase(), (t) => M(t) === e), z = (e) => (t) => typeof t === e, { isArray: P } = Array, U = z("undefined");
|
|
17
|
+
function nt(e) {
|
|
18
|
+
return e !== null && !U(e) && e.constructor !== null && !U(e.constructor) && g(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
13
19
|
}
|
|
14
|
-
const
|
|
15
|
-
function
|
|
20
|
+
const _e = T("ArrayBuffer");
|
|
21
|
+
function rt(e) {
|
|
16
22
|
let t;
|
|
17
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
23
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && _e(e.buffer), t;
|
|
18
24
|
}
|
|
19
|
-
const
|
|
20
|
-
if (
|
|
25
|
+
const st = z("string"), g = z("function"), xe = z("number"), J = (e) => e !== null && typeof e == "object", ot = (e) => e === !0 || e === !1, B = (e) => {
|
|
26
|
+
if (M(e) !== "object")
|
|
21
27
|
return !1;
|
|
22
|
-
const t =
|
|
28
|
+
const t = re(e);
|
|
23
29
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
24
|
-
},
|
|
30
|
+
}, it = T("Date"), at = T("File"), ct = T("Blob"), ut = T("FileList"), lt = (e) => J(e) && g(e.pipe), ft = (e) => {
|
|
25
31
|
let t;
|
|
26
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
27
|
-
t === "object" &&
|
|
28
|
-
},
|
|
29
|
-
function
|
|
32
|
+
return e && (typeof FormData == "function" && e instanceof FormData || g(e.append) && ((t = M(e)) === "formdata" || // detect form-data instance
|
|
33
|
+
t === "object" && g(e.toString) && e.toString() === "[object FormData]"));
|
|
34
|
+
}, dt = T("URLSearchParams"), pt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
35
|
+
function L(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
30
36
|
if (e === null || typeof e > "u")
|
|
31
37
|
return;
|
|
32
38
|
let r, s;
|
|
33
|
-
if (typeof e != "object" && (e = [e]),
|
|
39
|
+
if (typeof e != "object" && (e = [e]), P(e))
|
|
34
40
|
for (r = 0, s = e.length; r < s; r++)
|
|
35
41
|
t.call(null, e[r], r, e);
|
|
36
42
|
else {
|
|
@@ -40,7 +46,7 @@ function F(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
40
46
|
c = o[r], t.call(null, e[c], c, e);
|
|
41
47
|
}
|
|
42
48
|
}
|
|
43
|
-
function
|
|
49
|
+
function Ne(e, t) {
|
|
44
50
|
t = t.toLowerCase();
|
|
45
51
|
const n = Object.keys(e);
|
|
46
52
|
let r = n.length, s;
|
|
@@ -49,23 +55,23 @@ function Ue(e, t) {
|
|
|
49
55
|
return s;
|
|
50
56
|
return null;
|
|
51
57
|
}
|
|
52
|
-
const
|
|
53
|
-
function
|
|
54
|
-
const { caseless: e } =
|
|
55
|
-
const o = e &&
|
|
56
|
-
|
|
58
|
+
const Pe = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, Ce = (e) => !U(e) && e !== Pe;
|
|
59
|
+
function X() {
|
|
60
|
+
const { caseless: e } = Ce(this) && this || {}, t = {}, n = (r, s) => {
|
|
61
|
+
const o = e && Ne(t, s) || s;
|
|
62
|
+
B(t[o]) && B(r) ? t[o] = X(t[o], r) : B(r) ? t[o] = X({}, r) : P(r) ? t[o] = r.slice() : t[o] = r;
|
|
57
63
|
};
|
|
58
64
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
59
|
-
arguments[r] &&
|
|
65
|
+
arguments[r] && L(arguments[r], n);
|
|
60
66
|
return t;
|
|
61
67
|
}
|
|
62
|
-
const
|
|
63
|
-
n &&
|
|
64
|
-
}, { allOwnKeys: r }), e),
|
|
68
|
+
const ht = (e, t, n, { allOwnKeys: r } = {}) => (L(t, (s, o) => {
|
|
69
|
+
n && g(s) ? e[o] = ke(s, n) : e[o] = s;
|
|
70
|
+
}, { allOwnKeys: r }), e), mt = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), yt = (e, t, n, r) => {
|
|
65
71
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
66
72
|
value: t.prototype
|
|
67
73
|
}), n && Object.assign(e.prototype, n);
|
|
68
|
-
},
|
|
74
|
+
}, wt = (e, t, n, r) => {
|
|
69
75
|
let s, o, i;
|
|
70
76
|
const c = {};
|
|
71
77
|
if (t = t || {}, e == null)
|
|
@@ -73,55 +79,55 @@ const yt = (e, t, n, { allOwnKeys: r } = {}) => (F(t, (s, o) => {
|
|
|
73
79
|
do {
|
|
74
80
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
75
81
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
76
|
-
e = n !== !1 &&
|
|
82
|
+
e = n !== !1 && re(e);
|
|
77
83
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
78
84
|
return t;
|
|
79
85
|
}, Et = (e, t, n) => {
|
|
80
86
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
81
87
|
const r = e.indexOf(t, n);
|
|
82
88
|
return r !== -1 && r === n;
|
|
83
|
-
},
|
|
89
|
+
}, St = (e) => {
|
|
84
90
|
if (!e)
|
|
85
91
|
return null;
|
|
86
|
-
if (
|
|
92
|
+
if (P(e))
|
|
87
93
|
return e;
|
|
88
94
|
let t = e.length;
|
|
89
|
-
if (!
|
|
95
|
+
if (!xe(t))
|
|
90
96
|
return null;
|
|
91
97
|
const n = new Array(t);
|
|
92
98
|
for (; t-- > 0; )
|
|
93
99
|
n[t] = e[t];
|
|
94
100
|
return n;
|
|
95
|
-
},
|
|
101
|
+
}, bt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && re(Uint8Array)), gt = (e, t) => {
|
|
96
102
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
97
103
|
let s;
|
|
98
104
|
for (; (s = r.next()) && !s.done; ) {
|
|
99
105
|
const o = s.value;
|
|
100
106
|
t.call(e, o[0], o[1]);
|
|
101
107
|
}
|
|
102
|
-
},
|
|
108
|
+
}, Rt = (e, t) => {
|
|
103
109
|
let n;
|
|
104
110
|
const r = [];
|
|
105
111
|
for (; (n = e.exec(t)) !== null; )
|
|
106
112
|
r.push(n);
|
|
107
113
|
return r;
|
|
108
|
-
},
|
|
114
|
+
}, Tt = T("HTMLFormElement"), Ot = (e) => e.toLowerCase().replace(
|
|
109
115
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
110
116
|
function(n, r, s) {
|
|
111
117
|
return r.toUpperCase() + s;
|
|
112
118
|
}
|
|
113
|
-
),
|
|
119
|
+
), de = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), At = T("RegExp"), Ue = (e, t) => {
|
|
114
120
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
115
|
-
|
|
121
|
+
L(n, (s, o) => {
|
|
116
122
|
let i;
|
|
117
123
|
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
118
124
|
}), Object.defineProperties(e, r);
|
|
119
|
-
},
|
|
120
|
-
|
|
121
|
-
if (
|
|
125
|
+
}, kt = (e) => {
|
|
126
|
+
Ue(e, (t, n) => {
|
|
127
|
+
if (g(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
122
128
|
return !1;
|
|
123
129
|
const r = e[n];
|
|
124
|
-
if (
|
|
130
|
+
if (g(r)) {
|
|
125
131
|
if (t.enumerable = !1, "writable" in t) {
|
|
126
132
|
t.writable = !1;
|
|
127
133
|
return;
|
|
@@ -131,98 +137,98 @@ const yt = (e, t, n, { allOwnKeys: r } = {}) => (F(t, (s, o) => {
|
|
|
131
137
|
});
|
|
132
138
|
}
|
|
133
139
|
});
|
|
134
|
-
},
|
|
140
|
+
}, _t = (e, t) => {
|
|
135
141
|
const n = {}, r = (s) => {
|
|
136
142
|
s.forEach((o) => {
|
|
137
143
|
n[o] = !0;
|
|
138
144
|
});
|
|
139
145
|
};
|
|
140
|
-
return
|
|
141
|
-
},
|
|
142
|
-
},
|
|
143
|
-
DIGIT:
|
|
144
|
-
ALPHA:
|
|
145
|
-
ALPHA_DIGIT:
|
|
146
|
-
},
|
|
146
|
+
return P(e) ? r(e) : r(String(e).split(t)), n;
|
|
147
|
+
}, xt = () => {
|
|
148
|
+
}, Nt = (e, t) => (e = +e, Number.isFinite(e) ? e : t), V = "abcdefghijklmnopqrstuvwxyz", pe = "0123456789", Fe = {
|
|
149
|
+
DIGIT: pe,
|
|
150
|
+
ALPHA: V,
|
|
151
|
+
ALPHA_DIGIT: V + V.toUpperCase() + pe
|
|
152
|
+
}, Pt = (e = 16, t = Fe.ALPHA_DIGIT) => {
|
|
147
153
|
let n = "";
|
|
148
154
|
const { length: r } = t;
|
|
149
155
|
for (; e--; )
|
|
150
156
|
n += t[Math.random() * r | 0];
|
|
151
157
|
return n;
|
|
152
158
|
};
|
|
153
|
-
function
|
|
154
|
-
return !!(e &&
|
|
159
|
+
function Ct(e) {
|
|
160
|
+
return !!(e && g(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
155
161
|
}
|
|
156
|
-
const
|
|
162
|
+
const Ut = (e) => {
|
|
157
163
|
const t = new Array(10), n = (r, s) => {
|
|
158
|
-
if (
|
|
164
|
+
if (J(r)) {
|
|
159
165
|
if (t.indexOf(r) >= 0)
|
|
160
166
|
return;
|
|
161
167
|
if (!("toJSON" in r)) {
|
|
162
168
|
t[s] = r;
|
|
163
|
-
const o =
|
|
164
|
-
return
|
|
165
|
-
const
|
|
166
|
-
!
|
|
169
|
+
const o = P(r) ? [] : {};
|
|
170
|
+
return L(r, (i, c) => {
|
|
171
|
+
const f = n(i, s + 1);
|
|
172
|
+
!U(f) && (o[c] = f);
|
|
167
173
|
}), t[s] = void 0, o;
|
|
168
174
|
}
|
|
169
175
|
}
|
|
170
176
|
return r;
|
|
171
177
|
};
|
|
172
178
|
return n(e, 0);
|
|
173
|
-
},
|
|
174
|
-
isArray:
|
|
175
|
-
isArrayBuffer:
|
|
176
|
-
isBuffer:
|
|
177
|
-
isFormData:
|
|
178
|
-
isArrayBufferView:
|
|
179
|
-
isString:
|
|
180
|
-
isNumber:
|
|
181
|
-
isBoolean:
|
|
182
|
-
isObject:
|
|
183
|
-
isPlainObject:
|
|
184
|
-
isUndefined:
|
|
185
|
-
isDate:
|
|
186
|
-
isFile:
|
|
187
|
-
isBlob:
|
|
188
|
-
isRegExp:
|
|
189
|
-
isFunction:
|
|
190
|
-
isStream:
|
|
191
|
-
isURLSearchParams:
|
|
192
|
-
isTypedArray:
|
|
193
|
-
isFileList:
|
|
194
|
-
forEach:
|
|
195
|
-
merge:
|
|
196
|
-
extend:
|
|
197
|
-
trim:
|
|
198
|
-
stripBOM:
|
|
199
|
-
inherits:
|
|
200
|
-
toFlatObject:
|
|
201
|
-
kindOf:
|
|
202
|
-
kindOfTest:
|
|
179
|
+
}, Ft = T("AsyncFunction"), Lt = (e) => e && (J(e) || g(e)) && g(e.then) && g(e.catch), a = {
|
|
180
|
+
isArray: P,
|
|
181
|
+
isArrayBuffer: _e,
|
|
182
|
+
isBuffer: nt,
|
|
183
|
+
isFormData: ft,
|
|
184
|
+
isArrayBufferView: rt,
|
|
185
|
+
isString: st,
|
|
186
|
+
isNumber: xe,
|
|
187
|
+
isBoolean: ot,
|
|
188
|
+
isObject: J,
|
|
189
|
+
isPlainObject: B,
|
|
190
|
+
isUndefined: U,
|
|
191
|
+
isDate: it,
|
|
192
|
+
isFile: at,
|
|
193
|
+
isBlob: ct,
|
|
194
|
+
isRegExp: At,
|
|
195
|
+
isFunction: g,
|
|
196
|
+
isStream: lt,
|
|
197
|
+
isURLSearchParams: dt,
|
|
198
|
+
isTypedArray: bt,
|
|
199
|
+
isFileList: ut,
|
|
200
|
+
forEach: L,
|
|
201
|
+
merge: X,
|
|
202
|
+
extend: ht,
|
|
203
|
+
trim: pt,
|
|
204
|
+
stripBOM: mt,
|
|
205
|
+
inherits: yt,
|
|
206
|
+
toFlatObject: wt,
|
|
207
|
+
kindOf: M,
|
|
208
|
+
kindOfTest: T,
|
|
203
209
|
endsWith: Et,
|
|
204
|
-
toArray:
|
|
205
|
-
forEachEntry:
|
|
206
|
-
matchAll:
|
|
207
|
-
isHTMLForm:
|
|
208
|
-
hasOwnProperty:
|
|
209
|
-
hasOwnProp:
|
|
210
|
+
toArray: St,
|
|
211
|
+
forEachEntry: gt,
|
|
212
|
+
matchAll: Rt,
|
|
213
|
+
isHTMLForm: Tt,
|
|
214
|
+
hasOwnProperty: de,
|
|
215
|
+
hasOwnProp: de,
|
|
210
216
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
211
|
-
reduceDescriptors:
|
|
212
|
-
freezeMethods:
|
|
213
|
-
toObjectSet:
|
|
214
|
-
toCamelCase:
|
|
215
|
-
noop:
|
|
216
|
-
toFiniteNumber:
|
|
217
|
-
findKey:
|
|
218
|
-
global:
|
|
219
|
-
isContextDefined:
|
|
220
|
-
ALPHABET:
|
|
221
|
-
generateString:
|
|
222
|
-
isSpecCompliantForm:
|
|
223
|
-
toJSONObject:
|
|
224
|
-
isAsyncFn:
|
|
225
|
-
isThenable:
|
|
217
|
+
reduceDescriptors: Ue,
|
|
218
|
+
freezeMethods: kt,
|
|
219
|
+
toObjectSet: _t,
|
|
220
|
+
toCamelCase: Ot,
|
|
221
|
+
noop: xt,
|
|
222
|
+
toFiniteNumber: Nt,
|
|
223
|
+
findKey: Ne,
|
|
224
|
+
global: Pe,
|
|
225
|
+
isContextDefined: Ce,
|
|
226
|
+
ALPHABET: Fe,
|
|
227
|
+
generateString: Pt,
|
|
228
|
+
isSpecCompliantForm: Ct,
|
|
229
|
+
toJSONObject: Ut,
|
|
230
|
+
isAsyncFn: Ft,
|
|
231
|
+
isThenable: Lt
|
|
226
232
|
};
|
|
227
233
|
function m(e, t, n, r, s) {
|
|
228
234
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), s && (this.response = s);
|
|
@@ -248,7 +254,7 @@ a.inherits(m, Error, {
|
|
|
248
254
|
};
|
|
249
255
|
}
|
|
250
256
|
});
|
|
251
|
-
const
|
|
257
|
+
const Le = m.prototype, De = {};
|
|
252
258
|
[
|
|
253
259
|
"ERR_BAD_OPTION_VALUE",
|
|
254
260
|
"ERR_BAD_OPTION",
|
|
@@ -264,97 +270,97 @@ const je = m.prototype, ve = {};
|
|
|
264
270
|
"ERR_INVALID_URL"
|
|
265
271
|
// eslint-disable-next-line func-names
|
|
266
272
|
].forEach((e) => {
|
|
267
|
-
|
|
273
|
+
De[e] = { value: e };
|
|
268
274
|
});
|
|
269
|
-
Object.defineProperties(m,
|
|
270
|
-
Object.defineProperty(
|
|
275
|
+
Object.defineProperties(m, De);
|
|
276
|
+
Object.defineProperty(Le, "isAxiosError", { value: !0 });
|
|
271
277
|
m.from = (e, t, n, r, s, o) => {
|
|
272
|
-
const i = Object.create(
|
|
273
|
-
return a.toFlatObject(e, i, function(
|
|
274
|
-
return
|
|
278
|
+
const i = Object.create(Le);
|
|
279
|
+
return a.toFlatObject(e, i, function(f) {
|
|
280
|
+
return f !== Error.prototype;
|
|
275
281
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
276
282
|
};
|
|
277
|
-
const
|
|
278
|
-
function
|
|
283
|
+
const Dt = null;
|
|
284
|
+
function Q(e) {
|
|
279
285
|
return a.isPlainObject(e) || a.isArray(e);
|
|
280
286
|
}
|
|
281
|
-
function
|
|
287
|
+
function Be(e) {
|
|
282
288
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
283
289
|
}
|
|
284
|
-
function
|
|
290
|
+
function he(e, t, n) {
|
|
285
291
|
return e ? e.concat(t).map(function(s, o) {
|
|
286
|
-
return s =
|
|
292
|
+
return s = Be(s), !n && o ? "[" + s + "]" : s;
|
|
287
293
|
}).join(n ? "." : "") : t;
|
|
288
294
|
}
|
|
289
|
-
function
|
|
290
|
-
return a.isArray(e) && !e.some(
|
|
295
|
+
function Bt(e) {
|
|
296
|
+
return a.isArray(e) && !e.some(Q);
|
|
291
297
|
}
|
|
292
|
-
const
|
|
298
|
+
const jt = a.toFlatObject(a, {}, null, function(t) {
|
|
293
299
|
return /^is[A-Z]/.test(t);
|
|
294
300
|
});
|
|
295
|
-
function
|
|
301
|
+
function $(e, t, n) {
|
|
296
302
|
if (!a.isObject(e))
|
|
297
303
|
throw new TypeError("target must be an object");
|
|
298
304
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
299
305
|
metaTokens: !0,
|
|
300
306
|
dots: !1,
|
|
301
307
|
indexes: !1
|
|
302
|
-
}, !1, function(
|
|
303
|
-
return !a.isUndefined(
|
|
308
|
+
}, !1, function(p, E) {
|
|
309
|
+
return !a.isUndefined(E[p]);
|
|
304
310
|
});
|
|
305
|
-
const r = n.metaTokens, s = n.visitor ||
|
|
311
|
+
const r = n.metaTokens, s = n.visitor || l, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
306
312
|
if (!a.isFunction(s))
|
|
307
313
|
throw new TypeError("visitor must be a function");
|
|
308
|
-
function d
|
|
309
|
-
if (
|
|
314
|
+
function h(d) {
|
|
315
|
+
if (d === null)
|
|
310
316
|
return "";
|
|
311
|
-
if (a.isDate(
|
|
312
|
-
return
|
|
313
|
-
if (!
|
|
317
|
+
if (a.isDate(d))
|
|
318
|
+
return d.toISOString();
|
|
319
|
+
if (!f && a.isBlob(d))
|
|
314
320
|
throw new m("Blob is not supported. Use a Buffer instead.");
|
|
315
|
-
return a.isArrayBuffer(
|
|
316
|
-
}
|
|
317
|
-
function
|
|
318
|
-
let
|
|
319
|
-
if (
|
|
320
|
-
if (a.endsWith(
|
|
321
|
-
|
|
322
|
-
else if (a.isArray(
|
|
323
|
-
return
|
|
324
|
-
!(a.isUndefined(
|
|
321
|
+
return a.isArrayBuffer(d) || a.isTypedArray(d) ? f && typeof Blob == "function" ? new Blob([d]) : Buffer.from(d) : d;
|
|
322
|
+
}
|
|
323
|
+
function l(d, p, E) {
|
|
324
|
+
let S = d;
|
|
325
|
+
if (d && !E && typeof d == "object") {
|
|
326
|
+
if (a.endsWith(p, "{}"))
|
|
327
|
+
p = r ? p : p.slice(0, -2), d = JSON.stringify(d);
|
|
328
|
+
else if (a.isArray(d) && Bt(d) || (a.isFileList(d) || a.endsWith(p, "[]")) && (S = a.toArray(d)))
|
|
329
|
+
return p = Be(p), S.forEach(function(k, Ke) {
|
|
330
|
+
!(a.isUndefined(k) || k === null) && t.append(
|
|
325
331
|
// eslint-disable-next-line no-nested-ternary
|
|
326
|
-
i === !0 ?
|
|
327
|
-
|
|
332
|
+
i === !0 ? he([p], Ke, o) : i === null ? p : p + "[]",
|
|
333
|
+
h(k)
|
|
328
334
|
);
|
|
329
335
|
}), !1;
|
|
330
336
|
}
|
|
331
|
-
return
|
|
337
|
+
return Q(d) ? !0 : (t.append(he(E, p, o), h(d)), !1);
|
|
332
338
|
}
|
|
333
|
-
const u = [],
|
|
334
|
-
defaultVisitor:
|
|
335
|
-
convertValue:
|
|
336
|
-
isVisitable:
|
|
339
|
+
const u = [], w = Object.assign(jt, {
|
|
340
|
+
defaultVisitor: l,
|
|
341
|
+
convertValue: h,
|
|
342
|
+
isVisitable: Q
|
|
337
343
|
});
|
|
338
|
-
function
|
|
339
|
-
if (!a.isUndefined(
|
|
340
|
-
if (u.indexOf(
|
|
341
|
-
throw Error("Circular reference detected in " +
|
|
342
|
-
u.push(
|
|
343
|
-
(!(a.isUndefined(
|
|
344
|
+
function b(d, p) {
|
|
345
|
+
if (!a.isUndefined(d)) {
|
|
346
|
+
if (u.indexOf(d) !== -1)
|
|
347
|
+
throw Error("Circular reference detected in " + p.join("."));
|
|
348
|
+
u.push(d), a.forEach(d, function(S, A) {
|
|
349
|
+
(!(a.isUndefined(S) || S === null) && s.call(
|
|
344
350
|
t,
|
|
345
|
-
|
|
346
|
-
a.isString(
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
)) === !0 && S
|
|
351
|
+
S,
|
|
352
|
+
a.isString(A) ? A.trim() : A,
|
|
353
|
+
p,
|
|
354
|
+
w
|
|
355
|
+
)) === !0 && b(S, p ? p.concat(A) : [A]);
|
|
350
356
|
}), u.pop();
|
|
351
357
|
}
|
|
352
358
|
}
|
|
353
359
|
if (!a.isObject(e))
|
|
354
360
|
throw new TypeError("data must be an object");
|
|
355
|
-
return
|
|
361
|
+
return b(e), t;
|
|
356
362
|
}
|
|
357
|
-
function
|
|
363
|
+
function me(e) {
|
|
358
364
|
const t = {
|
|
359
365
|
"!": "%21",
|
|
360
366
|
"'": "%27",
|
|
@@ -368,36 +374,36 @@ function Ee(e) {
|
|
|
368
374
|
return t[r];
|
|
369
375
|
});
|
|
370
376
|
}
|
|
371
|
-
function
|
|
372
|
-
this._pairs = [], e &&
|
|
377
|
+
function se(e, t) {
|
|
378
|
+
this._pairs = [], e && $(e, this, t);
|
|
373
379
|
}
|
|
374
|
-
const
|
|
375
|
-
|
|
380
|
+
const je = se.prototype;
|
|
381
|
+
je.append = function(t, n) {
|
|
376
382
|
this._pairs.push([t, n]);
|
|
377
383
|
};
|
|
378
|
-
|
|
384
|
+
je.toString = function(t) {
|
|
379
385
|
const n = t ? function(r) {
|
|
380
|
-
return t.call(this, r,
|
|
381
|
-
} :
|
|
386
|
+
return t.call(this, r, me);
|
|
387
|
+
} : me;
|
|
382
388
|
return this._pairs.map(function(s) {
|
|
383
389
|
return n(s[0]) + "=" + n(s[1]);
|
|
384
390
|
}, "").join("&");
|
|
385
391
|
};
|
|
386
|
-
function
|
|
392
|
+
function It(e) {
|
|
387
393
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
388
394
|
}
|
|
389
|
-
function
|
|
395
|
+
function Ie(e, t, n) {
|
|
390
396
|
if (!t)
|
|
391
397
|
return e;
|
|
392
|
-
const r = n && n.encode ||
|
|
398
|
+
const r = n && n.encode || It, s = n && n.serialize;
|
|
393
399
|
let o;
|
|
394
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
400
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new se(t, n).toString(r), o) {
|
|
395
401
|
const i = e.indexOf("#");
|
|
396
402
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
397
403
|
}
|
|
398
404
|
return e;
|
|
399
405
|
}
|
|
400
|
-
class
|
|
406
|
+
class ye {
|
|
401
407
|
constructor() {
|
|
402
408
|
this.handlers = [];
|
|
403
409
|
}
|
|
@@ -451,39 +457,39 @@ class be {
|
|
|
451
457
|
});
|
|
452
458
|
}
|
|
453
459
|
}
|
|
454
|
-
const
|
|
460
|
+
const He = {
|
|
455
461
|
silentJSONParsing: !0,
|
|
456
462
|
forcedJSONParsing: !0,
|
|
457
463
|
clarifyTimeoutError: !1
|
|
458
|
-
},
|
|
464
|
+
}, Ht = typeof URLSearchParams < "u" ? URLSearchParams : se, qt = typeof FormData < "u" ? FormData : null, Mt = typeof Blob < "u" ? Blob : null, zt = {
|
|
459
465
|
isBrowser: !0,
|
|
460
466
|
classes: {
|
|
461
|
-
URLSearchParams:
|
|
467
|
+
URLSearchParams: Ht,
|
|
462
468
|
FormData: qt,
|
|
463
|
-
Blob:
|
|
469
|
+
Blob: Mt
|
|
464
470
|
},
|
|
465
471
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
466
|
-
},
|
|
467
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
472
|
+
}, qe = typeof window < "u" && typeof document < "u", Jt = ((e) => qe && ["ReactNative", "NativeScript", "NS"].indexOf(e) < 0)(typeof navigator < "u" && navigator.product), $t = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
473
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
468
474
|
__proto__: null,
|
|
469
|
-
hasBrowserEnv:
|
|
470
|
-
hasStandardBrowserEnv:
|
|
471
|
-
hasStandardBrowserWebWorkerEnv:
|
|
472
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
473
|
-
...
|
|
474
|
-
...
|
|
475
|
+
hasBrowserEnv: qe,
|
|
476
|
+
hasStandardBrowserEnv: Jt,
|
|
477
|
+
hasStandardBrowserWebWorkerEnv: $t
|
|
478
|
+
}, Symbol.toStringTag, { value: "Module" })), R = {
|
|
479
|
+
...vt,
|
|
480
|
+
...zt
|
|
475
481
|
};
|
|
476
|
-
function
|
|
477
|
-
return
|
|
482
|
+
function Vt(e, t) {
|
|
483
|
+
return $(e, new R.classes.URLSearchParams(), Object.assign({
|
|
478
484
|
visitor: function(n, r, s, o) {
|
|
479
|
-
return
|
|
485
|
+
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
480
486
|
}
|
|
481
487
|
}, t));
|
|
482
488
|
}
|
|
483
|
-
function
|
|
489
|
+
function Kt(e) {
|
|
484
490
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
485
491
|
}
|
|
486
|
-
function
|
|
492
|
+
function Wt(e) {
|
|
487
493
|
const t = {}, n = Object.keys(e);
|
|
488
494
|
let r;
|
|
489
495
|
const s = n.length;
|
|
@@ -492,23 +498,23 @@ function Xt(e) {
|
|
|
492
498
|
o = n[r], t[o] = e[o];
|
|
493
499
|
return t;
|
|
494
500
|
}
|
|
495
|
-
function
|
|
501
|
+
function Me(e) {
|
|
496
502
|
function t(n, r, s, o) {
|
|
497
503
|
let i = n[o++];
|
|
498
504
|
if (i === "__proto__")
|
|
499
505
|
return !0;
|
|
500
|
-
const c = Number.isFinite(+i),
|
|
501
|
-
return i = !i && a.isArray(s) ? s.length : i,
|
|
506
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
507
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = Wt(s[i])), !c);
|
|
502
508
|
}
|
|
503
509
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
510
|
const n = {};
|
|
505
511
|
return a.forEachEntry(e, (r, s) => {
|
|
506
|
-
t(
|
|
512
|
+
t(Kt(r), s, n, 0);
|
|
507
513
|
}), n;
|
|
508
514
|
}
|
|
509
515
|
return null;
|
|
510
516
|
}
|
|
511
|
-
function
|
|
517
|
+
function Gt(e, t, n) {
|
|
512
518
|
if (a.isString(e))
|
|
513
519
|
try {
|
|
514
520
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -518,13 +524,13 @@ function Qt(e, t, n) {
|
|
|
518
524
|
}
|
|
519
525
|
return (n || JSON.stringify)(e);
|
|
520
526
|
}
|
|
521
|
-
const
|
|
522
|
-
transitional:
|
|
527
|
+
const oe = {
|
|
528
|
+
transitional: He,
|
|
523
529
|
adapter: ["xhr", "http"],
|
|
524
530
|
transformRequest: [function(t, n) {
|
|
525
531
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
526
532
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
527
|
-
return s ? JSON.stringify(
|
|
533
|
+
return s ? JSON.stringify(Me(t)) : t;
|
|
528
534
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
529
535
|
return t;
|
|
530
536
|
if (a.isArrayBufferView(t))
|
|
@@ -534,20 +540,20 @@ const le = {
|
|
|
534
540
|
let c;
|
|
535
541
|
if (o) {
|
|
536
542
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
-
return
|
|
543
|
+
return Vt(t, this.formSerializer).toString();
|
|
538
544
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
|
-
const
|
|
540
|
-
return
|
|
545
|
+
const f = this.env && this.env.FormData;
|
|
546
|
+
return $(
|
|
541
547
|
c ? { "files[]": t } : t,
|
|
542
|
-
|
|
548
|
+
f && new f(),
|
|
543
549
|
this.formSerializer
|
|
544
550
|
);
|
|
545
551
|
}
|
|
546
552
|
}
|
|
547
|
-
return o || s ? (n.setContentType("application/json", !1),
|
|
553
|
+
return o || s ? (n.setContentType("application/json", !1), Gt(t)) : t;
|
|
548
554
|
}],
|
|
549
555
|
transformResponse: [function(t) {
|
|
550
|
-
const n = this.transitional ||
|
|
556
|
+
const n = this.transitional || oe.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
551
557
|
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
552
558
|
const i = !(n && n.silentJSONParsing) && s;
|
|
553
559
|
try {
|
|
@@ -569,8 +575,8 @@ const le = {
|
|
|
569
575
|
maxContentLength: -1,
|
|
570
576
|
maxBodyLength: -1,
|
|
571
577
|
env: {
|
|
572
|
-
FormData:
|
|
573
|
-
Blob:
|
|
578
|
+
FormData: R.classes.FormData,
|
|
579
|
+
Blob: R.classes.Blob
|
|
574
580
|
},
|
|
575
581
|
validateStatus: function(t) {
|
|
576
582
|
return t >= 200 && t < 300;
|
|
@@ -583,9 +589,9 @@ const le = {
|
|
|
583
589
|
}
|
|
584
590
|
};
|
|
585
591
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
|
-
|
|
592
|
+
oe.headers[e] = {};
|
|
587
593
|
});
|
|
588
|
-
const
|
|
594
|
+
const ie = oe, Xt = a.toObjectSet([
|
|
589
595
|
"age",
|
|
590
596
|
"authorization",
|
|
591
597
|
"content-length",
|
|
@@ -603,29 +609,29 @@ const fe = le, Yt = a.toObjectSet([
|
|
|
603
609
|
"referer",
|
|
604
610
|
"retry-after",
|
|
605
611
|
"user-agent"
|
|
606
|
-
]),
|
|
612
|
+
]), Qt = (e) => {
|
|
607
613
|
const t = {};
|
|
608
614
|
let n, r, s;
|
|
609
615
|
return e && e.split(`
|
|
610
616
|
`).forEach(function(i) {
|
|
611
|
-
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] &&
|
|
617
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Xt[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
618
|
}), t;
|
|
613
|
-
},
|
|
614
|
-
function
|
|
619
|
+
}, we = Symbol("internals");
|
|
620
|
+
function C(e) {
|
|
615
621
|
return e && String(e).trim().toLowerCase();
|
|
616
622
|
}
|
|
617
|
-
function
|
|
618
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
623
|
+
function j(e) {
|
|
624
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(j) : String(e);
|
|
619
625
|
}
|
|
620
|
-
function
|
|
626
|
+
function Zt(e) {
|
|
621
627
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
628
|
let r;
|
|
623
629
|
for (; r = n.exec(e); )
|
|
624
630
|
t[r[1]] = r[2];
|
|
625
631
|
return t;
|
|
626
632
|
}
|
|
627
|
-
const
|
|
628
|
-
function
|
|
633
|
+
const Yt = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
634
|
+
function K(e, t, n, r, s) {
|
|
629
635
|
if (a.isFunction(r))
|
|
630
636
|
return r.call(this, t, n);
|
|
631
637
|
if (s && (t = n), !!a.isString(t)) {
|
|
@@ -635,10 +641,10 @@ function Y(e, t, n, r, s) {
|
|
|
635
641
|
return r.test(t);
|
|
636
642
|
}
|
|
637
643
|
}
|
|
638
|
-
function
|
|
644
|
+
function en(e) {
|
|
639
645
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
646
|
}
|
|
641
|
-
function
|
|
647
|
+
function tn(e, t) {
|
|
642
648
|
const n = a.toCamelCase(" " + t);
|
|
643
649
|
["get", "set", "has"].forEach((r) => {
|
|
644
650
|
Object.defineProperty(e, r + n, {
|
|
@@ -649,31 +655,31 @@ function rn(e, t) {
|
|
|
649
655
|
});
|
|
650
656
|
});
|
|
651
657
|
}
|
|
652
|
-
class
|
|
658
|
+
class v {
|
|
653
659
|
constructor(t) {
|
|
654
660
|
t && this.set(t);
|
|
655
661
|
}
|
|
656
662
|
set(t, n, r) {
|
|
657
663
|
const s = this;
|
|
658
|
-
function o(c,
|
|
659
|
-
const
|
|
660
|
-
if (!
|
|
664
|
+
function o(c, f, h) {
|
|
665
|
+
const l = C(f);
|
|
666
|
+
if (!l)
|
|
661
667
|
throw new Error("header name must be a non-empty string");
|
|
662
|
-
const u = a.findKey(s,
|
|
663
|
-
(!u || s[u] === void 0 ||
|
|
668
|
+
const u = a.findKey(s, l);
|
|
669
|
+
(!u || s[u] === void 0 || h === !0 || h === void 0 && s[u] !== !1) && (s[u || f] = j(c));
|
|
664
670
|
}
|
|
665
|
-
const i = (c,
|
|
666
|
-
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !
|
|
671
|
+
const i = (c, f) => a.forEach(c, (h, l) => o(h, l, f));
|
|
672
|
+
return a.isPlainObject(t) || t instanceof this.constructor ? i(t, n) : a.isString(t) && (t = t.trim()) && !Yt(t) ? i(Qt(t), n) : t != null && o(n, t, r), this;
|
|
667
673
|
}
|
|
668
674
|
get(t, n) {
|
|
669
|
-
if (t =
|
|
675
|
+
if (t = C(t), t) {
|
|
670
676
|
const r = a.findKey(this, t);
|
|
671
677
|
if (r) {
|
|
672
678
|
const s = this[r];
|
|
673
679
|
if (!n)
|
|
674
680
|
return s;
|
|
675
681
|
if (n === !0)
|
|
676
|
-
return
|
|
682
|
+
return Zt(s);
|
|
677
683
|
if (a.isFunction(n))
|
|
678
684
|
return n.call(this, s, r);
|
|
679
685
|
if (a.isRegExp(n))
|
|
@@ -683,9 +689,9 @@ class X {
|
|
|
683
689
|
}
|
|
684
690
|
}
|
|
685
691
|
has(t, n) {
|
|
686
|
-
if (t =
|
|
692
|
+
if (t = C(t), t) {
|
|
687
693
|
const r = a.findKey(this, t);
|
|
688
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
694
|
+
return !!(r && this[r] !== void 0 && (!n || K(this, this[r], r, n)));
|
|
689
695
|
}
|
|
690
696
|
return !1;
|
|
691
697
|
}
|
|
@@ -693,9 +699,9 @@ class X {
|
|
|
693
699
|
const r = this;
|
|
694
700
|
let s = !1;
|
|
695
701
|
function o(i) {
|
|
696
|
-
if (i =
|
|
702
|
+
if (i = C(i), i) {
|
|
697
703
|
const c = a.findKey(r, i);
|
|
698
|
-
c && (!n ||
|
|
704
|
+
c && (!n || K(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
705
|
}
|
|
700
706
|
}
|
|
701
707
|
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
@@ -705,7 +711,7 @@ class X {
|
|
|
705
711
|
let r = n.length, s = !1;
|
|
706
712
|
for (; r--; ) {
|
|
707
713
|
const o = n[r];
|
|
708
|
-
(!t ||
|
|
714
|
+
(!t || K(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
709
715
|
}
|
|
710
716
|
return s;
|
|
711
717
|
}
|
|
@@ -714,11 +720,11 @@ class X {
|
|
|
714
720
|
return a.forEach(this, (s, o) => {
|
|
715
721
|
const i = a.findKey(r, o);
|
|
716
722
|
if (i) {
|
|
717
|
-
n[i] =
|
|
723
|
+
n[i] = j(s), delete n[o];
|
|
718
724
|
return;
|
|
719
725
|
}
|
|
720
|
-
const c = t ?
|
|
721
|
-
c !== o && delete n[o], n[c] =
|
|
726
|
+
const c = t ? en(o) : String(o).trim();
|
|
727
|
+
c !== o && delete n[o], n[c] = j(s), r[c] = !0;
|
|
722
728
|
}), this;
|
|
723
729
|
}
|
|
724
730
|
concat(...t) {
|
|
@@ -748,18 +754,18 @@ class X {
|
|
|
748
754
|
return n.forEach((s) => r.set(s)), r;
|
|
749
755
|
}
|
|
750
756
|
static accessor(t) {
|
|
751
|
-
const r = (this[
|
|
757
|
+
const r = (this[we] = this[we] = {
|
|
752
758
|
accessors: {}
|
|
753
759
|
}).accessors, s = this.prototype;
|
|
754
760
|
function o(i) {
|
|
755
|
-
const c =
|
|
756
|
-
r[c] || (
|
|
761
|
+
const c = C(i);
|
|
762
|
+
r[c] || (tn(s, i), r[c] = !0);
|
|
757
763
|
}
|
|
758
764
|
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
759
765
|
}
|
|
760
766
|
}
|
|
761
|
-
|
|
762
|
-
a.reduceDescriptors(
|
|
767
|
+
v.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
768
|
+
a.reduceDescriptors(v.prototype, ({ value: e }, t) => {
|
|
763
769
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
770
|
return {
|
|
765
771
|
get: () => e,
|
|
@@ -768,25 +774,25 @@ a.reduceDescriptors(X.prototype, ({ value: e }, t) => {
|
|
|
768
774
|
}
|
|
769
775
|
};
|
|
770
776
|
});
|
|
771
|
-
a.freezeMethods(
|
|
772
|
-
const
|
|
773
|
-
function
|
|
774
|
-
const n = this ||
|
|
777
|
+
a.freezeMethods(v);
|
|
778
|
+
const O = v;
|
|
779
|
+
function W(e, t) {
|
|
780
|
+
const n = this || ie, r = t || n, s = O.from(r.headers);
|
|
775
781
|
let o = r.data;
|
|
776
782
|
return a.forEach(e, function(c) {
|
|
777
783
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
778
784
|
}), s.normalize(), o;
|
|
779
785
|
}
|
|
780
|
-
function
|
|
786
|
+
function ze(e) {
|
|
781
787
|
return !!(e && e.__CANCEL__);
|
|
782
788
|
}
|
|
783
|
-
function
|
|
789
|
+
function D(e, t, n) {
|
|
784
790
|
m.call(this, e ?? "canceled", m.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
785
791
|
}
|
|
786
|
-
a.inherits(
|
|
792
|
+
a.inherits(D, m, {
|
|
787
793
|
__CANCEL__: !0
|
|
788
794
|
});
|
|
789
|
-
function
|
|
795
|
+
function nn(e, t, n) {
|
|
790
796
|
const r = n.config.validateStatus;
|
|
791
797
|
!n.status || !r || r(n.status) ? e(n) : t(new m(
|
|
792
798
|
"Request failed with status code " + n.status,
|
|
@@ -796,7 +802,7 @@ function sn(e, t, n) {
|
|
|
796
802
|
n
|
|
797
803
|
));
|
|
798
804
|
}
|
|
799
|
-
const
|
|
805
|
+
const rn = R.hasStandardBrowserEnv ? (
|
|
800
806
|
// Standard browser envs support document.cookie
|
|
801
807
|
{
|
|
802
808
|
write(e, t, n, r, s, o) {
|
|
@@ -823,16 +829,16 @@ const on = k.hasStandardBrowserEnv ? (
|
|
|
823
829
|
}
|
|
824
830
|
}
|
|
825
831
|
);
|
|
826
|
-
function
|
|
832
|
+
function sn(e) {
|
|
827
833
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
828
834
|
}
|
|
829
|
-
function
|
|
835
|
+
function on(e, t) {
|
|
830
836
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
831
837
|
}
|
|
832
|
-
function
|
|
833
|
-
return e && !
|
|
838
|
+
function Je(e, t) {
|
|
839
|
+
return e && !sn(t) ? on(e, t) : t;
|
|
834
840
|
}
|
|
835
|
-
const
|
|
841
|
+
const an = R.hasStandardBrowserEnv ? (
|
|
836
842
|
// Standard browser envs have full support of the APIs needed to test
|
|
837
843
|
// whether the request URL is of the same origin as current location.
|
|
838
844
|
function() {
|
|
@@ -864,123 +870,123 @@ const un = k.hasStandardBrowserEnv ? (
|
|
|
864
870
|
};
|
|
865
871
|
}()
|
|
866
872
|
);
|
|
867
|
-
function
|
|
873
|
+
function cn(e) {
|
|
868
874
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
869
875
|
return t && t[1] || "";
|
|
870
876
|
}
|
|
871
|
-
function
|
|
877
|
+
function un(e, t) {
|
|
872
878
|
e = e || 10;
|
|
873
879
|
const n = new Array(e), r = new Array(e);
|
|
874
880
|
let s = 0, o = 0, i;
|
|
875
|
-
return t = t !== void 0 ? t : 1e3, function(
|
|
876
|
-
const
|
|
877
|
-
i || (i =
|
|
878
|
-
let u = o,
|
|
881
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
882
|
+
const h = Date.now(), l = r[o];
|
|
883
|
+
i || (i = h), n[s] = f, r[s] = h;
|
|
884
|
+
let u = o, w = 0;
|
|
879
885
|
for (; u !== s; )
|
|
880
|
-
|
|
881
|
-
if (s = (s + 1) % e, s === o && (o = (o + 1) % e),
|
|
886
|
+
w += n[u++], u = u % e;
|
|
887
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), h - i < t)
|
|
882
888
|
return;
|
|
883
|
-
const
|
|
884
|
-
return
|
|
889
|
+
const b = l && h - l;
|
|
890
|
+
return b ? Math.round(w * 1e3 / b) : void 0;
|
|
885
891
|
};
|
|
886
892
|
}
|
|
887
|
-
function
|
|
893
|
+
function Ee(e, t) {
|
|
888
894
|
let n = 0;
|
|
889
|
-
const r =
|
|
895
|
+
const r = un(50, 250);
|
|
890
896
|
return (s) => {
|
|
891
|
-
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n,
|
|
897
|
+
const o = s.loaded, i = s.lengthComputable ? s.total : void 0, c = o - n, f = r(c), h = o <= i;
|
|
892
898
|
n = o;
|
|
893
|
-
const
|
|
899
|
+
const l = {
|
|
894
900
|
loaded: o,
|
|
895
901
|
total: i,
|
|
896
902
|
progress: i ? o / i : void 0,
|
|
897
903
|
bytes: c,
|
|
898
|
-
rate:
|
|
899
|
-
estimated:
|
|
904
|
+
rate: f || void 0,
|
|
905
|
+
estimated: f && i && h ? (i - o) / f : void 0,
|
|
900
906
|
event: s
|
|
901
907
|
};
|
|
902
|
-
|
|
908
|
+
l[t ? "download" : "upload"] = !0, e(l);
|
|
903
909
|
};
|
|
904
910
|
}
|
|
905
|
-
const
|
|
911
|
+
const ln = typeof XMLHttpRequest < "u", fn = ln && function(e) {
|
|
906
912
|
return new Promise(function(n, r) {
|
|
907
913
|
let s = e.data;
|
|
908
|
-
const o =
|
|
909
|
-
let { responseType: i, withXSRFToken: c } = e,
|
|
910
|
-
function
|
|
911
|
-
e.cancelToken && e.cancelToken.unsubscribe(
|
|
914
|
+
const o = O.from(e.headers).normalize();
|
|
915
|
+
let { responseType: i, withXSRFToken: c } = e, f;
|
|
916
|
+
function h() {
|
|
917
|
+
e.cancelToken && e.cancelToken.unsubscribe(f), e.signal && e.signal.removeEventListener("abort", f);
|
|
912
918
|
}
|
|
913
|
-
let
|
|
919
|
+
let l;
|
|
914
920
|
if (a.isFormData(s)) {
|
|
915
|
-
if (
|
|
921
|
+
if (R.hasStandardBrowserEnv || R.hasStandardBrowserWebWorkerEnv)
|
|
916
922
|
o.setContentType(!1);
|
|
917
|
-
else if ((
|
|
918
|
-
const [
|
|
919
|
-
o.setContentType([
|
|
923
|
+
else if ((l = o.getContentType()) !== !1) {
|
|
924
|
+
const [p, ...E] = l ? l.split(";").map((S) => S.trim()).filter(Boolean) : [];
|
|
925
|
+
o.setContentType([p || "multipart/form-data", ...E].join("; "));
|
|
920
926
|
}
|
|
921
927
|
}
|
|
922
928
|
let u = new XMLHttpRequest();
|
|
923
929
|
if (e.auth) {
|
|
924
|
-
const
|
|
925
|
-
o.set("Authorization", "Basic " + btoa(
|
|
930
|
+
const p = e.auth.username || "", E = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
931
|
+
o.set("Authorization", "Basic " + btoa(p + ":" + E));
|
|
926
932
|
}
|
|
927
|
-
const
|
|
928
|
-
u.open(e.method.toUpperCase(),
|
|
929
|
-
function
|
|
933
|
+
const w = Je(e.baseURL, e.url);
|
|
934
|
+
u.open(e.method.toUpperCase(), Ie(w, e.params, e.paramsSerializer), !0), u.timeout = e.timeout;
|
|
935
|
+
function b() {
|
|
930
936
|
if (!u)
|
|
931
937
|
return;
|
|
932
|
-
const
|
|
938
|
+
const p = O.from(
|
|
933
939
|
"getAllResponseHeaders" in u && u.getAllResponseHeaders()
|
|
934
|
-
),
|
|
940
|
+
), S = {
|
|
935
941
|
data: !i || i === "text" || i === "json" ? u.responseText : u.response,
|
|
936
942
|
status: u.status,
|
|
937
943
|
statusText: u.statusText,
|
|
938
|
-
headers:
|
|
944
|
+
headers: p,
|
|
939
945
|
config: e,
|
|
940
946
|
request: u
|
|
941
947
|
};
|
|
942
|
-
|
|
943
|
-
n(
|
|
944
|
-
}, function(
|
|
945
|
-
r(
|
|
946
|
-
},
|
|
948
|
+
nn(function(k) {
|
|
949
|
+
n(k), h();
|
|
950
|
+
}, function(k) {
|
|
951
|
+
r(k), h();
|
|
952
|
+
}, S), u = null;
|
|
947
953
|
}
|
|
948
|
-
if ("onloadend" in u ? u.onloadend =
|
|
949
|
-
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
954
|
+
if ("onloadend" in u ? u.onloadend = b : u.onreadystatechange = function() {
|
|
955
|
+
!u || u.readyState !== 4 || u.status === 0 && !(u.responseURL && u.responseURL.indexOf("file:") === 0) || setTimeout(b);
|
|
950
956
|
}, u.onabort = function() {
|
|
951
957
|
u && (r(new m("Request aborted", m.ECONNABORTED, e, u)), u = null);
|
|
952
958
|
}, u.onerror = function() {
|
|
953
959
|
r(new m("Network Error", m.ERR_NETWORK, e, u)), u = null;
|
|
954
960
|
}, u.ontimeout = function() {
|
|
955
|
-
let
|
|
956
|
-
const
|
|
957
|
-
e.timeoutErrorMessage && (
|
|
958
|
-
|
|
959
|
-
|
|
961
|
+
let E = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
962
|
+
const S = e.transitional || He;
|
|
963
|
+
e.timeoutErrorMessage && (E = e.timeoutErrorMessage), r(new m(
|
|
964
|
+
E,
|
|
965
|
+
S.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
960
966
|
e,
|
|
961
967
|
u
|
|
962
968
|
)), u = null;
|
|
963
|
-
},
|
|
964
|
-
const
|
|
965
|
-
|
|
969
|
+
}, R.hasStandardBrowserEnv && (c && a.isFunction(c) && (c = c(e)), c || c !== !1 && an(w))) {
|
|
970
|
+
const p = e.xsrfHeaderName && e.xsrfCookieName && rn.read(e.xsrfCookieName);
|
|
971
|
+
p && o.set(e.xsrfHeaderName, p);
|
|
966
972
|
}
|
|
967
|
-
s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(
|
|
968
|
-
u.setRequestHeader(
|
|
969
|
-
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress",
|
|
970
|
-
u && (r(!
|
|
971
|
-
}, e.cancelToken && e.cancelToken.subscribe(
|
|
972
|
-
const
|
|
973
|
-
if (
|
|
974
|
-
r(new m("Unsupported protocol " +
|
|
973
|
+
s === void 0 && o.setContentType(null), "setRequestHeader" in u && a.forEach(o.toJSON(), function(E, S) {
|
|
974
|
+
u.setRequestHeader(S, E);
|
|
975
|
+
}), a.isUndefined(e.withCredentials) || (u.withCredentials = !!e.withCredentials), i && i !== "json" && (u.responseType = e.responseType), typeof e.onDownloadProgress == "function" && u.addEventListener("progress", Ee(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && u.upload && u.upload.addEventListener("progress", Ee(e.onUploadProgress)), (e.cancelToken || e.signal) && (f = (p) => {
|
|
976
|
+
u && (r(!p || p.type ? new D(null, e, u) : p), u.abort(), u = null);
|
|
977
|
+
}, e.cancelToken && e.cancelToken.subscribe(f), e.signal && (e.signal.aborted ? f() : e.signal.addEventListener("abort", f)));
|
|
978
|
+
const d = cn(w);
|
|
979
|
+
if (d && R.protocols.indexOf(d) === -1) {
|
|
980
|
+
r(new m("Unsupported protocol " + d + ":", m.ERR_BAD_REQUEST, e));
|
|
975
981
|
return;
|
|
976
982
|
}
|
|
977
983
|
u.send(s || null);
|
|
978
984
|
});
|
|
979
|
-
},
|
|
980
|
-
http:
|
|
981
|
-
xhr:
|
|
985
|
+
}, Z = {
|
|
986
|
+
http: Dt,
|
|
987
|
+
xhr: fn
|
|
982
988
|
};
|
|
983
|
-
a.forEach(
|
|
989
|
+
a.forEach(Z, (e, t) => {
|
|
984
990
|
if (e) {
|
|
985
991
|
try {
|
|
986
992
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -989,7 +995,7 @@ a.forEach(re, (e, t) => {
|
|
|
989
995
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
990
996
|
}
|
|
991
997
|
});
|
|
992
|
-
const
|
|
998
|
+
const Se = (e) => `- ${e}`, dn = (e) => a.isFunction(e) || e === null || e === !1, $e = {
|
|
993
999
|
getAdapter: (e) => {
|
|
994
1000
|
e = a.isArray(e) ? e : [e];
|
|
995
1001
|
const { length: t } = e;
|
|
@@ -998,7 +1004,7 @@ const ke = (e) => `- ${e}`, hn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
998
1004
|
for (let o = 0; o < t; o++) {
|
|
999
1005
|
n = e[o];
|
|
1000
1006
|
let i;
|
|
1001
|
-
if (r = n, !
|
|
1007
|
+
if (r = n, !dn(n) && (r = Z[(i = String(n)).toLowerCase()], r === void 0))
|
|
1002
1008
|
throw new m(`Unknown adapter '${i}'`);
|
|
1003
1009
|
if (r)
|
|
1004
1010
|
break;
|
|
@@ -1006,11 +1012,11 @@ const ke = (e) => `- ${e}`, hn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1006
1012
|
}
|
|
1007
1013
|
if (!r) {
|
|
1008
1014
|
const o = Object.entries(s).map(
|
|
1009
|
-
([c,
|
|
1015
|
+
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1010
1016
|
);
|
|
1011
1017
|
let i = t ? o.length > 1 ? `since :
|
|
1012
|
-
` + o.map(
|
|
1013
|
-
`) : " " +
|
|
1018
|
+
` + o.map(Se).join(`
|
|
1019
|
+
`) : " " + Se(o[0]) : "as no adapter specified";
|
|
1014
1020
|
throw new m(
|
|
1015
1021
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1016
1022
|
"ERR_NOT_SUPPORT"
|
|
@@ -1018,62 +1024,62 @@ const ke = (e) => `- ${e}`, hn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1018
1024
|
}
|
|
1019
1025
|
return r;
|
|
1020
1026
|
},
|
|
1021
|
-
adapters:
|
|
1027
|
+
adapters: Z
|
|
1022
1028
|
};
|
|
1023
|
-
function
|
|
1029
|
+
function G(e) {
|
|
1024
1030
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1025
|
-
throw new
|
|
1031
|
+
throw new D(null, e);
|
|
1026
1032
|
}
|
|
1027
|
-
function
|
|
1028
|
-
return
|
|
1033
|
+
function be(e) {
|
|
1034
|
+
return G(e), e.headers = O.from(e.headers), e.data = W.call(
|
|
1029
1035
|
e,
|
|
1030
1036
|
e.transformRequest
|
|
1031
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1032
|
-
return
|
|
1037
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), $e.getAdapter(e.adapter || ie.adapter)(e).then(function(r) {
|
|
1038
|
+
return G(e), r.data = W.call(
|
|
1033
1039
|
e,
|
|
1034
1040
|
e.transformResponse,
|
|
1035
1041
|
r
|
|
1036
|
-
), r.headers =
|
|
1042
|
+
), r.headers = O.from(r.headers), r;
|
|
1037
1043
|
}, function(r) {
|
|
1038
|
-
return
|
|
1044
|
+
return ze(r) || (G(e), r && r.response && (r.response.data = W.call(
|
|
1039
1045
|
e,
|
|
1040
1046
|
e.transformResponse,
|
|
1041
1047
|
r.response
|
|
1042
|
-
), r.response.headers =
|
|
1048
|
+
), r.response.headers = O.from(r.response.headers))), Promise.reject(r);
|
|
1043
1049
|
});
|
|
1044
1050
|
}
|
|
1045
|
-
const
|
|
1046
|
-
function
|
|
1051
|
+
const ge = (e) => e instanceof O ? e.toJSON() : e;
|
|
1052
|
+
function N(e, t) {
|
|
1047
1053
|
t = t || {};
|
|
1048
1054
|
const n = {};
|
|
1049
|
-
function r(
|
|
1050
|
-
return a.isPlainObject(
|
|
1055
|
+
function r(h, l, u) {
|
|
1056
|
+
return a.isPlainObject(h) && a.isPlainObject(l) ? a.merge.call({ caseless: u }, h, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1051
1057
|
}
|
|
1052
|
-
function s(
|
|
1053
|
-
if (a.isUndefined(
|
|
1054
|
-
if (!a.isUndefined(
|
|
1055
|
-
return r(void 0,
|
|
1058
|
+
function s(h, l, u) {
|
|
1059
|
+
if (a.isUndefined(l)) {
|
|
1060
|
+
if (!a.isUndefined(h))
|
|
1061
|
+
return r(void 0, h, u);
|
|
1056
1062
|
} else
|
|
1057
|
-
return r(
|
|
1063
|
+
return r(h, l, u);
|
|
1058
1064
|
}
|
|
1059
|
-
function o(
|
|
1060
|
-
if (!a.isUndefined(
|
|
1061
|
-
return r(void 0,
|
|
1065
|
+
function o(h, l) {
|
|
1066
|
+
if (!a.isUndefined(l))
|
|
1067
|
+
return r(void 0, l);
|
|
1062
1068
|
}
|
|
1063
|
-
function i(
|
|
1064
|
-
if (a.isUndefined(
|
|
1065
|
-
if (!a.isUndefined(
|
|
1066
|
-
return r(void 0,
|
|
1069
|
+
function i(h, l) {
|
|
1070
|
+
if (a.isUndefined(l)) {
|
|
1071
|
+
if (!a.isUndefined(h))
|
|
1072
|
+
return r(void 0, h);
|
|
1067
1073
|
} else
|
|
1068
|
-
return r(void 0,
|
|
1074
|
+
return r(void 0, l);
|
|
1069
1075
|
}
|
|
1070
|
-
function c(
|
|
1076
|
+
function c(h, l, u) {
|
|
1071
1077
|
if (u in t)
|
|
1072
|
-
return r(
|
|
1078
|
+
return r(h, l);
|
|
1073
1079
|
if (u in e)
|
|
1074
|
-
return r(void 0,
|
|
1080
|
+
return r(void 0, h);
|
|
1075
1081
|
}
|
|
1076
|
-
const
|
|
1082
|
+
const f = {
|
|
1077
1083
|
url: o,
|
|
1078
1084
|
method: o,
|
|
1079
1085
|
data: o,
|
|
@@ -1102,23 +1108,23 @@ function C(e, t) {
|
|
|
1102
1108
|
socketPath: i,
|
|
1103
1109
|
responseEncoding: i,
|
|
1104
1110
|
validateStatus: c,
|
|
1105
|
-
headers: (
|
|
1111
|
+
headers: (h, l) => s(ge(h), ge(l), !0)
|
|
1106
1112
|
};
|
|
1107
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(
|
|
1108
|
-
const u = l
|
|
1109
|
-
a.isUndefined(
|
|
1113
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1114
|
+
const u = f[l] || s, w = u(e[l], t[l], l);
|
|
1115
|
+
a.isUndefined(w) && u !== c || (n[l] = w);
|
|
1110
1116
|
}), n;
|
|
1111
1117
|
}
|
|
1112
|
-
const
|
|
1118
|
+
const ve = "1.6.7", ae = {};
|
|
1113
1119
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1114
|
-
|
|
1120
|
+
ae[e] = function(r) {
|
|
1115
1121
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1116
1122
|
};
|
|
1117
1123
|
});
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1124
|
+
const Re = {};
|
|
1125
|
+
ae.transitional = function(t, n, r) {
|
|
1120
1126
|
function s(o, i) {
|
|
1121
|
-
return "[Axios v" +
|
|
1127
|
+
return "[Axios v" + ve + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1122
1128
|
}
|
|
1123
1129
|
return (o, i, c) => {
|
|
1124
1130
|
if (t === !1)
|
|
@@ -1126,7 +1132,7 @@ de.transitional = function(t, n, r) {
|
|
|
1126
1132
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1127
1133
|
m.ERR_DEPRECATED
|
|
1128
1134
|
);
|
|
1129
|
-
return n && !
|
|
1135
|
+
return n && !Re[i] && (Re[i] = !0, console.warn(
|
|
1130
1136
|
s(
|
|
1131
1137
|
i,
|
|
1132
1138
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -1134,7 +1140,7 @@ de.transitional = function(t, n, r) {
|
|
|
1134
1140
|
)), t ? t(o, i, c) : !0;
|
|
1135
1141
|
};
|
|
1136
1142
|
};
|
|
1137
|
-
function
|
|
1143
|
+
function pn(e, t, n) {
|
|
1138
1144
|
if (typeof e != "object")
|
|
1139
1145
|
throw new m("options must be an object", m.ERR_BAD_OPTION_VALUE);
|
|
1140
1146
|
const r = Object.keys(e);
|
|
@@ -1142,24 +1148,24 @@ function mn(e, t, n) {
|
|
|
1142
1148
|
for (; s-- > 0; ) {
|
|
1143
1149
|
const o = r[s], i = t[o];
|
|
1144
1150
|
if (i) {
|
|
1145
|
-
const c = e[o],
|
|
1146
|
-
if (
|
|
1147
|
-
throw new m("option " + o + " must be " +
|
|
1151
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1152
|
+
if (f !== !0)
|
|
1153
|
+
throw new m("option " + o + " must be " + f, m.ERR_BAD_OPTION_VALUE);
|
|
1148
1154
|
continue;
|
|
1149
1155
|
}
|
|
1150
1156
|
if (n !== !0)
|
|
1151
1157
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1152
1158
|
}
|
|
1153
1159
|
}
|
|
1154
|
-
const
|
|
1155
|
-
assertOptions:
|
|
1156
|
-
validators:
|
|
1157
|
-
},
|
|
1158
|
-
class
|
|
1160
|
+
const Y = {
|
|
1161
|
+
assertOptions: pn,
|
|
1162
|
+
validators: ae
|
|
1163
|
+
}, _ = Y.validators;
|
|
1164
|
+
class q {
|
|
1159
1165
|
constructor(t) {
|
|
1160
1166
|
this.defaults = t, this.interceptors = {
|
|
1161
|
-
request: new
|
|
1162
|
-
response: new
|
|
1167
|
+
request: new ye(),
|
|
1168
|
+
response: new ye()
|
|
1163
1169
|
};
|
|
1164
1170
|
}
|
|
1165
1171
|
/**
|
|
@@ -1185,17 +1191,17 @@ class M {
|
|
|
1185
1191
|
}
|
|
1186
1192
|
}
|
|
1187
1193
|
_request(t, n) {
|
|
1188
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1194
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = N(this.defaults, n);
|
|
1189
1195
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1190
|
-
r !== void 0 &&
|
|
1191
|
-
silentJSONParsing:
|
|
1192
|
-
forcedJSONParsing:
|
|
1193
|
-
clarifyTimeoutError:
|
|
1196
|
+
r !== void 0 && Y.assertOptions(r, {
|
|
1197
|
+
silentJSONParsing: _.transitional(_.boolean),
|
|
1198
|
+
forcedJSONParsing: _.transitional(_.boolean),
|
|
1199
|
+
clarifyTimeoutError: _.transitional(_.boolean)
|
|
1194
1200
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1195
1201
|
serialize: s
|
|
1196
|
-
} :
|
|
1197
|
-
encode:
|
|
1198
|
-
serialize:
|
|
1202
|
+
} : Y.assertOptions(s, {
|
|
1203
|
+
encode: _.function,
|
|
1204
|
+
serialize: _.function
|
|
1199
1205
|
}, !0)), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1200
1206
|
let i = o && a.merge(
|
|
1201
1207
|
o.common,
|
|
@@ -1203,55 +1209,55 @@ class M {
|
|
|
1203
1209
|
);
|
|
1204
1210
|
o && a.forEach(
|
|
1205
1211
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1206
|
-
(
|
|
1207
|
-
delete o[
|
|
1212
|
+
(d) => {
|
|
1213
|
+
delete o[d];
|
|
1208
1214
|
}
|
|
1209
|
-
), n.headers =
|
|
1215
|
+
), n.headers = O.concat(i, o);
|
|
1210
1216
|
const c = [];
|
|
1211
|
-
let
|
|
1212
|
-
this.interceptors.request.forEach(function(
|
|
1213
|
-
typeof
|
|
1217
|
+
let f = !0;
|
|
1218
|
+
this.interceptors.request.forEach(function(p) {
|
|
1219
|
+
typeof p.runWhen == "function" && p.runWhen(n) === !1 || (f = f && p.synchronous, c.unshift(p.fulfilled, p.rejected));
|
|
1214
1220
|
});
|
|
1215
|
-
const
|
|
1216
|
-
this.interceptors.response.forEach(function(
|
|
1217
|
-
|
|
1221
|
+
const h = [];
|
|
1222
|
+
this.interceptors.response.forEach(function(p) {
|
|
1223
|
+
h.push(p.fulfilled, p.rejected);
|
|
1218
1224
|
});
|
|
1219
|
-
let
|
|
1220
|
-
if (!
|
|
1221
|
-
const
|
|
1222
|
-
for (
|
|
1223
|
-
|
|
1224
|
-
return
|
|
1225
|
+
let l, u = 0, w;
|
|
1226
|
+
if (!f) {
|
|
1227
|
+
const d = [be.bind(this), void 0];
|
|
1228
|
+
for (d.unshift.apply(d, c), d.push.apply(d, h), w = d.length, l = Promise.resolve(n); u < w; )
|
|
1229
|
+
l = l.then(d[u++], d[u++]);
|
|
1230
|
+
return l;
|
|
1225
1231
|
}
|
|
1226
|
-
|
|
1227
|
-
let
|
|
1228
|
-
for (u = 0; u <
|
|
1229
|
-
const
|
|
1232
|
+
w = c.length;
|
|
1233
|
+
let b = n;
|
|
1234
|
+
for (u = 0; u < w; ) {
|
|
1235
|
+
const d = c[u++], p = c[u++];
|
|
1230
1236
|
try {
|
|
1231
|
-
|
|
1232
|
-
} catch (
|
|
1233
|
-
|
|
1237
|
+
b = d(b);
|
|
1238
|
+
} catch (E) {
|
|
1239
|
+
p.call(this, E);
|
|
1234
1240
|
break;
|
|
1235
1241
|
}
|
|
1236
1242
|
}
|
|
1237
1243
|
try {
|
|
1238
|
-
|
|
1239
|
-
} catch (
|
|
1240
|
-
return Promise.reject(
|
|
1244
|
+
l = be.call(this, b);
|
|
1245
|
+
} catch (d) {
|
|
1246
|
+
return Promise.reject(d);
|
|
1241
1247
|
}
|
|
1242
|
-
for (u = 0,
|
|
1243
|
-
|
|
1244
|
-
return
|
|
1248
|
+
for (u = 0, w = h.length; u < w; )
|
|
1249
|
+
l = l.then(h[u++], h[u++]);
|
|
1250
|
+
return l;
|
|
1245
1251
|
}
|
|
1246
1252
|
getUri(t) {
|
|
1247
|
-
t =
|
|
1248
|
-
const n =
|
|
1249
|
-
return
|
|
1253
|
+
t = N(this.defaults, t);
|
|
1254
|
+
const n = Je(t.baseURL, t.url);
|
|
1255
|
+
return Ie(n, t.params, t.paramsSerializer);
|
|
1250
1256
|
}
|
|
1251
1257
|
}
|
|
1252
1258
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1253
|
-
|
|
1254
|
-
return this.request(
|
|
1259
|
+
q.prototype[t] = function(n, r) {
|
|
1260
|
+
return this.request(N(r || {}, {
|
|
1255
1261
|
method: t,
|
|
1256
1262
|
url: n,
|
|
1257
1263
|
data: (r || {}).data
|
|
@@ -1261,7 +1267,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1261
1267
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1262
1268
|
function n(r) {
|
|
1263
1269
|
return function(o, i, c) {
|
|
1264
|
-
return this.request(
|
|
1270
|
+
return this.request(N(c || {}, {
|
|
1265
1271
|
method: t,
|
|
1266
1272
|
headers: r ? {
|
|
1267
1273
|
"Content-Type": "multipart/form-data"
|
|
@@ -1271,10 +1277,10 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1271
1277
|
}));
|
|
1272
1278
|
};
|
|
1273
1279
|
}
|
|
1274
|
-
|
|
1280
|
+
q.prototype[t] = n(), q.prototype[t + "Form"] = n(!0);
|
|
1275
1281
|
});
|
|
1276
|
-
const
|
|
1277
|
-
class
|
|
1282
|
+
const I = q;
|
|
1283
|
+
class ce {
|
|
1278
1284
|
constructor(t) {
|
|
1279
1285
|
if (typeof t != "function")
|
|
1280
1286
|
throw new TypeError("executor must be a function.");
|
|
@@ -1299,7 +1305,7 @@ class pe {
|
|
|
1299
1305
|
r.unsubscribe(o);
|
|
1300
1306
|
}, i;
|
|
1301
1307
|
}, t(function(o, i, c) {
|
|
1302
|
-
r.reason || (r.reason = new
|
|
1308
|
+
r.reason || (r.reason = new D(o, i, c), n(r.reason));
|
|
1303
1309
|
});
|
|
1304
1310
|
}
|
|
1305
1311
|
/**
|
|
@@ -1335,23 +1341,23 @@ class pe {
|
|
|
1335
1341
|
static source() {
|
|
1336
1342
|
let t;
|
|
1337
1343
|
return {
|
|
1338
|
-
token: new
|
|
1344
|
+
token: new ce(function(s) {
|
|
1339
1345
|
t = s;
|
|
1340
1346
|
}),
|
|
1341
1347
|
cancel: t
|
|
1342
1348
|
};
|
|
1343
1349
|
}
|
|
1344
1350
|
}
|
|
1345
|
-
const
|
|
1346
|
-
function
|
|
1351
|
+
const hn = ce;
|
|
1352
|
+
function mn(e) {
|
|
1347
1353
|
return function(n) {
|
|
1348
1354
|
return e.apply(null, n);
|
|
1349
1355
|
};
|
|
1350
1356
|
}
|
|
1351
|
-
function
|
|
1357
|
+
function yn(e) {
|
|
1352
1358
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1353
1359
|
}
|
|
1354
|
-
const
|
|
1360
|
+
const ee = {
|
|
1355
1361
|
Continue: 100,
|
|
1356
1362
|
SwitchingProtocols: 101,
|
|
1357
1363
|
Processing: 102,
|
|
@@ -1416,217 +1422,48 @@ const oe = {
|
|
|
1416
1422
|
NotExtended: 510,
|
|
1417
1423
|
NetworkAuthenticationRequired: 511
|
|
1418
1424
|
};
|
|
1419
|
-
Object.entries(
|
|
1420
|
-
|
|
1425
|
+
Object.entries(ee).forEach(([e, t]) => {
|
|
1426
|
+
ee[t] = e;
|
|
1421
1427
|
});
|
|
1422
|
-
const
|
|
1423
|
-
function
|
|
1424
|
-
const t = new
|
|
1425
|
-
return a.extend(n,
|
|
1426
|
-
return
|
|
1428
|
+
const wn = ee;
|
|
1429
|
+
function Ve(e) {
|
|
1430
|
+
const t = new I(e), n = ke(I.prototype.request, t);
|
|
1431
|
+
return a.extend(n, I.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1432
|
+
return Ve(N(e, s));
|
|
1427
1433
|
}, n;
|
|
1428
1434
|
}
|
|
1429
|
-
const y =
|
|
1430
|
-
y.Axios =
|
|
1431
|
-
y.CanceledError =
|
|
1432
|
-
y.CancelToken =
|
|
1433
|
-
y.isCancel =
|
|
1434
|
-
y.VERSION =
|
|
1435
|
-
y.toFormData =
|
|
1435
|
+
const y = Ve(ie);
|
|
1436
|
+
y.Axios = I;
|
|
1437
|
+
y.CanceledError = D;
|
|
1438
|
+
y.CancelToken = hn;
|
|
1439
|
+
y.isCancel = ze;
|
|
1440
|
+
y.VERSION = ve;
|
|
1441
|
+
y.toFormData = $;
|
|
1436
1442
|
y.AxiosError = m;
|
|
1437
1443
|
y.Cancel = y.CanceledError;
|
|
1438
1444
|
y.all = function(t) {
|
|
1439
1445
|
return Promise.all(t);
|
|
1440
1446
|
};
|
|
1441
|
-
y.spread =
|
|
1442
|
-
y.isAxiosError =
|
|
1443
|
-
y.mergeConfig =
|
|
1444
|
-
y.AxiosHeaders =
|
|
1445
|
-
y.formToJSON = (e) =>
|
|
1446
|
-
y.getAdapter =
|
|
1447
|
-
y.HttpStatusCode =
|
|
1447
|
+
y.spread = mn;
|
|
1448
|
+
y.isAxiosError = yn;
|
|
1449
|
+
y.mergeConfig = N;
|
|
1450
|
+
y.AxiosHeaders = O;
|
|
1451
|
+
y.formToJSON = (e) => Me(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1452
|
+
y.getAdapter = $e.getAdapter;
|
|
1453
|
+
y.HttpStatusCode = wn;
|
|
1448
1454
|
y.default = y;
|
|
1449
|
-
const
|
|
1450
|
-
var t = encodeURIComponent(e);
|
|
1451
|
-
return t = btoa(t), t;
|
|
1452
|
-
}, j = () => {
|
|
1453
|
-
let t = { ...(window == null ? void 0 : window.config) || {} };
|
|
1454
|
-
t.rootContainer || (t.rootContainer = "#app"), t.baseURL || (t.baseURL = location.origin), t.ossBaseURL || (t.ossBaseURL = "/oss"), t.ossBaseURL.startsWith("/") && (t.ossBaseURL = `${t.baseURL}/oss`), t.ssoBaseURL || (t.ssoBaseURL = t.baseURL);
|
|
1455
|
-
let { microAppName: n, publicPath: r, mainAppName: s } = t;
|
|
1456
|
-
return n && !0 && !r && (r = `/${n}/`.replace(/\/\//g, "/")), r || (r = "/"), t.publicPath = r, t.autoOssBucket || (t.autoOssBucket = s || n), t;
|
|
1457
|
-
}, Qe = (e, t) => {
|
|
1458
|
-
let n = window.location.search || "";
|
|
1459
|
-
if (e && e !== location.href) {
|
|
1460
|
-
const s = e.indexOf("?");
|
|
1461
|
-
s !== -1 ? n = e.slice(s) : n = "";
|
|
1462
|
-
}
|
|
1463
|
-
const r = new URLSearchParams(n);
|
|
1464
|
-
if (t)
|
|
1465
|
-
return r.get(t);
|
|
1466
|
-
{
|
|
1467
|
-
let s = {};
|
|
1468
|
-
for (let [o, i] of r.entries())
|
|
1469
|
-
s[o] = i;
|
|
1470
|
-
return s;
|
|
1471
|
-
}
|
|
1472
|
-
}, bn = (e, t) => {
|
|
1473
|
-
const n = t || location.href, r = Qe(n), s = Object.keys(r) || [];
|
|
1474
|
-
if (!s || !s.length)
|
|
1475
|
-
return n.includes("?") ? n.split("?")[0] : n.split("&")[0];
|
|
1476
|
-
let o = s.filter((c) => !e.includes(c));
|
|
1477
|
-
if (!o || !o.length)
|
|
1478
|
-
return n.includes("?") ? n.split("?")[0] : n.split("&")[0];
|
|
1479
|
-
let i = "";
|
|
1480
|
-
return o.forEach((c, l) => {
|
|
1481
|
-
l === s.length - 1 ? i += `${c}=${r[c]}` : i += `${c}=${r[c]}&`;
|
|
1482
|
-
}), n.includes("?") ? n.split("?")[0] + `?${i}` : n.split("&")[0] + `?${i}`;
|
|
1483
|
-
};
|
|
1484
|
-
/*! js-cookie v3.0.5 | MIT */
|
|
1485
|
-
function v(e) {
|
|
1486
|
-
for (var t = 1; t < arguments.length; t++) {
|
|
1487
|
-
var n = arguments[t];
|
|
1488
|
-
for (var r in n)
|
|
1489
|
-
e[r] = n[r];
|
|
1490
|
-
}
|
|
1491
|
-
return e;
|
|
1492
|
-
}
|
|
1493
|
-
var Rn = {
|
|
1494
|
-
read: function(e) {
|
|
1495
|
-
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1496
|
-
},
|
|
1497
|
-
write: function(e) {
|
|
1498
|
-
return encodeURIComponent(e).replace(
|
|
1499
|
-
/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
|
|
1500
|
-
decodeURIComponent
|
|
1501
|
-
);
|
|
1502
|
-
}
|
|
1503
|
-
};
|
|
1504
|
-
function ie(e, t) {
|
|
1505
|
-
function n(s, o, i) {
|
|
1506
|
-
if (!(typeof document > "u")) {
|
|
1507
|
-
i = v({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1508
|
-
var c = "";
|
|
1509
|
-
for (var l in i)
|
|
1510
|
-
i[l] && (c += "; " + l, i[l] !== !0 && (c += "=" + i[l].split(";")[0]));
|
|
1511
|
-
return document.cookie = s + "=" + e.write(o, s) + c;
|
|
1512
|
-
}
|
|
1513
|
-
}
|
|
1514
|
-
function r(s) {
|
|
1515
|
-
if (!(typeof document > "u" || arguments.length && !s)) {
|
|
1516
|
-
for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < o.length; c++) {
|
|
1517
|
-
var l = o[c].split("="), d = l.slice(1).join("=");
|
|
1518
|
-
try {
|
|
1519
|
-
var f = decodeURIComponent(l[0]);
|
|
1520
|
-
if (i[f] = e.read(d, f), s === f)
|
|
1521
|
-
break;
|
|
1522
|
-
} catch {
|
|
1523
|
-
}
|
|
1524
|
-
}
|
|
1525
|
-
return s ? i[s] : i;
|
|
1526
|
-
}
|
|
1527
|
-
}
|
|
1528
|
-
return Object.create(
|
|
1529
|
-
{
|
|
1530
|
-
set: n,
|
|
1531
|
-
get: r,
|
|
1532
|
-
remove: function(s, o) {
|
|
1533
|
-
n(
|
|
1534
|
-
s,
|
|
1535
|
-
"",
|
|
1536
|
-
v({}, o, {
|
|
1537
|
-
expires: -1
|
|
1538
|
-
})
|
|
1539
|
-
);
|
|
1540
|
-
},
|
|
1541
|
-
withAttributes: function(s) {
|
|
1542
|
-
return ie(this.converter, v({}, this.attributes, s));
|
|
1543
|
-
},
|
|
1544
|
-
withConverter: function(s) {
|
|
1545
|
-
return ie(v({}, this.converter, s), this.attributes);
|
|
1546
|
-
}
|
|
1547
|
-
},
|
|
1548
|
-
{
|
|
1549
|
-
attributes: { value: Object.freeze(t) },
|
|
1550
|
-
converter: { value: Object.freeze(e) }
|
|
1551
|
-
}
|
|
1552
|
-
);
|
|
1553
|
-
}
|
|
1554
|
-
var R = ie(Rn, { path: "/" });
|
|
1555
|
-
const Ye = (e) => {
|
|
1556
|
-
var t, n, r, s;
|
|
1557
|
-
sessionStorage.setItem("hotentToken", e.accessToken || ""), sessionStorage.setItem("currentUser", JSON.stringify({ token: e.accessToken || "" })), e.info && JSON.stringify(e.info) !== "{}" && sessionStorage.setItem("hotentUserInfo", JSON.stringify({ id: ((t = e.info) == null ? void 0 : t.sub) ?? "", name: ((n = e.info) == null ? void 0 : n.name) ?? "", flag: (r = e.info) == null ? void 0 : r.flag, tenantId: ((s = e.info) == null ? void 0 : s.tenant) ?? "" }));
|
|
1558
|
-
}, Tn = () => {
|
|
1559
|
-
const e = new URL(location.href).searchParams, t = e.get("token") || e.get("accessToken") || e.get("accesstoken") || "";
|
|
1560
|
-
if (t) {
|
|
1561
|
-
const n = JSON.stringify({ access_token: t });
|
|
1562
|
-
sessionStorage.setItem("accessToken", t), sessionStorage.setItem("tokenInfo", n), R.set("accessToken", t), R.set("accessTokenInfo", n);
|
|
1563
|
-
}
|
|
1564
|
-
}, kn = () => {
|
|
1565
|
-
const e = JSON.parse(sessionStorage.getItem("projectInfo") || "{}"), t = new URL(location.href).searchParams, n = t.get("project") || t.get("projectId") || "";
|
|
1566
|
-
if (!n)
|
|
1567
|
-
return;
|
|
1568
|
-
const r = t.get("projectParent") || t.get("projectParentId") || (e == null ? void 0 : e.parentId) || "", s = t.get("projectName") || (e == null ? void 0 : e.name) || "";
|
|
1569
|
-
sessionStorage.setItem("project", n), sessionStorage.setItem("projectInfo", JSON.stringify({ ...e, id: n, name: s, parentId: r }));
|
|
1570
|
-
}, On = () => R.get("accessToken") ?? "", An = () => {
|
|
1571
|
-
const e = j(), t = (e == null ? void 0 : e.infoStrict) ?? !0;
|
|
1572
|
-
let n = JSON.parse(sessionStorage.getItem("projectInfo") || "{}");
|
|
1573
|
-
return t || e.projectInfo && (n = e.projectInfo), {
|
|
1574
|
-
id: (n == null ? void 0 : n.id) ?? "",
|
|
1575
|
-
parentId: (n == null ? void 0 : n.parentId) ?? "",
|
|
1576
|
-
name: (n == null ? void 0 : n.name) ?? "",
|
|
1577
|
-
tenantId: (n == null ? void 0 : n.tenant) ?? ""
|
|
1578
|
-
};
|
|
1579
|
-
};
|
|
1580
|
-
On() || Tn();
|
|
1581
|
-
kn();
|
|
1582
|
-
const _n = {
|
|
1583
|
-
personalInfo: "/api/personal-center/personal-server/v1/info"
|
|
1584
|
-
}, he = async (e) => {
|
|
1585
|
-
var n;
|
|
1586
|
-
const t = await y.create().get(_n.personalInfo, {
|
|
1587
|
-
baseURL: j().baseURL,
|
|
1588
|
-
params: {
|
|
1589
|
-
project: ((n = An()) == null ? void 0 : n.id) || "",
|
|
1590
|
-
timestamp: (/* @__PURE__ */ new Date()).getTime()
|
|
1591
|
-
},
|
|
1592
|
-
headers: {
|
|
1593
|
-
Authorization: `Bearer ${e}`
|
|
1594
|
-
}
|
|
1595
|
-
});
|
|
1596
|
-
t != null && t.data && sessionStorage.setItem("userInfo", JSON.stringify(t.data));
|
|
1597
|
-
}, z = "accessToken", D = "accessTokenInfo", xe = () => {
|
|
1598
|
-
var n, r, s, o, i, c, l;
|
|
1599
|
-
const e = R.get(z) ?? "";
|
|
1600
|
-
let t = "";
|
|
1601
|
-
if ((n = T().getData()) != null && n.info && JSON.stringify((r = T().getData()) == null ? void 0 : r.info) !== "{}" && (t = ((o = (s = T().getData()) == null ? void 0 : s.info) == null ? void 0 : o.access_token) ?? ((c = (i = T().getData()) == null ? void 0 : i.info) == null ? void 0 : c.accessToken) ?? ""), e && !t) {
|
|
1602
|
-
const d = xn();
|
|
1603
|
-
if (d && JSON.stringify(d) !== "{}") {
|
|
1604
|
-
const { access_token: f, refresh_token: u, expires_in: g } = d, S = {
|
|
1605
|
-
accessToken: f,
|
|
1606
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + g * 1e3,
|
|
1607
|
-
refreshToken: u,
|
|
1608
|
-
info: d
|
|
1609
|
-
};
|
|
1610
|
-
T().save(S), he(f), Ye(S);
|
|
1611
|
-
}
|
|
1612
|
-
}
|
|
1613
|
-
return R.get(z) ?? ((l = T().getData()) == null ? void 0 : l.accessToken) ?? "";
|
|
1614
|
-
}, xn = () => R.get(D) ? JSON.parse(R.get(D)) : {}, Ze = (e, t) => {
|
|
1615
|
-
R.set(z, e), t && R.set(D, JSON.stringify(t));
|
|
1616
|
-
}, Nn = () => {
|
|
1617
|
-
R.remove(z), R.get(D) && R.remove(D);
|
|
1618
|
-
}, Ne = (e) => new URL(location.href).searchParams.get(e), me = {
|
|
1455
|
+
const Te = (e) => new URL(location.href).searchParams.get(e), ue = {
|
|
1619
1456
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1620
1457
|
// 重定向到登录页
|
|
1621
1458
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1622
1459
|
// 通过code获取token
|
|
1623
|
-
},
|
|
1460
|
+
}, x = We(!1), { baseURL: En, mainAppName: Sn, microAppName: bn } = ne(), te = Sn || window.__IN_MICRO_APP__ ? `${location.origin}/` : location.origin + location.pathname, H = {
|
|
1624
1461
|
response_type: "code",
|
|
1625
1462
|
scope: "sever",
|
|
1626
1463
|
client_id: "sys",
|
|
1627
|
-
client_secret:
|
|
1464
|
+
client_secret: Xe("das123"),
|
|
1628
1465
|
state: +/* @__PURE__ */ new Date()
|
|
1629
|
-
},
|
|
1466
|
+
}, gn = async (e, t, n, r) => {
|
|
1630
1467
|
const s = Qe(location.href, "kingdee_token") || "";
|
|
1631
1468
|
let o = {};
|
|
1632
1469
|
const i = {
|
|
@@ -1634,76 +1471,76 @@ const _n = {
|
|
|
1634
1471
|
code: e,
|
|
1635
1472
|
client_id: t.client_id,
|
|
1636
1473
|
client_secret: t.client_secret,
|
|
1637
|
-
redirect_uri: n ||
|
|
1474
|
+
redirect_uri: n || te
|
|
1638
1475
|
};
|
|
1639
1476
|
try {
|
|
1640
1477
|
r && (i.keep_login = !0, i.redirect_uri = `${i.redirect_uri}?keep_login=true`), s && (sessionStorage.setItem("kingdee_token", s), i.redirect_uri = `${i.redirect_uri}?kingdee_token=${s}`), o = await y.create().post(
|
|
1641
|
-
|
|
1478
|
+
ue.token,
|
|
1642
1479
|
{},
|
|
1643
1480
|
{
|
|
1644
|
-
baseURL:
|
|
1481
|
+
baseURL: En,
|
|
1645
1482
|
params: i,
|
|
1646
1483
|
headers: {
|
|
1647
1484
|
"Content-Type": "application/x-www-form-urlencoded"
|
|
1648
1485
|
}
|
|
1649
1486
|
}
|
|
1650
1487
|
);
|
|
1651
|
-
const { access_token: c, refresh_token:
|
|
1488
|
+
const { access_token: c, refresh_token: f, expires_in: h } = o.data, l = {
|
|
1652
1489
|
accessToken: c,
|
|
1653
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() +
|
|
1654
|
-
refreshToken:
|
|
1490
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + h * 1e3,
|
|
1491
|
+
refreshToken: f,
|
|
1655
1492
|
info: o.data
|
|
1656
1493
|
};
|
|
1657
|
-
|
|
1494
|
+
Oe(c, o.data), F().save(l), Ae(c);
|
|
1658
1495
|
let u = ["code", "state", "keep_login", "kingdee_token"];
|
|
1659
|
-
return window.history.replaceState(null, "",
|
|
1496
|
+
return window.history.replaceState(null, "", Ze(u)), c;
|
|
1660
1497
|
} catch {
|
|
1661
|
-
return
|
|
1498
|
+
return le({ ...H, redirect_uri: n || te });
|
|
1662
1499
|
}
|
|
1663
|
-
},
|
|
1500
|
+
}, Pn = async (e) => {
|
|
1664
1501
|
if (e.public)
|
|
1665
1502
|
return;
|
|
1666
|
-
if (
|
|
1667
|
-
return await new Promise(async (
|
|
1668
|
-
|
|
1669
|
-
() =>
|
|
1670
|
-
(
|
|
1671
|
-
if (!
|
|
1672
|
-
const
|
|
1673
|
-
l
|
|
1503
|
+
if (x.value)
|
|
1504
|
+
return await new Promise(async (f) => {
|
|
1505
|
+
Ge(
|
|
1506
|
+
() => x.value,
|
|
1507
|
+
(h) => {
|
|
1508
|
+
if (!h) {
|
|
1509
|
+
const l = fe();
|
|
1510
|
+
f(l);
|
|
1674
1511
|
}
|
|
1675
1512
|
}
|
|
1676
1513
|
);
|
|
1677
1514
|
});
|
|
1678
|
-
const t =
|
|
1679
|
-
|
|
1515
|
+
const t = fe(), { accessTokenExpiredAt: n, redirectUri: r } = F().getData(), s = Te("code") || "", o = !!Te("keep_login");
|
|
1516
|
+
x.value = !0;
|
|
1680
1517
|
const i = JSON.parse(sessionStorage.getItem("noLogin-page")) || [];
|
|
1681
|
-
if ((!t || n === 0) &&
|
|
1682
|
-
return
|
|
1518
|
+
if ((!t || n === 0) && bn !== "oauth" && !i.includes(location.pathname) && !s)
|
|
1519
|
+
return le({ ...H, redirect_uri: te });
|
|
1683
1520
|
if (n > 0 && +/* @__PURE__ */ new Date() + 60 * 1e3 > n)
|
|
1684
|
-
return
|
|
1521
|
+
return Rn(H);
|
|
1685
1522
|
if (t)
|
|
1686
1523
|
return t;
|
|
1687
1524
|
if (!s) {
|
|
1688
|
-
|
|
1525
|
+
x.value = !1;
|
|
1689
1526
|
return;
|
|
1690
1527
|
}
|
|
1691
1528
|
try {
|
|
1692
|
-
const
|
|
1693
|
-
return
|
|
1529
|
+
const f = await gn(s, H, r, o);
|
|
1530
|
+
return x.value = !1, f;
|
|
1694
1531
|
} catch {
|
|
1695
|
-
|
|
1532
|
+
x.value = !1;
|
|
1696
1533
|
}
|
|
1697
|
-
},
|
|
1698
|
-
const { baseURL: t, ssoLocale: n } =
|
|
1534
|
+
}, le = (e) => {
|
|
1535
|
+
const { baseURL: t, ssoLocale: n } = ne();
|
|
1699
1536
|
e.logout = "true", n && (e.locale = "locale");
|
|
1700
|
-
const r = Object.keys(e).filter((o) => o !== "client_secret").map((o) => `${o}=${e[o]}`).join("&"), s = `${t}${
|
|
1701
|
-
|
|
1702
|
-
},
|
|
1703
|
-
const { baseURL: t } =
|
|
1537
|
+
const r = Object.keys(e).filter((o) => o !== "client_secret").map((o) => `${o}=${e[o]}`).join("&"), s = `${t}${ue.oauth}?${r}`;
|
|
1538
|
+
Ye(), sessionStorage.clear(), F().save({ redirectUri: e.redirect_uri }), window.__isAutoCloseApp = !1, location.replace(s);
|
|
1539
|
+
}, Rn = async (e) => {
|
|
1540
|
+
const { baseURL: t } = ne(), { refreshToken: n, redirectUri: r } = F().getData();
|
|
1704
1541
|
e.redirect_uri = r;
|
|
1705
1542
|
try {
|
|
1706
|
-
const s = await y.create().post(
|
|
1543
|
+
const s = await y.create().post(ue.token, {
|
|
1707
1544
|
baseURL: t,
|
|
1708
1545
|
params: {
|
|
1709
1546
|
refresh_token: n,
|
|
@@ -1712,17 +1549,17 @@ const _n = {
|
|
|
1712
1549
|
client_secret: e.client_secret,
|
|
1713
1550
|
redirect_uri: r
|
|
1714
1551
|
}
|
|
1715
|
-
}), { access_token: o, refresh_token: i, expires_in: c } = s.data,
|
|
1552
|
+
}), { access_token: o, refresh_token: i, expires_in: c } = s.data, f = {
|
|
1716
1553
|
accessToken: o,
|
|
1717
1554
|
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + c * 1e3,
|
|
1718
1555
|
refreshToken: i,
|
|
1719
1556
|
info: s.data
|
|
1720
1557
|
};
|
|
1721
|
-
return
|
|
1558
|
+
return Oe(o, s.data), F().save(f), Ae(o), o;
|
|
1722
1559
|
} catch {
|
|
1723
|
-
return
|
|
1560
|
+
return le(e);
|
|
1724
1561
|
}
|
|
1725
|
-
},
|
|
1562
|
+
}, F = () => {
|
|
1726
1563
|
const e = "accessToken", t = "accessTokenExpiredAt", n = "refreshToken", r = "tokenInfo", s = "redirectUri";
|
|
1727
1564
|
return {
|
|
1728
1565
|
getData: () => ({
|
|
@@ -1736,7 +1573,7 @@ const _n = {
|
|
|
1736
1573
|
}),
|
|
1737
1574
|
save: (o) => {
|
|
1738
1575
|
const i = o.accessTokenExpiredAt || 0;
|
|
1739
|
-
sessionStorage.setItem(e, o.accessToken || ""), sessionStorage.setItem(t, i.toString()), sessionStorage.setItem(n, o.refreshToken || ""), sessionStorage.setItem(r, JSON.stringify(o.info || {})), o.redirectUri && sessionStorage.setItem(s, o.redirectUri || ""),
|
|
1576
|
+
sessionStorage.setItem(e, o.accessToken || ""), sessionStorage.setItem(t, i.toString()), sessionStorage.setItem(n, o.refreshToken || ""), sessionStorage.setItem(r, JSON.stringify(o.info || {})), o.redirectUri && sessionStorage.setItem(s, o.redirectUri || ""), et(o);
|
|
1740
1577
|
},
|
|
1741
1578
|
remove: () => {
|
|
1742
1579
|
sessionStorage.removeItem(e), sessionStorage.removeItem(t), sessionStorage.removeItem(n), sessionStorage.removeItem(r), sessionStorage.removeItem(s);
|
|
@@ -1744,11 +1581,11 @@ const _n = {
|
|
|
1744
1581
|
};
|
|
1745
1582
|
};
|
|
1746
1583
|
export {
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1584
|
+
Te as getQuery,
|
|
1585
|
+
Pn as getToken,
|
|
1586
|
+
gn as getTokenFromCode,
|
|
1587
|
+
H as getTokenParams,
|
|
1588
|
+
le as login,
|
|
1589
|
+
te as real_uri,
|
|
1590
|
+
F as tokenStorage
|
|
1754
1591
|
};
|