@das-fed/utils 7.0.2-beta.4 → 7.0.2-beta.4.1
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/i18n/index.js.gz +0 -0
- package/api-services/index.js +560 -541
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +350 -331
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +880 -843
- 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 +880 -843
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +356 -337
- 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 +880 -843
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1022 -985
- 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 +919 -882
- 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 +880 -843
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +880 -843
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +867 -830
- 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 +880 -843
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +731 -716
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +352 -333
- 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 +834 -833
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +874 -841
- 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/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/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/common-tools/get-url-params/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 +590 -574
- 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/directive/auth/index.js.gz +0 -0
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/nextTiken/index.js.gz +0 -0
- package/package.json +4 -4
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +1 -1
- package/style/index.js.gz +0 -0
- package/use-low-code/index.js.gz +0 -0
- package/vue/hooks/use-model-value/index.d.ts +5 -1
- package/webSocket-service/index.js.gz +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { unref as
|
|
1
|
+
import { unref as Lt, getCurrentScope as Ft, onScopeDispose as Dt, ref as ee, watch as Oe } from "vue";
|
|
2
2
|
import { encryption as vt } from "@das-fed/utils/atob";
|
|
3
|
-
import { getConfig as
|
|
4
|
-
import { getAccessToken as
|
|
3
|
+
import { getConfig as Ae } from "@das-fed/utils/config";
|
|
4
|
+
import { getAccessToken as M, removeAccessToken as Bt, setAccessToken as It, 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,75 +9,87 @@ 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, oe = /* @__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) => oe(t) === e), ie = (e) => (t) => typeof t === e, { isArray: v } = Array, H = ie("undefined");
|
|
16
|
+
function z(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 st = 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 && st(e.buffer), t;
|
|
23
23
|
}
|
|
24
|
-
const
|
|
25
|
-
if (
|
|
24
|
+
const $t = ie("string"), A = ie("function"), ot = ie("number"), J = (e) => e !== null && typeof e == "object", zt = (e) => e === !0 || e === !1, G = (e) => {
|
|
25
|
+
if (oe(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 (!J(e) || z(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) => J(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 = oe(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
42
|
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
35
43
|
if (e === null || typeof e > "u")
|
|
36
44
|
return;
|
|
37
|
-
let r,
|
|
38
|
-
if (typeof e != "object" && (e = [e]),
|
|
39
|
-
for (r = 0,
|
|
45
|
+
let r, s;
|
|
46
|
+
if (typeof e != "object" && (e = [e]), v(e))
|
|
47
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
40
48
|
t.call(null, e[r], r, e);
|
|
41
49
|
else {
|
|
42
|
-
|
|
50
|
+
if (z(e))
|
|
51
|
+
return;
|
|
52
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
43
53
|
let c;
|
|
44
54
|
for (r = 0; r < i; r++)
|
|
45
|
-
c =
|
|
55
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
46
56
|
}
|
|
47
57
|
}
|
|
48
|
-
function
|
|
58
|
+
function it(e, t) {
|
|
59
|
+
if (z(e))
|
|
60
|
+
return null;
|
|
49
61
|
t = t.toLowerCase();
|
|
50
62
|
const n = Object.keys(e);
|
|
51
|
-
let r = n.length,
|
|
63
|
+
let r = n.length, s;
|
|
52
64
|
for (; r-- > 0; )
|
|
53
|
-
if (
|
|
54
|
-
return
|
|
65
|
+
if (s = n[r], t === s.toLowerCase())
|
|
66
|
+
return s;
|
|
55
67
|
return null;
|
|
56
68
|
}
|
|
57
|
-
const
|
|
58
|
-
function
|
|
59
|
-
const { caseless: e } =
|
|
60
|
-
const
|
|
61
|
-
G(t[
|
|
69
|
+
const U = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, at = (e) => !H(e) && e !== U;
|
|
70
|
+
function me() {
|
|
71
|
+
const { caseless: e } = at(this) && this || {}, t = {}, n = (r, s) => {
|
|
72
|
+
const o = e && it(t, s) || s;
|
|
73
|
+
G(t[o]) && G(r) ? t[o] = me(t[o], r) : G(r) ? t[o] = me({}, r) : v(r) ? t[o] = r.slice() : t[o] = r;
|
|
62
74
|
};
|
|
63
|
-
for (let r = 0,
|
|
75
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
64
76
|
arguments[r] && V(arguments[r], n);
|
|
65
77
|
return t;
|
|
66
78
|
}
|
|
67
|
-
const
|
|
68
|
-
n &&
|
|
69
|
-
}, { allOwnKeys: r }), e),
|
|
79
|
+
const sn = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
80
|
+
n && A(s) ? e[o] = nt(s, n) : e[o] = s;
|
|
81
|
+
}, { allOwnKeys: r }), e), on = (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
|
|
72
84
|
}), n && Object.assign(e.prototype, n);
|
|
73
85
|
}, cn = (e, t, n, r) => {
|
|
74
|
-
let
|
|
86
|
+
let s, o, i;
|
|
75
87
|
const c = {};
|
|
76
88
|
if (t = t || {}, e == null) return t;
|
|
77
89
|
do {
|
|
78
|
-
for (
|
|
79
|
-
i = o
|
|
80
|
-
e = n !== !1 &&
|
|
90
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
91
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
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) => {
|
|
@@ -86,19 +98,19 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
|
86
98
|
return r !== -1 && r === n;
|
|
87
99
|
}, ln = (e) => {
|
|
88
100
|
if (!e) return null;
|
|
89
|
-
if (
|
|
101
|
+
if (v(e)) return e;
|
|
90
102
|
let t = e.length;
|
|
91
103
|
if (!ot(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[
|
|
98
|
-
let
|
|
99
|
-
for (; (
|
|
100
|
-
const
|
|
101
|
-
t.call(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);
|
|
110
|
+
let s;
|
|
111
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
112
|
+
const o = s.value;
|
|
113
|
+
t.call(e, o[0], o[1]);
|
|
102
114
|
}
|
|
103
115
|
}, pn = (e, t) => {
|
|
104
116
|
let n;
|
|
@@ -108,21 +120,21 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
|
108
120
|
return r;
|
|
109
121
|
}, hn = x("HTMLFormElement"), mn = (e) => e.toLowerCase().replace(
|
|
110
122
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
111
|
-
function(n, r,
|
|
112
|
-
return r.toUpperCase() +
|
|
123
|
+
function(n, r, s) {
|
|
124
|
+
return r.toUpperCase() + s;
|
|
113
125
|
}
|
|
114
|
-
),
|
|
126
|
+
), Ne = (({ 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
|
-
V(n, (
|
|
128
|
+
V(n, (s, o) => {
|
|
117
129
|
let i;
|
|
118
|
-
(i = t(
|
|
130
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
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;
|
|
@@ -133,113 +145,105 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (o, s) => {
|
|
|
133
145
|
}
|
|
134
146
|
});
|
|
135
147
|
}, gn = (e, t) => {
|
|
136
|
-
const n = {}, r = (
|
|
137
|
-
|
|
138
|
-
n[
|
|
148
|
+
const n = {}, r = (s) => {
|
|
149
|
+
s.forEach((o) => {
|
|
150
|
+
n[o] = !0;
|
|
139
151
|
});
|
|
140
152
|
};
|
|
141
|
-
return
|
|
153
|
+
return v(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
|
-
DIGIT: Ne,
|
|
145
|
-
ALPHA: le,
|
|
146
|
-
ALPHA_DIGIT: le + le.toUpperCase() + Ne
|
|
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
|
-
};
|
|
155
|
+
}, En = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
154
156
|
function Rn(e) {
|
|
155
|
-
return !!(e &&
|
|
157
|
+
return !!(e && A(e.append) && e[rt] === "FormData" && e[se]);
|
|
156
158
|
}
|
|
157
|
-
const
|
|
158
|
-
const t = new Array(10), n = (r,
|
|
159
|
-
if (
|
|
159
|
+
const Sn = (e) => {
|
|
160
|
+
const t = new Array(10), n = (r, s) => {
|
|
161
|
+
if (J(r)) {
|
|
160
162
|
if (t.indexOf(r) >= 0)
|
|
161
163
|
return;
|
|
164
|
+
if (z(r))
|
|
165
|
+
return r;
|
|
162
166
|
if (!("toJSON" in r)) {
|
|
163
|
-
t[
|
|
164
|
-
const
|
|
167
|
+
t[s] = r;
|
|
168
|
+
const o = v(r) ? [] : {};
|
|
165
169
|
return V(r, (i, c) => {
|
|
166
|
-
const f = n(i,
|
|
167
|
-
!
|
|
168
|
-
}), t[
|
|
170
|
+
const f = n(i, s + 1);
|
|
171
|
+
!H(f) && (o[c] = f);
|
|
172
|
+
}), t[s] = void 0, o;
|
|
169
173
|
}
|
|
170
174
|
}
|
|
171
175
|
return r;
|
|
172
176
|
};
|
|
173
177
|
return n(e, 0);
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
}, !1), (
|
|
177
|
-
r.push(
|
|
178
|
+
}, Tn = x("AsyncFunction"), On = (e) => e && (J(e) || A(e)) && A(e.then) && A(e.catch), ut = ((e, t) => e ? setImmediate : t ? ((n, r) => (U.addEventListener("message", ({ source: s, data: o }) => {
|
|
179
|
+
s === U && o === n && r.length && r.shift()();
|
|
180
|
+
}, !1), (s) => {
|
|
181
|
+
r.push(s), U.postMessage(n, "*");
|
|
178
182
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
179
183
|
typeof setImmediate == "function",
|
|
180
|
-
|
|
181
|
-
),
|
|
182
|
-
isArray:
|
|
183
|
-
isArrayBuffer:
|
|
184
|
-
isBuffer:
|
|
185
|
-
isFormData:
|
|
186
|
-
isArrayBufferView:
|
|
187
|
-
isString:
|
|
184
|
+
A(U.postMessage)
|
|
185
|
+
), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(U) : typeof process < "u" && process.nextTick || ut, _n = (e) => e != null && A(e[se]), a = {
|
|
186
|
+
isArray: v,
|
|
187
|
+
isArrayBuffer: st,
|
|
188
|
+
isBuffer: z,
|
|
189
|
+
isFormData: Gt,
|
|
190
|
+
isArrayBufferView: Ht,
|
|
191
|
+
isString: $t,
|
|
188
192
|
isNumber: ot,
|
|
189
|
-
isBoolean:
|
|
190
|
-
isObject:
|
|
193
|
+
isBoolean: zt,
|
|
194
|
+
isObject: J,
|
|
191
195
|
isPlainObject: G,
|
|
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
211
|
forEach: V,
|
|
207
|
-
merge:
|
|
208
|
-
extend:
|
|
212
|
+
merge: me,
|
|
213
|
+
extend: sn,
|
|
209
214
|
trim: rn,
|
|
210
|
-
stripBOM:
|
|
215
|
+
stripBOM: on,
|
|
211
216
|
inherits: an,
|
|
212
217
|
toFlatObject: cn,
|
|
213
|
-
kindOf:
|
|
218
|
+
kindOf: oe,
|
|
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: Ne,
|
|
226
|
+
hasOwnProp: Ne,
|
|
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
|
-
ALPHABET: ct,
|
|
233
|
-
generateString: Sn,
|
|
234
|
+
findKey: it,
|
|
235
|
+
global: U,
|
|
236
|
+
isContextDefined: at,
|
|
234
237
|
isSpecCompliantForm: Rn,
|
|
235
|
-
toJSONObject:
|
|
236
|
-
isAsyncFn:
|
|
237
|
-
isThenable:
|
|
238
|
+
toJSONObject: Sn,
|
|
239
|
+
isAsyncFn: Tn,
|
|
240
|
+
isThenable: On,
|
|
238
241
|
setImmediate: ut,
|
|
239
|
-
asap:
|
|
242
|
+
asap: An,
|
|
243
|
+
isIterable: _n
|
|
240
244
|
};
|
|
241
|
-
function y(e, t, n, r,
|
|
242
|
-
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),
|
|
245
|
+
function y(e, t, n, r, s) {
|
|
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), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
243
247
|
}
|
|
244
248
|
a.inherits(y, Error, {
|
|
245
249
|
toJSON: function() {
|
|
@@ -282,31 +286,31 @@ const lt = y.prototype, ft = {};
|
|
|
282
286
|
});
|
|
283
287
|
Object.defineProperties(y, ft);
|
|
284
288
|
Object.defineProperty(lt, "isAxiosError", { value: !0 });
|
|
285
|
-
y.from = (e, t, n, r,
|
|
289
|
+
y.from = (e, t, n, r, s, o) => {
|
|
286
290
|
const i = Object.create(lt);
|
|
287
291
|
return a.toFlatObject(e, i, function(f) {
|
|
288
292
|
return f !== Error.prototype;
|
|
289
|
-
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r,
|
|
293
|
+
}, (c) => c !== "isAxiosError"), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), 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
|
|
299
|
-
return e ? e.concat(t).map(function(
|
|
300
|
-
return
|
|
302
|
+
function Ue(e, t, n) {
|
|
303
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
304
|
+
return s = dt(s), !n && o ? "[" + s + "]" : s;
|
|
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 ae(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, {
|
|
@@ -316,13 +320,15 @@ function ie(e, t, n) {
|
|
|
316
320
|
}, !1, function(m, h) {
|
|
317
321
|
return !a.isUndefined(h[m]);
|
|
318
322
|
});
|
|
319
|
-
const r = n.metaTokens,
|
|
320
|
-
if (!a.isFunction(
|
|
323
|
+
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
324
|
+
if (!a.isFunction(s))
|
|
321
325
|
throw new TypeError("visitor must be a function");
|
|
322
326
|
function l(p) {
|
|
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;
|
|
@@ -333,33 +339,33 @@ function ie(e, t, n) {
|
|
|
333
339
|
if (a.endsWith(m, "{}"))
|
|
334
340
|
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
335
341
|
else if (a.isArray(p) && Cn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
|
|
336
|
-
return m = dt(m), E.forEach(function(
|
|
337
|
-
!(a.isUndefined(
|
|
342
|
+
return m = dt(m), E.forEach(function(S, k) {
|
|
343
|
+
!(a.isUndefined(S) || S === null) && t.append(
|
|
338
344
|
// eslint-disable-next-line no-nested-ternary
|
|
339
|
-
i === !0 ?
|
|
340
|
-
l(
|
|
345
|
+
i === !0 ? Ue([m], k, o) : i === null ? m : m + "[]",
|
|
346
|
+
l(S)
|
|
341
347
|
);
|
|
342
348
|
}), !1;
|
|
343
349
|
}
|
|
344
|
-
return
|
|
350
|
+
return ye(p) ? !0 : (t.append(Ue(h, m, o), 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)) {
|
|
353
359
|
if (d.indexOf(p) !== -1)
|
|
354
360
|
throw Error("Circular reference detected in " + m.join("."));
|
|
355
|
-
d.push(p), a.forEach(p, function(E,
|
|
356
|
-
(!(a.isUndefined(E) || E === null) &&
|
|
361
|
+
d.push(p), a.forEach(p, function(E, R) {
|
|
362
|
+
(!(a.isUndefined(E) || E === null) && s.call(
|
|
357
363
|
t,
|
|
358
364
|
E,
|
|
359
|
-
a.isString(
|
|
365
|
+
a.isString(R) ? R.trim() : R,
|
|
360
366
|
m,
|
|
361
367
|
w
|
|
362
|
-
)) === !0 && g(E, m ? m.concat(
|
|
368
|
+
)) === !0 && g(E, m ? m.concat(R) : [R]);
|
|
363
369
|
}), d.pop();
|
|
364
370
|
}
|
|
365
371
|
}
|
|
@@ -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 Le(e) {
|
|
371
377
|
const t = {
|
|
372
378
|
"!": "%21",
|
|
373
379
|
"'": "%27",
|
|
@@ -381,19 +387,19 @@ 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 && ae(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
|
-
} :
|
|
395
|
-
return this._pairs.map(function(
|
|
396
|
-
return n(
|
|
399
|
+
return t.call(this, r, Le);
|
|
400
|
+
} : Le;
|
|
401
|
+
return this._pairs.map(function(s) {
|
|
402
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
397
403
|
}, "").join("&");
|
|
398
404
|
};
|
|
399
405
|
function Pn(e) {
|
|
@@ -406,15 +412,15 @@ function ht(e, t, n) {
|
|
|
406
412
|
a.isFunction(n) && (n = {
|
|
407
413
|
serialize: n
|
|
408
414
|
});
|
|
409
|
-
const
|
|
410
|
-
let
|
|
411
|
-
if (
|
|
415
|
+
const s = n && n.serialize;
|
|
416
|
+
let o;
|
|
417
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new xe(t, n).toString(r), o) {
|
|
412
418
|
const i = e.indexOf("#");
|
|
413
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") +
|
|
419
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
414
420
|
}
|
|
415
421
|
return e;
|
|
416
422
|
}
|
|
417
|
-
class
|
|
423
|
+
class Fe {
|
|
418
424
|
constructor() {
|
|
419
425
|
this.handlers = [];
|
|
420
426
|
}
|
|
@@ -472,61 +478,62 @@ const mt = {
|
|
|
472
478
|
silentJSONParsing: !0,
|
|
473
479
|
forcedJSONParsing: !0,
|
|
474
480
|
clarifyTimeoutError: !1
|
|
475
|
-
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
481
|
+
}, Nn = typeof URLSearchParams < "u" ? URLSearchParams : xe, Un = typeof FormData < "u" ? FormData : null, Ln = typeof Blob < "u" ? Blob : null, Fn = {
|
|
476
482
|
isBrowser: !0,
|
|
477
483
|
classes: {
|
|
478
484
|
URLSearchParams: Nn,
|
|
479
|
-
FormData:
|
|
480
|
-
Blob:
|
|
485
|
+
FormData: Un,
|
|
486
|
+
Blob: Ln
|
|
481
487
|
},
|
|
482
488
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
483
|
-
},
|
|
484
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Bn =
|
|
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", Bn = Ce && window.location.href || "http://localhost", In = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
485
491
|
__proto__: null,
|
|
486
|
-
hasBrowserEnv:
|
|
487
|
-
hasStandardBrowserEnv:
|
|
492
|
+
hasBrowserEnv: Ce,
|
|
493
|
+
hasStandardBrowserEnv: Dn,
|
|
488
494
|
hasStandardBrowserWebWorkerEnv: vn,
|
|
489
|
-
navigator:
|
|
495
|
+
navigator: we,
|
|
490
496
|
origin: Bn
|
|
491
497
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
492
498
|
...In,
|
|
493
|
-
...
|
|
499
|
+
...Fn
|
|
494
500
|
};
|
|
495
501
|
function jn(e, t) {
|
|
496
|
-
return
|
|
497
|
-
visitor: function(n, r,
|
|
498
|
-
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) :
|
|
499
|
-
}
|
|
500
|
-
|
|
502
|
+
return ae(e, new T.classes.URLSearchParams(), {
|
|
503
|
+
visitor: function(n, r, s, o) {
|
|
504
|
+
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
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
|
-
const
|
|
509
|
-
let
|
|
510
|
-
for (r = 0; r <
|
|
511
|
-
|
|
515
|
+
const s = n.length;
|
|
516
|
+
let o;
|
|
517
|
+
for (r = 0; r < s; r++)
|
|
518
|
+
o = n[r], t[o] = e[o];
|
|
512
519
|
return t;
|
|
513
520
|
}
|
|
514
521
|
function yt(e) {
|
|
515
|
-
function t(n, r,
|
|
516
|
-
let i = n[
|
|
522
|
+
function t(n, r, s, o) {
|
|
523
|
+
let i = n[o++];
|
|
517
524
|
if (i === "__proto__") return !0;
|
|
518
|
-
const c = Number.isFinite(+i), f =
|
|
519
|
-
return i = !i && a.isArray(
|
|
525
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
526
|
+
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] = Mn(s[i])), !c);
|
|
520
527
|
}
|
|
521
528
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
522
529
|
const n = {};
|
|
523
|
-
return a.forEachEntry(e, (r,
|
|
524
|
-
t(qn(r),
|
|
530
|
+
return a.forEachEntry(e, (r, s) => {
|
|
531
|
+
t(qn(r), s, n, 0);
|
|
525
532
|
}), n;
|
|
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);
|
|
@@ -540,9 +547,9 @@ const W = {
|
|
|
540
547
|
transitional: mt,
|
|
541
548
|
adapter: ["xhr", "http", "fetch"],
|
|
542
549
|
transformRequest: [function(t, n) {
|
|
543
|
-
const r = n.getContentType() || "",
|
|
544
|
-
if (
|
|
545
|
-
return
|
|
550
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
551
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
552
|
+
return s ? JSON.stringify(yt(t)) : t;
|
|
546
553
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
547
554
|
return t;
|
|
548
555
|
if (a.isArrayBufferView(t))
|
|
@@ -550,26 +557,26 @@ const W = {
|
|
|
550
557
|
if (a.isURLSearchParams(t))
|
|
551
558
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
552
559
|
let c;
|
|
553
|
-
if (
|
|
560
|
+
if (o) {
|
|
554
561
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
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 ae(
|
|
559
566
|
c ? { "files[]": t } : t,
|
|
560
567
|
f && new f(),
|
|
561
568
|
this.formSerializer
|
|
562
569
|
);
|
|
563
570
|
}
|
|
564
571
|
}
|
|
565
|
-
return
|
|
572
|
+
return o || s ? (n.setContentType("application/json", !1), Hn(t)) : t;
|
|
566
573
|
}],
|
|
567
574
|
transformResponse: [function(t) {
|
|
568
|
-
const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing,
|
|
575
|
+
const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
569
576
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
570
577
|
return t;
|
|
571
|
-
if (t && a.isString(t) && (r && !this.responseType ||
|
|
572
|
-
const i = !(n && n.silentJSONParsing) &&
|
|
578
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
579
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
573
580
|
try {
|
|
574
581
|
return JSON.parse(t);
|
|
575
582
|
} catch (c) {
|
|
@@ -625,17 +632,17 @@ const $n = a.toObjectSet([
|
|
|
625
632
|
"user-agent"
|
|
626
633
|
]), zn = (e) => {
|
|
627
634
|
const t = {};
|
|
628
|
-
let n, r,
|
|
635
|
+
let n, r, s;
|
|
629
636
|
return e && e.split(`
|
|
630
637
|
`).forEach(function(i) {
|
|
631
|
-
|
|
638
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 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
|
-
},
|
|
634
|
-
function
|
|
640
|
+
}, De = Symbol("internals");
|
|
641
|
+
function I(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 Z(e) {
|
|
645
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Z) : String(e);
|
|
639
646
|
}
|
|
640
647
|
function Jn(e) {
|
|
641
648
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -645,10 +652,10 @@ 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, s) {
|
|
649
656
|
if (a.isFunction(r))
|
|
650
657
|
return r.call(this, t, n);
|
|
651
|
-
if (
|
|
658
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
652
659
|
if (a.isString(r))
|
|
653
660
|
return t.indexOf(r) !== -1;
|
|
654
661
|
if (a.isRegExp(r))
|
|
@@ -662,92 +669,97 @@ function Kn(e, t) {
|
|
|
662
669
|
const n = a.toCamelCase(" " + t);
|
|
663
670
|
["get", "set", "has"].forEach((r) => {
|
|
664
671
|
Object.defineProperty(e, r + n, {
|
|
665
|
-
value: function(
|
|
666
|
-
return this[r].call(this, t,
|
|
672
|
+
value: function(s, o, i) {
|
|
673
|
+
return this[r].call(this, t, s, o, i);
|
|
667
674
|
},
|
|
668
675
|
configurable: !0
|
|
669
676
|
});
|
|
670
677
|
});
|
|
671
678
|
}
|
|
672
|
-
let
|
|
679
|
+
let _ = class {
|
|
673
680
|
constructor(t) {
|
|
674
681
|
t && this.set(t);
|
|
675
682
|
}
|
|
676
683
|
set(t, n, r) {
|
|
677
|
-
const
|
|
678
|
-
function
|
|
679
|
-
const u =
|
|
684
|
+
const s = this;
|
|
685
|
+
function o(c, f, l) {
|
|
686
|
+
const u = I(f);
|
|
680
687
|
if (!u)
|
|
681
688
|
throw new Error("header name must be a non-empty string");
|
|
682
|
-
const d = a.findKey(
|
|
683
|
-
(!d ||
|
|
689
|
+
const d = a.findKey(s, u);
|
|
690
|
+
(!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = Z(c));
|
|
684
691
|
}
|
|
685
|
-
const i = (c, f) => a.forEach(c, (l, u) =>
|
|
692
|
+
const i = (c, f) => a.forEach(c, (l, u) => o(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
|
-
|
|
694
|
-
|
|
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
|
|
706
|
+
t != null && o(n, t, r);
|
|
695
707
|
return this;
|
|
696
708
|
}
|
|
697
709
|
get(t, n) {
|
|
698
|
-
if (t =
|
|
710
|
+
if (t = I(t), t) {
|
|
699
711
|
const r = a.findKey(this, t);
|
|
700
712
|
if (r) {
|
|
701
|
-
const
|
|
713
|
+
const s = this[r];
|
|
702
714
|
if (!n)
|
|
703
|
-
return
|
|
715
|
+
return s;
|
|
704
716
|
if (n === !0)
|
|
705
|
-
return Jn(
|
|
717
|
+
return Jn(s);
|
|
706
718
|
if (a.isFunction(n))
|
|
707
|
-
return n.call(this,
|
|
719
|
+
return n.call(this, s, r);
|
|
708
720
|
if (a.isRegExp(n))
|
|
709
|
-
return n.exec(
|
|
721
|
+
return n.exec(s);
|
|
710
722
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
711
723
|
}
|
|
712
724
|
}
|
|
713
725
|
}
|
|
714
726
|
has(t, n) {
|
|
715
|
-
if (t =
|
|
727
|
+
if (t = I(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
|
}
|
|
721
733
|
delete(t, n) {
|
|
722
734
|
const r = this;
|
|
723
|
-
let
|
|
724
|
-
function
|
|
725
|
-
if (i =
|
|
735
|
+
let s = !1;
|
|
736
|
+
function o(i) {
|
|
737
|
+
if (i = I(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], s = !0);
|
|
728
740
|
}
|
|
729
741
|
}
|
|
730
|
-
return a.isArray(t) ? t.forEach(
|
|
742
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
731
743
|
}
|
|
732
744
|
clear(t) {
|
|
733
745
|
const n = Object.keys(this);
|
|
734
|
-
let r = n.length,
|
|
746
|
+
let r = n.length, s = !1;
|
|
735
747
|
for (; r--; ) {
|
|
736
|
-
const
|
|
737
|
-
(!t ||
|
|
748
|
+
const o = n[r];
|
|
749
|
+
(!t || de(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
738
750
|
}
|
|
739
|
-
return
|
|
751
|
+
return s;
|
|
740
752
|
}
|
|
741
753
|
normalize(t) {
|
|
742
754
|
const n = this, r = {};
|
|
743
|
-
return a.forEach(this, (
|
|
744
|
-
const i = a.findKey(r,
|
|
755
|
+
return a.forEach(this, (s, o) => {
|
|
756
|
+
const i = a.findKey(r, o);
|
|
745
757
|
if (i) {
|
|
746
|
-
n[i] =
|
|
758
|
+
n[i] = Z(s), delete n[o];
|
|
747
759
|
return;
|
|
748
760
|
}
|
|
749
|
-
const c = t ? Wn(
|
|
750
|
-
c !==
|
|
761
|
+
const c = t ? Wn(o) : String(o).trim();
|
|
762
|
+
c !== o && delete n[o], n[c] = Z(s), r[c] = !0;
|
|
751
763
|
}), this;
|
|
752
764
|
}
|
|
753
765
|
concat(...t) {
|
|
@@ -755,8 +767,8 @@ let A = class {
|
|
|
755
767
|
}
|
|
756
768
|
toJSON(t) {
|
|
757
769
|
const n = /* @__PURE__ */ Object.create(null);
|
|
758
|
-
return a.forEach(this, (r,
|
|
759
|
-
r != null && r !== !1 && (n[
|
|
770
|
+
return a.forEach(this, (r, s) => {
|
|
771
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
760
772
|
}), n;
|
|
761
773
|
}
|
|
762
774
|
[Symbol.iterator]() {
|
|
@@ -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
|
}
|
|
@@ -774,21 +789,21 @@ let A = class {
|
|
|
774
789
|
}
|
|
775
790
|
static concat(t, ...n) {
|
|
776
791
|
const r = new this(t);
|
|
777
|
-
return n.forEach((
|
|
792
|
+
return n.forEach((s) => r.set(s)), r;
|
|
778
793
|
}
|
|
779
794
|
static accessor(t) {
|
|
780
|
-
const r = (this[
|
|
795
|
+
const r = (this[De] = this[De] = {
|
|
781
796
|
accessors: {}
|
|
782
|
-
}).accessors,
|
|
783
|
-
function
|
|
784
|
-
const c =
|
|
785
|
-
r[c] || (Kn(
|
|
797
|
+
}).accessors, s = this.prototype;
|
|
798
|
+
function o(i) {
|
|
799
|
+
const c = I(i);
|
|
800
|
+
r[c] || (Kn(s, i), r[c] = !0);
|
|
786
801
|
}
|
|
787
|
-
return a.isArray(t) ? t.forEach(
|
|
802
|
+
return a.isArray(t) ? t.forEach(o) : o(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,21 +812,21 @@ a.reduceDescriptors(A.prototype, ({ value: e }, t) => {
|
|
|
797
812
|
}
|
|
798
813
|
};
|
|
799
814
|
});
|
|
800
|
-
a.freezeMethods(
|
|
801
|
-
function
|
|
802
|
-
const n = this || W, r = t || n,
|
|
803
|
-
let
|
|
815
|
+
a.freezeMethods(_);
|
|
816
|
+
function pe(e, t) {
|
|
817
|
+
const n = this || W, r = t || n, s = _.from(r.headers);
|
|
818
|
+
let o = r.data;
|
|
804
819
|
return a.forEach(e, function(c) {
|
|
805
|
-
|
|
806
|
-
}),
|
|
820
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
821
|
+
}), s.normalize(), o;
|
|
807
822
|
}
|
|
808
823
|
function wt(e) {
|
|
809
824
|
return !!(e && e.__CANCEL__);
|
|
810
825
|
}
|
|
811
|
-
function
|
|
826
|
+
function B(e, t, n) {
|
|
812
827
|
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
813
828
|
}
|
|
814
|
-
a.inherits(
|
|
829
|
+
a.inherits(B, y, {
|
|
815
830
|
__CANCEL__: !0
|
|
816
831
|
});
|
|
817
832
|
function gt(e, t, n) {
|
|
@@ -828,39 +843,39 @@ 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
|
-
let
|
|
849
|
+
let s = 0, o = 0, i;
|
|
835
850
|
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
836
|
-
const l = Date.now(), u = r[
|
|
837
|
-
i || (i = l), n[
|
|
838
|
-
let d =
|
|
839
|
-
for (; d !==
|
|
851
|
+
const l = Date.now(), u = r[o];
|
|
852
|
+
i || (i = l), n[s] = f, r[s] = l;
|
|
853
|
+
let d = o, w = 0;
|
|
854
|
+
for (; d !== s; )
|
|
840
855
|
w += n[d++], d = d % e;
|
|
841
|
-
if (
|
|
856
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
842
857
|
return;
|
|
843
858
|
const g = u && l - u;
|
|
844
859
|
return g ? Math.round(w * 1e3 / g) : void 0;
|
|
845
860
|
};
|
|
846
861
|
}
|
|
847
|
-
function
|
|
848
|
-
let n = 0, r = 1e3 / t,
|
|
862
|
+
function Gn(e, t) {
|
|
863
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
849
864
|
const i = (l, u = Date.now()) => {
|
|
850
|
-
n = u,
|
|
865
|
+
n = u, s = null, o && (clearTimeout(o), o = null), e(...l);
|
|
851
866
|
};
|
|
852
867
|
return [(...l) => {
|
|
853
868
|
const u = Date.now(), d = u - n;
|
|
854
|
-
d >= r ? i(l, u) : (
|
|
855
|
-
|
|
869
|
+
d >= r ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
|
870
|
+
o = null, i(s);
|
|
856
871
|
}, r - d)));
|
|
857
|
-
}, () =>
|
|
872
|
+
}, () => s && i(s)];
|
|
858
873
|
}
|
|
859
874
|
const te = (e, t, n = 3) => {
|
|
860
875
|
let r = 0;
|
|
861
|
-
const
|
|
862
|
-
return
|
|
863
|
-
const i =
|
|
876
|
+
const s = Xn(50, 250);
|
|
877
|
+
return Gn((o) => {
|
|
878
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), u = i <= c;
|
|
864
879
|
r = i;
|
|
865
880
|
const d = {
|
|
866
881
|
loaded: i,
|
|
@@ -869,7 +884,7 @@ const te = (e, t, n = 3) => {
|
|
|
869
884
|
bytes: f,
|
|
870
885
|
rate: l || void 0,
|
|
871
886
|
estimated: l && c && u ? (c - i) / l : void 0,
|
|
872
|
-
event:
|
|
887
|
+
event: o,
|
|
873
888
|
lengthComputable: c != null,
|
|
874
889
|
[t ? "download" : "upload"]: !0
|
|
875
890
|
};
|
|
@@ -888,9 +903,9 @@ const te = (e, t, n = 3) => {
|
|
|
888
903
|
) : () => !0, Yn = T.hasStandardBrowserEnv ? (
|
|
889
904
|
// Standard browser envs support document.cookie
|
|
890
905
|
{
|
|
891
|
-
write(e, t, n, r,
|
|
906
|
+
write(e, t, n, r, s, o) {
|
|
892
907
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
893
|
-
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(
|
|
908
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === !0 && i.push("secure"), document.cookie = i.join("; ");
|
|
894
909
|
},
|
|
895
910
|
read(e) {
|
|
896
911
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -918,23 +933,24 @@ 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 Ie = (e) => e instanceof
|
|
925
|
-
function
|
|
940
|
+
const Ie = (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) {
|
|
929
945
|
return a.isPlainObject(l) && a.isPlainObject(u) ? a.merge.call({ caseless: w }, l, u) : a.isPlainObject(u) ? a.merge({}, u) : a.isArray(u) ? u.slice() : u;
|
|
930
946
|
}
|
|
931
|
-
function
|
|
947
|
+
function s(l, u, d, w) {
|
|
932
948
|
if (a.isUndefined(u)) {
|
|
933
949
|
if (!a.isUndefined(l))
|
|
934
950
|
return r(void 0, l, d, w);
|
|
935
951
|
} else return r(l, u, d, w);
|
|
936
952
|
}
|
|
937
|
-
function
|
|
953
|
+
function o(l, u) {
|
|
938
954
|
if (!a.isUndefined(u))
|
|
939
955
|
return r(void 0, u);
|
|
940
956
|
}
|
|
@@ -951,9 +967,9 @@ function D(e, t) {
|
|
|
951
967
|
return r(void 0, l);
|
|
952
968
|
}
|
|
953
969
|
const f = {
|
|
954
|
-
url:
|
|
955
|
-
method:
|
|
956
|
-
data:
|
|
970
|
+
url: o,
|
|
971
|
+
method: o,
|
|
972
|
+
data: o,
|
|
957
973
|
baseURL: i,
|
|
958
974
|
transformRequest: i,
|
|
959
975
|
transformResponse: i,
|
|
@@ -979,17 +995,17 @@ function D(e, t) {
|
|
|
979
995
|
socketPath: i,
|
|
980
996
|
responseEncoding: i,
|
|
981
997
|
validateStatus: c,
|
|
982
|
-
headers: (l, u, d) =>
|
|
998
|
+
headers: (l, u, d) => s(Ie(l), Ie(u), d, !0)
|
|
983
999
|
};
|
|
984
|
-
return a.forEach(Object.keys(
|
|
985
|
-
const d = f[u] ||
|
|
1000
|
+
return a.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1001
|
+
const d = f[u] || s, 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 =
|
|
991
|
-
let { data: n, withXSRFToken: r, xsrfHeaderName:
|
|
992
|
-
t.headers = i =
|
|
1006
|
+
const t = F({}, e);
|
|
1007
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
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
|
);
|
|
@@ -1003,31 +1019,31 @@ const Et = (e) => {
|
|
|
1003
1019
|
}
|
|
1004
1020
|
}
|
|
1005
1021
|
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Zn(t.url))) {
|
|
1006
|
-
const l =
|
|
1007
|
-
l && i.set(
|
|
1022
|
+
const l = s && o && Yn.read(o);
|
|
1023
|
+
l && i.set(s, l);
|
|
1008
1024
|
}
|
|
1009
1025
|
return t;
|
|
1010
1026
|
}, nr = typeof XMLHttpRequest < "u", rr = nr && function(e) {
|
|
1011
1027
|
return new Promise(function(n, r) {
|
|
1012
|
-
const
|
|
1013
|
-
let
|
|
1014
|
-
const i =
|
|
1015
|
-
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } =
|
|
1028
|
+
const s = Et(e);
|
|
1029
|
+
let o = s.data;
|
|
1030
|
+
const i = _.from(s.headers).normalize();
|
|
1031
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, g, p;
|
|
1016
1032
|
function m() {
|
|
1017
|
-
g && g(), p && p(),
|
|
1033
|
+
g && g(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
1018
1034
|
}
|
|
1019
1035
|
let h = new XMLHttpRequest();
|
|
1020
|
-
h.open(
|
|
1036
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
1021
1037
|
function E() {
|
|
1022
1038
|
if (!h)
|
|
1023
1039
|
return;
|
|
1024
|
-
const
|
|
1040
|
+
const S = _.from(
|
|
1025
1041
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1026
1042
|
), O = {
|
|
1027
1043
|
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1028
1044
|
status: h.status,
|
|
1029
1045
|
statusText: h.statusText,
|
|
1030
|
-
headers:
|
|
1046
|
+
headers: S,
|
|
1031
1047
|
config: e,
|
|
1032
1048
|
request: h
|
|
1033
1049
|
};
|
|
@@ -1044,61 +1060,61 @@ const Et = (e) => {
|
|
|
1044
1060
|
}, h.onerror = function() {
|
|
1045
1061
|
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1046
1062
|
}, h.ontimeout = function() {
|
|
1047
|
-
let k =
|
|
1048
|
-
const O =
|
|
1049
|
-
|
|
1063
|
+
let k = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1064
|
+
const O = s.transitional || mt;
|
|
1065
|
+
s.timeoutErrorMessage && (k = s.timeoutErrorMessage), r(new y(
|
|
1050
1066
|
k,
|
|
1051
1067
|
O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
1052
1068
|
e,
|
|
1053
1069
|
h
|
|
1054
1070
|
)), h = null;
|
|
1055
|
-
},
|
|
1071
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(k, O) {
|
|
1056
1072
|
h.setRequestHeader(O, k);
|
|
1057
|
-
}), a.isUndefined(
|
|
1058
|
-
h && (r(!
|
|
1059
|
-
},
|
|
1060
|
-
const
|
|
1061
|
-
if (
|
|
1062
|
-
r(new y("Unsupported protocol " +
|
|
1073
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] = te(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = te(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (S) => {
|
|
1074
|
+
h && (r(!S || S.type ? new B(null, e, h) : S), h.abort(), h = null);
|
|
1075
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1076
|
+
const R = Qn(s.url);
|
|
1077
|
+
if (R && T.protocols.indexOf(R) === -1) {
|
|
1078
|
+
r(new y("Unsupported protocol " + R + ":", y.ERR_BAD_REQUEST, e));
|
|
1063
1079
|
return;
|
|
1064
1080
|
}
|
|
1065
|
-
h.send(
|
|
1081
|
+
h.send(o || null);
|
|
1066
1082
|
});
|
|
1067
|
-
},
|
|
1083
|
+
}, sr = (e, t) => {
|
|
1068
1084
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1069
1085
|
if (t || n) {
|
|
1070
|
-
let r = new AbortController(),
|
|
1071
|
-
const
|
|
1072
|
-
if (!
|
|
1073
|
-
|
|
1086
|
+
let r = new AbortController(), s;
|
|
1087
|
+
const o = function(l) {
|
|
1088
|
+
if (!s) {
|
|
1089
|
+
s = !0, c();
|
|
1074
1090
|
const u = l instanceof Error ? l : this.reason;
|
|
1075
|
-
r.abort(u instanceof y ? u : new
|
|
1091
|
+
r.abort(u instanceof y ? u : new B(u instanceof Error ? u.message : u));
|
|
1076
1092
|
}
|
|
1077
1093
|
};
|
|
1078
1094
|
let i = t && setTimeout(() => {
|
|
1079
|
-
i = null,
|
|
1095
|
+
i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1080
1096
|
}, t);
|
|
1081
1097
|
const c = () => {
|
|
1082
1098
|
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1083
|
-
l.unsubscribe ? l.unsubscribe(
|
|
1099
|
+
l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
|
|
1084
1100
|
}), e = null);
|
|
1085
1101
|
};
|
|
1086
|
-
e.forEach((l) => l.addEventListener("abort",
|
|
1102
|
+
e.forEach((l) => l.addEventListener("abort", o));
|
|
1087
1103
|
const { signal: f } = r;
|
|
1088
1104
|
return f.unsubscribe = () => a.asap(c), f;
|
|
1089
1105
|
}
|
|
1090
|
-
},
|
|
1106
|
+
}, or = function* (e, t) {
|
|
1091
1107
|
let n = e.byteLength;
|
|
1092
1108
|
if (n < t) {
|
|
1093
1109
|
yield e;
|
|
1094
1110
|
return;
|
|
1095
1111
|
}
|
|
1096
|
-
let r = 0,
|
|
1112
|
+
let r = 0, s;
|
|
1097
1113
|
for (; r < n; )
|
|
1098
|
-
|
|
1114
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1099
1115
|
}, ir = async function* (e, t) {
|
|
1100
1116
|
for await (const n of ar(e))
|
|
1101
|
-
yield*
|
|
1117
|
+
yield* or(n, t);
|
|
1102
1118
|
}, ar = async function* (e) {
|
|
1103
1119
|
if (e[Symbol.asyncIterator]) {
|
|
1104
1120
|
yield* e;
|
|
@@ -1116,21 +1132,21 @@ const Et = (e) => {
|
|
|
1116
1132
|
await t.cancel();
|
|
1117
1133
|
}
|
|
1118
1134
|
}, je = (e, t, n, r) => {
|
|
1119
|
-
const
|
|
1120
|
-
let
|
|
1135
|
+
const s = ir(e, t);
|
|
1136
|
+
let o = 0, i, c = (f) => {
|
|
1121
1137
|
i || (i = !0, r && r(f));
|
|
1122
1138
|
};
|
|
1123
1139
|
return new ReadableStream({
|
|
1124
1140
|
async pull(f) {
|
|
1125
1141
|
try {
|
|
1126
|
-
const { done: l, value: u } = await
|
|
1142
|
+
const { done: l, value: u } = await s.next();
|
|
1127
1143
|
if (l) {
|
|
1128
1144
|
c(), f.close();
|
|
1129
1145
|
return;
|
|
1130
1146
|
}
|
|
1131
1147
|
let d = u.byteLength;
|
|
1132
1148
|
if (n) {
|
|
1133
|
-
let w =
|
|
1149
|
+
let w = o += d;
|
|
1134
1150
|
n(w);
|
|
1135
1151
|
}
|
|
1136
1152
|
f.enqueue(new Uint8Array(u));
|
|
@@ -1139,18 +1155,18 @@ const Et = (e) => {
|
|
|
1139
1155
|
}
|
|
1140
1156
|
},
|
|
1141
1157
|
cancel(f) {
|
|
1142
|
-
return c(f),
|
|
1158
|
+
return c(f), s.return();
|
|
1143
1159
|
}
|
|
1144
1160
|
}, {
|
|
1145
1161
|
highWaterMark: 2
|
|
1146
1162
|
});
|
|
1147
|
-
},
|
|
1163
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Rt = ce && typeof ReadableStream == "function", cr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), St = (e, ...t) => {
|
|
1148
1164
|
try {
|
|
1149
1165
|
return !!e(...t);
|
|
1150
1166
|
} catch {
|
|
1151
1167
|
return !1;
|
|
1152
1168
|
}
|
|
1153
|
-
}, ur =
|
|
1169
|
+
}, ur = Rt && St(() => {
|
|
1154
1170
|
let e = !1;
|
|
1155
1171
|
const t = new Request(T.origin, {
|
|
1156
1172
|
body: new ReadableStream(),
|
|
@@ -1160,10 +1176,10 @@ 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 = Rt && St(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1180
|
+
stream: ge && ((e) => e.body)
|
|
1165
1181
|
};
|
|
1166
|
-
|
|
1182
|
+
ce && ((e) => {
|
|
1167
1183
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1168
1184
|
!ne[t] && (ne[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);
|
|
@@ -1187,13 +1203,13 @@ 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 = ce && (async (e) => {
|
|
1191
1207
|
let {
|
|
1192
1208
|
url: t,
|
|
1193
1209
|
method: n,
|
|
1194
1210
|
data: r,
|
|
1195
|
-
signal:
|
|
1196
|
-
cancelToken:
|
|
1211
|
+
signal: s,
|
|
1212
|
+
cancelToken: o,
|
|
1197
1213
|
timeout: i,
|
|
1198
1214
|
onDownloadProgress: c,
|
|
1199
1215
|
onUploadProgress: f,
|
|
@@ -1203,7 +1219,7 @@ const lr = async (e) => {
|
|
|
1203
1219
|
fetchOptions: w
|
|
1204
1220
|
} = Et(e);
|
|
1205
1221
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1206
|
-
let g =
|
|
1222
|
+
let g = sr([s, o && o.toAbortSignal()], i), p;
|
|
1207
1223
|
const m = g && g.unsubscribe && (() => {
|
|
1208
1224
|
g.unsubscribe();
|
|
1209
1225
|
});
|
|
@@ -1234,50 +1250,50 @@ const lr = async (e) => {
|
|
|
1234
1250
|
duplex: "half",
|
|
1235
1251
|
credentials: E ? d : void 0
|
|
1236
1252
|
});
|
|
1237
|
-
let
|
|
1238
|
-
const
|
|
1239
|
-
if (
|
|
1253
|
+
let R = await fetch(p, w);
|
|
1254
|
+
const S = ge && (l === "stream" || l === "response");
|
|
1255
|
+
if (ge && (c || S && m)) {
|
|
1240
1256
|
const O = {};
|
|
1241
|
-
["status", "statusText", "headers"].forEach((
|
|
1242
|
-
O[
|
|
1257
|
+
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1258
|
+
O[Pe] = R[Pe];
|
|
1243
1259
|
});
|
|
1244
|
-
const P = a.toFiniteNumber(
|
|
1260
|
+
const P = a.toFiniteNumber(R.headers.get("content-length")), [N, K] = c && ve(
|
|
1245
1261
|
P,
|
|
1246
1262
|
te(Be(c), !0)
|
|
1247
1263
|
) || [];
|
|
1248
|
-
|
|
1249
|
-
je(
|
|
1264
|
+
R = new Response(
|
|
1265
|
+
je(R.body, qe, N, () => {
|
|
1250
1266
|
K && K(), m && m();
|
|
1251
1267
|
}),
|
|
1252
1268
|
O
|
|
1253
1269
|
);
|
|
1254
1270
|
}
|
|
1255
1271
|
l = l || "text";
|
|
1256
|
-
let k = await ne[a.findKey(ne, l) || "text"](
|
|
1257
|
-
return !
|
|
1272
|
+
let k = await ne[a.findKey(ne, l) || "text"](R, e);
|
|
1273
|
+
return !S && m && m(), await new Promise((O, P) => {
|
|
1258
1274
|
gt(O, P, {
|
|
1259
1275
|
data: k,
|
|
1260
|
-
headers:
|
|
1261
|
-
status:
|
|
1262
|
-
statusText:
|
|
1276
|
+
headers: _.from(R.headers),
|
|
1277
|
+
status: R.status,
|
|
1278
|
+
statusText: R.statusText,
|
|
1263
1279
|
config: e,
|
|
1264
1280
|
request: p
|
|
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,28 +1302,28 @@ 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;
|
|
1293
1309
|
let n, r;
|
|
1294
|
-
const
|
|
1295
|
-
for (let
|
|
1296
|
-
n = e[
|
|
1310
|
+
const s = {};
|
|
1311
|
+
for (let o = 0; o < t; o++) {
|
|
1312
|
+
n = e[o];
|
|
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;
|
|
1302
|
-
|
|
1318
|
+
s[i || "#" + o] = r;
|
|
1303
1319
|
}
|
|
1304
1320
|
if (!r) {
|
|
1305
|
-
const
|
|
1321
|
+
const o = Object.entries(s).map(
|
|
1306
1322
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1307
1323
|
);
|
|
1308
|
-
let i = t ?
|
|
1309
|
-
` +
|
|
1310
|
-
`) : " " +
|
|
1324
|
+
let i = t ? o.length > 1 ? `since :
|
|
1325
|
+
` + o.map(Me).join(`
|
|
1326
|
+
`) : " " + Me(o[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,79 +1331,79 @@ 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
|
-
throw new
|
|
1338
|
+
throw new B(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
1344
|
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Tt.getAdapter(e.adapter || W.adapter)(e).then(function(r) {
|
|
1329
|
-
return
|
|
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", ue = {};
|
|
1343
1359
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1344
|
-
|
|
1360
|
+
ue[e] = function(r) {
|
|
1345
1361
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1346
1362
|
};
|
|
1347
1363
|
});
|
|
1348
1364
|
const $e = {};
|
|
1349
|
-
|
|
1350
|
-
function o
|
|
1351
|
-
return "[Axios v" + Ot + "] Transitional option '" +
|
|
1365
|
+
ue.transitional = function(t, n, r) {
|
|
1366
|
+
function s(o, i) {
|
|
1367
|
+
return "[Axios v" + Ot + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1352
1368
|
}
|
|
1353
|
-
return (
|
|
1369
|
+
return (o, i, c) => {
|
|
1354
1370
|
if (t === !1)
|
|
1355
1371
|
throw new y(
|
|
1356
|
-
|
|
1372
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1357
1373
|
y.ERR_DEPRECATED
|
|
1358
1374
|
);
|
|
1359
|
-
return n && !$e[i] && ($e[i] = !0), t ? t(
|
|
1375
|
+
return n && !$e[i] && ($e[i] = !0), t ? t(o, i, c) : !0;
|
|
1360
1376
|
};
|
|
1361
1377
|
};
|
|
1362
|
-
|
|
1378
|
+
ue.spelling = function(t) {
|
|
1363
1379
|
return (n, r) => !0;
|
|
1364
1380
|
};
|
|
1365
1381
|
function hr(e, t, n) {
|
|
1366
1382
|
if (typeof e != "object")
|
|
1367
1383
|
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1368
1384
|
const r = Object.keys(e);
|
|
1369
|
-
let
|
|
1370
|
-
for (;
|
|
1371
|
-
const
|
|
1385
|
+
let s = r.length;
|
|
1386
|
+
for (; s-- > 0; ) {
|
|
1387
|
+
const o = r[s], i = t[o];
|
|
1372
1388
|
if (i) {
|
|
1373
|
-
const c = e[
|
|
1389
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1374
1390
|
if (f !== !0)
|
|
1375
|
-
throw new y("option " +
|
|
1391
|
+
throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1376
1392
|
continue;
|
|
1377
1393
|
}
|
|
1378
1394
|
if (n !== !0)
|
|
1379
|
-
throw new y("Unknown option " +
|
|
1395
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1380
1396
|
}
|
|
1381
1397
|
}
|
|
1382
|
-
const
|
|
1398
|
+
const Y = {
|
|
1383
1399
|
assertOptions: hr,
|
|
1384
|
-
validators:
|
|
1385
|
-
}, C =
|
|
1386
|
-
let
|
|
1400
|
+
validators: ue
|
|
1401
|
+
}, C = Y.validators;
|
|
1402
|
+
let L = 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
|
/**
|
|
@@ -1403,12 +1419,12 @@ let U = class {
|
|
|
1403
1419
|
return await this._request(t, n);
|
|
1404
1420
|
} catch (r) {
|
|
1405
1421
|
if (r instanceof Error) {
|
|
1406
|
-
let
|
|
1407
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1408
|
-
const
|
|
1422
|
+
let s = {};
|
|
1423
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1424
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1409
1425
|
try {
|
|
1410
|
-
r.stack ?
|
|
1411
|
-
` +
|
|
1426
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1427
|
+
` + o) : r.stack = o;
|
|
1412
1428
|
} catch {
|
|
1413
1429
|
}
|
|
1414
1430
|
}
|
|
@@ -1416,31 +1432,31 @@ let U = class {
|
|
|
1416
1432
|
}
|
|
1417
1433
|
}
|
|
1418
1434
|
_request(t, n) {
|
|
1419
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1420
|
-
const { transitional: r, paramsSerializer:
|
|
1421
|
-
r !== void 0 &&
|
|
1435
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1436
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1437
|
+
r !== void 0 && Y.assertOptions(r, {
|
|
1422
1438
|
silentJSONParsing: C.transitional(C.boolean),
|
|
1423
1439
|
forcedJSONParsing: C.transitional(C.boolean),
|
|
1424
1440
|
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1425
|
-
}, !1),
|
|
1426
|
-
serialize:
|
|
1427
|
-
} :
|
|
1441
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1442
|
+
serialize: s
|
|
1443
|
+
} : Y.assertOptions(s, {
|
|
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), Y.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();
|
|
1434
|
-
let i =
|
|
1435
|
-
|
|
1436
|
-
|
|
1450
|
+
let i = o && a.merge(
|
|
1451
|
+
o.common,
|
|
1452
|
+
o[n.method]
|
|
1437
1453
|
);
|
|
1438
|
-
|
|
1454
|
+
o && a.forEach(
|
|
1439
1455
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1440
1456
|
(p) => {
|
|
1441
|
-
delete
|
|
1457
|
+
delete o[p];
|
|
1442
1458
|
}
|
|
1443
|
-
), n.headers =
|
|
1459
|
+
), n.headers = _.concat(i, o);
|
|
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
|
+
L.prototype[t] = function(n, r) {
|
|
1504
|
+
return this.request(F(r || {}, {
|
|
1489
1505
|
method: t,
|
|
1490
1506
|
url: n,
|
|
1491
1507
|
data: (r || {}).data
|
|
@@ -1494,44 +1510,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1494
1510
|
});
|
|
1495
1511
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1496
1512
|
function n(r) {
|
|
1497
|
-
return function(
|
|
1498
|
-
return this.request(
|
|
1513
|
+
return function(o, i, c) {
|
|
1514
|
+
return this.request(F(c || {}, {
|
|
1499
1515
|
method: t,
|
|
1500
1516
|
headers: r ? {
|
|
1501
1517
|
"Content-Type": "multipart/form-data"
|
|
1502
1518
|
} : {},
|
|
1503
|
-
url:
|
|
1519
|
+
url: o,
|
|
1504
1520
|
data: i
|
|
1505
1521
|
}));
|
|
1506
1522
|
};
|
|
1507
1523
|
}
|
|
1508
|
-
|
|
1524
|
+
L.prototype[t] = n(), L.prototype[t + "Form"] = n(!0);
|
|
1509
1525
|
});
|
|
1510
1526
|
let mr = class At {
|
|
1511
1527
|
constructor(t) {
|
|
1512
1528
|
if (typeof t != "function")
|
|
1513
1529
|
throw new TypeError("executor must be a function.");
|
|
1514
1530
|
let n;
|
|
1515
|
-
this.promise = new Promise(function(
|
|
1516
|
-
n =
|
|
1531
|
+
this.promise = new Promise(function(o) {
|
|
1532
|
+
n = o;
|
|
1517
1533
|
});
|
|
1518
1534
|
const r = this;
|
|
1519
|
-
this.promise.then((
|
|
1535
|
+
this.promise.then((s) => {
|
|
1520
1536
|
if (!r._listeners) return;
|
|
1521
|
-
let
|
|
1522
|
-
for (;
|
|
1523
|
-
r._listeners[
|
|
1537
|
+
let o = r._listeners.length;
|
|
1538
|
+
for (; o-- > 0; )
|
|
1539
|
+
r._listeners[o](s);
|
|
1524
1540
|
r._listeners = null;
|
|
1525
|
-
}), this.promise.then = (
|
|
1526
|
-
let
|
|
1541
|
+
}), this.promise.then = (s) => {
|
|
1542
|
+
let o;
|
|
1527
1543
|
const i = new Promise((c) => {
|
|
1528
|
-
r.subscribe(c),
|
|
1529
|
-
}).then(
|
|
1544
|
+
r.subscribe(c), o = c;
|
|
1545
|
+
}).then(s);
|
|
1530
1546
|
return i.cancel = function() {
|
|
1531
|
-
r.unsubscribe(
|
|
1547
|
+
r.unsubscribe(o);
|
|
1532
1548
|
}, i;
|
|
1533
|
-
}, t(function(
|
|
1534
|
-
r.reason || (r.reason = new
|
|
1549
|
+
}, t(function(o, i, c) {
|
|
1550
|
+
r.reason || (r.reason = new B(o, i, c), n(r.reason));
|
|
1535
1551
|
});
|
|
1536
1552
|
}
|
|
1537
1553
|
/**
|
|
@@ -1573,8 +1589,8 @@ let mr = class At {
|
|
|
1573
1589
|
static source() {
|
|
1574
1590
|
let t;
|
|
1575
1591
|
return {
|
|
1576
|
-
token: new At(function(
|
|
1577
|
-
t =
|
|
1592
|
+
token: new At(function(s) {
|
|
1593
|
+
t = s;
|
|
1578
1594
|
}),
|
|
1579
1595
|
cancel: t
|
|
1580
1596
|
};
|
|
@@ -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 L(e), n = nt(L.prototype.request, t);
|
|
1677
|
+
return a.extend(n, L.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1678
|
+
return _t(F(e, s));
|
|
1663
1679
|
}, n;
|
|
1664
1680
|
}
|
|
1665
1681
|
const b = _t(W);
|
|
1666
|
-
b.Axios =
|
|
1667
|
-
b.CanceledError =
|
|
1682
|
+
b.Axios = L;
|
|
1683
|
+
b.CanceledError = B;
|
|
1668
1684
|
b.CancelToken = mr;
|
|
1669
1685
|
b.isCancel = wt;
|
|
1670
1686
|
b.VERSION = Ot;
|
|
1671
|
-
b.toFormData =
|
|
1687
|
+
b.toFormData = ae;
|
|
1672
1688
|
b.AxiosError = y;
|
|
1673
1689
|
b.Cancel = b.CanceledError;
|
|
1674
1690
|
b.all = function(t) {
|
|
@@ -1676,29 +1692,29 @@ 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: Wr,
|
|
1687
1703
|
AxiosError: Kr,
|
|
1688
1704
|
CanceledError: Qr,
|
|
1689
|
-
isCancel:
|
|
1690
|
-
CancelToken:
|
|
1705
|
+
isCancel: Xr,
|
|
1706
|
+
CancelToken: Gr,
|
|
1691
1707
|
VERSION: Zr,
|
|
1692
1708
|
all: Yr,
|
|
1693
|
-
Cancel:
|
|
1694
|
-
isAxiosError:
|
|
1695
|
-
spread:
|
|
1696
|
-
toFormData:
|
|
1697
|
-
AxiosHeaders:
|
|
1698
|
-
HttpStatusCode:
|
|
1699
|
-
formToJSON:
|
|
1700
|
-
getAdapter:
|
|
1701
|
-
mergeConfig:
|
|
1709
|
+
Cancel: es,
|
|
1710
|
+
isAxiosError: ts,
|
|
1711
|
+
spread: ns,
|
|
1712
|
+
toFormData: rs,
|
|
1713
|
+
AxiosHeaders: ss,
|
|
1714
|
+
HttpStatusCode: os,
|
|
1715
|
+
formToJSON: is,
|
|
1716
|
+
getAdapter: as,
|
|
1717
|
+
mergeConfig: cs
|
|
1702
1718
|
} = b;
|
|
1703
1719
|
/*! js-cookie v3.0.5 | MIT */
|
|
1704
1720
|
function Q(e) {
|
|
@@ -1720,48 +1736,48 @@ var gr = {
|
|
|
1720
1736
|
);
|
|
1721
1737
|
}
|
|
1722
1738
|
};
|
|
1723
|
-
function
|
|
1724
|
-
function n(
|
|
1739
|
+
function Re(e, t) {
|
|
1740
|
+
function n(s, o, i) {
|
|
1725
1741
|
if (!(typeof document > "u")) {
|
|
1726
|
-
i = Q({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()),
|
|
1742
|
+
i = Q({}, 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);
|
|
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]));
|
|
1730
|
-
return document.cookie =
|
|
1746
|
+
return document.cookie = s + "=" + e.write(o, s) + c;
|
|
1731
1747
|
}
|
|
1732
1748
|
}
|
|
1733
|
-
function r(
|
|
1734
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
1735
|
-
for (var
|
|
1736
|
-
var f =
|
|
1749
|
+
function r(s) {
|
|
1750
|
+
if (!(typeof document > "u" || arguments.length && !s)) {
|
|
1751
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < o.length; c++) {
|
|
1752
|
+
var f = o[c].split("="), l = f.slice(1).join("=");
|
|
1737
1753
|
try {
|
|
1738
1754
|
var u = decodeURIComponent(f[0]);
|
|
1739
|
-
if (i[u] = e.read(l, u),
|
|
1755
|
+
if (i[u] = e.read(l, u), s === u)
|
|
1740
1756
|
break;
|
|
1741
1757
|
} catch {
|
|
1742
1758
|
}
|
|
1743
1759
|
}
|
|
1744
|
-
return
|
|
1760
|
+
return s ? i[s] : i;
|
|
1745
1761
|
}
|
|
1746
1762
|
}
|
|
1747
1763
|
return Object.create(
|
|
1748
1764
|
{
|
|
1749
1765
|
set: n,
|
|
1750
1766
|
get: r,
|
|
1751
|
-
remove: function(
|
|
1767
|
+
remove: function(s, o) {
|
|
1752
1768
|
n(
|
|
1753
|
-
|
|
1769
|
+
s,
|
|
1754
1770
|
"",
|
|
1755
|
-
Q({},
|
|
1771
|
+
Q({}, o, {
|
|
1756
1772
|
expires: -1
|
|
1757
1773
|
})
|
|
1758
1774
|
);
|
|
1759
1775
|
},
|
|
1760
|
-
withAttributes: function(
|
|
1761
|
-
return
|
|
1776
|
+
withAttributes: function(s) {
|
|
1777
|
+
return Re(this.converter, Q({}, this.attributes, s));
|
|
1762
1778
|
},
|
|
1763
|
-
withConverter: function(
|
|
1764
|
-
return
|
|
1779
|
+
withConverter: function(s) {
|
|
1780
|
+
return Re(Q({}, this.converter, s), this.attributes);
|
|
1765
1781
|
}
|
|
1766
1782
|
},
|
|
1767
1783
|
{
|
|
@@ -1770,56 +1786,56 @@ function Ee(e, t) {
|
|
|
1770
1786
|
}
|
|
1771
1787
|
);
|
|
1772
1788
|
}
|
|
1773
|
-
var br =
|
|
1789
|
+
var br = Re(gr, { path: "/" }), ze;
|
|
1774
1790
|
const xt = typeof window < "u", Er = (e) => typeof e == "string", Je = () => +Date.now(), Se = () => {
|
|
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() : Lt(e);
|
|
1779
1795
|
}
|
|
1780
|
-
function
|
|
1796
|
+
function Rr(e, t) {
|
|
1781
1797
|
function n(...r) {
|
|
1782
|
-
return new Promise((
|
|
1783
|
-
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(
|
|
1798
|
+
return new Promise((s, o) => {
|
|
1799
|
+
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(s).catch(o);
|
|
1784
1800
|
});
|
|
1785
1801
|
}
|
|
1786
1802
|
return n;
|
|
1787
1803
|
}
|
|
1788
|
-
function
|
|
1789
|
-
let
|
|
1804
|
+
function Sr(e, t = !0, n = !0, r = !1) {
|
|
1805
|
+
let s = 0, o, i = !0, c = Se, f;
|
|
1790
1806
|
const l = () => {
|
|
1791
|
-
|
|
1807
|
+
o && (clearTimeout(o), o = void 0, c(), c = Se);
|
|
1792
1808
|
};
|
|
1793
1809
|
return (d) => {
|
|
1794
|
-
const w =
|
|
1795
|
-
return l(), w <= 0 ? (
|
|
1796
|
-
c = r ? h : m,
|
|
1797
|
-
|
|
1810
|
+
const w = ke(e), g = Date.now() - s, p = () => f = d();
|
|
1811
|
+
return l(), w <= 0 ? (s = Date.now(), p()) : (g > w && (n || !i) ? (s = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1812
|
+
c = r ? h : m, o = setTimeout(() => {
|
|
1813
|
+
s = Date.now(), i = !0, m(p()), l();
|
|
1798
1814
|
}, Math.max(0, w - g));
|
|
1799
|
-
})), !n && !
|
|
1815
|
+
})), !n && !o && (o = setTimeout(() => i = !0, w)), i = !1, f);
|
|
1800
1816
|
};
|
|
1801
1817
|
}
|
|
1802
1818
|
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
|
-
let t, n, r,
|
|
1816
|
-
if (Er(e[0]) || Array.isArray(e[0]) ? ([n, r,
|
|
1831
|
+
let t, n, r, s;
|
|
1832
|
+
if (Er(e[0]) || Array.isArray(e[0]) ? ([n, r, s] = e, t = Ct) : [t, n, r, s] = e, !t)
|
|
1817
1833
|
return Se;
|
|
1818
1834
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1819
|
-
const
|
|
1820
|
-
|
|
1821
|
-
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f =
|
|
1822
|
-
i(), u &&
|
|
1835
|
+
const o = [], i = () => {
|
|
1836
|
+
o.forEach((u) => u()), o.length = 0;
|
|
1837
|
+
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Oe(() => [Ar(t), ke(s)], ([u, d]) => {
|
|
1838
|
+
i(), u && o.push(...n.flatMap((w) => r.map((g) => c(u, w, g, d))));
|
|
1823
1839
|
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1824
1840
|
f(), i();
|
|
1825
1841
|
};
|
|
@@ -1832,18 +1848,18 @@ function Cr(e = xr, t = {}) {
|
|
|
1832
1848
|
const {
|
|
1833
1849
|
initialState: n = !1,
|
|
1834
1850
|
listenForVisibilityChange: r = !0,
|
|
1835
|
-
events:
|
|
1836
|
-
window:
|
|
1837
|
-
eventFilter: i =
|
|
1851
|
+
events: s = _r,
|
|
1852
|
+
window: o = Ct,
|
|
1853
|
+
eventFilter: i = Sr(50)
|
|
1838
1854
|
} = t, c = ee(n), f = ee(Je());
|
|
1839
1855
|
let l;
|
|
1840
|
-
const u =
|
|
1856
|
+
const u = Rr(i, () => {
|
|
1841
1857
|
c.value = !1, f.value = Je(), clearTimeout(l), l = setTimeout(() => c.value = !0, e);
|
|
1842
1858
|
});
|
|
1843
|
-
if (
|
|
1844
|
-
const d =
|
|
1845
|
-
for (const w of
|
|
1846
|
-
Ve(
|
|
1859
|
+
if (o) {
|
|
1860
|
+
const d = o.document;
|
|
1861
|
+
for (const w of s)
|
|
1862
|
+
Ve(o, w, u, { passive: !0 });
|
|
1847
1863
|
r && Ve(d, "visibilitychange", () => {
|
|
1848
1864
|
d.hidden || u();
|
|
1849
1865
|
});
|
|
@@ -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, Nr = Object.prototype.propertyIsEnumerable, Ge = (e, t, n) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Ur = (e, t) => {
|
|
1858
1874
|
for (var n in t || (t = {}))
|
|
1859
|
-
Pr.call(t, n) &&
|
|
1860
|
-
if (
|
|
1861
|
-
for (var n of
|
|
1862
|
-
Nr.call(t, n) &&
|
|
1875
|
+
Pr.call(t, n) && Ge(e, n, t[n]);
|
|
1876
|
+
if (Xe)
|
|
1877
|
+
for (var n of Xe(t))
|
|
1878
|
+
Nr.call(t, n) && Ge(e, n, t[n]);
|
|
1863
1879
|
return e;
|
|
1864
1880
|
};
|
|
1865
|
-
const
|
|
1881
|
+
const Lr = {
|
|
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
|
+
Ur({
|
|
1892
1908
|
linear: Tr
|
|
1893
|
-
},
|
|
1894
|
-
let
|
|
1895
|
-
const kt = { triggerProxySso: "triggerProxySso" },
|
|
1896
|
-
|
|
1909
|
+
}, Lr);
|
|
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,14 +1932,14 @@ let Pt = (e = 21) => {
|
|
|
1916
1932
|
}
|
|
1917
1933
|
return t;
|
|
1918
1934
|
};
|
|
1919
|
-
const
|
|
1935
|
+
const j = (e) => new URL(location.href).searchParams.get(e), D = {
|
|
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: vr = !1 } =
|
|
1942
|
+
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Ae(), re = location.origin + "/home", q = {
|
|
1927
1943
|
response_type: "code",
|
|
1928
1944
|
scope: "sever",
|
|
1929
1945
|
client_id: "sys",
|
|
@@ -1934,113 +1950,113 @@ const Y = (e) => new URL(location.href).searchParams.get(e), B = {
|
|
|
1934
1950
|
e.forEach((r) => {
|
|
1935
1951
|
n.delete(r);
|
|
1936
1952
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
1937
|
-
}, Nt = ee(!1),
|
|
1953
|
+
}, Nt = ee(!1), Ut = (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
1959
|
n === !0 && (Nt.value = !0);
|
|
1944
1960
|
}
|
|
1945
1961
|
);
|
|
1946
1962
|
};
|
|
1947
|
-
localStorage.getItem("idelTime") &&
|
|
1963
|
+
localStorage.getItem("idelTime") && Ut(Number(localStorage.getItem("idelTime")));
|
|
1948
1964
|
let et = "";
|
|
1949
1965
|
const Br = async () => {
|
|
1950
|
-
const e =
|
|
1951
|
-
if (!e) return
|
|
1966
|
+
const e = j("code") || "", t = j("redirect_url") || "", n = j("kingdee_token") || "";
|
|
1967
|
+
if (!e) return M();
|
|
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))), M();
|
|
1954
1970
|
et = e, Ye(["code", "state", "kingdee_token", "redirect_url"]);
|
|
1955
1971
|
let r = {};
|
|
1956
|
-
const
|
|
1972
|
+
const s = {
|
|
1957
1973
|
grant_type: "authorization_code",
|
|
1958
1974
|
code: e,
|
|
1959
|
-
client_id:
|
|
1960
|
-
client_secret:
|
|
1961
|
-
redirect_uri:
|
|
1975
|
+
client_id: q.client_id,
|
|
1976
|
+
client_secret: q.client_secret,
|
|
1977
|
+
redirect_uri: re,
|
|
1962
1978
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1963
1979
|
nonce: Pt()
|
|
1964
1980
|
};
|
|
1965
|
-
n && (sessionStorage.setItem("kingdee_token", n),
|
|
1981
|
+
n && (sessionStorage.setItem("kingdee_token", n), s.redirect_uri = `${s.redirect_uri}?kingdee_token=${n}`);
|
|
1966
1982
|
try {
|
|
1967
|
-
await b.create().get(
|
|
1983
|
+
await b.create().get(D.token, { baseURL: Ze });
|
|
1968
1984
|
} catch {
|
|
1969
1985
|
}
|
|
1970
1986
|
try {
|
|
1971
1987
|
r = await b.create().post(
|
|
1972
|
-
|
|
1988
|
+
D.token,
|
|
1973
1989
|
{},
|
|
1974
1990
|
{
|
|
1975
1991
|
baseURL: Ze,
|
|
1976
|
-
params:
|
|
1992
|
+
params: s,
|
|
1977
1993
|
headers: {
|
|
1978
1994
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
1979
1995
|
"csrf-token": br.get("csrf-token")
|
|
1980
1996
|
}
|
|
1981
1997
|
}
|
|
1982
1998
|
);
|
|
1983
|
-
const { access_token:
|
|
1984
|
-
accessToken:
|
|
1999
|
+
const { access_token: o = "", expires_in: i = 0, refresh_token: c = "", refresh_exp: f = 0 } = r.data, l = {
|
|
2000
|
+
accessToken: o,
|
|
1985
2001
|
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(i) * 1e3,
|
|
1986
2002
|
refreshToken: c,
|
|
1987
2003
|
info: r.data
|
|
1988
2004
|
};
|
|
1989
|
-
|
|
2005
|
+
$().save(l), await tt(o);
|
|
1990
2006
|
const u = Number(f) - (/* @__PURE__ */ new Date()).getTime();
|
|
1991
|
-
return u && u > 0 && (
|
|
2007
|
+
return u && u > 0 && (Ut(u), u && localStorage.setItem("idelTime", u.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), o;
|
|
1992
2008
|
} catch {
|
|
1993
|
-
return
|
|
2009
|
+
return le({ ...q, redirect_uri: re });
|
|
1994
2010
|
}
|
|
1995
|
-
},
|
|
2011
|
+
}, X = ee(!1), us = async (e) => {
|
|
1996
2012
|
if (e.public) return "";
|
|
1997
|
-
if (Nt.value)
|
|
1998
|
-
|
|
1999
|
-
|
|
2000
|
-
|
|
2001
|
-
|
|
2013
|
+
if (Nt.value)
|
|
2014
|
+
return le({ ...q, redirect_uri: re });
|
|
2015
|
+
if (X.value)
|
|
2016
|
+
return await new Promise(async (r) => {
|
|
2017
|
+
Oe(
|
|
2018
|
+
() => X.value,
|
|
2002
2019
|
(s) => {
|
|
2003
2020
|
if (!s) {
|
|
2004
|
-
const
|
|
2005
|
-
o
|
|
2021
|
+
const o = M();
|
|
2022
|
+
r(o);
|
|
2006
2023
|
}
|
|
2007
2024
|
}
|
|
2008
2025
|
);
|
|
2009
2026
|
});
|
|
2010
|
-
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
let r = F();
|
|
2014
|
-
H.value = !0;
|
|
2027
|
+
let t = M();
|
|
2028
|
+
const { accessTokenExpiredAt: n } = $().getData();
|
|
2029
|
+
j("code"), X.value = !0;
|
|
2015
2030
|
try {
|
|
2016
|
-
|
|
2031
|
+
j("code") || "" ? t = await Br() : typeof n == "number" && n > 0 && +/* @__PURE__ */ new Date() + 6e4 > n && (t = await Ir(q));
|
|
2017
2032
|
} catch {
|
|
2018
|
-
|
|
2033
|
+
} finally {
|
|
2034
|
+
X.value = !1;
|
|
2019
2035
|
}
|
|
2020
|
-
return
|
|
2021
|
-
},
|
|
2036
|
+
return t;
|
|
2037
|
+
}, le = (e) => {
|
|
2022
2038
|
if (vr) return;
|
|
2023
|
-
const { baseURL: t, ssoLocale: n } =
|
|
2024
|
-
if (
|
|
2039
|
+
const { baseURL: t, ssoLocale: n } = Ae();
|
|
2040
|
+
if (Te) return Te(e);
|
|
2025
2041
|
e.logout = "true", n && (e.locale = "locale");
|
|
2026
|
-
const r = Object.keys(e).filter((
|
|
2027
|
-
localStorage.removeItem("idelTime"), sessionStorage.clear(),
|
|
2042
|
+
const r = Object.keys(e).filter((o) => o !== "client_secret").map((o) => `${o}=${e[o]}`).join("&"), s = `${t}${D.oauth}?${r}`;
|
|
2043
|
+
localStorage.removeItem("idelTime"), sessionStorage.clear(), $().remove();
|
|
2028
2044
|
try {
|
|
2029
|
-
b.create().get(
|
|
2045
|
+
b.create().get(D.logoutCurpage, { baseURL: t });
|
|
2030
2046
|
} catch {
|
|
2031
2047
|
}
|
|
2032
|
-
window.__isAutoCloseApp = !1, location.replace(
|
|
2048
|
+
window.__isAutoCloseApp = !1, location.replace(s);
|
|
2033
2049
|
};
|
|
2034
|
-
|
|
2050
|
+
Dr(le);
|
|
2035
2051
|
const Ir = async (e) => {
|
|
2036
|
-
const { baseURL: t } =
|
|
2052
|
+
const { baseURL: t } = Ae(), { refreshToken: n } = $().getData();
|
|
2037
2053
|
try {
|
|
2038
|
-
await b.create().get(
|
|
2054
|
+
await b.create().get(D.token, { baseURL: t });
|
|
2039
2055
|
} catch {
|
|
2040
2056
|
}
|
|
2041
2057
|
try {
|
|
2042
2058
|
const r = await b.create().post(
|
|
2043
|
-
|
|
2059
|
+
D.token,
|
|
2044
2060
|
{},
|
|
2045
2061
|
{
|
|
2046
2062
|
baseURL: t,
|
|
@@ -2053,21 +2069,21 @@ const Ir = async (e) => {
|
|
|
2053
2069
|
nonce: Pt()
|
|
2054
2070
|
}
|
|
2055
2071
|
}
|
|
2056
|
-
), { access_token:
|
|
2057
|
-
accessToken:
|
|
2058
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(
|
|
2072
|
+
), { access_token: s = "", expires_in: o = 0, refresh_token: i = "" } = r.data, c = {
|
|
2073
|
+
accessToken: s,
|
|
2074
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(o) * 1e3,
|
|
2059
2075
|
refreshToken: i,
|
|
2060
2076
|
info: r.data
|
|
2061
2077
|
};
|
|
2062
|
-
return
|
|
2078
|
+
return $().save(c), await tt(s), s;
|
|
2063
2079
|
} catch {
|
|
2064
|
-
return
|
|
2080
|
+
return le({ ...e, redirect_uri: re });
|
|
2065
2081
|
}
|
|
2066
|
-
},
|
|
2082
|
+
}, $ = () => ({
|
|
2067
2083
|
getData: () => ({
|
|
2068
|
-
accessToken:
|
|
2069
|
-
accessTokenExpiredAt:
|
|
2070
|
-
refreshToken:
|
|
2084
|
+
accessToken: M(),
|
|
2085
|
+
accessTokenExpiredAt: fe("accessTokenExpiredAt") ? Number(fe("accessTokenExpiredAt")) : "",
|
|
2086
|
+
refreshToken: fe("refreshToken")
|
|
2071
2087
|
}),
|
|
2072
2088
|
save: (e) => {
|
|
2073
2089
|
It(
|
|
@@ -2083,11 +2099,11 @@ const Ir = async (e) => {
|
|
|
2083
2099
|
}
|
|
2084
2100
|
});
|
|
2085
2101
|
export {
|
|
2086
|
-
|
|
2087
|
-
|
|
2102
|
+
j as getQuery,
|
|
2103
|
+
us as getToken,
|
|
2088
2104
|
Br as getTokenFromCode,
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2105
|
+
q as getTokenParams,
|
|
2106
|
+
le as login,
|
|
2107
|
+
re as real_uri,
|
|
2108
|
+
$ as tokenStorage
|
|
2093
2109
|
};
|