@das-fed/utils 7.0.5 → 7.0.6
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.js +560 -541
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +834 -833
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +350 -331
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +355 -336
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +834 -833
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +371 -352
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +880 -843
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +573 -554
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +834 -833
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +972 -949
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +1200 -1163
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +889 -888
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +350 -331
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +350 -331
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +849 -844
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +350 -331
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +350 -331
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +874 -841
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +867 -830
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +366 -347
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +350 -331
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +350 -331
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +880 -843
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +849 -848
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/set-personal-info/index.js +243 -227
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/index.js +566 -550
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/create-api-service/index.js +350 -331
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +326 -310
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +582 -566
- package/curring-http/index.js.gz +0 -0
- package/package.json +4 -4
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/vue/hooks/use-model-value/index.d.ts +5 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
import { encryption as
|
|
3
|
-
import { getConfig as
|
|
4
|
-
import { getAccessToken as
|
|
1
|
+
import { unref as Nt, getCurrentScope as Ft, onScopeDispose as Dt, ref as ne, watch as Oe } from "vue";
|
|
2
|
+
import { encryption as vt } from "@das-fed/utils/atob";
|
|
3
|
+
import { getConfig as Ae } from "@das-fed/utils/config";
|
|
4
|
+
import { getAccessToken as D, removeAccessToken as It, setAccessToken as Bt, getAccessTokenInfo as fe } from "@das-fed/utils/token-tools";
|
|
5
5
|
import { removeProcessEngineToken as jt, setProcessEngineToken as qt } from "@das-fed/utils/process-engine-info";
|
|
6
6
|
import { setPersonalInfo as tt } from "@das-fed/utils/common-info/set-personal-info";
|
|
7
7
|
function nt(e, t) {
|
|
@@ -9,29 +9,37 @@ function nt(e, t) {
|
|
|
9
9
|
return e.apply(t, arguments);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
const { toString:
|
|
13
|
-
const n =
|
|
12
|
+
const { toString: Mt } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: se, toStringTag: rt } = Symbol, ie = /* @__PURE__ */ ((e) => (t) => {
|
|
13
|
+
const n = Mt.call(t);
|
|
14
14
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
15
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
16
|
-
function
|
|
17
|
-
return e !== null && !
|
|
15
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => ie(t) === e), ae = (e) => (t) => typeof t === e, { isArray: B } = Array, H = ae("undefined");
|
|
16
|
+
function V(e) {
|
|
17
|
+
return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
function
|
|
19
|
+
const ot = x("ArrayBuffer");
|
|
20
|
+
function Ht(e) {
|
|
21
21
|
let t;
|
|
22
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
22
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ot(e.buffer), t;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
24
|
+
const $t = ae("string"), A = ae("function"), st = ae("number"), W = (e) => e !== null && typeof e == "object", zt = (e) => e === !0 || e === !1, Z = (e) => {
|
|
25
|
+
if (ie(e) !== "object")
|
|
26
26
|
return !1;
|
|
27
|
-
const t =
|
|
28
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
29
|
-
},
|
|
27
|
+
const t = _e(e);
|
|
28
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(se in e);
|
|
29
|
+
}, Jt = (e) => {
|
|
30
|
+
if (!W(e) || V(e))
|
|
31
|
+
return !1;
|
|
32
|
+
try {
|
|
33
|
+
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
34
|
+
} catch {
|
|
35
|
+
return !1;
|
|
36
|
+
}
|
|
37
|
+
}, Vt = x("Date"), Wt = x("File"), Kt = x("Blob"), Qt = x("FileList"), Xt = (e) => W(e) && A(e.pipe), Gt = (e) => {
|
|
30
38
|
let t;
|
|
31
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
32
|
-
t === "object" &&
|
|
39
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = ie(e)) === "formdata" || // detect form-data instance
|
|
40
|
+
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
33
41
|
}, Zt = x("URLSearchParams"), [Yt, en, tn, nn] = ["ReadableStream", "Request", "Response", "Headers"].map(x), rn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
34
|
-
function
|
|
42
|
+
function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
35
43
|
if (e === null || typeof e > "u")
|
|
36
44
|
return;
|
|
37
45
|
let r, o;
|
|
@@ -39,13 +47,17 @@ function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
39
47
|
for (r = 0, o = e.length; r < o; r++)
|
|
40
48
|
t.call(null, e[r], r, e);
|
|
41
49
|
else {
|
|
50
|
+
if (V(e))
|
|
51
|
+
return;
|
|
42
52
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
43
53
|
let c;
|
|
44
54
|
for (r = 0; r < i; r++)
|
|
45
55
|
c = s[r], t.call(null, e[c], c, e);
|
|
46
56
|
}
|
|
47
57
|
}
|
|
48
|
-
function
|
|
58
|
+
function it(e, t) {
|
|
59
|
+
if (V(e))
|
|
60
|
+
return null;
|
|
49
61
|
t = t.toLowerCase();
|
|
50
62
|
const n = Object.keys(e);
|
|
51
63
|
let r = n.length, o;
|
|
@@ -54,18 +66,18 @@ function st(e, t) {
|
|
|
54
66
|
return o;
|
|
55
67
|
return null;
|
|
56
68
|
}
|
|
57
|
-
const
|
|
58
|
-
function
|
|
59
|
-
const { caseless: e } =
|
|
60
|
-
const s = e &&
|
|
61
|
-
|
|
69
|
+
const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) => !H(e) && e !== L;
|
|
70
|
+
function me() {
|
|
71
|
+
const { caseless: e } = at(this) && this || {}, t = {}, n = (r, o) => {
|
|
72
|
+
const s = e && it(t, o) || o;
|
|
73
|
+
Z(t[s]) && Z(r) ? t[s] = me(t[s], r) : Z(r) ? t[s] = me({}, r) : B(r) ? t[s] = r.slice() : t[s] = r;
|
|
62
74
|
};
|
|
63
75
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
64
|
-
arguments[r] &&
|
|
76
|
+
arguments[r] && K(arguments[r], n);
|
|
65
77
|
return t;
|
|
66
78
|
}
|
|
67
|
-
const on = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
68
|
-
n &&
|
|
79
|
+
const on = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (o, s) => {
|
|
80
|
+
n && A(o) ? e[s] = nt(o, n) : e[s] = o;
|
|
69
81
|
}, { allOwnKeys: r }), e), sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), an = (e, t, n, r) => {
|
|
70
82
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
71
83
|
value: t.prototype
|
|
@@ -77,7 +89,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
|
77
89
|
do {
|
|
78
90
|
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
|
|
79
91
|
i = o[s], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
80
|
-
e = n !== !1 &&
|
|
92
|
+
e = n !== !1 && _e(e);
|
|
81
93
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
82
94
|
return t;
|
|
83
95
|
}, un = (e, t, n) => {
|
|
@@ -88,13 +100,13 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
|
88
100
|
if (!e) return null;
|
|
89
101
|
if (B(e)) return e;
|
|
90
102
|
let t = e.length;
|
|
91
|
-
if (!
|
|
103
|
+
if (!st(t)) return null;
|
|
92
104
|
const n = new Array(t);
|
|
93
105
|
for (; t-- > 0; )
|
|
94
106
|
n[t] = e[t];
|
|
95
107
|
return n;
|
|
96
|
-
}, fn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
97
|
-
const r = (e && e[
|
|
108
|
+
}, fn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), dn = (e, t) => {
|
|
109
|
+
const r = (e && e[se]).call(e);
|
|
98
110
|
let o;
|
|
99
111
|
for (; (o = r.next()) && !o.done; ) {
|
|
100
112
|
const s = o.value;
|
|
@@ -111,18 +123,18 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
|
111
123
|
function(n, r, o) {
|
|
112
124
|
return r.toUpperCase() + o;
|
|
113
125
|
}
|
|
114
|
-
),
|
|
126
|
+
), Ue = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), yn = x("RegExp"), ct = (e, t) => {
|
|
115
127
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
116
|
-
|
|
128
|
+
K(n, (o, s) => {
|
|
117
129
|
let i;
|
|
118
130
|
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
119
131
|
}), Object.defineProperties(e, r);
|
|
120
132
|
}, wn = (e) => {
|
|
121
|
-
|
|
122
|
-
if (
|
|
133
|
+
ct(e, (t, n) => {
|
|
134
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
123
135
|
return !1;
|
|
124
136
|
const r = e[n];
|
|
125
|
-
if (
|
|
137
|
+
if (A(r)) {
|
|
126
138
|
if (t.enumerable = !1, "writable" in t) {
|
|
127
139
|
t.writable = !1;
|
|
128
140
|
return;
|
|
@@ -140,103 +152,95 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
|
140
152
|
};
|
|
141
153
|
return B(e) ? r(e) : r(String(e).split(t)), n;
|
|
142
154
|
}, bn = () => {
|
|
143
|
-
}, En = (e, t) => e != null && Number.isFinite(e = +e) ? e : t
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
ALPHA_DIGIT: le + le.toUpperCase() + Le
|
|
147
|
-
}, Sn = (e = 16, t = ct.ALPHA_DIGIT) => {
|
|
148
|
-
let n = "";
|
|
149
|
-
const { length: r } = t;
|
|
150
|
-
for (; e--; )
|
|
151
|
-
n += t[Math.random() * r | 0];
|
|
152
|
-
return n;
|
|
153
|
-
};
|
|
154
|
-
function Rn(e) {
|
|
155
|
-
return !!(e && _(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
155
|
+
}, En = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
156
|
+
function Sn(e) {
|
|
157
|
+
return !!(e && A(e.append) && e[rt] === "FormData" && e[se]);
|
|
156
158
|
}
|
|
157
|
-
const
|
|
159
|
+
const Rn = (e) => {
|
|
158
160
|
const t = new Array(10), n = (r, o) => {
|
|
159
|
-
if (
|
|
161
|
+
if (W(r)) {
|
|
160
162
|
if (t.indexOf(r) >= 0)
|
|
161
163
|
return;
|
|
164
|
+
if (V(r))
|
|
165
|
+
return r;
|
|
162
166
|
if (!("toJSON" in r)) {
|
|
163
167
|
t[o] = r;
|
|
164
168
|
const s = B(r) ? [] : {};
|
|
165
|
-
return
|
|
169
|
+
return K(r, (i, c) => {
|
|
166
170
|
const f = n(i, o + 1);
|
|
167
|
-
!
|
|
171
|
+
!H(f) && (s[c] = f);
|
|
168
172
|
}), t[o] = void 0, s;
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
return r;
|
|
172
176
|
};
|
|
173
177
|
return n(e, 0);
|
|
174
|
-
},
|
|
175
|
-
o ===
|
|
178
|
+
}, Tn = x("AsyncFunction"), On = (e) => e && (W(e) || A(e)) && A(e.then) && A(e.catch), ut = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: o, data: s }) => {
|
|
179
|
+
o === L && s === n && r.length && r.shift()();
|
|
176
180
|
}, !1), (o) => {
|
|
177
|
-
r.push(o),
|
|
181
|
+
r.push(o), L.postMessage(n, "*");
|
|
178
182
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
179
183
|
typeof setImmediate == "function",
|
|
180
|
-
|
|
181
|
-
),
|
|
184
|
+
A(L.postMessage)
|
|
185
|
+
), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || ut, _n = (e) => e != null && A(e[se]), a = {
|
|
182
186
|
isArray: B,
|
|
183
|
-
isArrayBuffer:
|
|
184
|
-
isBuffer:
|
|
185
|
-
isFormData:
|
|
186
|
-
isArrayBufferView:
|
|
187
|
-
isString:
|
|
188
|
-
isNumber:
|
|
189
|
-
isBoolean:
|
|
190
|
-
isObject:
|
|
191
|
-
isPlainObject:
|
|
187
|
+
isArrayBuffer: ot,
|
|
188
|
+
isBuffer: V,
|
|
189
|
+
isFormData: Gt,
|
|
190
|
+
isArrayBufferView: Ht,
|
|
191
|
+
isString: $t,
|
|
192
|
+
isNumber: st,
|
|
193
|
+
isBoolean: zt,
|
|
194
|
+
isObject: W,
|
|
195
|
+
isPlainObject: Z,
|
|
196
|
+
isEmptyObject: Jt,
|
|
192
197
|
isReadableStream: Yt,
|
|
193
198
|
isRequest: en,
|
|
194
199
|
isResponse: tn,
|
|
195
200
|
isHeaders: nn,
|
|
196
|
-
isUndefined:
|
|
201
|
+
isUndefined: H,
|
|
197
202
|
isDate: Vt,
|
|
198
203
|
isFile: Wt,
|
|
199
204
|
isBlob: Kt,
|
|
200
205
|
isRegExp: yn,
|
|
201
|
-
isFunction:
|
|
202
|
-
isStream:
|
|
206
|
+
isFunction: A,
|
|
207
|
+
isStream: Xt,
|
|
203
208
|
isURLSearchParams: Zt,
|
|
204
209
|
isTypedArray: fn,
|
|
205
210
|
isFileList: Qt,
|
|
206
|
-
forEach:
|
|
207
|
-
merge:
|
|
211
|
+
forEach: K,
|
|
212
|
+
merge: me,
|
|
208
213
|
extend: on,
|
|
209
214
|
trim: rn,
|
|
210
215
|
stripBOM: sn,
|
|
211
216
|
inherits: an,
|
|
212
217
|
toFlatObject: cn,
|
|
213
|
-
kindOf:
|
|
218
|
+
kindOf: ie,
|
|
214
219
|
kindOfTest: x,
|
|
215
220
|
endsWith: un,
|
|
216
221
|
toArray: ln,
|
|
217
222
|
forEachEntry: dn,
|
|
218
223
|
matchAll: pn,
|
|
219
224
|
isHTMLForm: hn,
|
|
220
|
-
hasOwnProperty:
|
|
221
|
-
hasOwnProp:
|
|
225
|
+
hasOwnProperty: Ue,
|
|
226
|
+
hasOwnProp: Ue,
|
|
222
227
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
223
|
-
reduceDescriptors:
|
|
228
|
+
reduceDescriptors: ct,
|
|
224
229
|
freezeMethods: wn,
|
|
225
230
|
toObjectSet: gn,
|
|
226
231
|
toCamelCase: mn,
|
|
227
232
|
noop: bn,
|
|
228
233
|
toFiniteNumber: En,
|
|
229
|
-
findKey:
|
|
230
|
-
global:
|
|
231
|
-
isContextDefined:
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
isAsyncFn: On,
|
|
237
|
-
isThenable: An,
|
|
234
|
+
findKey: it,
|
|
235
|
+
global: L,
|
|
236
|
+
isContextDefined: at,
|
|
237
|
+
isSpecCompliantForm: Sn,
|
|
238
|
+
toJSONObject: Rn,
|
|
239
|
+
isAsyncFn: Tn,
|
|
240
|
+
isThenable: On,
|
|
238
241
|
setImmediate: ut,
|
|
239
|
-
asap:
|
|
242
|
+
asap: An,
|
|
243
|
+
isIterable: _n
|
|
240
244
|
};
|
|
241
245
|
function y(e, t, n, r, o) {
|
|
242
246
|
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), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
@@ -289,24 +293,24 @@ y.from = (e, t, n, r, o, s) => {
|
|
|
289
293
|
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
|
|
290
294
|
};
|
|
291
295
|
const xn = null;
|
|
292
|
-
function
|
|
296
|
+
function ye(e) {
|
|
293
297
|
return a.isPlainObject(e) || a.isArray(e);
|
|
294
298
|
}
|
|
295
299
|
function dt(e) {
|
|
296
300
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
297
301
|
}
|
|
298
|
-
function
|
|
302
|
+
function Le(e, t, n) {
|
|
299
303
|
return e ? e.concat(t).map(function(o, s) {
|
|
300
304
|
return o = dt(o), !n && s ? "[" + o + "]" : o;
|
|
301
305
|
}).join(n ? "." : "") : t;
|
|
302
306
|
}
|
|
303
307
|
function Cn(e) {
|
|
304
|
-
return a.isArray(e) && !e.some(
|
|
308
|
+
return a.isArray(e) && !e.some(ye);
|
|
305
309
|
}
|
|
306
310
|
const kn = a.toFlatObject(a, {}, null, function(t) {
|
|
307
311
|
return /^is[A-Z]/.test(t);
|
|
308
312
|
});
|
|
309
|
-
function
|
|
313
|
+
function ce(e, t, n) {
|
|
310
314
|
if (!a.isObject(e))
|
|
311
315
|
throw new TypeError("target must be an object");
|
|
312
316
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -323,6 +327,8 @@ function ie(e, t, n) {
|
|
|
323
327
|
if (p === null) return "";
|
|
324
328
|
if (a.isDate(p))
|
|
325
329
|
return p.toISOString();
|
|
330
|
+
if (a.isBoolean(p))
|
|
331
|
+
return p.toString();
|
|
326
332
|
if (!f && a.isBlob(p))
|
|
327
333
|
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
328
334
|
return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
@@ -336,17 +342,17 @@ function ie(e, t, n) {
|
|
|
336
342
|
return m = dt(m), E.forEach(function(R, k) {
|
|
337
343
|
!(a.isUndefined(R) || R === null) && t.append(
|
|
338
344
|
// eslint-disable-next-line no-nested-ternary
|
|
339
|
-
i === !0 ?
|
|
345
|
+
i === !0 ? Le([m], k, s) : i === null ? m : m + "[]",
|
|
340
346
|
l(R)
|
|
341
347
|
);
|
|
342
348
|
}), !1;
|
|
343
349
|
}
|
|
344
|
-
return
|
|
350
|
+
return ye(p) ? !0 : (t.append(Le(h, m, s), l(p)), !1);
|
|
345
351
|
}
|
|
346
352
|
const d = [], w = Object.assign(kn, {
|
|
347
353
|
defaultVisitor: u,
|
|
348
354
|
convertValue: l,
|
|
349
|
-
isVisitable:
|
|
355
|
+
isVisitable: ye
|
|
350
356
|
});
|
|
351
357
|
function g(p, m) {
|
|
352
358
|
if (!a.isUndefined(p)) {
|
|
@@ -367,7 +373,7 @@ function ie(e, t, n) {
|
|
|
367
373
|
throw new TypeError("data must be an object");
|
|
368
374
|
return g(e), t;
|
|
369
375
|
}
|
|
370
|
-
function
|
|
376
|
+
function Ne(e) {
|
|
371
377
|
const t = {
|
|
372
378
|
"!": "%21",
|
|
373
379
|
"'": "%27",
|
|
@@ -381,17 +387,17 @@ function Ue(e) {
|
|
|
381
387
|
return t[r];
|
|
382
388
|
});
|
|
383
389
|
}
|
|
384
|
-
function
|
|
385
|
-
this._pairs = [], e &&
|
|
390
|
+
function xe(e, t) {
|
|
391
|
+
this._pairs = [], e && ce(e, this, t);
|
|
386
392
|
}
|
|
387
|
-
const pt =
|
|
393
|
+
const pt = xe.prototype;
|
|
388
394
|
pt.append = function(t, n) {
|
|
389
395
|
this._pairs.push([t, n]);
|
|
390
396
|
};
|
|
391
397
|
pt.toString = function(t) {
|
|
392
398
|
const n = t ? function(r) {
|
|
393
|
-
return t.call(this, r,
|
|
394
|
-
} :
|
|
399
|
+
return t.call(this, r, Ne);
|
|
400
|
+
} : Ne;
|
|
395
401
|
return this._pairs.map(function(o) {
|
|
396
402
|
return n(o[0]) + "=" + n(o[1]);
|
|
397
403
|
}, "").join("&");
|
|
@@ -408,13 +414,13 @@ function ht(e, t, n) {
|
|
|
408
414
|
});
|
|
409
415
|
const o = n && n.serialize;
|
|
410
416
|
let s;
|
|
411
|
-
if (o ? s = o(t, n) : s = a.isURLSearchParams(t) ? t.toString() : new
|
|
417
|
+
if (o ? s = o(t, n) : s = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(r), s) {
|
|
412
418
|
const i = e.indexOf("#");
|
|
413
419
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
414
420
|
}
|
|
415
421
|
return e;
|
|
416
422
|
}
|
|
417
|
-
class
|
|
423
|
+
class Fe {
|
|
418
424
|
constructor() {
|
|
419
425
|
this.handlers = [];
|
|
420
426
|
}
|
|
@@ -472,37 +478,38 @@ const mt = {
|
|
|
472
478
|
silentJSONParsing: !0,
|
|
473
479
|
forcedJSONParsing: !0,
|
|
474
480
|
clarifyTimeoutError: !1
|
|
475
|
-
},
|
|
481
|
+
}, Un = typeof URLSearchParams < "u" ? URLSearchParams : xe, Ln = typeof FormData < "u" ? FormData : null, Nn = typeof Blob < "u" ? Blob : null, Fn = {
|
|
476
482
|
isBrowser: !0,
|
|
477
483
|
classes: {
|
|
478
|
-
URLSearchParams:
|
|
479
|
-
FormData:
|
|
480
|
-
Blob:
|
|
484
|
+
URLSearchParams: Un,
|
|
485
|
+
FormData: Ln,
|
|
486
|
+
Blob: Nn
|
|
481
487
|
},
|
|
482
488
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
483
|
-
},
|
|
484
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", In =
|
|
489
|
+
}, Ce = typeof window < "u" && typeof document < "u", we = typeof navigator == "object" && navigator || void 0, Dn = Ce && (!we || ["ReactNative", "NativeScript", "NS"].indexOf(we.product) < 0), vn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
490
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", In = Ce && window.location.href || "http://localhost", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
485
491
|
__proto__: null,
|
|
486
|
-
hasBrowserEnv:
|
|
487
|
-
hasStandardBrowserEnv:
|
|
488
|
-
hasStandardBrowserWebWorkerEnv:
|
|
489
|
-
navigator:
|
|
492
|
+
hasBrowserEnv: Ce,
|
|
493
|
+
hasStandardBrowserEnv: Dn,
|
|
494
|
+
hasStandardBrowserWebWorkerEnv: vn,
|
|
495
|
+
navigator: we,
|
|
490
496
|
origin: In
|
|
491
497
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
492
498
|
...Bn,
|
|
493
|
-
...
|
|
499
|
+
...Fn
|
|
494
500
|
};
|
|
495
501
|
function jn(e, t) {
|
|
496
|
-
return
|
|
502
|
+
return ce(e, new T.classes.URLSearchParams(), {
|
|
497
503
|
visitor: function(n, r, o, s) {
|
|
498
504
|
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
499
|
-
}
|
|
500
|
-
|
|
505
|
+
},
|
|
506
|
+
...t
|
|
507
|
+
});
|
|
501
508
|
}
|
|
502
509
|
function qn(e) {
|
|
503
510
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
504
511
|
}
|
|
505
|
-
function
|
|
512
|
+
function Mn(e) {
|
|
506
513
|
const t = {}, n = Object.keys(e);
|
|
507
514
|
let r;
|
|
508
515
|
const o = n.length;
|
|
@@ -516,7 +523,7 @@ function yt(e) {
|
|
|
516
523
|
let i = n[s++];
|
|
517
524
|
if (i === "__proto__") return !0;
|
|
518
525
|
const c = Number.isFinite(+i), f = s >= n.length;
|
|
519
|
-
return i = !i && a.isArray(o) ? o.length : i, f ? (a.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !c) : ((!o[i] || !a.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && a.isArray(o[i]) && (o[i] =
|
|
526
|
+
return i = !i && a.isArray(o) ? o.length : i, f ? (a.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !c) : ((!o[i] || !a.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && a.isArray(o[i]) && (o[i] = Mn(o[i])), !c);
|
|
520
527
|
}
|
|
521
528
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
522
529
|
const n = {};
|
|
@@ -526,7 +533,7 @@ function yt(e) {
|
|
|
526
533
|
}
|
|
527
534
|
return null;
|
|
528
535
|
}
|
|
529
|
-
function
|
|
536
|
+
function Hn(e, t, n) {
|
|
530
537
|
if (a.isString(e))
|
|
531
538
|
try {
|
|
532
539
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -536,7 +543,7 @@ function Mn(e, t, n) {
|
|
|
536
543
|
}
|
|
537
544
|
return (n || JSON.stringify)(e);
|
|
538
545
|
}
|
|
539
|
-
const
|
|
546
|
+
const Q = {
|
|
540
547
|
transitional: mt,
|
|
541
548
|
adapter: ["xhr", "http", "fetch"],
|
|
542
549
|
transformRequest: [function(t, n) {
|
|
@@ -555,17 +562,17 @@ const W = {
|
|
|
555
562
|
return jn(t, this.formSerializer).toString();
|
|
556
563
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
557
564
|
const f = this.env && this.env.FormData;
|
|
558
|
-
return
|
|
565
|
+
return ce(
|
|
559
566
|
c ? { "files[]": t } : t,
|
|
560
567
|
f && new f(),
|
|
561
568
|
this.formSerializer
|
|
562
569
|
);
|
|
563
570
|
}
|
|
564
571
|
}
|
|
565
|
-
return s || o ? (n.setContentType("application/json", !1),
|
|
572
|
+
return s || o ? (n.setContentType("application/json", !1), Hn(t)) : t;
|
|
566
573
|
}],
|
|
567
574
|
transformResponse: [function(t) {
|
|
568
|
-
const n = this.transitional ||
|
|
575
|
+
const n = this.transitional || Q.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
569
576
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
570
577
|
return t;
|
|
571
578
|
if (t && a.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -603,7 +610,7 @@ const W = {
|
|
|
603
610
|
}
|
|
604
611
|
};
|
|
605
612
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
606
|
-
|
|
613
|
+
Q.headers[e] = {};
|
|
607
614
|
});
|
|
608
615
|
const $n = a.toObjectSet([
|
|
609
616
|
"age",
|
|
@@ -630,12 +637,12 @@ const $n = a.toObjectSet([
|
|
|
630
637
|
`).forEach(function(i) {
|
|
631
638
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && $n[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
632
639
|
}), t;
|
|
633
|
-
},
|
|
640
|
+
}, De = Symbol("internals");
|
|
634
641
|
function q(e) {
|
|
635
642
|
return e && String(e).trim().toLowerCase();
|
|
636
643
|
}
|
|
637
|
-
function
|
|
638
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
644
|
+
function Y(e) {
|
|
645
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Y) : String(e);
|
|
639
646
|
}
|
|
640
647
|
function Jn(e) {
|
|
641
648
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -645,7 +652,7 @@ function Jn(e) {
|
|
|
645
652
|
return t;
|
|
646
653
|
}
|
|
647
654
|
const Vn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
648
|
-
function
|
|
655
|
+
function de(e, t, n, r, o) {
|
|
649
656
|
if (a.isFunction(r))
|
|
650
657
|
return r.call(this, t, n);
|
|
651
658
|
if (o && (t = n), !!a.isString(t)) {
|
|
@@ -669,7 +676,7 @@ function Kn(e, t) {
|
|
|
669
676
|
});
|
|
670
677
|
});
|
|
671
678
|
}
|
|
672
|
-
let
|
|
679
|
+
let _ = class {
|
|
673
680
|
constructor(t) {
|
|
674
681
|
t && this.set(t);
|
|
675
682
|
}
|
|
@@ -680,17 +687,22 @@ let A = class {
|
|
|
680
687
|
if (!u)
|
|
681
688
|
throw new Error("header name must be a non-empty string");
|
|
682
689
|
const d = a.findKey(o, u);
|
|
683
|
-
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || f] =
|
|
690
|
+
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || f] = Y(c));
|
|
684
691
|
}
|
|
685
692
|
const i = (c, f) => a.forEach(c, (l, u) => s(l, u, f));
|
|
686
693
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
687
694
|
i(t, n);
|
|
688
695
|
else if (a.isString(t) && (t = t.trim()) && !Vn(t))
|
|
689
696
|
i(zn(t), n);
|
|
690
|
-
else if (a.
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
697
|
+
else if (a.isObject(t) && a.isIterable(t)) {
|
|
698
|
+
let c = {}, f, l;
|
|
699
|
+
for (const u of t) {
|
|
700
|
+
if (!a.isArray(u))
|
|
701
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
702
|
+
c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
703
|
+
}
|
|
704
|
+
i(c, n);
|
|
705
|
+
} else
|
|
694
706
|
t != null && s(n, t, r);
|
|
695
707
|
return this;
|
|
696
708
|
}
|
|
@@ -714,7 +726,7 @@ let A = class {
|
|
|
714
726
|
has(t, n) {
|
|
715
727
|
if (t = q(t), t) {
|
|
716
728
|
const r = a.findKey(this, t);
|
|
717
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
729
|
+
return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
|
|
718
730
|
}
|
|
719
731
|
return !1;
|
|
720
732
|
}
|
|
@@ -724,7 +736,7 @@ let A = class {
|
|
|
724
736
|
function s(i) {
|
|
725
737
|
if (i = q(i), i) {
|
|
726
738
|
const c = a.findKey(r, i);
|
|
727
|
-
c && (!n ||
|
|
739
|
+
c && (!n || de(r, r[c], c, n)) && (delete r[c], o = !0);
|
|
728
740
|
}
|
|
729
741
|
}
|
|
730
742
|
return a.isArray(t) ? t.forEach(s) : s(t), o;
|
|
@@ -734,7 +746,7 @@ let A = class {
|
|
|
734
746
|
let r = n.length, o = !1;
|
|
735
747
|
for (; r--; ) {
|
|
736
748
|
const s = n[r];
|
|
737
|
-
(!t ||
|
|
749
|
+
(!t || de(this, this[s], s, t, !0)) && (delete this[s], o = !0);
|
|
738
750
|
}
|
|
739
751
|
return o;
|
|
740
752
|
}
|
|
@@ -743,11 +755,11 @@ let A = class {
|
|
|
743
755
|
return a.forEach(this, (o, s) => {
|
|
744
756
|
const i = a.findKey(r, s);
|
|
745
757
|
if (i) {
|
|
746
|
-
n[i] =
|
|
758
|
+
n[i] = Y(o), delete n[s];
|
|
747
759
|
return;
|
|
748
760
|
}
|
|
749
761
|
const c = t ? Wn(s) : String(s).trim();
|
|
750
|
-
c !== s && delete n[s], n[c] =
|
|
762
|
+
c !== s && delete n[s], n[c] = Y(o), r[c] = !0;
|
|
751
763
|
}), this;
|
|
752
764
|
}
|
|
753
765
|
concat(...t) {
|
|
@@ -766,6 +778,9 @@ let A = class {
|
|
|
766
778
|
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
767
779
|
`);
|
|
768
780
|
}
|
|
781
|
+
getSetCookie() {
|
|
782
|
+
return this.get("set-cookie") || [];
|
|
783
|
+
}
|
|
769
784
|
get [Symbol.toStringTag]() {
|
|
770
785
|
return "AxiosHeaders";
|
|
771
786
|
}
|
|
@@ -777,7 +792,7 @@ let A = class {
|
|
|
777
792
|
return n.forEach((o) => r.set(o)), r;
|
|
778
793
|
}
|
|
779
794
|
static accessor(t) {
|
|
780
|
-
const r = (this[
|
|
795
|
+
const r = (this[De] = this[De] = {
|
|
781
796
|
accessors: {}
|
|
782
797
|
}).accessors, o = this.prototype;
|
|
783
798
|
function s(i) {
|
|
@@ -787,8 +802,8 @@ let A = class {
|
|
|
787
802
|
return a.isArray(t) ? t.forEach(s) : s(t), this;
|
|
788
803
|
}
|
|
789
804
|
};
|
|
790
|
-
|
|
791
|
-
a.reduceDescriptors(
|
|
805
|
+
_.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
806
|
+
a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
792
807
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
793
808
|
return {
|
|
794
809
|
get: () => e,
|
|
@@ -797,9 +812,9 @@ a.reduceDescriptors(A.prototype, ({ value: e }, t) => {
|
|
|
797
812
|
}
|
|
798
813
|
};
|
|
799
814
|
});
|
|
800
|
-
a.freezeMethods(
|
|
801
|
-
function
|
|
802
|
-
const n = this ||
|
|
815
|
+
a.freezeMethods(_);
|
|
816
|
+
function pe(e, t) {
|
|
817
|
+
const n = this || Q, r = t || n, o = _.from(r.headers);
|
|
803
818
|
let s = r.data;
|
|
804
819
|
return a.forEach(e, function(c) {
|
|
805
820
|
s = c.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
@@ -828,7 +843,7 @@ function Qn(e) {
|
|
|
828
843
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
829
844
|
return t && t[1] || "";
|
|
830
845
|
}
|
|
831
|
-
function
|
|
846
|
+
function Xn(e, t) {
|
|
832
847
|
e = e || 10;
|
|
833
848
|
const n = new Array(e), r = new Array(e);
|
|
834
849
|
let o = 0, s = 0, i;
|
|
@@ -844,10 +859,10 @@ function Gn(e, t) {
|
|
|
844
859
|
return g ? Math.round(w * 1e3 / g) : void 0;
|
|
845
860
|
};
|
|
846
861
|
}
|
|
847
|
-
function
|
|
862
|
+
function Gn(e, t) {
|
|
848
863
|
let n = 0, r = 1e3 / t, o, s;
|
|
849
864
|
const i = (l, u = Date.now()) => {
|
|
850
|
-
n = u, o = null, s && (clearTimeout(s), s = null), e
|
|
865
|
+
n = u, o = null, s && (clearTimeout(s), s = null), e(...l);
|
|
851
866
|
};
|
|
852
867
|
return [(...l) => {
|
|
853
868
|
const u = Date.now(), d = u - n;
|
|
@@ -856,10 +871,10 @@ function Xn(e, t) {
|
|
|
856
871
|
}, r - d)));
|
|
857
872
|
}, () => o && i(o)];
|
|
858
873
|
}
|
|
859
|
-
const
|
|
874
|
+
const re = (e, t, n = 3) => {
|
|
860
875
|
let r = 0;
|
|
861
|
-
const o =
|
|
862
|
-
return
|
|
876
|
+
const o = Xn(50, 250);
|
|
877
|
+
return Gn((s) => {
|
|
863
878
|
const i = s.loaded, c = s.lengthComputable ? s.total : void 0, f = i - r, l = o(f), u = i <= c;
|
|
864
879
|
r = i;
|
|
865
880
|
const d = {
|
|
@@ -875,7 +890,7 @@ const te = (e, t, n = 3) => {
|
|
|
875
890
|
};
|
|
876
891
|
e(d);
|
|
877
892
|
}, n);
|
|
878
|
-
},
|
|
893
|
+
}, ve = (e, t) => {
|
|
879
894
|
const n = e != null;
|
|
880
895
|
return [(r) => t[0]({
|
|
881
896
|
lengthComputable: n,
|
|
@@ -918,11 +933,12 @@ function er(e) {
|
|
|
918
933
|
function tr(e, t) {
|
|
919
934
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
920
935
|
}
|
|
921
|
-
function bt(e, t) {
|
|
922
|
-
|
|
936
|
+
function bt(e, t, n) {
|
|
937
|
+
let r = !er(t);
|
|
938
|
+
return e && (r || n == !1) ? tr(e, t) : t;
|
|
923
939
|
}
|
|
924
|
-
const Be = (e) => e instanceof
|
|
925
|
-
function
|
|
940
|
+
const Be = (e) => e instanceof _ ? { ...e } : e;
|
|
941
|
+
function F(e, t) {
|
|
926
942
|
t = t || {};
|
|
927
943
|
const n = {};
|
|
928
944
|
function r(l, u, d, w) {
|
|
@@ -981,15 +997,15 @@ function D(e, t) {
|
|
|
981
997
|
validateStatus: c,
|
|
982
998
|
headers: (l, u, d) => o(Be(l), Be(u), d, !0)
|
|
983
999
|
};
|
|
984
|
-
return a.forEach(Object.keys(
|
|
1000
|
+
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
985
1001
|
const d = f[u] || o, w = d(e[u], t[u], u);
|
|
986
1002
|
a.isUndefined(w) && d !== c || (n[u] = w);
|
|
987
1003
|
}), n;
|
|
988
1004
|
}
|
|
989
1005
|
const Et = (e) => {
|
|
990
|
-
const t =
|
|
1006
|
+
const t = F({}, e);
|
|
991
1007
|
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: c } = t;
|
|
992
|
-
t.headers = i =
|
|
1008
|
+
t.headers = i = _.from(i), t.url = ht(bt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
993
1009
|
"Authorization",
|
|
994
1010
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
995
1011
|
);
|
|
@@ -1011,7 +1027,7 @@ const Et = (e) => {
|
|
|
1011
1027
|
return new Promise(function(n, r) {
|
|
1012
1028
|
const o = Et(e);
|
|
1013
1029
|
let s = o.data;
|
|
1014
|
-
const i =
|
|
1030
|
+
const i = _.from(o.headers).normalize();
|
|
1015
1031
|
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = o, u, d, w, g, p;
|
|
1016
1032
|
function m() {
|
|
1017
1033
|
g && g(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u);
|
|
@@ -1021,7 +1037,7 @@ const Et = (e) => {
|
|
|
1021
1037
|
function E() {
|
|
1022
1038
|
if (!h)
|
|
1023
1039
|
return;
|
|
1024
|
-
const R =
|
|
1040
|
+
const R = _.from(
|
|
1025
1041
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1026
1042
|
), O = {
|
|
1027
1043
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
@@ -1031,10 +1047,10 @@ const Et = (e) => {
|
|
|
1031
1047
|
config: e,
|
|
1032
1048
|
request: h
|
|
1033
1049
|
};
|
|
1034
|
-
gt(function(
|
|
1035
|
-
n(
|
|
1036
|
-
}, function(
|
|
1037
|
-
r(
|
|
1050
|
+
gt(function(U) {
|
|
1051
|
+
n(U), m();
|
|
1052
|
+
}, function(U) {
|
|
1053
|
+
r(U), m();
|
|
1038
1054
|
}, O), h = null;
|
|
1039
1055
|
}
|
|
1040
1056
|
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
@@ -1054,7 +1070,7 @@ const Et = (e) => {
|
|
|
1054
1070
|
)), h = null;
|
|
1055
1071
|
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(k, O) {
|
|
1056
1072
|
h.setRequestHeader(O, k);
|
|
1057
|
-
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), l && ([w, p] =
|
|
1073
|
+
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), l && ([w, p] = re(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = re(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (u = (R) => {
|
|
1058
1074
|
h && (r(!R || R.type ? new j(null, e, h) : R), h.abort(), h = null);
|
|
1059
1075
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1060
1076
|
const S = Qn(o.url);
|
|
@@ -1144,7 +1160,7 @@ const Et = (e) => {
|
|
|
1144
1160
|
}, {
|
|
1145
1161
|
highWaterMark: 2
|
|
1146
1162
|
});
|
|
1147
|
-
},
|
|
1163
|
+
}, ue = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", St = ue && typeof ReadableStream == "function", cr = ue && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Rt = (e, ...t) => {
|
|
1148
1164
|
try {
|
|
1149
1165
|
return !!e(...t);
|
|
1150
1166
|
} catch {
|
|
@@ -1160,12 +1176,12 @@ const Et = (e) => {
|
|
|
1160
1176
|
}
|
|
1161
1177
|
}).headers.has("Content-Type");
|
|
1162
1178
|
return e && !t;
|
|
1163
|
-
}), qe = 64 * 1024,
|
|
1164
|
-
stream:
|
|
1179
|
+
}), qe = 64 * 1024, ge = St && Rt(() => a.isReadableStream(new Response("").body)), oe = {
|
|
1180
|
+
stream: ge && ((e) => e.body)
|
|
1165
1181
|
};
|
|
1166
|
-
|
|
1182
|
+
ue && ((e) => {
|
|
1167
1183
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1168
|
-
!
|
|
1184
|
+
!oe[t] && (oe[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1169
1185
|
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1170
1186
|
});
|
|
1171
1187
|
});
|
|
@@ -1187,7 +1203,7 @@ const lr = async (e) => {
|
|
|
1187
1203
|
}, fr = async (e, t) => {
|
|
1188
1204
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1189
1205
|
return n ?? lr(t);
|
|
1190
|
-
}, dr =
|
|
1206
|
+
}, dr = ue && (async (e) => {
|
|
1191
1207
|
let {
|
|
1192
1208
|
url: t,
|
|
1193
1209
|
method: n,
|
|
@@ -1216,11 +1232,11 @@ const lr = async (e) => {
|
|
|
1216
1232
|
duplex: "half"
|
|
1217
1233
|
}), P;
|
|
1218
1234
|
if (a.isFormData(r) && (P = O.headers.get("content-type")) && u.setContentType(P), O.body) {
|
|
1219
|
-
const [
|
|
1235
|
+
const [U, X] = ve(
|
|
1220
1236
|
h,
|
|
1221
|
-
|
|
1237
|
+
re(Ie(f))
|
|
1222
1238
|
);
|
|
1223
|
-
r = je(O.body, qe,
|
|
1239
|
+
r = je(O.body, qe, U, X);
|
|
1224
1240
|
}
|
|
1225
1241
|
}
|
|
1226
1242
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1234,30 +1250,30 @@ const lr = async (e) => {
|
|
|
1234
1250
|
duplex: "half",
|
|
1235
1251
|
credentials: E ? d : void 0
|
|
1236
1252
|
});
|
|
1237
|
-
let S = await fetch(p);
|
|
1238
|
-
const R =
|
|
1239
|
-
if (
|
|
1253
|
+
let S = await fetch(p, w);
|
|
1254
|
+
const R = ge && (l === "stream" || l === "response");
|
|
1255
|
+
if (ge && (c || R && m)) {
|
|
1240
1256
|
const O = {};
|
|
1241
|
-
["status", "statusText", "headers"].forEach((
|
|
1242
|
-
O[
|
|
1257
|
+
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1258
|
+
O[Pe] = S[Pe];
|
|
1243
1259
|
});
|
|
1244
|
-
const P = a.toFiniteNumber(S.headers.get("content-length")), [
|
|
1260
|
+
const P = a.toFiniteNumber(S.headers.get("content-length")), [U, X] = c && ve(
|
|
1245
1261
|
P,
|
|
1246
|
-
|
|
1262
|
+
re(Ie(c), !0)
|
|
1247
1263
|
) || [];
|
|
1248
1264
|
S = new Response(
|
|
1249
|
-
je(S.body, qe,
|
|
1250
|
-
|
|
1265
|
+
je(S.body, qe, U, () => {
|
|
1266
|
+
X && X(), m && m();
|
|
1251
1267
|
}),
|
|
1252
1268
|
O
|
|
1253
1269
|
);
|
|
1254
1270
|
}
|
|
1255
1271
|
l = l || "text";
|
|
1256
|
-
let k = await
|
|
1272
|
+
let k = await oe[a.findKey(oe, l) || "text"](S, e);
|
|
1257
1273
|
return !R && m && m(), await new Promise((O, P) => {
|
|
1258
1274
|
gt(O, P, {
|
|
1259
1275
|
data: k,
|
|
1260
|
-
headers:
|
|
1276
|
+
headers: _.from(S.headers),
|
|
1261
1277
|
status: S.status,
|
|
1262
1278
|
statusText: S.statusText,
|
|
1263
1279
|
config: e,
|
|
@@ -1265,19 +1281,19 @@ const lr = async (e) => {
|
|
|
1265
1281
|
});
|
|
1266
1282
|
});
|
|
1267
1283
|
} catch (E) {
|
|
1268
|
-
throw m && m(), E && E.name === "TypeError" && /fetch/i.test(E.message) ? Object.assign(
|
|
1284
|
+
throw m && m(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1269
1285
|
new y("Network Error", y.ERR_NETWORK, e, p),
|
|
1270
1286
|
{
|
|
1271
1287
|
cause: E.cause || E
|
|
1272
1288
|
}
|
|
1273
1289
|
) : y.from(E, E && E.code, e, p);
|
|
1274
1290
|
}
|
|
1275
|
-
}),
|
|
1291
|
+
}), be = {
|
|
1276
1292
|
http: xn,
|
|
1277
1293
|
xhr: rr,
|
|
1278
1294
|
fetch: dr
|
|
1279
1295
|
};
|
|
1280
|
-
a.forEach(
|
|
1296
|
+
a.forEach(be, (e, t) => {
|
|
1281
1297
|
if (e) {
|
|
1282
1298
|
try {
|
|
1283
1299
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1286,7 +1302,7 @@ a.forEach(ge, (e, t) => {
|
|
|
1286
1302
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1287
1303
|
}
|
|
1288
1304
|
});
|
|
1289
|
-
const
|
|
1305
|
+
const Me = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !1, Tt = {
|
|
1290
1306
|
getAdapter: (e) => {
|
|
1291
1307
|
e = a.isArray(e) ? e : [e];
|
|
1292
1308
|
const { length: t } = e;
|
|
@@ -1295,7 +1311,7 @@ const He = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1295
1311
|
for (let s = 0; s < t; s++) {
|
|
1296
1312
|
n = e[s];
|
|
1297
1313
|
let i;
|
|
1298
|
-
if (r = n, !pr(n) && (r =
|
|
1314
|
+
if (r = n, !pr(n) && (r = be[(i = String(n)).toLowerCase()], r === void 0))
|
|
1299
1315
|
throw new y(`Unknown adapter '${i}'`);
|
|
1300
1316
|
if (r)
|
|
1301
1317
|
break;
|
|
@@ -1306,8 +1322,8 @@ const He = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1306
1322
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1307
1323
|
);
|
|
1308
1324
|
let i = t ? s.length > 1 ? `since :
|
|
1309
|
-
` + s.map(
|
|
1310
|
-
`) : " " +
|
|
1325
|
+
` + s.map(Me).join(`
|
|
1326
|
+
`) : " " + Me(s[0]) : "as no adapter specified";
|
|
1311
1327
|
throw new y(
|
|
1312
1328
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1313
1329
|
"ERR_NOT_SUPPORT"
|
|
@@ -1315,38 +1331,38 @@ const He = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1315
1331
|
}
|
|
1316
1332
|
return r;
|
|
1317
1333
|
},
|
|
1318
|
-
adapters:
|
|
1334
|
+
adapters: be
|
|
1319
1335
|
};
|
|
1320
|
-
function
|
|
1336
|
+
function he(e) {
|
|
1321
1337
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1322
1338
|
throw new j(null, e);
|
|
1323
1339
|
}
|
|
1324
|
-
function
|
|
1325
|
-
return
|
|
1340
|
+
function He(e) {
|
|
1341
|
+
return he(e), e.headers = _.from(e.headers), e.data = pe.call(
|
|
1326
1342
|
e,
|
|
1327
1343
|
e.transformRequest
|
|
1328
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tt.getAdapter(e.adapter ||
|
|
1329
|
-
return
|
|
1344
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tt.getAdapter(e.adapter || Q.adapter)(e).then(function(r) {
|
|
1345
|
+
return he(e), r.data = pe.call(
|
|
1330
1346
|
e,
|
|
1331
1347
|
e.transformResponse,
|
|
1332
1348
|
r
|
|
1333
|
-
), r.headers =
|
|
1349
|
+
), r.headers = _.from(r.headers), r;
|
|
1334
1350
|
}, function(r) {
|
|
1335
|
-
return wt(r) || (
|
|
1351
|
+
return wt(r) || (he(e), r && r.response && (r.response.data = pe.call(
|
|
1336
1352
|
e,
|
|
1337
1353
|
e.transformResponse,
|
|
1338
1354
|
r.response
|
|
1339
|
-
), r.response.headers =
|
|
1355
|
+
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1340
1356
|
});
|
|
1341
1357
|
}
|
|
1342
|
-
const Ot = "1.
|
|
1358
|
+
const Ot = "1.11.0", le = {};
|
|
1343
1359
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1344
|
-
|
|
1360
|
+
le[e] = function(r) {
|
|
1345
1361
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1346
1362
|
};
|
|
1347
1363
|
});
|
|
1348
1364
|
const $e = {};
|
|
1349
|
-
|
|
1365
|
+
le.transitional = function(t, n, r) {
|
|
1350
1366
|
function o(s, i) {
|
|
1351
1367
|
return "[Axios v" + Ot + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
1352
1368
|
}
|
|
@@ -1359,7 +1375,7 @@ ce.transitional = function(t, n, r) {
|
|
|
1359
1375
|
return n && !$e[i] && ($e[i] = !0), t ? t(s, i, c) : !0;
|
|
1360
1376
|
};
|
|
1361
1377
|
};
|
|
1362
|
-
|
|
1378
|
+
le.spelling = function(t) {
|
|
1363
1379
|
return (n, r) => !0;
|
|
1364
1380
|
};
|
|
1365
1381
|
function hr(e, t, n) {
|
|
@@ -1379,15 +1395,15 @@ function hr(e, t, n) {
|
|
|
1379
1395
|
throw new y("Unknown option " + s, y.ERR_BAD_OPTION);
|
|
1380
1396
|
}
|
|
1381
1397
|
}
|
|
1382
|
-
const
|
|
1398
|
+
const ee = {
|
|
1383
1399
|
assertOptions: hr,
|
|
1384
|
-
validators:
|
|
1385
|
-
}, C =
|
|
1386
|
-
let
|
|
1400
|
+
validators: le
|
|
1401
|
+
}, C = ee.validators;
|
|
1402
|
+
let N = class {
|
|
1387
1403
|
constructor(t) {
|
|
1388
|
-
this.defaults = t, this.interceptors = {
|
|
1389
|
-
request: new
|
|
1390
|
-
response: new
|
|
1404
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1405
|
+
request: new Fe(),
|
|
1406
|
+
response: new Fe()
|
|
1391
1407
|
};
|
|
1392
1408
|
}
|
|
1393
1409
|
/**
|
|
@@ -1416,18 +1432,18 @@ let U = class {
|
|
|
1416
1432
|
}
|
|
1417
1433
|
}
|
|
1418
1434
|
_request(t, n) {
|
|
1419
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1435
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1420
1436
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1421
|
-
r !== void 0 &&
|
|
1437
|
+
r !== void 0 && ee.assertOptions(r, {
|
|
1422
1438
|
silentJSONParsing: C.transitional(C.boolean),
|
|
1423
1439
|
forcedJSONParsing: C.transitional(C.boolean),
|
|
1424
1440
|
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1425
1441
|
}, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
|
|
1426
1442
|
serialize: o
|
|
1427
|
-
} :
|
|
1443
|
+
} : ee.assertOptions(o, {
|
|
1428
1444
|
encode: C.function,
|
|
1429
1445
|
serialize: C.function
|
|
1430
|
-
}, !0)),
|
|
1446
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ee.assertOptions(n, {
|
|
1431
1447
|
baseUrl: C.spelling("baseURL"),
|
|
1432
1448
|
withXsrfToken: C.spelling("withXSRFToken")
|
|
1433
1449
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1440,7 +1456,7 @@ let U = class {
|
|
|
1440
1456
|
(p) => {
|
|
1441
1457
|
delete s[p];
|
|
1442
1458
|
}
|
|
1443
|
-
), n.headers =
|
|
1459
|
+
), n.headers = _.concat(i, s);
|
|
1444
1460
|
const c = [];
|
|
1445
1461
|
let f = !0;
|
|
1446
1462
|
this.interceptors.request.forEach(function(m) {
|
|
@@ -1452,8 +1468,8 @@ let U = class {
|
|
|
1452
1468
|
});
|
|
1453
1469
|
let u, d = 0, w;
|
|
1454
1470
|
if (!f) {
|
|
1455
|
-
const p = [
|
|
1456
|
-
for (p.unshift
|
|
1471
|
+
const p = [He.bind(this), void 0];
|
|
1472
|
+
for (p.unshift(...c), p.push(...l), w = p.length, u = Promise.resolve(n); d < w; )
|
|
1457
1473
|
u = u.then(p[d++], p[d++]);
|
|
1458
1474
|
return u;
|
|
1459
1475
|
}
|
|
@@ -1469,7 +1485,7 @@ let U = class {
|
|
|
1469
1485
|
}
|
|
1470
1486
|
}
|
|
1471
1487
|
try {
|
|
1472
|
-
u =
|
|
1488
|
+
u = He.call(this, g);
|
|
1473
1489
|
} catch (p) {
|
|
1474
1490
|
return Promise.reject(p);
|
|
1475
1491
|
}
|
|
@@ -1478,14 +1494,14 @@ let U = class {
|
|
|
1478
1494
|
return u;
|
|
1479
1495
|
}
|
|
1480
1496
|
getUri(t) {
|
|
1481
|
-
t =
|
|
1482
|
-
const n = bt(t.baseURL, t.url);
|
|
1497
|
+
t = F(this.defaults, t);
|
|
1498
|
+
const n = bt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1483
1499
|
return ht(n, t.params, t.paramsSerializer);
|
|
1484
1500
|
}
|
|
1485
1501
|
};
|
|
1486
1502
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1487
|
-
|
|
1488
|
-
return this.request(
|
|
1503
|
+
N.prototype[t] = function(n, r) {
|
|
1504
|
+
return this.request(F(r || {}, {
|
|
1489
1505
|
method: t,
|
|
1490
1506
|
url: n,
|
|
1491
1507
|
data: (r || {}).data
|
|
@@ -1495,7 +1511,7 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1495
1511
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1496
1512
|
function n(r) {
|
|
1497
1513
|
return function(s, i, c) {
|
|
1498
|
-
return this.request(
|
|
1514
|
+
return this.request(F(c || {}, {
|
|
1499
1515
|
method: t,
|
|
1500
1516
|
headers: r ? {
|
|
1501
1517
|
"Content-Type": "multipart/form-data"
|
|
@@ -1505,7 +1521,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1505
1521
|
}));
|
|
1506
1522
|
};
|
|
1507
1523
|
}
|
|
1508
|
-
|
|
1524
|
+
N.prototype[t] = n(), N.prototype[t + "Form"] = n(!0);
|
|
1509
1525
|
});
|
|
1510
1526
|
let mr = class At {
|
|
1511
1527
|
constructor(t) {
|
|
@@ -1588,7 +1604,7 @@ function yr(e) {
|
|
|
1588
1604
|
function wr(e) {
|
|
1589
1605
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1590
1606
|
}
|
|
1591
|
-
const
|
|
1607
|
+
const Ee = {
|
|
1592
1608
|
Continue: 100,
|
|
1593
1609
|
SwitchingProtocols: 101,
|
|
1594
1610
|
Processing: 102,
|
|
@@ -1653,22 +1669,22 @@ const be = {
|
|
|
1653
1669
|
NotExtended: 510,
|
|
1654
1670
|
NetworkAuthenticationRequired: 511
|
|
1655
1671
|
};
|
|
1656
|
-
Object.entries(
|
|
1657
|
-
|
|
1672
|
+
Object.entries(Ee).forEach(([e, t]) => {
|
|
1673
|
+
Ee[t] = e;
|
|
1658
1674
|
});
|
|
1659
1675
|
function _t(e) {
|
|
1660
|
-
const t = new
|
|
1661
|
-
return a.extend(n,
|
|
1662
|
-
return _t(
|
|
1676
|
+
const t = new N(e), n = nt(N.prototype.request, t);
|
|
1677
|
+
return a.extend(n, N.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1678
|
+
return _t(F(e, o));
|
|
1663
1679
|
}, n;
|
|
1664
1680
|
}
|
|
1665
|
-
const b = _t(
|
|
1666
|
-
b.Axios =
|
|
1681
|
+
const b = _t(Q);
|
|
1682
|
+
b.Axios = N;
|
|
1667
1683
|
b.CanceledError = j;
|
|
1668
1684
|
b.CancelToken = mr;
|
|
1669
1685
|
b.isCancel = wt;
|
|
1670
1686
|
b.VERSION = Ot;
|
|
1671
|
-
b.toFormData =
|
|
1687
|
+
b.toFormData = ce;
|
|
1672
1688
|
b.AxiosError = y;
|
|
1673
1689
|
b.Cancel = b.CanceledError;
|
|
1674
1690
|
b.all = function(t) {
|
|
@@ -1676,16 +1692,16 @@ b.all = function(t) {
|
|
|
1676
1692
|
};
|
|
1677
1693
|
b.spread = yr;
|
|
1678
1694
|
b.isAxiosError = wr;
|
|
1679
|
-
b.mergeConfig =
|
|
1680
|
-
b.AxiosHeaders =
|
|
1695
|
+
b.mergeConfig = F;
|
|
1696
|
+
b.AxiosHeaders = _;
|
|
1681
1697
|
b.formToJSON = (e) => yt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1682
1698
|
b.getAdapter = Tt.getAdapter;
|
|
1683
|
-
b.HttpStatusCode =
|
|
1699
|
+
b.HttpStatusCode = Ee;
|
|
1684
1700
|
b.default = b;
|
|
1685
1701
|
const {
|
|
1686
1702
|
Axios: Qr,
|
|
1687
|
-
AxiosError:
|
|
1688
|
-
CanceledError:
|
|
1703
|
+
AxiosError: Xr,
|
|
1704
|
+
CanceledError: Gr,
|
|
1689
1705
|
isCancel: Zr,
|
|
1690
1706
|
CancelToken: Yr,
|
|
1691
1707
|
VERSION: eo,
|
|
@@ -1701,7 +1717,7 @@ const {
|
|
|
1701
1717
|
mergeConfig: lo
|
|
1702
1718
|
} = b;
|
|
1703
1719
|
/*! js-cookie v3.0.5 | MIT */
|
|
1704
|
-
function
|
|
1720
|
+
function G(e) {
|
|
1705
1721
|
for (var t = 1; t < arguments.length; t++) {
|
|
1706
1722
|
var n = arguments[t];
|
|
1707
1723
|
for (var r in n)
|
|
@@ -1720,10 +1736,10 @@ var gr = {
|
|
|
1720
1736
|
);
|
|
1721
1737
|
}
|
|
1722
1738
|
};
|
|
1723
|
-
function
|
|
1739
|
+
function Se(e, t) {
|
|
1724
1740
|
function n(o, s, i) {
|
|
1725
1741
|
if (!(typeof document > "u")) {
|
|
1726
|
-
i =
|
|
1742
|
+
i = G({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), o = encodeURIComponent(o).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
1727
1743
|
var c = "";
|
|
1728
1744
|
for (var f in i)
|
|
1729
1745
|
i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
|
|
@@ -1752,16 +1768,16 @@ function Ee(e, t) {
|
|
|
1752
1768
|
n(
|
|
1753
1769
|
o,
|
|
1754
1770
|
"",
|
|
1755
|
-
|
|
1771
|
+
G({}, s, {
|
|
1756
1772
|
expires: -1
|
|
1757
1773
|
})
|
|
1758
1774
|
);
|
|
1759
1775
|
},
|
|
1760
1776
|
withAttributes: function(o) {
|
|
1761
|
-
return
|
|
1777
|
+
return Se(this.converter, G({}, this.attributes, o));
|
|
1762
1778
|
},
|
|
1763
1779
|
withConverter: function(o) {
|
|
1764
|
-
return
|
|
1780
|
+
return Se(G({}, this.converter, o), this.attributes);
|
|
1765
1781
|
}
|
|
1766
1782
|
},
|
|
1767
1783
|
{
|
|
@@ -1770,12 +1786,12 @@ function Ee(e, t) {
|
|
|
1770
1786
|
}
|
|
1771
1787
|
);
|
|
1772
1788
|
}
|
|
1773
|
-
var br =
|
|
1774
|
-
const xt = typeof window < "u", Er = (e) => typeof e == "string", Je = () => +Date.now(),
|
|
1789
|
+
var br = Se(gr, { path: "/" }), ze;
|
|
1790
|
+
const xt = typeof window < "u", Er = (e) => typeof e == "string", Je = () => +Date.now(), Re = () => {
|
|
1775
1791
|
};
|
|
1776
1792
|
xt && ((ze = window == null ? void 0 : window.navigator) != null && ze.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1777
|
-
function
|
|
1778
|
-
return typeof e == "function" ? e() :
|
|
1793
|
+
function ke(e) {
|
|
1794
|
+
return typeof e == "function" ? e() : Nt(e);
|
|
1779
1795
|
}
|
|
1780
1796
|
function Sr(e, t) {
|
|
1781
1797
|
function n(...r) {
|
|
@@ -1786,12 +1802,12 @@ function Sr(e, t) {
|
|
|
1786
1802
|
return n;
|
|
1787
1803
|
}
|
|
1788
1804
|
function Rr(e, t = !0, n = !0, r = !1) {
|
|
1789
|
-
let o = 0, s, i = !0, c =
|
|
1805
|
+
let o = 0, s, i = !0, c = Re, f;
|
|
1790
1806
|
const l = () => {
|
|
1791
|
-
s && (clearTimeout(s), s = void 0, c(), c =
|
|
1807
|
+
s && (clearTimeout(s), s = void 0, c(), c = Re);
|
|
1792
1808
|
};
|
|
1793
1809
|
return (d) => {
|
|
1794
|
-
const w =
|
|
1810
|
+
const w = ke(e), g = Date.now() - o, p = () => f = d();
|
|
1795
1811
|
return l(), w <= 0 ? (o = Date.now(), p()) : (g > w && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1796
1812
|
c = r ? h : m, s = setTimeout(() => {
|
|
1797
1813
|
o = Date.now(), i = !0, m(p()), l();
|
|
@@ -1803,22 +1819,22 @@ function Tr(e) {
|
|
|
1803
1819
|
return e;
|
|
1804
1820
|
}
|
|
1805
1821
|
function Or(e) {
|
|
1806
|
-
return
|
|
1822
|
+
return Ft() ? (Dt(e), !0) : !1;
|
|
1807
1823
|
}
|
|
1808
1824
|
function Ar(e) {
|
|
1809
1825
|
var t;
|
|
1810
|
-
const n =
|
|
1826
|
+
const n = ke(e);
|
|
1811
1827
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1812
1828
|
}
|
|
1813
1829
|
const Ct = xt ? window : void 0;
|
|
1814
1830
|
function Ve(...e) {
|
|
1815
1831
|
let t, n, r, o;
|
|
1816
1832
|
if (Er(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Ct) : [t, n, r, o] = e, !t)
|
|
1817
|
-
return
|
|
1833
|
+
return Re;
|
|
1818
1834
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1819
1835
|
const s = [], i = () => {
|
|
1820
1836
|
s.forEach((u) => u()), s.length = 0;
|
|
1821
|
-
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f =
|
|
1837
|
+
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Oe(() => [Ar(t), ke(o)], ([u, d]) => {
|
|
1822
1838
|
i(), u && s.push(...n.flatMap((w) => r.map((g) => c(u, w, g, d))));
|
|
1823
1839
|
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1824
1840
|
f(), i();
|
|
@@ -1835,7 +1851,7 @@ function Cr(e = xr, t = {}) {
|
|
|
1835
1851
|
events: o = _r,
|
|
1836
1852
|
window: s = Ct,
|
|
1837
1853
|
eventFilter: i = Rr(50)
|
|
1838
|
-
} = t, c =
|
|
1854
|
+
} = t, c = ne(n), f = ne(Je());
|
|
1839
1855
|
let l;
|
|
1840
1856
|
const u = Sr(i, () => {
|
|
1841
1857
|
c.value = !1, f.value = Je(), clearTimeout(l), l = setTimeout(() => c.value = !0, e);
|
|
@@ -1854,15 +1870,15 @@ var Qe;
|
|
|
1854
1870
|
(function(e) {
|
|
1855
1871
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1856
1872
|
})(Qe || (Qe = {}));
|
|
1857
|
-
var kr = Object.defineProperty,
|
|
1873
|
+
var kr = Object.defineProperty, Xe = Object.getOwnPropertySymbols, Pr = Object.prototype.hasOwnProperty, Ur = Object.prototype.propertyIsEnumerable, Ge = (e, t, n) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Lr = (e, t) => {
|
|
1858
1874
|
for (var n in t || (t = {}))
|
|
1859
|
-
Pr.call(t, n) &&
|
|
1860
|
-
if (
|
|
1861
|
-
for (var n of
|
|
1862
|
-
|
|
1875
|
+
Pr.call(t, n) && Ge(e, n, t[n]);
|
|
1876
|
+
if (Xe)
|
|
1877
|
+
for (var n of Xe(t))
|
|
1878
|
+
Ur.call(t, n) && Ge(e, n, t[n]);
|
|
1863
1879
|
return e;
|
|
1864
1880
|
};
|
|
1865
|
-
const
|
|
1881
|
+
const Nr = {
|
|
1866
1882
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
1867
1883
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
1868
1884
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -1888,12 +1904,12 @@ const Ur = {
|
|
|
1888
1904
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
1889
1905
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1890
1906
|
};
|
|
1891
|
-
|
|
1907
|
+
Lr({
|
|
1892
1908
|
linear: Tr
|
|
1893
|
-
},
|
|
1894
|
-
let
|
|
1895
|
-
const kt = { triggerProxySso: "triggerProxySso" },
|
|
1896
|
-
|
|
1909
|
+
}, Nr);
|
|
1910
|
+
let Te;
|
|
1911
|
+
const kt = { triggerProxySso: "triggerProxySso" }, Fr = () => {
|
|
1912
|
+
Te = (e) => {
|
|
1897
1913
|
var n;
|
|
1898
1914
|
const { origin: t } = new URL(location.href);
|
|
1899
1915
|
(n = window.top) == null || n.postMessage(
|
|
@@ -1901,13 +1917,13 @@ const kt = { triggerProxySso: "triggerProxySso" }, Dr = () => {
|
|
|
1901
1917
|
t
|
|
1902
1918
|
);
|
|
1903
1919
|
};
|
|
1904
|
-
},
|
|
1920
|
+
}, Dr = (e) => {
|
|
1905
1921
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1906
1922
|
const { type: n, data: r } = t.data;
|
|
1907
1923
|
n === kt.triggerProxySso && (e == null || e(r));
|
|
1908
1924
|
});
|
|
1909
1925
|
};
|
|
1910
|
-
window.top !== window.self &&
|
|
1926
|
+
window.top !== window.self && Fr();
|
|
1911
1927
|
let Pt = (e = 21) => {
|
|
1912
1928
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1913
1929
|
for (; e--; ) {
|
|
@@ -1916,48 +1932,48 @@ let Pt = (e = 21) => {
|
|
|
1916
1932
|
}
|
|
1917
1933
|
return t;
|
|
1918
1934
|
};
|
|
1919
|
-
const
|
|
1935
|
+
const te = (e) => new URL(location.href).searchParams.get(e), I = {
|
|
1920
1936
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1921
1937
|
// 重定向到登录页
|
|
1922
1938
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1923
1939
|
// 清除登录信息
|
|
1924
1940
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1925
1941
|
// 通过code获取token
|
|
1926
|
-
}, { baseURL: Ze, noRedireLogin:
|
|
1942
|
+
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Ae(), $ = location.origin + "/home", v = {
|
|
1927
1943
|
response_type: "code",
|
|
1928
1944
|
scope: "sever",
|
|
1929
1945
|
client_id: "sys",
|
|
1930
|
-
client_secret:
|
|
1946
|
+
client_secret: vt("das123"),
|
|
1931
1947
|
state: +/* @__PURE__ */ new Date()
|
|
1932
1948
|
}, Ye = (e) => {
|
|
1933
1949
|
const t = new URL(window.location.href), n = new URLSearchParams(t.search);
|
|
1934
1950
|
e.forEach((r) => {
|
|
1935
1951
|
n.delete(r);
|
|
1936
1952
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
1937
|
-
},
|
|
1953
|
+
}, Ut = ne(!1), Lt = (e) => {
|
|
1938
1954
|
if (e <= 0) return;
|
|
1939
1955
|
const { idle: t } = Cr(e);
|
|
1940
|
-
|
|
1956
|
+
Oe(
|
|
1941
1957
|
() => t.value,
|
|
1942
1958
|
(n) => {
|
|
1943
|
-
n === !0 && (
|
|
1959
|
+
n === !0 && (Ut.value = !0);
|
|
1944
1960
|
}
|
|
1945
1961
|
);
|
|
1946
1962
|
};
|
|
1947
|
-
localStorage.getItem("idelTime") &&
|
|
1963
|
+
localStorage.getItem("idelTime") && Lt(Number(localStorage.getItem("idelTime")));
|
|
1948
1964
|
let et = "";
|
|
1949
1965
|
const Ir = async () => {
|
|
1950
|
-
const e =
|
|
1951
|
-
if (!e) return
|
|
1966
|
+
const e = te("code") || "", t = te("redirect_url") || "", n = te("kingdee_token") || "";
|
|
1967
|
+
if (!e) return D();
|
|
1952
1968
|
if (e === et)
|
|
1953
|
-
return Ye(["code", "state", "kingdee_token", "redirect_url"]), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))),
|
|
1969
|
+
return Ye(["code", "state", "kingdee_token", "redirect_url"]), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), D();
|
|
1954
1970
|
et = e, Ye(["code", "state", "kingdee_token", "redirect_url"]);
|
|
1955
1971
|
let r = {};
|
|
1956
1972
|
const o = {
|
|
1957
1973
|
grant_type: "authorization_code",
|
|
1958
1974
|
code: e,
|
|
1959
|
-
client_id:
|
|
1960
|
-
client_secret:
|
|
1975
|
+
client_id: v.client_id,
|
|
1976
|
+
client_secret: v.client_secret,
|
|
1961
1977
|
redirect_uri: $,
|
|
1962
1978
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1963
1979
|
nonce: Pt()
|
|
@@ -1988,34 +2004,34 @@ const Ir = async () => {
|
|
|
1988
2004
|
};
|
|
1989
2005
|
J().save(l), await tt(s);
|
|
1990
2006
|
const u = Number(f) - (/* @__PURE__ */ new Date()).getTime();
|
|
1991
|
-
return u && u > 0 && (
|
|
2007
|
+
return u && u > 0 && (Lt(u), u && localStorage.setItem("idelTime", u.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), s;
|
|
1992
2008
|
} catch {
|
|
1993
|
-
return z({ ...
|
|
2009
|
+
return z({ ...v, redirect_uri: $ });
|
|
1994
2010
|
}
|
|
1995
|
-
},
|
|
2011
|
+
}, M = ne(!1), fo = async (e) => {
|
|
1996
2012
|
if (e.public) return "";
|
|
1997
|
-
if (
|
|
1998
|
-
if (
|
|
2013
|
+
if (Ut.value) return z({ ...v, redirect_uri: $ });
|
|
2014
|
+
if (M.value)
|
|
1999
2015
|
return await new Promise(async (o) => {
|
|
2000
|
-
|
|
2001
|
-
() =>
|
|
2016
|
+
Oe(
|
|
2017
|
+
() => M.value,
|
|
2002
2018
|
(s) => {
|
|
2003
2019
|
if (!s) {
|
|
2004
|
-
const i =
|
|
2020
|
+
const i = D();
|
|
2005
2021
|
o(i);
|
|
2006
2022
|
}
|
|
2007
2023
|
}
|
|
2008
2024
|
);
|
|
2009
2025
|
});
|
|
2010
|
-
const { accessTokenExpiredAt: t } = J().getData(), n =
|
|
2011
|
-
if ((!
|
|
2012
|
-
return z({ ...
|
|
2013
|
-
let r =
|
|
2014
|
-
|
|
2026
|
+
const { accessTokenExpiredAt: t } = J().getData(), n = te("code") || "";
|
|
2027
|
+
if ((!D() || t === 0) && !n)
|
|
2028
|
+
return z({ ...v, redirect_uri: $ });
|
|
2029
|
+
let r = D();
|
|
2030
|
+
M.value = !0;
|
|
2015
2031
|
try {
|
|
2016
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await qr(
|
|
2032
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await qr(v)), r = await Ir(), M.value = !1;
|
|
2017
2033
|
} catch {
|
|
2018
|
-
|
|
2034
|
+
M.value = !1;
|
|
2019
2035
|
}
|
|
2020
2036
|
return r;
|
|
2021
2037
|
}, Br = () => {
|
|
@@ -2027,9 +2043,9 @@ const Ir = async () => {
|
|
|
2027
2043
|
localStorage.removeItem("thirdLogouSource"), location.href = r;
|
|
2028
2044
|
}
|
|
2029
2045
|
}, z = (e) => {
|
|
2030
|
-
if (
|
|
2031
|
-
const { baseURL: t, ssoLocale: n } =
|
|
2032
|
-
if (
|
|
2046
|
+
if (vr) return;
|
|
2047
|
+
const { baseURL: t, ssoLocale: n } = Ae();
|
|
2048
|
+
if (Te) return Te(e);
|
|
2033
2049
|
e.logout = "true", n && (e.locale = "locale");
|
|
2034
2050
|
const r = Object.keys(e).filter((s) => s !== "client_secret").map((s) => `${s}=${e[s]}`).join("&"), o = `${t}${I.oauth}?${r}`;
|
|
2035
2051
|
if (localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove(), Br())
|
|
@@ -2042,9 +2058,9 @@ const Ir = async () => {
|
|
|
2042
2058
|
window.__isAutoCloseApp = !1, location.replace(o);
|
|
2043
2059
|
}
|
|
2044
2060
|
};
|
|
2045
|
-
|
|
2061
|
+
Dr(z);
|
|
2046
2062
|
const qr = async (e) => {
|
|
2047
|
-
const { baseURL: t } =
|
|
2063
|
+
const { baseURL: t } = Ae(), { refreshToken: n } = J().getData();
|
|
2048
2064
|
try {
|
|
2049
2065
|
await b.create().get(I.token, { baseURL: t });
|
|
2050
2066
|
} catch {
|
|
@@ -2076,9 +2092,9 @@ const qr = async (e) => {
|
|
|
2076
2092
|
}
|
|
2077
2093
|
}, J = () => ({
|
|
2078
2094
|
getData: () => ({
|
|
2079
|
-
accessToken:
|
|
2080
|
-
accessTokenExpiredAt:
|
|
2081
|
-
refreshToken:
|
|
2095
|
+
accessToken: D(),
|
|
2096
|
+
accessTokenExpiredAt: fe("accessTokenExpiredAt") ? Number(fe("accessTokenExpiredAt")) : "",
|
|
2097
|
+
refreshToken: fe("refreshToken")
|
|
2082
2098
|
}),
|
|
2083
2099
|
save: (e) => {
|
|
2084
2100
|
Bt(
|
|
@@ -2094,10 +2110,10 @@ const qr = async (e) => {
|
|
|
2094
2110
|
}
|
|
2095
2111
|
});
|
|
2096
2112
|
export {
|
|
2097
|
-
|
|
2113
|
+
te as getQuery,
|
|
2098
2114
|
fo as getToken,
|
|
2099
2115
|
Ir as getTokenFromCode,
|
|
2100
|
-
|
|
2116
|
+
v as getTokenParams,
|
|
2101
2117
|
z as login,
|
|
2102
2118
|
$ as real_uri,
|
|
2103
2119
|
J as tokenStorage
|