@das-fed/upf-utils 6.4.0-dev.149 → 6.4.0-dev.151
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 +2085 -1664
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +2189 -1768
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +2234 -1813
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +2237 -1816
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +2234 -1813
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +2170 -1749
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +2238 -1813
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +2038 -1617
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +2250 -1811
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +2099 -1678
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +2247 -1826
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +2238 -1799
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +2234 -1813
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +2234 -1813
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +2234 -1813
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +2195 -1774
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +2234 -1813
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +2189 -1768
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +2237 -1816
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +2236 -1815
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +2234 -1813
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +2234 -1813
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +2250 -1811
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +2188 -1767
- 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 +848 -599
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/index.js +842 -593
- 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 +2188 -1767
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +1130 -881
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/index.js +1415 -1166
- 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 +19799 -20879
- package/pinyin-first-character/index.js.gz +0 -0
- package/style/index.js +4 -2
- package/style/index.js.gz +0 -0
- package/use-low-code/index.js.gz +0 -0
- package/webSocket-service/index.js.gz +0 -0
|
@@ -1,129 +1,129 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
import { encryption as
|
|
3
|
-
import { getConfig as
|
|
4
|
-
import { getUrlParams as
|
|
5
|
-
import { getAccessToken as
|
|
6
|
-
import { removeProcessEngineToken as
|
|
7
|
-
import { setPersonalInfo as
|
|
8
|
-
function
|
|
1
|
+
import { unref as Nt, getCurrentScope as Ut, onScopeDispose as Lt, ref as Y, watch as Se } from "vue";
|
|
2
|
+
import { encryption as Ft } from "@das-fed/upf-utils/atob";
|
|
3
|
+
import { getConfig as Te } from "@das-fed/upf-utils/config";
|
|
4
|
+
import { getUrlParams as Ge, funcUrlDel as Dt } from "@das-fed/upf-utils/common-tools";
|
|
5
|
+
import { getAccessToken as M, removeAccessToken as vt, setAccessToken as Bt, getAccessTokenInfo as le } from "@das-fed/upf-utils/token-tools";
|
|
6
|
+
import { removeProcessEngineToken as It, setProcessEngineToken as jt } from "@das-fed/upf-utils/process-engine-info";
|
|
7
|
+
import { setPersonalInfo as Ze } from "@das-fed/upf-utils/common-info/set-personal-info";
|
|
8
|
+
function Ye(e, t) {
|
|
9
9
|
return function() {
|
|
10
10
|
return e.apply(t, arguments);
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
|
-
const { toString:
|
|
14
|
-
const n =
|
|
13
|
+
const { toString: qt } = Object.prototype, { getPrototypeOf: Oe } = Object, { iterator: ne, toStringTag: et } = Symbol, re = /* @__PURE__ */ ((e) => (t) => {
|
|
14
|
+
const n = qt.call(t);
|
|
15
15
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
16
|
-
})(/* @__PURE__ */ Object.create(null)),
|
|
17
|
-
function
|
|
18
|
-
return e !== null && !
|
|
16
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => re(t) === e), se = (e) => (t) => typeof t === e, { isArray: B } = Array, H = se("undefined");
|
|
17
|
+
function Mt(e) {
|
|
18
|
+
return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
function
|
|
20
|
+
const tt = x("ArrayBuffer");
|
|
21
|
+
function Ht(e) {
|
|
22
22
|
let t;
|
|
23
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
23
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && tt(e.buffer), t;
|
|
24
24
|
}
|
|
25
|
-
const
|
|
26
|
-
if (
|
|
25
|
+
const $t = se("string"), A = se("function"), nt = se("number"), oe = (e) => e !== null && typeof e == "object", zt = (e) => e === !0 || e === !1, X = (e) => {
|
|
26
|
+
if (re(e) !== "object")
|
|
27
27
|
return !1;
|
|
28
|
-
const t =
|
|
29
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
30
|
-
},
|
|
28
|
+
const t = Oe(e);
|
|
29
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(et in e) && !(ne in e);
|
|
30
|
+
}, Jt = x("Date"), Vt = x("File"), Wt = x("Blob"), Kt = x("FileList"), Qt = (e) => oe(e) && A(e.pipe), Xt = (e) => {
|
|
31
31
|
let t;
|
|
32
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
33
|
-
t === "object" &&
|
|
34
|
-
},
|
|
35
|
-
function
|
|
32
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = re(e)) === "formdata" || // detect form-data instance
|
|
33
|
+
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
34
|
+
}, Gt = x("URLSearchParams"), [Zt, Yt, en, tn] = ["ReadableStream", "Request", "Response", "Headers"].map(x), nn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
35
|
+
function V(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
36
36
|
if (e === null || typeof e > "u")
|
|
37
37
|
return;
|
|
38
|
-
let r,
|
|
39
|
-
if (typeof e != "object" && (e = [e]),
|
|
40
|
-
for (r = 0,
|
|
38
|
+
let r, s;
|
|
39
|
+
if (typeof e != "object" && (e = [e]), B(e))
|
|
40
|
+
for (r = 0, s = e.length; r < s; r++)
|
|
41
41
|
t.call(null, e[r], r, e);
|
|
42
42
|
else {
|
|
43
|
-
const
|
|
43
|
+
const o = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = o.length;
|
|
44
44
|
let c;
|
|
45
45
|
for (r = 0; r < i; r++)
|
|
46
|
-
c =
|
|
46
|
+
c = o[r], t.call(null, e[c], c, e);
|
|
47
47
|
}
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function rt(e, t) {
|
|
50
50
|
t = t.toLowerCase();
|
|
51
51
|
const n = Object.keys(e);
|
|
52
|
-
let r = n.length,
|
|
52
|
+
let r = n.length, s;
|
|
53
53
|
for (; r-- > 0; )
|
|
54
|
-
if (
|
|
55
|
-
return
|
|
54
|
+
if (s = n[r], t === s.toLowerCase())
|
|
55
|
+
return s;
|
|
56
56
|
return null;
|
|
57
57
|
}
|
|
58
|
-
const
|
|
59
|
-
function
|
|
60
|
-
const { caseless: e } =
|
|
61
|
-
const
|
|
62
|
-
|
|
58
|
+
const U = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, st = (e) => !H(e) && e !== U;
|
|
59
|
+
function pe() {
|
|
60
|
+
const { caseless: e } = st(this) && this || {}, t = {}, n = (r, s) => {
|
|
61
|
+
const o = e && rt(t, s) || s;
|
|
62
|
+
X(t[o]) && X(r) ? t[o] = pe(t[o], r) : X(r) ? t[o] = pe({}, r) : B(r) ? t[o] = r.slice() : t[o] = r;
|
|
63
63
|
};
|
|
64
|
-
for (let r = 0,
|
|
65
|
-
arguments[r] &&
|
|
64
|
+
for (let r = 0, s = arguments.length; r < s; r++)
|
|
65
|
+
arguments[r] && V(arguments[r], n);
|
|
66
66
|
return t;
|
|
67
67
|
}
|
|
68
|
-
const
|
|
69
|
-
n &&
|
|
70
|
-
}, { allOwnKeys: r }), e),
|
|
68
|
+
const rn = (e, t, n, { allOwnKeys: r } = {}) => (V(t, (s, o) => {
|
|
69
|
+
n && A(s) ? e[o] = Ye(s, n) : e[o] = s;
|
|
70
|
+
}, { allOwnKeys: r }), e), sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), on = (e, t, n, r) => {
|
|
71
71
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
72
72
|
value: t.prototype
|
|
73
73
|
}), n && Object.assign(e.prototype, n);
|
|
74
|
-
},
|
|
75
|
-
let
|
|
74
|
+
}, an = (e, t, n, r) => {
|
|
75
|
+
let s, o, i;
|
|
76
76
|
const c = {};
|
|
77
77
|
if (t = t || {}, e == null) return t;
|
|
78
78
|
do {
|
|
79
|
-
for (
|
|
80
|
-
i = o
|
|
81
|
-
e = n !== !1 &&
|
|
79
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
80
|
+
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
81
|
+
e = n !== !1 && Oe(e);
|
|
82
82
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
83
83
|
return t;
|
|
84
|
-
},
|
|
84
|
+
}, cn = (e, t, n) => {
|
|
85
85
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
86
86
|
const r = e.indexOf(t, n);
|
|
87
87
|
return r !== -1 && r === n;
|
|
88
|
-
},
|
|
88
|
+
}, ln = (e) => {
|
|
89
89
|
if (!e) return null;
|
|
90
|
-
if (
|
|
90
|
+
if (B(e)) return e;
|
|
91
91
|
let t = e.length;
|
|
92
|
-
if (!
|
|
92
|
+
if (!nt(t)) return null;
|
|
93
93
|
const n = new Array(t);
|
|
94
94
|
for (; t-- > 0; )
|
|
95
95
|
n[t] = e[t];
|
|
96
96
|
return n;
|
|
97
|
-
},
|
|
98
|
-
const r = (e && e[
|
|
99
|
-
let
|
|
100
|
-
for (; (
|
|
101
|
-
const
|
|
102
|
-
t.call(e,
|
|
97
|
+
}, un = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Oe(Uint8Array)), fn = (e, t) => {
|
|
98
|
+
const r = (e && e[ne]).call(e);
|
|
99
|
+
let s;
|
|
100
|
+
for (; (s = r.next()) && !s.done; ) {
|
|
101
|
+
const o = s.value;
|
|
102
|
+
t.call(e, o[0], o[1]);
|
|
103
103
|
}
|
|
104
|
-
},
|
|
104
|
+
}, dn = (e, t) => {
|
|
105
105
|
let n;
|
|
106
106
|
const r = [];
|
|
107
107
|
for (; (n = e.exec(t)) !== null; )
|
|
108
108
|
r.push(n);
|
|
109
109
|
return r;
|
|
110
|
-
},
|
|
110
|
+
}, pn = x("HTMLFormElement"), hn = (e) => e.toLowerCase().replace(
|
|
111
111
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
112
|
-
function(n, r,
|
|
113
|
-
return r.toUpperCase() +
|
|
112
|
+
function(n, r, s) {
|
|
113
|
+
return r.toUpperCase() + s;
|
|
114
114
|
}
|
|
115
|
-
),
|
|
115
|
+
), Ce = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), mn = x("RegExp"), ot = (e, t) => {
|
|
116
116
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
117
|
-
|
|
117
|
+
V(n, (s, o) => {
|
|
118
118
|
let i;
|
|
119
|
-
(i = t(
|
|
119
|
+
(i = t(s, o, e)) !== !1 && (r[o] = i || s);
|
|
120
120
|
}), Object.defineProperties(e, r);
|
|
121
|
-
},
|
|
122
|
-
|
|
123
|
-
if (
|
|
121
|
+
}, yn = (e) => {
|
|
122
|
+
ot(e, (t, n) => {
|
|
123
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
124
124
|
return !1;
|
|
125
125
|
const r = e[n];
|
|
126
|
-
if (
|
|
126
|
+
if (A(r)) {
|
|
127
127
|
if (t.enumerable = !1, "writable" in t) {
|
|
128
128
|
t.writable = !1;
|
|
129
129
|
return;
|
|
@@ -133,103 +133,105 @@ const vt = (e, t, n, { allOwnKeys: r } = {}) => (H(t, (o, s) => {
|
|
|
133
133
|
});
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
|
-
},
|
|
137
|
-
const n = {}, r = (
|
|
138
|
-
|
|
139
|
-
n[
|
|
136
|
+
}, wn = (e, t) => {
|
|
137
|
+
const n = {}, r = (s) => {
|
|
138
|
+
s.forEach((o) => {
|
|
139
|
+
n[o] = !0;
|
|
140
140
|
});
|
|
141
141
|
};
|
|
142
|
-
return
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
ALPHA_DIGIT: Z + Z.toUpperCase() + we
|
|
148
|
-
}, Zt = (e = 16, t = Je.ALPHA_DIGIT) => {
|
|
149
|
-
let n = "";
|
|
150
|
-
const { length: r } = t;
|
|
151
|
-
for (; e--; )
|
|
152
|
-
n += t[Math.random() * r | 0];
|
|
153
|
-
return n;
|
|
154
|
-
};
|
|
155
|
-
function Yt(e) {
|
|
156
|
-
return !!(e && S(e.append) && e[Symbol.toStringTag] === "FormData" && e[Symbol.iterator]);
|
|
142
|
+
return B(e) ? r(e) : r(String(e).split(t)), n;
|
|
143
|
+
}, gn = () => {
|
|
144
|
+
}, bn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
145
|
+
function En(e) {
|
|
146
|
+
return !!(e && A(e.append) && e[et] === "FormData" && e[ne]);
|
|
157
147
|
}
|
|
158
|
-
const
|
|
159
|
-
const t = new Array(10), n = (r,
|
|
160
|
-
if (
|
|
148
|
+
const Rn = (e) => {
|
|
149
|
+
const t = new Array(10), n = (r, s) => {
|
|
150
|
+
if (oe(r)) {
|
|
161
151
|
if (t.indexOf(r) >= 0)
|
|
162
152
|
return;
|
|
163
153
|
if (!("toJSON" in r)) {
|
|
164
|
-
t[
|
|
165
|
-
const
|
|
166
|
-
return
|
|
167
|
-
const f = n(i,
|
|
168
|
-
!
|
|
169
|
-
}), t[
|
|
154
|
+
t[s] = r;
|
|
155
|
+
const o = B(r) ? [] : {};
|
|
156
|
+
return V(r, (i, c) => {
|
|
157
|
+
const f = n(i, s + 1);
|
|
158
|
+
!H(f) && (o[c] = f);
|
|
159
|
+
}), t[s] = void 0, o;
|
|
170
160
|
}
|
|
171
161
|
}
|
|
172
162
|
return r;
|
|
173
163
|
};
|
|
174
164
|
return n(e, 0);
|
|
175
|
-
},
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
165
|
+
}, Sn = x("AsyncFunction"), Tn = (e) => e && (oe(e) || A(e)) && A(e.then) && A(e.catch), it = ((e, t) => e ? setImmediate : t ? ((n, r) => (U.addEventListener("message", ({ source: s, data: o }) => {
|
|
166
|
+
s === U && o === n && r.length && r.shift()();
|
|
167
|
+
}, !1), (s) => {
|
|
168
|
+
r.push(s), U.postMessage(n, "*");
|
|
169
|
+
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
170
|
+
typeof setImmediate == "function",
|
|
171
|
+
A(U.postMessage)
|
|
172
|
+
), On = typeof queueMicrotask < "u" ? queueMicrotask.bind(U) : typeof process < "u" && process.nextTick || it, An = (e) => e != null && A(e[ne]), a = {
|
|
173
|
+
isArray: B,
|
|
174
|
+
isArrayBuffer: tt,
|
|
175
|
+
isBuffer: Mt,
|
|
176
|
+
isFormData: Xt,
|
|
177
|
+
isArrayBufferView: Ht,
|
|
178
|
+
isString: $t,
|
|
179
|
+
isNumber: nt,
|
|
180
|
+
isBoolean: zt,
|
|
181
|
+
isObject: oe,
|
|
182
|
+
isPlainObject: X,
|
|
183
|
+
isReadableStream: Zt,
|
|
184
|
+
isRequest: Yt,
|
|
185
|
+
isResponse: en,
|
|
186
|
+
isHeaders: tn,
|
|
187
|
+
isUndefined: H,
|
|
188
|
+
isDate: Jt,
|
|
189
|
+
isFile: Vt,
|
|
190
|
+
isBlob: Wt,
|
|
191
|
+
isRegExp: mn,
|
|
192
|
+
isFunction: A,
|
|
193
|
+
isStream: Qt,
|
|
194
|
+
isURLSearchParams: Gt,
|
|
195
|
+
isTypedArray: un,
|
|
196
|
+
isFileList: Kt,
|
|
197
|
+
forEach: V,
|
|
198
|
+
merge: pe,
|
|
199
|
+
extend: rn,
|
|
200
|
+
trim: nn,
|
|
201
|
+
stripBOM: sn,
|
|
202
|
+
inherits: on,
|
|
203
|
+
toFlatObject: an,
|
|
204
|
+
kindOf: re,
|
|
205
|
+
kindOfTest: x,
|
|
206
|
+
endsWith: cn,
|
|
207
|
+
toArray: ln,
|
|
208
|
+
forEachEntry: fn,
|
|
209
|
+
matchAll: dn,
|
|
210
|
+
isHTMLForm: pn,
|
|
211
|
+
hasOwnProperty: Ce,
|
|
212
|
+
hasOwnProp: Ce,
|
|
212
213
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
213
|
-
reduceDescriptors:
|
|
214
|
-
freezeMethods:
|
|
215
|
-
toObjectSet:
|
|
216
|
-
toCamelCase:
|
|
217
|
-
noop:
|
|
218
|
-
toFiniteNumber:
|
|
219
|
-
findKey:
|
|
220
|
-
global:
|
|
221
|
-
isContextDefined:
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
214
|
+
reduceDescriptors: ot,
|
|
215
|
+
freezeMethods: yn,
|
|
216
|
+
toObjectSet: wn,
|
|
217
|
+
toCamelCase: hn,
|
|
218
|
+
noop: gn,
|
|
219
|
+
toFiniteNumber: bn,
|
|
220
|
+
findKey: rt,
|
|
221
|
+
global: U,
|
|
222
|
+
isContextDefined: st,
|
|
223
|
+
isSpecCompliantForm: En,
|
|
224
|
+
toJSONObject: Rn,
|
|
225
|
+
isAsyncFn: Sn,
|
|
226
|
+
isThenable: Tn,
|
|
227
|
+
setImmediate: it,
|
|
228
|
+
asap: On,
|
|
229
|
+
isIterable: An
|
|
228
230
|
};
|
|
229
|
-
function
|
|
230
|
-
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),
|
|
231
|
+
function y(e, t, n, r, s) {
|
|
232
|
+
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);
|
|
231
233
|
}
|
|
232
|
-
a.inherits(
|
|
234
|
+
a.inherits(y, Error, {
|
|
233
235
|
toJSON: function() {
|
|
234
236
|
return {
|
|
235
237
|
// Standard
|
|
@@ -246,11 +248,11 @@ a.inherits(m, Error, {
|
|
|
246
248
|
// Axios
|
|
247
249
|
config: a.toJSONObject(this.config),
|
|
248
250
|
code: this.code,
|
|
249
|
-
status: this.
|
|
251
|
+
status: this.status
|
|
250
252
|
};
|
|
251
253
|
}
|
|
252
254
|
});
|
|
253
|
-
const
|
|
255
|
+
const at = y.prototype, ct = {};
|
|
254
256
|
[
|
|
255
257
|
"ERR_BAD_OPTION_VALUE",
|
|
256
258
|
"ERR_BAD_OPTION",
|
|
@@ -266,96 +268,98 @@ const Ve = m.prototype, We = {};
|
|
|
266
268
|
"ERR_INVALID_URL"
|
|
267
269
|
// eslint-disable-next-line func-names
|
|
268
270
|
].forEach((e) => {
|
|
269
|
-
|
|
271
|
+
ct[e] = { value: e };
|
|
270
272
|
});
|
|
271
|
-
Object.defineProperties(
|
|
272
|
-
Object.defineProperty(
|
|
273
|
-
|
|
274
|
-
const i = Object.create(
|
|
273
|
+
Object.defineProperties(y, ct);
|
|
274
|
+
Object.defineProperty(at, "isAxiosError", { value: !0 });
|
|
275
|
+
y.from = (e, t, n, r, s, o) => {
|
|
276
|
+
const i = Object.create(at);
|
|
275
277
|
return a.toFlatObject(e, i, function(f) {
|
|
276
278
|
return f !== Error.prototype;
|
|
277
|
-
}, (c) => c !== "isAxiosError"),
|
|
279
|
+
}, (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;
|
|
278
280
|
};
|
|
279
|
-
const
|
|
280
|
-
function
|
|
281
|
+
const _n = null;
|
|
282
|
+
function he(e) {
|
|
281
283
|
return a.isPlainObject(e) || a.isArray(e);
|
|
282
284
|
}
|
|
283
|
-
function
|
|
285
|
+
function lt(e) {
|
|
284
286
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
285
287
|
}
|
|
286
|
-
function
|
|
287
|
-
return e ? e.concat(t).map(function(
|
|
288
|
-
return
|
|
288
|
+
function Pe(e, t, n) {
|
|
289
|
+
return e ? e.concat(t).map(function(s, o) {
|
|
290
|
+
return s = lt(s), !n && o ? "[" + s + "]" : s;
|
|
289
291
|
}).join(n ? "." : "") : t;
|
|
290
292
|
}
|
|
291
|
-
function
|
|
292
|
-
return a.isArray(e) && !e.some(
|
|
293
|
+
function xn(e) {
|
|
294
|
+
return a.isArray(e) && !e.some(he);
|
|
293
295
|
}
|
|
294
|
-
const
|
|
296
|
+
const kn = a.toFlatObject(a, {}, null, function(t) {
|
|
295
297
|
return /^is[A-Z]/.test(t);
|
|
296
298
|
});
|
|
297
|
-
function
|
|
299
|
+
function ie(e, t, n) {
|
|
298
300
|
if (!a.isObject(e))
|
|
299
301
|
throw new TypeError("target must be an object");
|
|
300
302
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
301
303
|
metaTokens: !0,
|
|
302
304
|
dots: !1,
|
|
303
305
|
indexes: !1
|
|
304
|
-
}, !1, function(
|
|
305
|
-
return !a.isUndefined(
|
|
306
|
+
}, !1, function(m, h) {
|
|
307
|
+
return !a.isUndefined(h[m]);
|
|
306
308
|
});
|
|
307
|
-
const r = n.metaTokens,
|
|
308
|
-
if (!a.isFunction(
|
|
309
|
+
const r = n.metaTokens, s = n.visitor || u, o = n.dots, i = n.indexes, f = (n.Blob || typeof Blob < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
310
|
+
if (!a.isFunction(s))
|
|
309
311
|
throw new TypeError("visitor must be a function");
|
|
310
|
-
function
|
|
312
|
+
function l(p) {
|
|
311
313
|
if (p === null) return "";
|
|
312
314
|
if (a.isDate(p))
|
|
313
315
|
return p.toISOString();
|
|
316
|
+
if (a.isBoolean(p))
|
|
317
|
+
return p.toString();
|
|
314
318
|
if (!f && a.isBlob(p))
|
|
315
|
-
throw new
|
|
319
|
+
throw new y("Blob is not supported. Use a Buffer instead.");
|
|
316
320
|
return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
317
321
|
}
|
|
318
|
-
function
|
|
319
|
-
let
|
|
320
|
-
if (p && !
|
|
321
|
-
if (a.endsWith(
|
|
322
|
-
|
|
323
|
-
else if (a.isArray(p) &&
|
|
324
|
-
return
|
|
325
|
-
!(a.isUndefined(
|
|
322
|
+
function u(p, m, h) {
|
|
323
|
+
let E = p;
|
|
324
|
+
if (p && !h && typeof p == "object") {
|
|
325
|
+
if (a.endsWith(m, "{}"))
|
|
326
|
+
m = r ? m : m.slice(0, -2), p = JSON.stringify(p);
|
|
327
|
+
else if (a.isArray(p) && xn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p)))
|
|
328
|
+
return m = lt(m), E.forEach(function(S, C) {
|
|
329
|
+
!(a.isUndefined(S) || S === null) && t.append(
|
|
326
330
|
// eslint-disable-next-line no-nested-ternary
|
|
327
|
-
i === !0 ?
|
|
328
|
-
|
|
331
|
+
i === !0 ? Pe([m], C, o) : i === null ? m : m + "[]",
|
|
332
|
+
l(S)
|
|
329
333
|
);
|
|
330
334
|
}), !1;
|
|
331
335
|
}
|
|
332
|
-
return
|
|
336
|
+
return he(p) ? !0 : (t.append(Pe(h, m, o), l(p)), !1);
|
|
333
337
|
}
|
|
334
|
-
const
|
|
335
|
-
defaultVisitor:
|
|
336
|
-
convertValue:
|
|
337
|
-
isVisitable:
|
|
338
|
+
const d = [], w = Object.assign(kn, {
|
|
339
|
+
defaultVisitor: u,
|
|
340
|
+
convertValue: l,
|
|
341
|
+
isVisitable: he
|
|
338
342
|
});
|
|
339
|
-
function
|
|
343
|
+
function g(p, m) {
|
|
340
344
|
if (!a.isUndefined(p)) {
|
|
341
|
-
if (
|
|
342
|
-
throw Error("Circular reference detected in " +
|
|
343
|
-
|
|
344
|
-
(!(a.isUndefined(
|
|
345
|
+
if (d.indexOf(p) !== -1)
|
|
346
|
+
throw Error("Circular reference detected in " + m.join("."));
|
|
347
|
+
d.push(p), a.forEach(p, function(E, R) {
|
|
348
|
+
(!(a.isUndefined(E) || E === null) && s.call(
|
|
345
349
|
t,
|
|
346
|
-
|
|
347
|
-
a.isString(
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
)) === !0 && E
|
|
351
|
-
}),
|
|
350
|
+
E,
|
|
351
|
+
a.isString(R) ? R.trim() : R,
|
|
352
|
+
m,
|
|
353
|
+
w
|
|
354
|
+
)) === !0 && g(E, m ? m.concat(R) : [R]);
|
|
355
|
+
}), d.pop();
|
|
352
356
|
}
|
|
353
357
|
}
|
|
354
358
|
if (!a.isObject(e))
|
|
355
359
|
throw new TypeError("data must be an object");
|
|
356
|
-
return
|
|
360
|
+
return g(e), t;
|
|
357
361
|
}
|
|
358
|
-
function
|
|
362
|
+
function Ne(e) {
|
|
359
363
|
const t = {
|
|
360
364
|
"!": "%21",
|
|
361
365
|
"'": "%27",
|
|
@@ -369,36 +373,40 @@ function ge(e) {
|
|
|
369
373
|
return t[r];
|
|
370
374
|
});
|
|
371
375
|
}
|
|
372
|
-
function
|
|
373
|
-
this._pairs = [], e &&
|
|
376
|
+
function Ae(e, t) {
|
|
377
|
+
this._pairs = [], e && ie(e, this, t);
|
|
374
378
|
}
|
|
375
|
-
const
|
|
376
|
-
|
|
379
|
+
const ut = Ae.prototype;
|
|
380
|
+
ut.append = function(t, n) {
|
|
377
381
|
this._pairs.push([t, n]);
|
|
378
382
|
};
|
|
379
|
-
|
|
383
|
+
ut.toString = function(t) {
|
|
380
384
|
const n = t ? function(r) {
|
|
381
|
-
return t.call(this, r,
|
|
382
|
-
} :
|
|
383
|
-
return this._pairs.map(function(
|
|
384
|
-
return n(
|
|
385
|
+
return t.call(this, r, Ne);
|
|
386
|
+
} : Ne;
|
|
387
|
+
return this._pairs.map(function(s) {
|
|
388
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
385
389
|
}, "").join("&");
|
|
386
390
|
};
|
|
387
|
-
function
|
|
391
|
+
function Cn(e) {
|
|
388
392
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
389
393
|
}
|
|
390
|
-
function
|
|
394
|
+
function ft(e, t, n) {
|
|
391
395
|
if (!t)
|
|
392
396
|
return e;
|
|
393
|
-
const r = n && n.encode ||
|
|
394
|
-
|
|
395
|
-
|
|
397
|
+
const r = n && n.encode || Cn;
|
|
398
|
+
a.isFunction(n) && (n = {
|
|
399
|
+
serialize: n
|
|
400
|
+
});
|
|
401
|
+
const s = n && n.serialize;
|
|
402
|
+
let o;
|
|
403
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Ae(t, n).toString(r), o) {
|
|
396
404
|
const i = e.indexOf("#");
|
|
397
|
-
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") +
|
|
405
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
398
406
|
}
|
|
399
407
|
return e;
|
|
400
408
|
}
|
|
401
|
-
class
|
|
409
|
+
class Ue {
|
|
402
410
|
constructor() {
|
|
403
411
|
this.handlers = [];
|
|
404
412
|
}
|
|
@@ -452,63 +460,65 @@ class be {
|
|
|
452
460
|
});
|
|
453
461
|
}
|
|
454
462
|
}
|
|
455
|
-
const
|
|
463
|
+
const dt = {
|
|
456
464
|
silentJSONParsing: !0,
|
|
457
465
|
forcedJSONParsing: !0,
|
|
458
466
|
clarifyTimeoutError: !1
|
|
459
|
-
},
|
|
467
|
+
}, Pn = typeof URLSearchParams < "u" ? URLSearchParams : Ae, Nn = typeof FormData < "u" ? FormData : null, Un = typeof Blob < "u" ? Blob : null, Ln = {
|
|
460
468
|
isBrowser: !0,
|
|
461
469
|
classes: {
|
|
462
|
-
URLSearchParams:
|
|
463
|
-
FormData:
|
|
464
|
-
Blob:
|
|
470
|
+
URLSearchParams: Pn,
|
|
471
|
+
FormData: Nn,
|
|
472
|
+
Blob: Un
|
|
465
473
|
},
|
|
466
474
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
467
|
-
},
|
|
468
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
475
|
+
}, _e = typeof window < "u" && typeof document < "u", me = typeof navigator == "object" && navigator || void 0, Fn = _e && (!me || ["ReactNative", "NativeScript", "NS"].indexOf(me.product) < 0), Dn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
476
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", vn = _e && window.location.href || "http://localhost", Bn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
469
477
|
__proto__: null,
|
|
470
|
-
hasBrowserEnv:
|
|
471
|
-
hasStandardBrowserEnv:
|
|
472
|
-
hasStandardBrowserWebWorkerEnv:
|
|
478
|
+
hasBrowserEnv: _e,
|
|
479
|
+
hasStandardBrowserEnv: Fn,
|
|
480
|
+
hasStandardBrowserWebWorkerEnv: Dn,
|
|
481
|
+
navigator: me,
|
|
482
|
+
origin: vn
|
|
473
483
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
474
|
-
...
|
|
475
|
-
...
|
|
484
|
+
...Bn,
|
|
485
|
+
...Ln
|
|
476
486
|
};
|
|
477
|
-
function
|
|
478
|
-
return
|
|
479
|
-
visitor: function(n, r,
|
|
480
|
-
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) :
|
|
487
|
+
function In(e, t) {
|
|
488
|
+
return ie(e, new T.classes.URLSearchParams(), Object.assign({
|
|
489
|
+
visitor: function(n, r, s, o) {
|
|
490
|
+
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : o.defaultVisitor.apply(this, arguments);
|
|
481
491
|
}
|
|
482
492
|
}, t));
|
|
483
493
|
}
|
|
484
|
-
function
|
|
494
|
+
function jn(e) {
|
|
485
495
|
return a.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
486
496
|
}
|
|
487
|
-
function
|
|
497
|
+
function qn(e) {
|
|
488
498
|
const t = {}, n = Object.keys(e);
|
|
489
499
|
let r;
|
|
490
|
-
const
|
|
491
|
-
let
|
|
492
|
-
for (r = 0; r <
|
|
493
|
-
|
|
500
|
+
const s = n.length;
|
|
501
|
+
let o;
|
|
502
|
+
for (r = 0; r < s; r++)
|
|
503
|
+
o = n[r], t[o] = e[o];
|
|
494
504
|
return t;
|
|
495
505
|
}
|
|
496
|
-
function
|
|
497
|
-
function t(n, r,
|
|
498
|
-
let i = n[
|
|
506
|
+
function pt(e) {
|
|
507
|
+
function t(n, r, s, o) {
|
|
508
|
+
let i = n[o++];
|
|
499
509
|
if (i === "__proto__") return !0;
|
|
500
|
-
const c = Number.isFinite(+i), f =
|
|
501
|
-
return i = !i && a.isArray(
|
|
510
|
+
const c = Number.isFinite(+i), f = o >= n.length;
|
|
511
|
+
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] = qn(s[i])), !c);
|
|
502
512
|
}
|
|
503
513
|
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
504
514
|
const n = {};
|
|
505
|
-
return a.forEachEntry(e, (r,
|
|
506
|
-
t(
|
|
515
|
+
return a.forEachEntry(e, (r, s) => {
|
|
516
|
+
t(jn(r), s, n, 0);
|
|
507
517
|
}), n;
|
|
508
518
|
}
|
|
509
519
|
return null;
|
|
510
520
|
}
|
|
511
|
-
function
|
|
521
|
+
function Mn(e, t, n) {
|
|
512
522
|
if (a.isString(e))
|
|
513
523
|
try {
|
|
514
524
|
return (t || JSON.parse)(e), a.trim(e);
|
|
@@ -518,43 +528,45 @@ function En(e, t, n) {
|
|
|
518
528
|
}
|
|
519
529
|
return (n || JSON.stringify)(e);
|
|
520
530
|
}
|
|
521
|
-
const
|
|
522
|
-
transitional:
|
|
523
|
-
adapter: ["xhr", "http"],
|
|
531
|
+
const W = {
|
|
532
|
+
transitional: dt,
|
|
533
|
+
adapter: ["xhr", "http", "fetch"],
|
|
524
534
|
transformRequest: [function(t, n) {
|
|
525
|
-
const r = n.getContentType() || "",
|
|
526
|
-
if (
|
|
527
|
-
return
|
|
528
|
-
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t))
|
|
535
|
+
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
536
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
537
|
+
return s ? JSON.stringify(pt(t)) : t;
|
|
538
|
+
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
529
539
|
return t;
|
|
530
540
|
if (a.isArrayBufferView(t))
|
|
531
541
|
return t.buffer;
|
|
532
542
|
if (a.isURLSearchParams(t))
|
|
533
543
|
return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", !1), t.toString();
|
|
534
544
|
let c;
|
|
535
|
-
if (
|
|
545
|
+
if (o) {
|
|
536
546
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
537
|
-
return
|
|
547
|
+
return In(t, this.formSerializer).toString();
|
|
538
548
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
539
549
|
const f = this.env && this.env.FormData;
|
|
540
|
-
return
|
|
550
|
+
return ie(
|
|
541
551
|
c ? { "files[]": t } : t,
|
|
542
552
|
f && new f(),
|
|
543
553
|
this.formSerializer
|
|
544
554
|
);
|
|
545
555
|
}
|
|
546
556
|
}
|
|
547
|
-
return
|
|
557
|
+
return o || s ? (n.setContentType("application/json", !1), Mn(t)) : t;
|
|
548
558
|
}],
|
|
549
559
|
transformResponse: [function(t) {
|
|
550
|
-
const n = this.transitional ||
|
|
551
|
-
if (
|
|
552
|
-
|
|
560
|
+
const n = this.transitional || W.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
561
|
+
if (a.isResponse(t) || a.isReadableStream(t))
|
|
562
|
+
return t;
|
|
563
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
564
|
+
const i = !(n && n.silentJSONParsing) && s;
|
|
553
565
|
try {
|
|
554
566
|
return JSON.parse(t);
|
|
555
567
|
} catch (c) {
|
|
556
568
|
if (i)
|
|
557
|
-
throw c.name === "SyntaxError" ?
|
|
569
|
+
throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
558
570
|
}
|
|
559
571
|
}
|
|
560
572
|
return t;
|
|
@@ -583,9 +595,9 @@ const M = {
|
|
|
583
595
|
}
|
|
584
596
|
};
|
|
585
597
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
586
|
-
|
|
598
|
+
W.headers[e] = {};
|
|
587
599
|
});
|
|
588
|
-
const
|
|
600
|
+
const Hn = a.toObjectSet([
|
|
589
601
|
"age",
|
|
590
602
|
"authorization",
|
|
591
603
|
"content-length",
|
|
@@ -603,122 +615,136 @@ const gn = a.toObjectSet([
|
|
|
603
615
|
"referer",
|
|
604
616
|
"retry-after",
|
|
605
617
|
"user-agent"
|
|
606
|
-
]),
|
|
618
|
+
]), $n = (e) => {
|
|
607
619
|
const t = {};
|
|
608
|
-
let n, r,
|
|
620
|
+
let n, r, s;
|
|
609
621
|
return e && e.split(`
|
|
610
622
|
`).forEach(function(i) {
|
|
611
|
-
|
|
623
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Hn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
612
624
|
}), t;
|
|
613
|
-
},
|
|
614
|
-
function
|
|
625
|
+
}, Le = Symbol("internals");
|
|
626
|
+
function j(e) {
|
|
615
627
|
return e && String(e).trim().toLowerCase();
|
|
616
628
|
}
|
|
617
|
-
function
|
|
618
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
629
|
+
function G(e) {
|
|
630
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(G) : String(e);
|
|
619
631
|
}
|
|
620
|
-
function
|
|
632
|
+
function zn(e) {
|
|
621
633
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
622
634
|
let r;
|
|
623
635
|
for (; r = n.exec(e); )
|
|
624
636
|
t[r[1]] = r[2];
|
|
625
637
|
return t;
|
|
626
638
|
}
|
|
627
|
-
const
|
|
628
|
-
function
|
|
639
|
+
const Jn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
640
|
+
function ue(e, t, n, r, s) {
|
|
629
641
|
if (a.isFunction(r))
|
|
630
642
|
return r.call(this, t, n);
|
|
631
|
-
if (
|
|
643
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
632
644
|
if (a.isString(r))
|
|
633
645
|
return t.indexOf(r) !== -1;
|
|
634
646
|
if (a.isRegExp(r))
|
|
635
647
|
return r.test(t);
|
|
636
648
|
}
|
|
637
649
|
}
|
|
638
|
-
function
|
|
650
|
+
function Vn(e) {
|
|
639
651
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
640
652
|
}
|
|
641
|
-
function
|
|
653
|
+
function Wn(e, t) {
|
|
642
654
|
const n = a.toCamelCase(" " + t);
|
|
643
655
|
["get", "set", "has"].forEach((r) => {
|
|
644
656
|
Object.defineProperty(e, r + n, {
|
|
645
|
-
value: function(
|
|
646
|
-
return this[r].call(this, t,
|
|
657
|
+
value: function(s, o, i) {
|
|
658
|
+
return this[r].call(this, t, s, o, i);
|
|
647
659
|
},
|
|
648
660
|
configurable: !0
|
|
649
661
|
});
|
|
650
662
|
});
|
|
651
663
|
}
|
|
652
|
-
let
|
|
664
|
+
let _ = class {
|
|
653
665
|
constructor(t) {
|
|
654
666
|
t && this.set(t);
|
|
655
667
|
}
|
|
656
668
|
set(t, n, r) {
|
|
657
|
-
const
|
|
658
|
-
function
|
|
659
|
-
const
|
|
660
|
-
if (!
|
|
669
|
+
const s = this;
|
|
670
|
+
function o(c, f, l) {
|
|
671
|
+
const u = j(f);
|
|
672
|
+
if (!u)
|
|
661
673
|
throw new Error("header name must be a non-empty string");
|
|
662
|
-
const
|
|
663
|
-
(!
|
|
674
|
+
const d = a.findKey(s, u);
|
|
675
|
+
(!d || s[d] === void 0 || l === !0 || l === void 0 && s[d] !== !1) && (s[d || f] = G(c));
|
|
664
676
|
}
|
|
665
|
-
const i = (c, f) => a.forEach(c, (
|
|
666
|
-
|
|
677
|
+
const i = (c, f) => a.forEach(c, (l, u) => o(l, u, f));
|
|
678
|
+
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
679
|
+
i(t, n);
|
|
680
|
+
else if (a.isString(t) && (t = t.trim()) && !Jn(t))
|
|
681
|
+
i($n(t), n);
|
|
682
|
+
else if (a.isObject(t) && a.isIterable(t)) {
|
|
683
|
+
let c = {}, f, l;
|
|
684
|
+
for (const u of t) {
|
|
685
|
+
if (!a.isArray(u))
|
|
686
|
+
throw TypeError("Object iterator must return a key-value pair");
|
|
687
|
+
c[l = u[0]] = (f = c[l]) ? a.isArray(f) ? [...f, u[1]] : [f, u[1]] : u[1];
|
|
688
|
+
}
|
|
689
|
+
i(c, n);
|
|
690
|
+
} else
|
|
691
|
+
t != null && o(n, t, r);
|
|
692
|
+
return this;
|
|
667
693
|
}
|
|
668
694
|
get(t, n) {
|
|
669
|
-
if (t =
|
|
695
|
+
if (t = j(t), t) {
|
|
670
696
|
const r = a.findKey(this, t);
|
|
671
697
|
if (r) {
|
|
672
|
-
const
|
|
698
|
+
const s = this[r];
|
|
673
699
|
if (!n)
|
|
674
|
-
return
|
|
700
|
+
return s;
|
|
675
701
|
if (n === !0)
|
|
676
|
-
return
|
|
702
|
+
return zn(s);
|
|
677
703
|
if (a.isFunction(n))
|
|
678
|
-
return n.call(this,
|
|
704
|
+
return n.call(this, s, r);
|
|
679
705
|
if (a.isRegExp(n))
|
|
680
|
-
return n.exec(
|
|
706
|
+
return n.exec(s);
|
|
681
707
|
throw new TypeError("parser must be boolean|regexp|function");
|
|
682
708
|
}
|
|
683
709
|
}
|
|
684
710
|
}
|
|
685
711
|
has(t, n) {
|
|
686
|
-
if (t =
|
|
712
|
+
if (t = j(t), t) {
|
|
687
713
|
const r = a.findKey(this, t);
|
|
688
|
-
return !!(r && this[r] !== void 0 && (!n ||
|
|
714
|
+
return !!(r && this[r] !== void 0 && (!n || ue(this, this[r], r, n)));
|
|
689
715
|
}
|
|
690
716
|
return !1;
|
|
691
717
|
}
|
|
692
718
|
delete(t, n) {
|
|
693
719
|
const r = this;
|
|
694
|
-
let
|
|
695
|
-
function
|
|
696
|
-
if (i =
|
|
720
|
+
let s = !1;
|
|
721
|
+
function o(i) {
|
|
722
|
+
if (i = j(i), i) {
|
|
697
723
|
const c = a.findKey(r, i);
|
|
698
|
-
c && (!n ||
|
|
724
|
+
c && (!n || ue(r, r[c], c, n)) && (delete r[c], s = !0);
|
|
699
725
|
}
|
|
700
726
|
}
|
|
701
|
-
return a.isArray(t) ? t.forEach(
|
|
727
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
702
728
|
}
|
|
703
729
|
clear(t) {
|
|
704
730
|
const n = Object.keys(this);
|
|
705
|
-
let r = n.length,
|
|
731
|
+
let r = n.length, s = !1;
|
|
706
732
|
for (; r--; ) {
|
|
707
|
-
const
|
|
708
|
-
(!t ||
|
|
733
|
+
const o = n[r];
|
|
734
|
+
(!t || ue(this, this[o], o, t, !0)) && (delete this[o], s = !0);
|
|
709
735
|
}
|
|
710
|
-
return
|
|
736
|
+
return s;
|
|
711
737
|
}
|
|
712
738
|
normalize(t) {
|
|
713
739
|
const n = this, r = {};
|
|
714
|
-
return a.forEach(this, (
|
|
715
|
-
const i = a.findKey(r,
|
|
740
|
+
return a.forEach(this, (s, o) => {
|
|
741
|
+
const i = a.findKey(r, o);
|
|
716
742
|
if (i) {
|
|
717
|
-
n[i] =
|
|
743
|
+
n[i] = G(s), delete n[o];
|
|
718
744
|
return;
|
|
719
745
|
}
|
|
720
|
-
const c = t ?
|
|
721
|
-
c !==
|
|
746
|
+
const c = t ? Vn(o) : String(o).trim();
|
|
747
|
+
c !== o && delete n[o], n[c] = G(s), r[c] = !0;
|
|
722
748
|
}), this;
|
|
723
749
|
}
|
|
724
750
|
concat(...t) {
|
|
@@ -726,8 +752,8 @@ let O = class {
|
|
|
726
752
|
}
|
|
727
753
|
toJSON(t) {
|
|
728
754
|
const n = /* @__PURE__ */ Object.create(null);
|
|
729
|
-
return a.forEach(this, (r,
|
|
730
|
-
r != null && r !== !1 && (n[
|
|
755
|
+
return a.forEach(this, (r, s) => {
|
|
756
|
+
r != null && r !== !1 && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
731
757
|
}), n;
|
|
732
758
|
}
|
|
733
759
|
[Symbol.iterator]() {
|
|
@@ -737,6 +763,9 @@ let O = class {
|
|
|
737
763
|
return Object.entries(this.toJSON()).map(([t, n]) => t + ": " + n).join(`
|
|
738
764
|
`);
|
|
739
765
|
}
|
|
766
|
+
getSetCookie() {
|
|
767
|
+
return this.get("set-cookie") || [];
|
|
768
|
+
}
|
|
740
769
|
get [Symbol.toStringTag]() {
|
|
741
770
|
return "AxiosHeaders";
|
|
742
771
|
}
|
|
@@ -745,21 +774,21 @@ let O = class {
|
|
|
745
774
|
}
|
|
746
775
|
static concat(t, ...n) {
|
|
747
776
|
const r = new this(t);
|
|
748
|
-
return n.forEach((
|
|
777
|
+
return n.forEach((s) => r.set(s)), r;
|
|
749
778
|
}
|
|
750
779
|
static accessor(t) {
|
|
751
|
-
const r = (this[
|
|
780
|
+
const r = (this[Le] = this[Le] = {
|
|
752
781
|
accessors: {}
|
|
753
|
-
}).accessors,
|
|
754
|
-
function
|
|
755
|
-
const c =
|
|
756
|
-
r[c] || (
|
|
782
|
+
}).accessors, s = this.prototype;
|
|
783
|
+
function o(i) {
|
|
784
|
+
const c = j(i);
|
|
785
|
+
r[c] || (Wn(s, i), r[c] = !0);
|
|
757
786
|
}
|
|
758
|
-
return a.isArray(t) ? t.forEach(
|
|
787
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
759
788
|
}
|
|
760
789
|
};
|
|
761
|
-
|
|
762
|
-
a.reduceDescriptors(
|
|
790
|
+
_.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
791
|
+
a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
763
792
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
764
793
|
return {
|
|
765
794
|
get: () => e,
|
|
@@ -768,39 +797,100 @@ a.reduceDescriptors(O.prototype, ({ value: e }, t) => {
|
|
|
768
797
|
}
|
|
769
798
|
};
|
|
770
799
|
});
|
|
771
|
-
a.freezeMethods(
|
|
772
|
-
function
|
|
773
|
-
const n = this ||
|
|
774
|
-
let
|
|
800
|
+
a.freezeMethods(_);
|
|
801
|
+
function fe(e, t) {
|
|
802
|
+
const n = this || W, r = t || n, s = _.from(r.headers);
|
|
803
|
+
let o = r.data;
|
|
775
804
|
return a.forEach(e, function(c) {
|
|
776
|
-
|
|
777
|
-
}),
|
|
805
|
+
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
806
|
+
}), s.normalize(), o;
|
|
778
807
|
}
|
|
779
|
-
function
|
|
808
|
+
function ht(e) {
|
|
780
809
|
return !!(e && e.__CANCEL__);
|
|
781
810
|
}
|
|
782
|
-
function
|
|
783
|
-
|
|
811
|
+
function I(e, t, n) {
|
|
812
|
+
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
784
813
|
}
|
|
785
|
-
a.inherits(
|
|
814
|
+
a.inherits(I, y, {
|
|
786
815
|
__CANCEL__: !0
|
|
787
816
|
});
|
|
788
|
-
function
|
|
817
|
+
function mt(e, t, n) {
|
|
789
818
|
const r = n.config.validateStatus;
|
|
790
|
-
!n.status || !r || r(n.status) ? e(n) : t(new
|
|
819
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y(
|
|
791
820
|
"Request failed with status code " + n.status,
|
|
792
|
-
[
|
|
821
|
+
[y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4],
|
|
793
822
|
n.config,
|
|
794
823
|
n.request,
|
|
795
824
|
n
|
|
796
825
|
));
|
|
797
826
|
}
|
|
798
|
-
|
|
827
|
+
function Kn(e) {
|
|
828
|
+
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
829
|
+
return t && t[1] || "";
|
|
830
|
+
}
|
|
831
|
+
function Qn(e, t) {
|
|
832
|
+
e = e || 10;
|
|
833
|
+
const n = new Array(e), r = new Array(e);
|
|
834
|
+
let s = 0, o = 0, i;
|
|
835
|
+
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
836
|
+
const l = Date.now(), u = r[o];
|
|
837
|
+
i || (i = l), n[s] = f, r[s] = l;
|
|
838
|
+
let d = o, w = 0;
|
|
839
|
+
for (; d !== s; )
|
|
840
|
+
w += n[d++], d = d % e;
|
|
841
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), l - i < t)
|
|
842
|
+
return;
|
|
843
|
+
const g = u && l - u;
|
|
844
|
+
return g ? Math.round(w * 1e3 / g) : void 0;
|
|
845
|
+
};
|
|
846
|
+
}
|
|
847
|
+
function Xn(e, t) {
|
|
848
|
+
let n = 0, r = 1e3 / t, s, o;
|
|
849
|
+
const i = (l, u = Date.now()) => {
|
|
850
|
+
n = u, s = null, o && (clearTimeout(o), o = null), e.apply(null, l);
|
|
851
|
+
};
|
|
852
|
+
return [(...l) => {
|
|
853
|
+
const u = Date.now(), d = u - n;
|
|
854
|
+
d >= r ? i(l, u) : (s = l, o || (o = setTimeout(() => {
|
|
855
|
+
o = null, i(s);
|
|
856
|
+
}, r - d)));
|
|
857
|
+
}, () => s && i(s)];
|
|
858
|
+
}
|
|
859
|
+
const ee = (e, t, n = 3) => {
|
|
860
|
+
let r = 0;
|
|
861
|
+
const s = Qn(50, 250);
|
|
862
|
+
return Xn((o) => {
|
|
863
|
+
const i = o.loaded, c = o.lengthComputable ? o.total : void 0, f = i - r, l = s(f), u = i <= c;
|
|
864
|
+
r = i;
|
|
865
|
+
const d = {
|
|
866
|
+
loaded: i,
|
|
867
|
+
total: c,
|
|
868
|
+
progress: c ? i / c : void 0,
|
|
869
|
+
bytes: f,
|
|
870
|
+
rate: l || void 0,
|
|
871
|
+
estimated: l && c && u ? (c - i) / l : void 0,
|
|
872
|
+
event: o,
|
|
873
|
+
lengthComputable: c != null,
|
|
874
|
+
[t ? "download" : "upload"]: !0
|
|
875
|
+
};
|
|
876
|
+
e(d);
|
|
877
|
+
}, n);
|
|
878
|
+
}, Fe = (e, t) => {
|
|
879
|
+
const n = e != null;
|
|
880
|
+
return [(r) => t[0]({
|
|
881
|
+
lengthComputable: n,
|
|
882
|
+
total: e,
|
|
883
|
+
loaded: r
|
|
884
|
+
}), t[1]];
|
|
885
|
+
}, De = (e) => (...t) => a.asap(() => e(...t)), Gn = T.hasStandardBrowserEnv ? /* @__PURE__ */ ((e, t) => (n) => (n = new URL(n, T.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port)))(
|
|
886
|
+
new URL(T.origin),
|
|
887
|
+
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
888
|
+
) : () => !0, Zn = T.hasStandardBrowserEnv ? (
|
|
799
889
|
// Standard browser envs support document.cookie
|
|
800
890
|
{
|
|
801
|
-
write(e, t, n, r,
|
|
891
|
+
write(e, t, n, r, s, o) {
|
|
802
892
|
const i = [e + "=" + encodeURIComponent(t)];
|
|
803
|
-
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(
|
|
893
|
+
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("; ");
|
|
804
894
|
},
|
|
805
895
|
read(e) {
|
|
806
896
|
const t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
@@ -822,164 +912,373 @@ const _n = T.hasStandardBrowserEnv ? (
|
|
|
822
912
|
}
|
|
823
913
|
}
|
|
824
914
|
);
|
|
825
|
-
function
|
|
915
|
+
function Yn(e) {
|
|
826
916
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
827
917
|
}
|
|
828
|
-
function
|
|
918
|
+
function er(e, t) {
|
|
829
919
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
830
920
|
}
|
|
831
|
-
function
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
const Cn = T.hasStandardBrowserEnv ? (
|
|
835
|
-
// Standard browser envs have full support of the APIs needed to test
|
|
836
|
-
// whether the request URL is of the same origin as current location.
|
|
837
|
-
function() {
|
|
838
|
-
const t = /(msie|trident)/i.test(navigator.userAgent), n = document.createElement("a");
|
|
839
|
-
let r;
|
|
840
|
-
function o(s) {
|
|
841
|
-
let i = s;
|
|
842
|
-
return t && (n.setAttribute("href", i), i = n.href), n.setAttribute("href", i), {
|
|
843
|
-
href: n.href,
|
|
844
|
-
protocol: n.protocol ? n.protocol.replace(/:$/, "") : "",
|
|
845
|
-
host: n.host,
|
|
846
|
-
search: n.search ? n.search.replace(/^\?/, "") : "",
|
|
847
|
-
hash: n.hash ? n.hash.replace(/^#/, "") : "",
|
|
848
|
-
hostname: n.hostname,
|
|
849
|
-
port: n.port,
|
|
850
|
-
pathname: n.pathname.charAt(0) === "/" ? n.pathname : "/" + n.pathname
|
|
851
|
-
};
|
|
852
|
-
}
|
|
853
|
-
return r = o(window.location.href), function(i) {
|
|
854
|
-
const c = a.isString(i) ? o(i) : i;
|
|
855
|
-
return c.protocol === r.protocol && c.host === r.host;
|
|
856
|
-
};
|
|
857
|
-
}()
|
|
858
|
-
) : (
|
|
859
|
-
// Non standard browser envs (web workers, react-native) lack needed support.
|
|
860
|
-
/* @__PURE__ */ function() {
|
|
861
|
-
return function() {
|
|
862
|
-
return !0;
|
|
863
|
-
};
|
|
864
|
-
}()
|
|
865
|
-
);
|
|
866
|
-
function Pn(e) {
|
|
867
|
-
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
868
|
-
return t && t[1] || "";
|
|
869
|
-
}
|
|
870
|
-
function Nn(e, t) {
|
|
871
|
-
e = e || 10;
|
|
872
|
-
const n = new Array(e), r = new Array(e);
|
|
873
|
-
let o = 0, s = 0, i;
|
|
874
|
-
return t = t !== void 0 ? t : 1e3, function(f) {
|
|
875
|
-
const d = Date.now(), l = r[s];
|
|
876
|
-
i || (i = d), n[o] = f, r[o] = d;
|
|
877
|
-
let u = s, y = 0;
|
|
878
|
-
for (; u !== o; )
|
|
879
|
-
y += n[u++], u = u % e;
|
|
880
|
-
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), d - i < t)
|
|
881
|
-
return;
|
|
882
|
-
const E = l && d - l;
|
|
883
|
-
return E ? Math.round(y * 1e3 / E) : void 0;
|
|
884
|
-
};
|
|
921
|
+
function yt(e, t, n) {
|
|
922
|
+
let r = !Yn(t);
|
|
923
|
+
return e && (r || n == !1) ? er(e, t) : t;
|
|
885
924
|
}
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
925
|
+
const ve = (e) => e instanceof _ ? { ...e } : e;
|
|
926
|
+
function F(e, t) {
|
|
927
|
+
t = t || {};
|
|
928
|
+
const n = {};
|
|
929
|
+
function r(l, u, d, w) {
|
|
930
|
+
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;
|
|
931
|
+
}
|
|
932
|
+
function s(l, u, d, w) {
|
|
933
|
+
if (a.isUndefined(u)) {
|
|
934
|
+
if (!a.isUndefined(l))
|
|
935
|
+
return r(void 0, l, d, w);
|
|
936
|
+
} else return r(l, u, d, w);
|
|
937
|
+
}
|
|
938
|
+
function o(l, u) {
|
|
939
|
+
if (!a.isUndefined(u))
|
|
940
|
+
return r(void 0, u);
|
|
941
|
+
}
|
|
942
|
+
function i(l, u) {
|
|
943
|
+
if (a.isUndefined(u)) {
|
|
944
|
+
if (!a.isUndefined(l))
|
|
945
|
+
return r(void 0, l);
|
|
946
|
+
} else return r(void 0, u);
|
|
947
|
+
}
|
|
948
|
+
function c(l, u, d) {
|
|
949
|
+
if (d in t)
|
|
950
|
+
return r(l, u);
|
|
951
|
+
if (d in e)
|
|
952
|
+
return r(void 0, l);
|
|
953
|
+
}
|
|
954
|
+
const f = {
|
|
955
|
+
url: o,
|
|
956
|
+
method: o,
|
|
957
|
+
data: o,
|
|
958
|
+
baseURL: i,
|
|
959
|
+
transformRequest: i,
|
|
960
|
+
transformResponse: i,
|
|
961
|
+
paramsSerializer: i,
|
|
962
|
+
timeout: i,
|
|
963
|
+
timeoutMessage: i,
|
|
964
|
+
withCredentials: i,
|
|
965
|
+
withXSRFToken: i,
|
|
966
|
+
adapter: i,
|
|
967
|
+
responseType: i,
|
|
968
|
+
xsrfCookieName: i,
|
|
969
|
+
xsrfHeaderName: i,
|
|
970
|
+
onUploadProgress: i,
|
|
971
|
+
onDownloadProgress: i,
|
|
972
|
+
decompress: i,
|
|
973
|
+
maxContentLength: i,
|
|
974
|
+
maxBodyLength: i,
|
|
975
|
+
beforeRedirect: i,
|
|
976
|
+
transport: i,
|
|
977
|
+
httpAgent: i,
|
|
978
|
+
httpsAgent: i,
|
|
979
|
+
cancelToken: i,
|
|
980
|
+
socketPath: i,
|
|
981
|
+
responseEncoding: i,
|
|
982
|
+
validateStatus: c,
|
|
983
|
+
headers: (l, u, d) => s(ve(l), ve(u), d, !0)
|
|
902
984
|
};
|
|
985
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
986
|
+
const d = f[u] || s, w = d(e[u], t[u], u);
|
|
987
|
+
a.isUndefined(w) && d !== c || (n[u] = w);
|
|
988
|
+
}), n;
|
|
903
989
|
}
|
|
904
|
-
const
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
if (
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
s.setContentType([h || "multipart/form-data", ...g].join("; "));
|
|
919
|
-
}
|
|
990
|
+
const wt = (e) => {
|
|
991
|
+
const t = F({}, e);
|
|
992
|
+
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
993
|
+
t.headers = i = _.from(i), t.url = ft(yt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
994
|
+
"Authorization",
|
|
995
|
+
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
996
|
+
);
|
|
997
|
+
let f;
|
|
998
|
+
if (a.isFormData(n)) {
|
|
999
|
+
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv)
|
|
1000
|
+
i.setContentType(void 0);
|
|
1001
|
+
else if ((f = i.getContentType()) !== !1) {
|
|
1002
|
+
const [l, ...u] = f ? f.split(";").map((d) => d.trim()).filter(Boolean) : [];
|
|
1003
|
+
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
920
1004
|
}
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
1005
|
+
}
|
|
1006
|
+
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== !1 && Gn(t.url))) {
|
|
1007
|
+
const l = s && o && Zn.read(o);
|
|
1008
|
+
l && i.set(s, l);
|
|
1009
|
+
}
|
|
1010
|
+
return t;
|
|
1011
|
+
}, tr = typeof XMLHttpRequest < "u", nr = tr && function(e) {
|
|
1012
|
+
return new Promise(function(n, r) {
|
|
1013
|
+
const s = wt(e);
|
|
1014
|
+
let o = s.data;
|
|
1015
|
+
const i = _.from(s.headers).normalize();
|
|
1016
|
+
let { responseType: c, onUploadProgress: f, onDownloadProgress: l } = s, u, d, w, g, p;
|
|
1017
|
+
function m() {
|
|
1018
|
+
g && g(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(u), s.signal && s.signal.removeEventListener("abort", u);
|
|
925
1019
|
}
|
|
926
|
-
|
|
927
|
-
|
|
1020
|
+
let h = new XMLHttpRequest();
|
|
1021
|
+
h.open(s.method.toUpperCase(), s.url, !0), h.timeout = s.timeout;
|
|
928
1022
|
function E() {
|
|
929
|
-
if (!
|
|
1023
|
+
if (!h)
|
|
930
1024
|
return;
|
|
931
|
-
const
|
|
932
|
-
"getAllResponseHeaders" in
|
|
933
|
-
),
|
|
934
|
-
data: !
|
|
935
|
-
status:
|
|
936
|
-
statusText:
|
|
937
|
-
headers:
|
|
1025
|
+
const S = _.from(
|
|
1026
|
+
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1027
|
+
), O = {
|
|
1028
|
+
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1029
|
+
status: h.status,
|
|
1030
|
+
statusText: h.statusText,
|
|
1031
|
+
headers: S,
|
|
938
1032
|
config: e,
|
|
939
|
-
request:
|
|
1033
|
+
request: h
|
|
940
1034
|
};
|
|
941
|
-
|
|
942
|
-
n(
|
|
943
|
-
}, function(
|
|
944
|
-
r(
|
|
945
|
-
},
|
|
1035
|
+
mt(function(N) {
|
|
1036
|
+
n(N), m();
|
|
1037
|
+
}, function(N) {
|
|
1038
|
+
r(N), m();
|
|
1039
|
+
}, O), h = null;
|
|
946
1040
|
}
|
|
947
|
-
|
|
948
|
-
!
|
|
949
|
-
},
|
|
950
|
-
|
|
951
|
-
},
|
|
952
|
-
r(new
|
|
953
|
-
},
|
|
954
|
-
let
|
|
955
|
-
const
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
1041
|
+
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
1042
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1043
|
+
}, h.onabort = function() {
|
|
1044
|
+
h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
|
|
1045
|
+
}, h.onerror = function() {
|
|
1046
|
+
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1047
|
+
}, h.ontimeout = function() {
|
|
1048
|
+
let C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1049
|
+
const O = s.transitional || dt;
|
|
1050
|
+
s.timeoutErrorMessage && (C = s.timeoutErrorMessage), r(new y(
|
|
1051
|
+
C,
|
|
1052
|
+
O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED,
|
|
959
1053
|
e,
|
|
960
|
-
|
|
961
|
-
)),
|
|
962
|
-
},
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
}, e.cancelToken && e.cancelToken.subscribe(f), e.signal && (e.signal.aborted ? f() : e.signal.addEventListener("abort", f)));
|
|
971
|
-
const p = Pn(y);
|
|
972
|
-
if (p && T.protocols.indexOf(p) === -1) {
|
|
973
|
-
r(new m("Unsupported protocol " + p + ":", m.ERR_BAD_REQUEST, e));
|
|
1054
|
+
h
|
|
1055
|
+
)), h = null;
|
|
1056
|
+
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(C, O) {
|
|
1057
|
+
h.setRequestHeader(O, C);
|
|
1058
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, p] = ee(l, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = ee(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (u = (S) => {
|
|
1059
|
+
h && (r(!S || S.type ? new I(null, e, h) : S), h.abort(), h = null);
|
|
1060
|
+
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1061
|
+
const R = Kn(s.url);
|
|
1062
|
+
if (R && T.protocols.indexOf(R) === -1) {
|
|
1063
|
+
r(new y("Unsupported protocol " + R + ":", y.ERR_BAD_REQUEST, e));
|
|
974
1064
|
return;
|
|
975
1065
|
}
|
|
976
|
-
|
|
1066
|
+
h.send(o || null);
|
|
1067
|
+
});
|
|
1068
|
+
}, rr = (e, t) => {
|
|
1069
|
+
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1070
|
+
if (t || n) {
|
|
1071
|
+
let r = new AbortController(), s;
|
|
1072
|
+
const o = function(l) {
|
|
1073
|
+
if (!s) {
|
|
1074
|
+
s = !0, c();
|
|
1075
|
+
const u = l instanceof Error ? l : this.reason;
|
|
1076
|
+
r.abort(u instanceof y ? u : new I(u instanceof Error ? u.message : u));
|
|
1077
|
+
}
|
|
1078
|
+
};
|
|
1079
|
+
let i = t && setTimeout(() => {
|
|
1080
|
+
i = null, o(new y(`timeout ${t} of ms exceeded`, y.ETIMEDOUT));
|
|
1081
|
+
}, t);
|
|
1082
|
+
const c = () => {
|
|
1083
|
+
e && (i && clearTimeout(i), i = null, e.forEach((l) => {
|
|
1084
|
+
l.unsubscribe ? l.unsubscribe(o) : l.removeEventListener("abort", o);
|
|
1085
|
+
}), e = null);
|
|
1086
|
+
};
|
|
1087
|
+
e.forEach((l) => l.addEventListener("abort", o));
|
|
1088
|
+
const { signal: f } = r;
|
|
1089
|
+
return f.unsubscribe = () => a.asap(c), f;
|
|
1090
|
+
}
|
|
1091
|
+
}, sr = function* (e, t) {
|
|
1092
|
+
let n = e.byteLength;
|
|
1093
|
+
if (n < t) {
|
|
1094
|
+
yield e;
|
|
1095
|
+
return;
|
|
1096
|
+
}
|
|
1097
|
+
let r = 0, s;
|
|
1098
|
+
for (; r < n; )
|
|
1099
|
+
s = r + t, yield e.slice(r, s), r = s;
|
|
1100
|
+
}, or = async function* (e, t) {
|
|
1101
|
+
for await (const n of ir(e))
|
|
1102
|
+
yield* sr(n, t);
|
|
1103
|
+
}, ir = async function* (e) {
|
|
1104
|
+
if (e[Symbol.asyncIterator]) {
|
|
1105
|
+
yield* e;
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
const t = e.getReader();
|
|
1109
|
+
try {
|
|
1110
|
+
for (; ; ) {
|
|
1111
|
+
const { done: n, value: r } = await t.read();
|
|
1112
|
+
if (n)
|
|
1113
|
+
break;
|
|
1114
|
+
yield r;
|
|
1115
|
+
}
|
|
1116
|
+
} finally {
|
|
1117
|
+
await t.cancel();
|
|
1118
|
+
}
|
|
1119
|
+
}, Be = (e, t, n, r) => {
|
|
1120
|
+
const s = or(e, t);
|
|
1121
|
+
let o = 0, i, c = (f) => {
|
|
1122
|
+
i || (i = !0, r && r(f));
|
|
1123
|
+
};
|
|
1124
|
+
return new ReadableStream({
|
|
1125
|
+
async pull(f) {
|
|
1126
|
+
try {
|
|
1127
|
+
const { done: l, value: u } = await s.next();
|
|
1128
|
+
if (l) {
|
|
1129
|
+
c(), f.close();
|
|
1130
|
+
return;
|
|
1131
|
+
}
|
|
1132
|
+
let d = u.byteLength;
|
|
1133
|
+
if (n) {
|
|
1134
|
+
let w = o += d;
|
|
1135
|
+
n(w);
|
|
1136
|
+
}
|
|
1137
|
+
f.enqueue(new Uint8Array(u));
|
|
1138
|
+
} catch (l) {
|
|
1139
|
+
throw c(l), l;
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
cancel(f) {
|
|
1143
|
+
return c(f), s.return();
|
|
1144
|
+
}
|
|
1145
|
+
}, {
|
|
1146
|
+
highWaterMark: 2
|
|
1147
|
+
});
|
|
1148
|
+
}, ae = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", gt = ae && typeof ReadableStream == "function", ar = ae && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), bt = (e, ...t) => {
|
|
1149
|
+
try {
|
|
1150
|
+
return !!e(...t);
|
|
1151
|
+
} catch {
|
|
1152
|
+
return !1;
|
|
1153
|
+
}
|
|
1154
|
+
}, cr = gt && bt(() => {
|
|
1155
|
+
let e = !1;
|
|
1156
|
+
const t = new Request(T.origin, {
|
|
1157
|
+
body: new ReadableStream(),
|
|
1158
|
+
method: "POST",
|
|
1159
|
+
get duplex() {
|
|
1160
|
+
return e = !0, "half";
|
|
1161
|
+
}
|
|
1162
|
+
}).headers.has("Content-Type");
|
|
1163
|
+
return e && !t;
|
|
1164
|
+
}), Ie = 64 * 1024, ye = gt && bt(() => a.isReadableStream(new Response("").body)), te = {
|
|
1165
|
+
stream: ye && ((e) => e.body)
|
|
1166
|
+
};
|
|
1167
|
+
ae && ((e) => {
|
|
1168
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1169
|
+
!te[t] && (te[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1170
|
+
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1171
|
+
});
|
|
1172
|
+
});
|
|
1173
|
+
})(new Response());
|
|
1174
|
+
const lr = async (e) => {
|
|
1175
|
+
if (e == null)
|
|
1176
|
+
return 0;
|
|
1177
|
+
if (a.isBlob(e))
|
|
1178
|
+
return e.size;
|
|
1179
|
+
if (a.isSpecCompliantForm(e))
|
|
1180
|
+
return (await new Request(T.origin, {
|
|
1181
|
+
method: "POST",
|
|
1182
|
+
body: e
|
|
1183
|
+
}).arrayBuffer()).byteLength;
|
|
1184
|
+
if (a.isArrayBufferView(e) || a.isArrayBuffer(e))
|
|
1185
|
+
return e.byteLength;
|
|
1186
|
+
if (a.isURLSearchParams(e) && (e = e + ""), a.isString(e))
|
|
1187
|
+
return (await ar(e)).byteLength;
|
|
1188
|
+
}, ur = async (e, t) => {
|
|
1189
|
+
const n = a.toFiniteNumber(e.getContentLength());
|
|
1190
|
+
return n ?? lr(t);
|
|
1191
|
+
}, fr = ae && (async (e) => {
|
|
1192
|
+
let {
|
|
1193
|
+
url: t,
|
|
1194
|
+
method: n,
|
|
1195
|
+
data: r,
|
|
1196
|
+
signal: s,
|
|
1197
|
+
cancelToken: o,
|
|
1198
|
+
timeout: i,
|
|
1199
|
+
onDownloadProgress: c,
|
|
1200
|
+
onUploadProgress: f,
|
|
1201
|
+
responseType: l,
|
|
1202
|
+
headers: u,
|
|
1203
|
+
withCredentials: d = "same-origin",
|
|
1204
|
+
fetchOptions: w
|
|
1205
|
+
} = wt(e);
|
|
1206
|
+
l = l ? (l + "").toLowerCase() : "text";
|
|
1207
|
+
let g = rr([s, o && o.toAbortSignal()], i), p;
|
|
1208
|
+
const m = g && g.unsubscribe && (() => {
|
|
1209
|
+
g.unsubscribe();
|
|
977
1210
|
});
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
1211
|
+
let h;
|
|
1212
|
+
try {
|
|
1213
|
+
if (f && cr && n !== "get" && n !== "head" && (h = await ur(u, r)) !== 0) {
|
|
1214
|
+
let O = new Request(t, {
|
|
1215
|
+
method: "POST",
|
|
1216
|
+
body: r,
|
|
1217
|
+
duplex: "half"
|
|
1218
|
+
}), P;
|
|
1219
|
+
if (a.isFormData(r) && (P = O.headers.get("content-type")) && u.setContentType(P), O.body) {
|
|
1220
|
+
const [N, K] = Fe(
|
|
1221
|
+
h,
|
|
1222
|
+
ee(De(f))
|
|
1223
|
+
);
|
|
1224
|
+
r = Be(O.body, Ie, N, K);
|
|
1225
|
+
}
|
|
1226
|
+
}
|
|
1227
|
+
a.isString(d) || (d = d ? "include" : "omit");
|
|
1228
|
+
const E = "credentials" in Request.prototype;
|
|
1229
|
+
p = new Request(t, {
|
|
1230
|
+
...w,
|
|
1231
|
+
signal: g,
|
|
1232
|
+
method: n.toUpperCase(),
|
|
1233
|
+
headers: u.normalize().toJSON(),
|
|
1234
|
+
body: r,
|
|
1235
|
+
duplex: "half",
|
|
1236
|
+
credentials: E ? d : void 0
|
|
1237
|
+
});
|
|
1238
|
+
let R = await fetch(p, w);
|
|
1239
|
+
const S = ye && (l === "stream" || l === "response");
|
|
1240
|
+
if (ye && (c || S && m)) {
|
|
1241
|
+
const O = {};
|
|
1242
|
+
["status", "statusText", "headers"].forEach((ke) => {
|
|
1243
|
+
O[ke] = R[ke];
|
|
1244
|
+
});
|
|
1245
|
+
const P = a.toFiniteNumber(R.headers.get("content-length")), [N, K] = c && Fe(
|
|
1246
|
+
P,
|
|
1247
|
+
ee(De(c), !0)
|
|
1248
|
+
) || [];
|
|
1249
|
+
R = new Response(
|
|
1250
|
+
Be(R.body, Ie, N, () => {
|
|
1251
|
+
K && K(), m && m();
|
|
1252
|
+
}),
|
|
1253
|
+
O
|
|
1254
|
+
);
|
|
1255
|
+
}
|
|
1256
|
+
l = l || "text";
|
|
1257
|
+
let C = await te[a.findKey(te, l) || "text"](R, e);
|
|
1258
|
+
return !S && m && m(), await new Promise((O, P) => {
|
|
1259
|
+
mt(O, P, {
|
|
1260
|
+
data: C,
|
|
1261
|
+
headers: _.from(R.headers),
|
|
1262
|
+
status: R.status,
|
|
1263
|
+
statusText: R.statusText,
|
|
1264
|
+
config: e,
|
|
1265
|
+
request: p
|
|
1266
|
+
});
|
|
1267
|
+
});
|
|
1268
|
+
} catch (E) {
|
|
1269
|
+
throw m && m(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1270
|
+
new y("Network Error", y.ERR_NETWORK, e, p),
|
|
1271
|
+
{
|
|
1272
|
+
cause: E.cause || E
|
|
1273
|
+
}
|
|
1274
|
+
) : y.from(E, E && E.code, e, p);
|
|
1275
|
+
}
|
|
1276
|
+
}), we = {
|
|
1277
|
+
http: _n,
|
|
1278
|
+
xhr: nr,
|
|
1279
|
+
fetch: fr
|
|
981
1280
|
};
|
|
982
|
-
a.forEach(
|
|
1281
|
+
a.forEach(we, (e, t) => {
|
|
983
1282
|
if (e) {
|
|
984
1283
|
try {
|
|
985
1284
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -988,170 +1287,108 @@ a.forEach(oe, (e, t) => {
|
|
|
988
1287
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
989
1288
|
}
|
|
990
1289
|
});
|
|
991
|
-
const
|
|
1290
|
+
const je = (e) => `- ${e}`, dr = (e) => a.isFunction(e) || e === null || e === !1, Et = {
|
|
992
1291
|
getAdapter: (e) => {
|
|
993
1292
|
e = a.isArray(e) ? e : [e];
|
|
994
1293
|
const { length: t } = e;
|
|
995
1294
|
let n, r;
|
|
996
|
-
const
|
|
997
|
-
for (let
|
|
998
|
-
n = e[
|
|
1295
|
+
const s = {};
|
|
1296
|
+
for (let o = 0; o < t; o++) {
|
|
1297
|
+
n = e[o];
|
|
999
1298
|
let i;
|
|
1000
|
-
if (r = n, !
|
|
1001
|
-
throw new
|
|
1299
|
+
if (r = n, !dr(n) && (r = we[(i = String(n)).toLowerCase()], r === void 0))
|
|
1300
|
+
throw new y(`Unknown adapter '${i}'`);
|
|
1002
1301
|
if (r)
|
|
1003
1302
|
break;
|
|
1004
|
-
|
|
1303
|
+
s[i || "#" + o] = r;
|
|
1005
1304
|
}
|
|
1006
1305
|
if (!r) {
|
|
1007
|
-
const
|
|
1306
|
+
const o = Object.entries(s).map(
|
|
1008
1307
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1009
1308
|
);
|
|
1010
|
-
let i = t ?
|
|
1011
|
-
` +
|
|
1012
|
-
`) : " " +
|
|
1013
|
-
throw new
|
|
1309
|
+
let i = t ? o.length > 1 ? `since :
|
|
1310
|
+
` + o.map(je).join(`
|
|
1311
|
+
`) : " " + je(o[0]) : "as no adapter specified";
|
|
1312
|
+
throw new y(
|
|
1014
1313
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1015
1314
|
"ERR_NOT_SUPPORT"
|
|
1016
1315
|
);
|
|
1017
1316
|
}
|
|
1018
1317
|
return r;
|
|
1019
1318
|
},
|
|
1020
|
-
adapters:
|
|
1319
|
+
adapters: we
|
|
1021
1320
|
};
|
|
1022
|
-
function
|
|
1321
|
+
function de(e) {
|
|
1023
1322
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1024
|
-
throw new
|
|
1323
|
+
throw new I(null, e);
|
|
1025
1324
|
}
|
|
1026
|
-
function
|
|
1027
|
-
return
|
|
1325
|
+
function qe(e) {
|
|
1326
|
+
return de(e), e.headers = _.from(e.headers), e.data = fe.call(
|
|
1028
1327
|
e,
|
|
1029
1328
|
e.transformRequest
|
|
1030
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1031
|
-
return
|
|
1329
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Et.getAdapter(e.adapter || W.adapter)(e).then(function(r) {
|
|
1330
|
+
return de(e), r.data = fe.call(
|
|
1032
1331
|
e,
|
|
1033
1332
|
e.transformResponse,
|
|
1034
1333
|
r
|
|
1035
|
-
), r.headers =
|
|
1334
|
+
), r.headers = _.from(r.headers), r;
|
|
1036
1335
|
}, function(r) {
|
|
1037
|
-
return
|
|
1336
|
+
return ht(r) || (de(e), r && r.response && (r.response.data = fe.call(
|
|
1038
1337
|
e,
|
|
1039
1338
|
e.transformResponse,
|
|
1040
1339
|
r.response
|
|
1041
|
-
), r.response.headers =
|
|
1340
|
+
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1042
1341
|
});
|
|
1043
1342
|
}
|
|
1044
|
-
const
|
|
1045
|
-
function P(e, t) {
|
|
1046
|
-
t = t || {};
|
|
1047
|
-
const n = {};
|
|
1048
|
-
function r(d, l, u) {
|
|
1049
|
-
return a.isPlainObject(d) && a.isPlainObject(l) ? a.merge.call({ caseless: u }, d, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1050
|
-
}
|
|
1051
|
-
function o(d, l, u) {
|
|
1052
|
-
if (a.isUndefined(l)) {
|
|
1053
|
-
if (!a.isUndefined(d))
|
|
1054
|
-
return r(void 0, d, u);
|
|
1055
|
-
} else return r(d, l, u);
|
|
1056
|
-
}
|
|
1057
|
-
function s(d, l) {
|
|
1058
|
-
if (!a.isUndefined(l))
|
|
1059
|
-
return r(void 0, l);
|
|
1060
|
-
}
|
|
1061
|
-
function i(d, l) {
|
|
1062
|
-
if (a.isUndefined(l)) {
|
|
1063
|
-
if (!a.isUndefined(d))
|
|
1064
|
-
return r(void 0, d);
|
|
1065
|
-
} else return r(void 0, l);
|
|
1066
|
-
}
|
|
1067
|
-
function c(d, l, u) {
|
|
1068
|
-
if (u in t)
|
|
1069
|
-
return r(d, l);
|
|
1070
|
-
if (u in e)
|
|
1071
|
-
return r(void 0, d);
|
|
1072
|
-
}
|
|
1073
|
-
const f = {
|
|
1074
|
-
url: s,
|
|
1075
|
-
method: s,
|
|
1076
|
-
data: s,
|
|
1077
|
-
baseURL: i,
|
|
1078
|
-
transformRequest: i,
|
|
1079
|
-
transformResponse: i,
|
|
1080
|
-
paramsSerializer: i,
|
|
1081
|
-
timeout: i,
|
|
1082
|
-
timeoutMessage: i,
|
|
1083
|
-
withCredentials: i,
|
|
1084
|
-
withXSRFToken: i,
|
|
1085
|
-
adapter: i,
|
|
1086
|
-
responseType: i,
|
|
1087
|
-
xsrfCookieName: i,
|
|
1088
|
-
xsrfHeaderName: i,
|
|
1089
|
-
onUploadProgress: i,
|
|
1090
|
-
onDownloadProgress: i,
|
|
1091
|
-
decompress: i,
|
|
1092
|
-
maxContentLength: i,
|
|
1093
|
-
maxBodyLength: i,
|
|
1094
|
-
beforeRedirect: i,
|
|
1095
|
-
transport: i,
|
|
1096
|
-
httpAgent: i,
|
|
1097
|
-
httpsAgent: i,
|
|
1098
|
-
cancelToken: i,
|
|
1099
|
-
socketPath: i,
|
|
1100
|
-
responseEncoding: i,
|
|
1101
|
-
validateStatus: c,
|
|
1102
|
-
headers: (d, l) => o(Ae(d), Ae(l), !0)
|
|
1103
|
-
};
|
|
1104
|
-
return a.forEach(Object.keys(Object.assign({}, e, t)), function(l) {
|
|
1105
|
-
const u = f[l] || o, y = u(e[l], t[l], l);
|
|
1106
|
-
a.isUndefined(y) && u !== c || (n[l] = y);
|
|
1107
|
-
}), n;
|
|
1108
|
-
}
|
|
1109
|
-
const rt = "1.6.7", he = {};
|
|
1343
|
+
const Rt = "1.10.0", ce = {};
|
|
1110
1344
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1111
|
-
|
|
1345
|
+
ce[e] = function(r) {
|
|
1112
1346
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1113
1347
|
};
|
|
1114
1348
|
});
|
|
1115
|
-
const
|
|
1116
|
-
|
|
1117
|
-
function o
|
|
1118
|
-
return "[Axios v" +
|
|
1349
|
+
const Me = {};
|
|
1350
|
+
ce.transitional = function(t, n, r) {
|
|
1351
|
+
function s(o, i) {
|
|
1352
|
+
return "[Axios v" + Rt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1119
1353
|
}
|
|
1120
|
-
return (
|
|
1354
|
+
return (o, i, c) => {
|
|
1121
1355
|
if (t === !1)
|
|
1122
|
-
throw new
|
|
1123
|
-
|
|
1124
|
-
|
|
1356
|
+
throw new y(
|
|
1357
|
+
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1358
|
+
y.ERR_DEPRECATED
|
|
1125
1359
|
);
|
|
1126
|
-
return n && !
|
|
1360
|
+
return n && !Me[i] && (Me[i] = !0), t ? t(o, i, c) : !0;
|
|
1127
1361
|
};
|
|
1128
1362
|
};
|
|
1129
|
-
function
|
|
1363
|
+
ce.spelling = function(t) {
|
|
1364
|
+
return (n, r) => !0;
|
|
1365
|
+
};
|
|
1366
|
+
function pr(e, t, n) {
|
|
1130
1367
|
if (typeof e != "object")
|
|
1131
|
-
throw new
|
|
1368
|
+
throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1132
1369
|
const r = Object.keys(e);
|
|
1133
|
-
let
|
|
1134
|
-
for (;
|
|
1135
|
-
const
|
|
1370
|
+
let s = r.length;
|
|
1371
|
+
for (; s-- > 0; ) {
|
|
1372
|
+
const o = r[s], i = t[o];
|
|
1136
1373
|
if (i) {
|
|
1137
|
-
const c = e[
|
|
1374
|
+
const c = e[o], f = c === void 0 || i(c, o, e);
|
|
1138
1375
|
if (f !== !0)
|
|
1139
|
-
throw new
|
|
1376
|
+
throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1140
1377
|
continue;
|
|
1141
1378
|
}
|
|
1142
1379
|
if (n !== !0)
|
|
1143
|
-
throw new
|
|
1380
|
+
throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1144
1381
|
}
|
|
1145
1382
|
}
|
|
1146
|
-
const
|
|
1147
|
-
assertOptions:
|
|
1148
|
-
validators:
|
|
1149
|
-
},
|
|
1150
|
-
let
|
|
1383
|
+
const Z = {
|
|
1384
|
+
assertOptions: pr,
|
|
1385
|
+
validators: ce
|
|
1386
|
+
}, k = Z.validators;
|
|
1387
|
+
let L = class {
|
|
1151
1388
|
constructor(t) {
|
|
1152
|
-
this.defaults = t, this.interceptors = {
|
|
1153
|
-
request: new
|
|
1154
|
-
response: new
|
|
1389
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1390
|
+
request: new Ue(),
|
|
1391
|
+
response: new Ue()
|
|
1155
1392
|
};
|
|
1156
1393
|
}
|
|
1157
1394
|
/**
|
|
@@ -1167,83 +1404,89 @@ let k = class {
|
|
|
1167
1404
|
return await this._request(t, n);
|
|
1168
1405
|
} catch (r) {
|
|
1169
1406
|
if (r instanceof Error) {
|
|
1170
|
-
let
|
|
1171
|
-
Error.captureStackTrace ? Error.captureStackTrace(
|
|
1172
|
-
const
|
|
1173
|
-
|
|
1174
|
-
|
|
1407
|
+
let s = {};
|
|
1408
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1409
|
+
const o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1410
|
+
try {
|
|
1411
|
+
r.stack ? o && !String(r.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (r.stack += `
|
|
1412
|
+
` + o) : r.stack = o;
|
|
1413
|
+
} catch {
|
|
1414
|
+
}
|
|
1175
1415
|
}
|
|
1176
1416
|
throw r;
|
|
1177
1417
|
}
|
|
1178
1418
|
}
|
|
1179
1419
|
_request(t, n) {
|
|
1180
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1181
|
-
const { transitional: r, paramsSerializer:
|
|
1182
|
-
r !== void 0 &&
|
|
1183
|
-
silentJSONParsing:
|
|
1184
|
-
forcedJSONParsing:
|
|
1185
|
-
clarifyTimeoutError:
|
|
1186
|
-
}, !1),
|
|
1187
|
-
serialize:
|
|
1188
|
-
} :
|
|
1189
|
-
encode:
|
|
1190
|
-
serialize:
|
|
1191
|
-
}, !0)), n.
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1420
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1421
|
+
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1422
|
+
r !== void 0 && Z.assertOptions(r, {
|
|
1423
|
+
silentJSONParsing: k.transitional(k.boolean),
|
|
1424
|
+
forcedJSONParsing: k.transitional(k.boolean),
|
|
1425
|
+
clarifyTimeoutError: k.transitional(k.boolean)
|
|
1426
|
+
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1427
|
+
serialize: s
|
|
1428
|
+
} : Z.assertOptions(s, {
|
|
1429
|
+
encode: k.function,
|
|
1430
|
+
serialize: k.function
|
|
1431
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Z.assertOptions(n, {
|
|
1432
|
+
baseUrl: k.spelling("baseURL"),
|
|
1433
|
+
withXsrfToken: k.spelling("withXSRFToken")
|
|
1434
|
+
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1435
|
+
let i = o && a.merge(
|
|
1436
|
+
o.common,
|
|
1437
|
+
o[n.method]
|
|
1195
1438
|
);
|
|
1196
|
-
|
|
1439
|
+
o && a.forEach(
|
|
1197
1440
|
["delete", "get", "head", "post", "put", "patch", "common"],
|
|
1198
1441
|
(p) => {
|
|
1199
|
-
delete
|
|
1442
|
+
delete o[p];
|
|
1200
1443
|
}
|
|
1201
|
-
), n.headers =
|
|
1444
|
+
), n.headers = _.concat(i, o);
|
|
1202
1445
|
const c = [];
|
|
1203
1446
|
let f = !0;
|
|
1204
|
-
this.interceptors.request.forEach(function(
|
|
1205
|
-
typeof
|
|
1447
|
+
this.interceptors.request.forEach(function(m) {
|
|
1448
|
+
typeof m.runWhen == "function" && m.runWhen(n) === !1 || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1206
1449
|
});
|
|
1207
|
-
const
|
|
1208
|
-
this.interceptors.response.forEach(function(
|
|
1209
|
-
|
|
1450
|
+
const l = [];
|
|
1451
|
+
this.interceptors.response.forEach(function(m) {
|
|
1452
|
+
l.push(m.fulfilled, m.rejected);
|
|
1210
1453
|
});
|
|
1211
|
-
let
|
|
1454
|
+
let u, d = 0, w;
|
|
1212
1455
|
if (!f) {
|
|
1213
|
-
const p = [
|
|
1214
|
-
for (p.unshift.apply(p, c), p.push.apply(p,
|
|
1215
|
-
|
|
1216
|
-
return
|
|
1456
|
+
const p = [qe.bind(this), void 0];
|
|
1457
|
+
for (p.unshift.apply(p, c), p.push.apply(p, l), w = p.length, u = Promise.resolve(n); d < w; )
|
|
1458
|
+
u = u.then(p[d++], p[d++]);
|
|
1459
|
+
return u;
|
|
1217
1460
|
}
|
|
1218
|
-
|
|
1219
|
-
let
|
|
1220
|
-
for (
|
|
1221
|
-
const p = c[
|
|
1461
|
+
w = c.length;
|
|
1462
|
+
let g = n;
|
|
1463
|
+
for (d = 0; d < w; ) {
|
|
1464
|
+
const p = c[d++], m = c[d++];
|
|
1222
1465
|
try {
|
|
1223
|
-
|
|
1224
|
-
} catch (
|
|
1225
|
-
|
|
1466
|
+
g = p(g);
|
|
1467
|
+
} catch (h) {
|
|
1468
|
+
m.call(this, h);
|
|
1226
1469
|
break;
|
|
1227
1470
|
}
|
|
1228
1471
|
}
|
|
1229
1472
|
try {
|
|
1230
|
-
|
|
1473
|
+
u = qe.call(this, g);
|
|
1231
1474
|
} catch (p) {
|
|
1232
1475
|
return Promise.reject(p);
|
|
1233
1476
|
}
|
|
1234
|
-
for (
|
|
1235
|
-
|
|
1236
|
-
return
|
|
1477
|
+
for (d = 0, w = l.length; d < w; )
|
|
1478
|
+
u = u.then(l[d++], l[d++]);
|
|
1479
|
+
return u;
|
|
1237
1480
|
}
|
|
1238
1481
|
getUri(t) {
|
|
1239
|
-
t =
|
|
1240
|
-
const n =
|
|
1241
|
-
return
|
|
1482
|
+
t = F(this.defaults, t);
|
|
1483
|
+
const n = yt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1484
|
+
return ft(n, t.params, t.paramsSerializer);
|
|
1242
1485
|
}
|
|
1243
1486
|
};
|
|
1244
1487
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1245
|
-
|
|
1246
|
-
return this.request(
|
|
1488
|
+
L.prototype[t] = function(n, r) {
|
|
1489
|
+
return this.request(F(r || {}, {
|
|
1247
1490
|
method: t,
|
|
1248
1491
|
url: n,
|
|
1249
1492
|
data: (r || {}).data
|
|
@@ -1252,44 +1495,44 @@ a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1252
1495
|
});
|
|
1253
1496
|
a.forEach(["post", "put", "patch"], function(t) {
|
|
1254
1497
|
function n(r) {
|
|
1255
|
-
return function(
|
|
1256
|
-
return this.request(
|
|
1498
|
+
return function(o, i, c) {
|
|
1499
|
+
return this.request(F(c || {}, {
|
|
1257
1500
|
method: t,
|
|
1258
1501
|
headers: r ? {
|
|
1259
1502
|
"Content-Type": "multipart/form-data"
|
|
1260
1503
|
} : {},
|
|
1261
|
-
url:
|
|
1504
|
+
url: o,
|
|
1262
1505
|
data: i
|
|
1263
1506
|
}));
|
|
1264
1507
|
};
|
|
1265
1508
|
}
|
|
1266
|
-
|
|
1509
|
+
L.prototype[t] = n(), L.prototype[t + "Form"] = n(!0);
|
|
1267
1510
|
});
|
|
1268
|
-
let
|
|
1511
|
+
let hr = class St {
|
|
1269
1512
|
constructor(t) {
|
|
1270
1513
|
if (typeof t != "function")
|
|
1271
1514
|
throw new TypeError("executor must be a function.");
|
|
1272
1515
|
let n;
|
|
1273
|
-
this.promise = new Promise(function(
|
|
1274
|
-
n =
|
|
1516
|
+
this.promise = new Promise(function(o) {
|
|
1517
|
+
n = o;
|
|
1275
1518
|
});
|
|
1276
1519
|
const r = this;
|
|
1277
|
-
this.promise.then((
|
|
1520
|
+
this.promise.then((s) => {
|
|
1278
1521
|
if (!r._listeners) return;
|
|
1279
|
-
let
|
|
1280
|
-
for (;
|
|
1281
|
-
r._listeners[
|
|
1522
|
+
let o = r._listeners.length;
|
|
1523
|
+
for (; o-- > 0; )
|
|
1524
|
+
r._listeners[o](s);
|
|
1282
1525
|
r._listeners = null;
|
|
1283
|
-
}), this.promise.then = (
|
|
1284
|
-
let
|
|
1526
|
+
}), this.promise.then = (s) => {
|
|
1527
|
+
let o;
|
|
1285
1528
|
const i = new Promise((c) => {
|
|
1286
|
-
r.subscribe(c),
|
|
1287
|
-
}).then(
|
|
1529
|
+
r.subscribe(c), o = c;
|
|
1530
|
+
}).then(s);
|
|
1288
1531
|
return i.cancel = function() {
|
|
1289
|
-
r.unsubscribe(
|
|
1532
|
+
r.unsubscribe(o);
|
|
1290
1533
|
}, i;
|
|
1291
|
-
}, t(function(
|
|
1292
|
-
r.reason || (r.reason = new
|
|
1534
|
+
}, t(function(o, i, c) {
|
|
1535
|
+
r.reason || (r.reason = new I(o, i, c), n(r.reason));
|
|
1293
1536
|
});
|
|
1294
1537
|
}
|
|
1295
1538
|
/**
|
|
@@ -1318,6 +1561,12 @@ let vn = class ot {
|
|
|
1318
1561
|
const n = this._listeners.indexOf(t);
|
|
1319
1562
|
n !== -1 && this._listeners.splice(n, 1);
|
|
1320
1563
|
}
|
|
1564
|
+
toAbortSignal() {
|
|
1565
|
+
const t = new AbortController(), n = (r) => {
|
|
1566
|
+
t.abort(r);
|
|
1567
|
+
};
|
|
1568
|
+
return this.subscribe(n), t.signal.unsubscribe = () => this.unsubscribe(n), t.signal;
|
|
1569
|
+
}
|
|
1321
1570
|
/**
|
|
1322
1571
|
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
1323
1572
|
* cancels the `CancelToken`.
|
|
@@ -1325,22 +1574,22 @@ let vn = class ot {
|
|
|
1325
1574
|
static source() {
|
|
1326
1575
|
let t;
|
|
1327
1576
|
return {
|
|
1328
|
-
token: new
|
|
1329
|
-
t =
|
|
1577
|
+
token: new St(function(s) {
|
|
1578
|
+
t = s;
|
|
1330
1579
|
}),
|
|
1331
1580
|
cancel: t
|
|
1332
1581
|
};
|
|
1333
1582
|
}
|
|
1334
1583
|
};
|
|
1335
|
-
function
|
|
1584
|
+
function mr(e) {
|
|
1336
1585
|
return function(n) {
|
|
1337
1586
|
return e.apply(null, n);
|
|
1338
1587
|
};
|
|
1339
1588
|
}
|
|
1340
|
-
function
|
|
1589
|
+
function yr(e) {
|
|
1341
1590
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1342
1591
|
}
|
|
1343
|
-
const
|
|
1592
|
+
const ge = {
|
|
1344
1593
|
Continue: 100,
|
|
1345
1594
|
SwitchingProtocols: 101,
|
|
1346
1595
|
Processing: 102,
|
|
@@ -1405,55 +1654,55 @@ const ie = {
|
|
|
1405
1654
|
NotExtended: 510,
|
|
1406
1655
|
NetworkAuthenticationRequired: 511
|
|
1407
1656
|
};
|
|
1408
|
-
Object.entries(
|
|
1409
|
-
|
|
1657
|
+
Object.entries(ge).forEach(([e, t]) => {
|
|
1658
|
+
ge[t] = e;
|
|
1410
1659
|
});
|
|
1411
|
-
function
|
|
1412
|
-
const t = new
|
|
1413
|
-
return a.extend(n,
|
|
1414
|
-
return
|
|
1660
|
+
function Tt(e) {
|
|
1661
|
+
const t = new L(e), n = Ye(L.prototype.request, t);
|
|
1662
|
+
return a.extend(n, L.prototype, t, { allOwnKeys: !0 }), a.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
1663
|
+
return Tt(F(e, s));
|
|
1415
1664
|
}, n;
|
|
1416
1665
|
}
|
|
1417
|
-
const
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1666
|
+
const b = Tt(W);
|
|
1667
|
+
b.Axios = L;
|
|
1668
|
+
b.CanceledError = I;
|
|
1669
|
+
b.CancelToken = hr;
|
|
1670
|
+
b.isCancel = ht;
|
|
1671
|
+
b.VERSION = Rt;
|
|
1672
|
+
b.toFormData = ie;
|
|
1673
|
+
b.AxiosError = y;
|
|
1674
|
+
b.Cancel = b.CanceledError;
|
|
1675
|
+
b.all = function(t) {
|
|
1427
1676
|
return Promise.all(t);
|
|
1428
1677
|
};
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1678
|
+
b.spread = mr;
|
|
1679
|
+
b.isAxiosError = yr;
|
|
1680
|
+
b.mergeConfig = F;
|
|
1681
|
+
b.AxiosHeaders = _;
|
|
1682
|
+
b.formToJSON = (e) => pt(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1683
|
+
b.getAdapter = Et.getAdapter;
|
|
1684
|
+
b.HttpStatusCode = ge;
|
|
1685
|
+
b.default = b;
|
|
1437
1686
|
const {
|
|
1438
|
-
Axios:
|
|
1439
|
-
AxiosError:
|
|
1440
|
-
CanceledError:
|
|
1441
|
-
isCancel:
|
|
1442
|
-
CancelToken:
|
|
1443
|
-
VERSION:
|
|
1444
|
-
all:
|
|
1445
|
-
Cancel:
|
|
1446
|
-
isAxiosError:
|
|
1447
|
-
spread:
|
|
1448
|
-
toFormData:
|
|
1449
|
-
AxiosHeaders:
|
|
1450
|
-
HttpStatusCode:
|
|
1451
|
-
formToJSON:
|
|
1452
|
-
getAdapter:
|
|
1453
|
-
mergeConfig:
|
|
1454
|
-
} =
|
|
1687
|
+
Axios: Kr,
|
|
1688
|
+
AxiosError: Qr,
|
|
1689
|
+
CanceledError: Xr,
|
|
1690
|
+
isCancel: Gr,
|
|
1691
|
+
CancelToken: Zr,
|
|
1692
|
+
VERSION: Yr,
|
|
1693
|
+
all: es,
|
|
1694
|
+
Cancel: ts,
|
|
1695
|
+
isAxiosError: ns,
|
|
1696
|
+
spread: rs,
|
|
1697
|
+
toFormData: ss,
|
|
1698
|
+
AxiosHeaders: os,
|
|
1699
|
+
HttpStatusCode: is,
|
|
1700
|
+
formToJSON: as,
|
|
1701
|
+
getAdapter: cs,
|
|
1702
|
+
mergeConfig: ls
|
|
1703
|
+
} = b;
|
|
1455
1704
|
/*! js-cookie v3.0.5 | MIT */
|
|
1456
|
-
function
|
|
1705
|
+
function Q(e) {
|
|
1457
1706
|
for (var t = 1; t < arguments.length; t++) {
|
|
1458
1707
|
var n = arguments[t];
|
|
1459
1708
|
for (var r in n)
|
|
@@ -1461,7 +1710,7 @@ function q(e) {
|
|
|
1461
1710
|
}
|
|
1462
1711
|
return e;
|
|
1463
1712
|
}
|
|
1464
|
-
var
|
|
1713
|
+
var wr = {
|
|
1465
1714
|
read: function(e) {
|
|
1466
1715
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1467
1716
|
},
|
|
@@ -1472,48 +1721,48 @@ var jn = {
|
|
|
1472
1721
|
);
|
|
1473
1722
|
}
|
|
1474
1723
|
};
|
|
1475
|
-
function
|
|
1476
|
-
function n(
|
|
1724
|
+
function be(e, t) {
|
|
1725
|
+
function n(s, o, i) {
|
|
1477
1726
|
if (!(typeof document > "u")) {
|
|
1478
|
-
i =
|
|
1727
|
+
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);
|
|
1479
1728
|
var c = "";
|
|
1480
1729
|
for (var f in i)
|
|
1481
1730
|
i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
|
|
1482
|
-
return document.cookie =
|
|
1731
|
+
return document.cookie = s + "=" + e.write(o, s) + c;
|
|
1483
1732
|
}
|
|
1484
1733
|
}
|
|
1485
|
-
function r(
|
|
1486
|
-
if (!(typeof document > "u" || arguments.length && !
|
|
1487
|
-
for (var
|
|
1488
|
-
var f =
|
|
1734
|
+
function r(s) {
|
|
1735
|
+
if (!(typeof document > "u" || arguments.length && !s)) {
|
|
1736
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < o.length; c++) {
|
|
1737
|
+
var f = o[c].split("="), l = f.slice(1).join("=");
|
|
1489
1738
|
try {
|
|
1490
|
-
var
|
|
1491
|
-
if (i[
|
|
1739
|
+
var u = decodeURIComponent(f[0]);
|
|
1740
|
+
if (i[u] = e.read(l, u), s === u)
|
|
1492
1741
|
break;
|
|
1493
1742
|
} catch {
|
|
1494
1743
|
}
|
|
1495
1744
|
}
|
|
1496
|
-
return
|
|
1745
|
+
return s ? i[s] : i;
|
|
1497
1746
|
}
|
|
1498
1747
|
}
|
|
1499
1748
|
return Object.create(
|
|
1500
1749
|
{
|
|
1501
1750
|
set: n,
|
|
1502
1751
|
get: r,
|
|
1503
|
-
remove: function(
|
|
1752
|
+
remove: function(s, o) {
|
|
1504
1753
|
n(
|
|
1505
|
-
|
|
1754
|
+
s,
|
|
1506
1755
|
"",
|
|
1507
|
-
|
|
1756
|
+
Q({}, o, {
|
|
1508
1757
|
expires: -1
|
|
1509
1758
|
})
|
|
1510
1759
|
);
|
|
1511
1760
|
},
|
|
1512
|
-
withAttributes: function(
|
|
1513
|
-
return
|
|
1761
|
+
withAttributes: function(s) {
|
|
1762
|
+
return be(this.converter, Q({}, this.attributes, s));
|
|
1514
1763
|
},
|
|
1515
|
-
withConverter: function(
|
|
1516
|
-
return
|
|
1764
|
+
withConverter: function(s) {
|
|
1765
|
+
return be(Q({}, this.converter, s), this.attributes);
|
|
1517
1766
|
}
|
|
1518
1767
|
},
|
|
1519
1768
|
{
|
|
@@ -1522,99 +1771,99 @@ function ae(e, t) {
|
|
|
1522
1771
|
}
|
|
1523
1772
|
);
|
|
1524
1773
|
}
|
|
1525
|
-
var
|
|
1526
|
-
const
|
|
1774
|
+
var gr = be(wr, { path: "/" }), He;
|
|
1775
|
+
const Ot = typeof window < "u", br = (e) => typeof e == "string", $e = () => +Date.now(), Ee = () => {
|
|
1527
1776
|
};
|
|
1528
|
-
|
|
1529
|
-
function
|
|
1530
|
-
return typeof e == "function" ? e() :
|
|
1777
|
+
Ot && ((He = window == null ? void 0 : window.navigator) != null && He.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1778
|
+
function xe(e) {
|
|
1779
|
+
return typeof e == "function" ? e() : Nt(e);
|
|
1531
1780
|
}
|
|
1532
|
-
function
|
|
1781
|
+
function Er(e, t) {
|
|
1533
1782
|
function n(...r) {
|
|
1534
|
-
return new Promise((
|
|
1535
|
-
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(
|
|
1783
|
+
return new Promise((s, o) => {
|
|
1784
|
+
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(s).catch(o);
|
|
1536
1785
|
});
|
|
1537
1786
|
}
|
|
1538
1787
|
return n;
|
|
1539
1788
|
}
|
|
1540
|
-
function
|
|
1541
|
-
let
|
|
1542
|
-
const
|
|
1543
|
-
|
|
1789
|
+
function Rr(e, t = !0, n = !0, r = !1) {
|
|
1790
|
+
let s = 0, o, i = !0, c = Ee, f;
|
|
1791
|
+
const l = () => {
|
|
1792
|
+
o && (clearTimeout(o), o = void 0, c(), c = Ee);
|
|
1544
1793
|
};
|
|
1545
|
-
return (
|
|
1546
|
-
const
|
|
1547
|
-
return
|
|
1548
|
-
c = r ?
|
|
1549
|
-
|
|
1550
|
-
}, Math.max(0,
|
|
1551
|
-
})), !n && !
|
|
1794
|
+
return (d) => {
|
|
1795
|
+
const w = xe(e), g = Date.now() - s, p = () => f = d();
|
|
1796
|
+
return l(), w <= 0 ? (s = Date.now(), p()) : (g > w && (n || !i) ? (s = Date.now(), p()) : t && (f = new Promise((m, h) => {
|
|
1797
|
+
c = r ? h : m, o = setTimeout(() => {
|
|
1798
|
+
s = Date.now(), i = !0, m(p()), l();
|
|
1799
|
+
}, Math.max(0, w - g));
|
|
1800
|
+
})), !n && !o && (o = setTimeout(() => i = !0, w)), i = !1, f);
|
|
1552
1801
|
};
|
|
1553
1802
|
}
|
|
1554
|
-
function
|
|
1803
|
+
function Sr(e) {
|
|
1555
1804
|
return e;
|
|
1556
1805
|
}
|
|
1557
|
-
function
|
|
1558
|
-
return
|
|
1806
|
+
function Tr(e) {
|
|
1807
|
+
return Ut() ? (Lt(e), !0) : !1;
|
|
1559
1808
|
}
|
|
1560
|
-
function
|
|
1809
|
+
function Or(e) {
|
|
1561
1810
|
var t;
|
|
1562
|
-
const n =
|
|
1811
|
+
const n = xe(e);
|
|
1563
1812
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1564
1813
|
}
|
|
1565
|
-
const
|
|
1566
|
-
function
|
|
1567
|
-
let t, n, r,
|
|
1568
|
-
if (
|
|
1569
|
-
return
|
|
1814
|
+
const At = Ot ? window : void 0;
|
|
1815
|
+
function ze(...e) {
|
|
1816
|
+
let t, n, r, s;
|
|
1817
|
+
if (br(e[0]) || Array.isArray(e[0]) ? ([n, r, s] = e, t = At) : [t, n, r, s] = e, !t)
|
|
1818
|
+
return Ee;
|
|
1570
1819
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1571
|
-
const
|
|
1572
|
-
|
|
1573
|
-
}, c = (
|
|
1574
|
-
i(),
|
|
1575
|
-
}, { immediate: !0, flush: "post" }),
|
|
1820
|
+
const o = [], i = () => {
|
|
1821
|
+
o.forEach((u) => u()), o.length = 0;
|
|
1822
|
+
}, c = (u, d, w, g) => (u.addEventListener(d, w, g), () => u.removeEventListener(d, w, g)), f = Se(() => [Or(t), xe(s)], ([u, d]) => {
|
|
1823
|
+
i(), u && o.push(...n.flatMap((w) => r.map((g) => c(u, w, g, d))));
|
|
1824
|
+
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1576
1825
|
f(), i();
|
|
1577
1826
|
};
|
|
1578
|
-
return
|
|
1827
|
+
return Tr(l), l;
|
|
1579
1828
|
}
|
|
1580
|
-
const
|
|
1581
|
-
|
|
1582
|
-
const
|
|
1583
|
-
function
|
|
1829
|
+
const Je = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ve = "__vueuse_ssr_handlers__";
|
|
1830
|
+
Je[Ve] = Je[Ve] || {};
|
|
1831
|
+
const Ar = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], _r = 6e4;
|
|
1832
|
+
function xr(e = _r, t = {}) {
|
|
1584
1833
|
const {
|
|
1585
1834
|
initialState: n = !1,
|
|
1586
1835
|
listenForVisibilityChange: r = !0,
|
|
1587
|
-
events:
|
|
1588
|
-
window:
|
|
1589
|
-
eventFilter: i =
|
|
1590
|
-
} = t, c =
|
|
1591
|
-
let
|
|
1592
|
-
const
|
|
1593
|
-
c.value = !1, f.value =
|
|
1836
|
+
events: s = Ar,
|
|
1837
|
+
window: o = At,
|
|
1838
|
+
eventFilter: i = Rr(50)
|
|
1839
|
+
} = t, c = Y(n), f = Y($e());
|
|
1840
|
+
let l;
|
|
1841
|
+
const u = Er(i, () => {
|
|
1842
|
+
c.value = !1, f.value = $e(), clearTimeout(l), l = setTimeout(() => c.value = !0, e);
|
|
1594
1843
|
});
|
|
1595
|
-
if (
|
|
1596
|
-
const
|
|
1597
|
-
for (const
|
|
1598
|
-
|
|
1599
|
-
r &&
|
|
1600
|
-
|
|
1844
|
+
if (o) {
|
|
1845
|
+
const d = o.document;
|
|
1846
|
+
for (const w of s)
|
|
1847
|
+
ze(o, w, u, { passive: !0 });
|
|
1848
|
+
r && ze(d, "visibilitychange", () => {
|
|
1849
|
+
d.hidden || u();
|
|
1601
1850
|
});
|
|
1602
1851
|
}
|
|
1603
|
-
return
|
|
1852
|
+
return l = setTimeout(() => c.value = !0, e), { idle: c, lastActive: f };
|
|
1604
1853
|
}
|
|
1605
|
-
var
|
|
1854
|
+
var We;
|
|
1606
1855
|
(function(e) {
|
|
1607
1856
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1608
|
-
})(
|
|
1609
|
-
var
|
|
1857
|
+
})(We || (We = {}));
|
|
1858
|
+
var kr = Object.defineProperty, Ke = Object.getOwnPropertySymbols, Cr = Object.prototype.hasOwnProperty, Pr = Object.prototype.propertyIsEnumerable, Qe = (e, t, n) => t in e ? kr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Nr = (e, t) => {
|
|
1610
1859
|
for (var n in t || (t = {}))
|
|
1611
|
-
|
|
1612
|
-
if (
|
|
1613
|
-
for (var n of
|
|
1614
|
-
|
|
1860
|
+
Cr.call(t, n) && Qe(e, n, t[n]);
|
|
1861
|
+
if (Ke)
|
|
1862
|
+
for (var n of Ke(t))
|
|
1863
|
+
Pr.call(t, n) && Qe(e, n, t[n]);
|
|
1615
1864
|
return e;
|
|
1616
1865
|
};
|
|
1617
|
-
const
|
|
1866
|
+
const Ur = {
|
|
1618
1867
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
1619
1868
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
1620
1869
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -1640,27 +1889,27 @@ const er = {
|
|
|
1640
1889
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
1641
1890
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1642
1891
|
};
|
|
1643
|
-
|
|
1644
|
-
linear:
|
|
1645
|
-
},
|
|
1646
|
-
let
|
|
1647
|
-
const
|
|
1648
|
-
|
|
1892
|
+
Nr({
|
|
1893
|
+
linear: Sr
|
|
1894
|
+
}, Ur);
|
|
1895
|
+
let Re;
|
|
1896
|
+
const _t = { triggerProxySso: "triggerProxySso" }, Lr = () => {
|
|
1897
|
+
Re = (e) => {
|
|
1649
1898
|
var n;
|
|
1650
1899
|
const { origin: t } = new URL(location.href);
|
|
1651
1900
|
(n = window.top) == null || n.postMessage(
|
|
1652
|
-
{ type:
|
|
1901
|
+
{ type: _t.triggerProxySso, data: { ...e || {}, redirect_uri: `${t}/` } },
|
|
1653
1902
|
t
|
|
1654
1903
|
);
|
|
1655
1904
|
};
|
|
1656
|
-
},
|
|
1905
|
+
}, Fr = (e) => {
|
|
1657
1906
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1658
1907
|
const { type: n, data: r } = t.data;
|
|
1659
|
-
n ===
|
|
1908
|
+
n === _t.triggerProxySso && (e == null || e(r));
|
|
1660
1909
|
});
|
|
1661
1910
|
};
|
|
1662
|
-
window.top !== window.self &&
|
|
1663
|
-
let
|
|
1911
|
+
window.top !== window.self && Lr();
|
|
1912
|
+
let xt = (e = 21) => {
|
|
1664
1913
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1665
1914
|
for (; e--; ) {
|
|
1666
1915
|
let r = n[e] & 63;
|
|
@@ -1668,131 +1917,131 @@ let ut = (e = 21) => {
|
|
|
1668
1917
|
}
|
|
1669
1918
|
return t;
|
|
1670
1919
|
};
|
|
1671
|
-
const
|
|
1920
|
+
const kt = (e) => new URL(location.href).searchParams.get(e), v = {
|
|
1672
1921
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1673
1922
|
// 重定向到登录页
|
|
1674
1923
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1675
1924
|
// 清除登录信息
|
|
1676
1925
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1677
1926
|
// 通过code获取token
|
|
1678
|
-
}, { baseURL:
|
|
1927
|
+
}, { baseURL: Xe, noRedireLogin: Dr = !1 } = Te(), $ = location.origin + "/home", D = {
|
|
1679
1928
|
response_type: "code",
|
|
1680
1929
|
scope: "sever",
|
|
1681
1930
|
client_id: "sys",
|
|
1682
|
-
client_secret:
|
|
1931
|
+
client_secret: Ft("das123"),
|
|
1683
1932
|
state: +/* @__PURE__ */ new Date()
|
|
1684
|
-
},
|
|
1685
|
-
const e =
|
|
1933
|
+
}, vr = () => {
|
|
1934
|
+
const e = Ge(location.href, "redirect_url") || "";
|
|
1686
1935
|
if (e)
|
|
1687
1936
|
window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(e));
|
|
1688
1937
|
else {
|
|
1689
1938
|
const t = ["code", "state", "kingdee_token", "redirect_url"];
|
|
1690
|
-
window.history.replaceState({}, "",
|
|
1939
|
+
window.history.replaceState({}, "", Dt(t));
|
|
1691
1940
|
}
|
|
1692
|
-
},
|
|
1941
|
+
}, Ct = Y(!1), Pt = (e) => {
|
|
1693
1942
|
if (e <= 0) return;
|
|
1694
|
-
const { idle: t } =
|
|
1695
|
-
|
|
1943
|
+
const { idle: t } = xr(e);
|
|
1944
|
+
Se(
|
|
1696
1945
|
() => t.value,
|
|
1697
1946
|
(n) => {
|
|
1698
|
-
n === !0 && (
|
|
1947
|
+
n === !0 && (Ct.value = !0);
|
|
1699
1948
|
}
|
|
1700
1949
|
);
|
|
1701
1950
|
};
|
|
1702
|
-
localStorage.getItem("idelTime") &&
|
|
1703
|
-
const
|
|
1704
|
-
const e =
|
|
1705
|
-
if (!e) return
|
|
1706
|
-
const t =
|
|
1951
|
+
localStorage.getItem("idelTime") && Pt(Number(localStorage.getItem("idelTime")));
|
|
1952
|
+
const Br = async () => {
|
|
1953
|
+
const e = kt("code") || "";
|
|
1954
|
+
if (!e) return M();
|
|
1955
|
+
const t = Ge(location.href, "kingdee_token") || "";
|
|
1707
1956
|
let n = {};
|
|
1708
1957
|
const r = {
|
|
1709
1958
|
grant_type: "authorization_code",
|
|
1710
1959
|
code: e,
|
|
1711
|
-
client_id:
|
|
1712
|
-
client_secret:
|
|
1713
|
-
redirect_uri:
|
|
1960
|
+
client_id: D.client_id,
|
|
1961
|
+
client_secret: D.client_secret,
|
|
1962
|
+
redirect_uri: $,
|
|
1714
1963
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1715
|
-
nonce:
|
|
1964
|
+
nonce: xt()
|
|
1716
1965
|
};
|
|
1717
1966
|
t && (sessionStorage.setItem("kingdee_token", t), r.redirect_uri = `${r.redirect_uri}?kingdee_token=${t}`);
|
|
1718
1967
|
try {
|
|
1719
|
-
await
|
|
1968
|
+
await b.create().get(v.token, { baseURL: Xe });
|
|
1720
1969
|
} catch {
|
|
1721
1970
|
}
|
|
1722
1971
|
try {
|
|
1723
|
-
n = await
|
|
1724
|
-
|
|
1972
|
+
n = await b.create().post(
|
|
1973
|
+
v.token,
|
|
1725
1974
|
{},
|
|
1726
1975
|
{
|
|
1727
|
-
baseURL:
|
|
1976
|
+
baseURL: Xe,
|
|
1728
1977
|
params: r,
|
|
1729
1978
|
headers: {
|
|
1730
1979
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
1731
|
-
"csrf-token":
|
|
1980
|
+
"csrf-token": gr.get("csrf-token")
|
|
1732
1981
|
}
|
|
1733
1982
|
}
|
|
1734
1983
|
);
|
|
1735
|
-
const { access_token:
|
|
1736
|
-
accessToken:
|
|
1737
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(
|
|
1984
|
+
const { access_token: s = "", expires_in: o = 0, refresh_token: i = "", refresh_exp: c = 0 } = n.data, f = {
|
|
1985
|
+
accessToken: s,
|
|
1986
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(o) * 1e3,
|
|
1738
1987
|
refreshToken: i,
|
|
1739
1988
|
info: n.data
|
|
1740
1989
|
};
|
|
1741
|
-
|
|
1742
|
-
const
|
|
1743
|
-
return
|
|
1990
|
+
J().save(f), await Ze(s);
|
|
1991
|
+
const l = Number(c) - (/* @__PURE__ */ new Date()).getTime();
|
|
1992
|
+
return l && l > 0 && (Pt(l), l && localStorage.setItem("idelTime", l.toString())), vr(), s;
|
|
1744
1993
|
} catch {
|
|
1745
|
-
return
|
|
1994
|
+
return z({ ...D, redirect_uri: $ });
|
|
1746
1995
|
}
|
|
1747
|
-
},
|
|
1996
|
+
}, q = Y(!1), us = async (e) => {
|
|
1748
1997
|
if (e.public) return "";
|
|
1749
|
-
if (
|
|
1750
|
-
if (
|
|
1751
|
-
return await new Promise(async (
|
|
1752
|
-
|
|
1753
|
-
() =>
|
|
1754
|
-
(
|
|
1755
|
-
if (!
|
|
1756
|
-
const i =
|
|
1757
|
-
|
|
1998
|
+
if (Ct.value) return z({ ...D, redirect_uri: $ });
|
|
1999
|
+
if (q.value)
|
|
2000
|
+
return await new Promise(async (s) => {
|
|
2001
|
+
Se(
|
|
2002
|
+
() => q.value,
|
|
2003
|
+
(o) => {
|
|
2004
|
+
if (!o) {
|
|
2005
|
+
const i = M();
|
|
2006
|
+
s(i);
|
|
1758
2007
|
}
|
|
1759
2008
|
}
|
|
1760
2009
|
);
|
|
1761
2010
|
});
|
|
1762
|
-
const { accessTokenExpiredAt: t } =
|
|
1763
|
-
if ((!
|
|
1764
|
-
return
|
|
1765
|
-
let r =
|
|
1766
|
-
|
|
2011
|
+
const { accessTokenExpiredAt: t } = J().getData(), n = kt("code") || "";
|
|
2012
|
+
if ((!M() || t === 0) && !n)
|
|
2013
|
+
return z({ ...D, redirect_uri: $ });
|
|
2014
|
+
let r = M();
|
|
2015
|
+
q.value = !0;
|
|
1767
2016
|
try {
|
|
1768
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await
|
|
2017
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await Ir(D)), r = await Br(), q.value = !1;
|
|
1769
2018
|
} catch {
|
|
1770
|
-
|
|
2019
|
+
q.value = !1;
|
|
1771
2020
|
}
|
|
1772
2021
|
return r;
|
|
1773
|
-
},
|
|
1774
|
-
if (
|
|
1775
|
-
const { baseURL: t, ssoLocale: n } =
|
|
1776
|
-
if (
|
|
2022
|
+
}, z = (e) => {
|
|
2023
|
+
if (Dr) return;
|
|
2024
|
+
const { baseURL: t, ssoLocale: n } = Te();
|
|
2025
|
+
if (Re) return Re(e);
|
|
1777
2026
|
e.logout = "true", n && (e.locale = "locale");
|
|
1778
|
-
const r = Object.keys(e).filter((
|
|
1779
|
-
localStorage.removeItem("idelTime"), sessionStorage.clear(),
|
|
2027
|
+
const r = Object.keys(e).filter((o) => o !== "client_secret").map((o) => `${o}=${e[o]}`).join("&"), s = `${t}${v.oauth}?${r}`;
|
|
2028
|
+
localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove();
|
|
1780
2029
|
try {
|
|
1781
|
-
|
|
2030
|
+
b.create().get(v.logoutCurpage, { baseURL: t });
|
|
1782
2031
|
} catch {
|
|
1783
2032
|
}
|
|
1784
|
-
window.__isAutoCloseApp = !1, location.replace(
|
|
2033
|
+
window.__isAutoCloseApp = !1, location.replace(s);
|
|
1785
2034
|
};
|
|
1786
|
-
|
|
1787
|
-
const
|
|
1788
|
-
const { baseURL: t } =
|
|
2035
|
+
Fr(z);
|
|
2036
|
+
const Ir = async (e) => {
|
|
2037
|
+
const { baseURL: t } = Te(), { refreshToken: n } = J().getData();
|
|
1789
2038
|
try {
|
|
1790
|
-
await
|
|
2039
|
+
await b.create().get(v.token, { baseURL: t });
|
|
1791
2040
|
} catch {
|
|
1792
2041
|
}
|
|
1793
2042
|
try {
|
|
1794
|
-
const r = await
|
|
1795
|
-
|
|
2043
|
+
const r = await b.create().post(
|
|
2044
|
+
v.token,
|
|
1796
2045
|
{},
|
|
1797
2046
|
{
|
|
1798
2047
|
baseURL: t,
|
|
@@ -1802,44 +2051,44 @@ const ir = async (e) => {
|
|
|
1802
2051
|
client_id: e.client_id,
|
|
1803
2052
|
client_secret: e.client_secret,
|
|
1804
2053
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1805
|
-
nonce:
|
|
2054
|
+
nonce: xt()
|
|
1806
2055
|
}
|
|
1807
2056
|
}
|
|
1808
|
-
), { access_token:
|
|
1809
|
-
accessToken:
|
|
1810
|
-
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(
|
|
2057
|
+
), { access_token: s = "", expires_in: o = 0, refresh_token: i = "" } = r.data, c = {
|
|
2058
|
+
accessToken: s,
|
|
2059
|
+
accessTokenExpiredAt: +/* @__PURE__ */ new Date() + Number(o) * 1e3,
|
|
1811
2060
|
refreshToken: i,
|
|
1812
2061
|
info: r.data
|
|
1813
2062
|
};
|
|
1814
|
-
return
|
|
2063
|
+
return J().save(c), await Ze(s), s;
|
|
1815
2064
|
} catch {
|
|
1816
|
-
return
|
|
2065
|
+
return z({ ...e, redirect_uri: $ });
|
|
1817
2066
|
}
|
|
1818
|
-
},
|
|
2067
|
+
}, J = () => ({
|
|
1819
2068
|
getData: () => ({
|
|
1820
|
-
accessToken:
|
|
1821
|
-
accessTokenExpiredAt:
|
|
1822
|
-
refreshToken:
|
|
2069
|
+
accessToken: M(),
|
|
2070
|
+
accessTokenExpiredAt: le("accessTokenExpiredAt") ? Number(le("accessTokenExpiredAt")) : "",
|
|
2071
|
+
refreshToken: le("refreshToken")
|
|
1823
2072
|
}),
|
|
1824
2073
|
save: (e) => {
|
|
1825
|
-
|
|
2074
|
+
Bt(
|
|
1826
2075
|
e.accessToken || "",
|
|
1827
2076
|
{
|
|
1828
2077
|
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
1829
2078
|
refreshToken: e.refreshToken
|
|
1830
2079
|
}
|
|
1831
|
-
),
|
|
2080
|
+
), jt(e);
|
|
1832
2081
|
},
|
|
1833
2082
|
remove: () => {
|
|
1834
|
-
|
|
2083
|
+
vt(), It();
|
|
1835
2084
|
}
|
|
1836
2085
|
});
|
|
1837
2086
|
export {
|
|
1838
|
-
|
|
1839
|
-
|
|
1840
|
-
|
|
1841
|
-
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
2087
|
+
kt as getQuery,
|
|
2088
|
+
us as getToken,
|
|
2089
|
+
Br as getTokenFromCode,
|
|
2090
|
+
D as getTokenParams,
|
|
2091
|
+
z as login,
|
|
2092
|
+
$ as real_uri,
|
|
2093
|
+
J as tokenStorage
|
|
1845
2094
|
};
|