@das-fed/utils 7.1.0-seres.21 → 7.1.0-seres.23
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/modules/authentication/index.js +782 -800
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +785 -803
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +782 -800
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +782 -800
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +905 -891
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/index.js +952 -970
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +794 -776
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +782 -800
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +798 -784
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +782 -800
- package/api-services/modules/tool/index.js.gz +0 -0
- package/create-api-service/sailisi-logout/index.js +20 -0
- package/create-api-service/sailisi-logout/sailisi-logout/index.d.ts +5 -0
- package/create-api-service/sailisi-logout/sso/utils.d.ts +8 -0
- package/create-api-service/sso/index.d.ts +1 -1
- package/create-api-service/sso/index.js +531 -599
- package/create-api-service/sso/index.js.gz +0 -0
- package/esm-map.json +2 -1
- package/package.json +4 -4
|
@@ -1,55 +1,57 @@
|
|
|
1
|
-
import { unref as
|
|
2
|
-
import { encryption as
|
|
3
|
-
import { getConfig as
|
|
4
|
-
import {
|
|
5
|
-
import { tokenStorage as
|
|
6
|
-
import { appendQueryParams as
|
|
7
|
-
import { setPersonalInfo as
|
|
1
|
+
import { unref as qt, getCurrentScope as Mt, onScopeDispose as Ht, ref as te, watch as xe } from "vue";
|
|
2
|
+
import { encryption as $t } from "@das-fed/utils/atob";
|
|
3
|
+
import { getConfig as se } from "@das-fed/utils/config";
|
|
4
|
+
import { getAccessToken as $, tokenStorage as ne, clearPlatformAuthStorage as zt } from "@das-fed/utils/token-tools";
|
|
5
|
+
import { tokenStorage as Oo } from "@das-fed/utils/token-tools";
|
|
6
|
+
import { appendQueryParams as ke } from "@das-fed/utils/common-tools";
|
|
7
|
+
import { setPersonalInfo as at } from "@das-fed/utils/common-info/set-personal-info";
|
|
8
|
+
import { trySailisiLogout as Jt } from "@das-fed/utils/create-api-service/sailisi-logout";
|
|
9
|
+
import { isThirdLogin as Vt, thirdLogout as Wt } from "@das-fed/utils/create-api-service/thirdLogout";
|
|
8
10
|
import { hasUnauthorizedRecovery as we } from "@das-fed/utils/create-api-service/unauthorized-recovery";
|
|
9
|
-
function
|
|
11
|
+
function ct(e, t) {
|
|
10
12
|
return function() {
|
|
11
13
|
return e.apply(t, arguments);
|
|
12
14
|
};
|
|
13
15
|
}
|
|
14
|
-
const { toString:
|
|
15
|
-
const n =
|
|
16
|
+
const { toString: Kt } = Object.prototype, { getPrototypeOf: Pe } = Object, { iterator: ie, toStringTag: ut } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
|
|
17
|
+
const n = Kt.call(t);
|
|
16
18
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
17
|
-
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ce = (e) => (t) => typeof t === e, { isArray:
|
|
18
|
-
function
|
|
19
|
-
return e !== null && !
|
|
19
|
+
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => ae(t) === e), ce = (e) => (t) => typeof t === e, { isArray: q } = Array, z = ce("undefined");
|
|
20
|
+
function J(e) {
|
|
21
|
+
return e !== null && !z(e) && e.constructor !== null && !z(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
20
22
|
}
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
+
const lt = C("ArrayBuffer");
|
|
24
|
+
function Qt(e) {
|
|
23
25
|
let t;
|
|
24
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
26
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && lt(e.buffer), t;
|
|
25
27
|
}
|
|
26
|
-
const
|
|
28
|
+
const Xt = ce("string"), A = ce("function"), ft = ce("number"), V = (e) => e !== null && typeof e == "object", Gt = (e) => e === !0 || e === !1, Y = (e) => {
|
|
27
29
|
if (ae(e) !== "object")
|
|
28
30
|
return !1;
|
|
29
|
-
const t =
|
|
30
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(
|
|
31
|
-
},
|
|
32
|
-
if (!
|
|
31
|
+
const t = Pe(e);
|
|
32
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ut in e) && !(ie in e);
|
|
33
|
+
}, Yt = (e) => {
|
|
34
|
+
if (!V(e) || J(e))
|
|
33
35
|
return !1;
|
|
34
36
|
try {
|
|
35
37
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
36
38
|
} catch {
|
|
37
39
|
return !1;
|
|
38
40
|
}
|
|
39
|
-
},
|
|
41
|
+
}, Zt = C("Date"), en = C("File"), tn = C("Blob"), nn = C("FileList"), rn = (e) => V(e) && A(e.pipe), on = (e) => {
|
|
40
42
|
let t;
|
|
41
|
-
return e && (typeof FormData == "function" && e instanceof FormData ||
|
|
42
|
-
t === "object" &&
|
|
43
|
-
},
|
|
44
|
-
function
|
|
43
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
|
|
44
|
+
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
45
|
+
}, sn = C("URLSearchParams"), [an, cn, un, ln] = ["ReadableStream", "Request", "Response", "Headers"].map(C), fn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
46
|
+
function W(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
45
47
|
if (e === null || typeof e > "u")
|
|
46
48
|
return;
|
|
47
49
|
let r, o;
|
|
48
|
-
if (typeof e != "object" && (e = [e]),
|
|
50
|
+
if (typeof e != "object" && (e = [e]), q(e))
|
|
49
51
|
for (r = 0, o = e.length; r < o; r++)
|
|
50
52
|
t.call(null, e[r], r, e);
|
|
51
53
|
else {
|
|
52
|
-
if (
|
|
54
|
+
if (J(e))
|
|
53
55
|
return;
|
|
54
56
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
55
57
|
let a;
|
|
@@ -57,8 +59,8 @@ function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
57
59
|
a = s[r], t.call(null, e[a], a, e);
|
|
58
60
|
}
|
|
59
61
|
}
|
|
60
|
-
function
|
|
61
|
-
if (
|
|
62
|
+
function dt(e, t) {
|
|
63
|
+
if (J(e))
|
|
62
64
|
return null;
|
|
63
65
|
t = t.toLowerCase();
|
|
64
66
|
const n = Object.keys(e);
|
|
@@ -68,75 +70,75 @@ function bt(e, t) {
|
|
|
68
70
|
return o;
|
|
69
71
|
return null;
|
|
70
72
|
}
|
|
71
|
-
const
|
|
73
|
+
const D = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, pt = (e) => !z(e) && e !== D;
|
|
72
74
|
function ge() {
|
|
73
|
-
const { caseless: e } =
|
|
74
|
-
const s = e &&
|
|
75
|
-
|
|
75
|
+
const { caseless: e } = pt(this) && this || {}, t = {}, n = (r, o) => {
|
|
76
|
+
const s = e && dt(t, o) || o;
|
|
77
|
+
Y(t[s]) && Y(r) ? t[s] = ge(t[s], r) : Y(r) ? t[s] = ge({}, r) : q(r) ? t[s] = r.slice() : t[s] = r;
|
|
76
78
|
};
|
|
77
79
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
78
|
-
arguments[r] &&
|
|
80
|
+
arguments[r] && W(arguments[r], n);
|
|
79
81
|
return t;
|
|
80
82
|
}
|
|
81
|
-
const
|
|
82
|
-
n &&
|
|
83
|
-
}, { allOwnKeys: r }), e),
|
|
83
|
+
const dn = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (o, s) => {
|
|
84
|
+
n && A(o) ? e[s] = ct(o, n) : e[s] = o;
|
|
85
|
+
}, { allOwnKeys: r }), e), pn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), hn = (e, t, n, r) => {
|
|
84
86
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
85
87
|
value: t.prototype
|
|
86
88
|
}), n && Object.assign(e.prototype, n);
|
|
87
|
-
},
|
|
89
|
+
}, mn = (e, t, n, r) => {
|
|
88
90
|
let o, s, i;
|
|
89
91
|
const a = {};
|
|
90
92
|
if (t = t || {}, e == null) return t;
|
|
91
93
|
do {
|
|
92
94
|
for (o = Object.getOwnPropertyNames(e), s = o.length; s-- > 0; )
|
|
93
95
|
i = o[s], (!r || r(i, e, t)) && !a[i] && (t[i] = e[i], a[i] = !0);
|
|
94
|
-
e = n !== !1 &&
|
|
96
|
+
e = n !== !1 && Pe(e);
|
|
95
97
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
96
98
|
return t;
|
|
97
|
-
},
|
|
99
|
+
}, yn = (e, t, n) => {
|
|
98
100
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
99
101
|
const r = e.indexOf(t, n);
|
|
100
102
|
return r !== -1 && r === n;
|
|
101
|
-
},
|
|
103
|
+
}, wn = (e) => {
|
|
102
104
|
if (!e) return null;
|
|
103
|
-
if (
|
|
105
|
+
if (q(e)) return e;
|
|
104
106
|
let t = e.length;
|
|
105
|
-
if (!
|
|
107
|
+
if (!ft(t)) return null;
|
|
106
108
|
const n = new Array(t);
|
|
107
109
|
for (; t-- > 0; )
|
|
108
110
|
n[t] = e[t];
|
|
109
111
|
return n;
|
|
110
|
-
},
|
|
112
|
+
}, gn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Pe(Uint8Array)), bn = (e, t) => {
|
|
111
113
|
const r = (e && e[ie]).call(e);
|
|
112
114
|
let o;
|
|
113
115
|
for (; (o = r.next()) && !o.done; ) {
|
|
114
116
|
const s = o.value;
|
|
115
117
|
t.call(e, s[0], s[1]);
|
|
116
118
|
}
|
|
117
|
-
},
|
|
119
|
+
}, En = (e, t) => {
|
|
118
120
|
let n;
|
|
119
121
|
const r = [];
|
|
120
122
|
for (; (n = e.exec(t)) !== null; )
|
|
121
123
|
r.push(n);
|
|
122
124
|
return r;
|
|
123
|
-
},
|
|
125
|
+
}, Rn = C("HTMLFormElement"), Sn = (e) => e.toLowerCase().replace(
|
|
124
126
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
125
127
|
function(n, r, o) {
|
|
126
128
|
return r.toUpperCase() + o;
|
|
127
129
|
}
|
|
128
|
-
),
|
|
130
|
+
), De = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Tn = C("RegExp"), ht = (e, t) => {
|
|
129
131
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
130
|
-
|
|
132
|
+
W(n, (o, s) => {
|
|
131
133
|
let i;
|
|
132
134
|
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
133
135
|
}), Object.defineProperties(e, r);
|
|
134
|
-
},
|
|
135
|
-
|
|
136
|
-
if (
|
|
136
|
+
}, On = (e) => {
|
|
137
|
+
ht(e, (t, n) => {
|
|
138
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
137
139
|
return !1;
|
|
138
140
|
const r = e[n];
|
|
139
|
-
if (
|
|
141
|
+
if (A(r)) {
|
|
140
142
|
if (t.enumerable = !1, "writable" in t) {
|
|
141
143
|
t.writable = !1;
|
|
142
144
|
return;
|
|
@@ -146,103 +148,103 @@ const yn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (o, s) => {
|
|
|
146
148
|
});
|
|
147
149
|
}
|
|
148
150
|
});
|
|
149
|
-
},
|
|
151
|
+
}, An = (e, t) => {
|
|
150
152
|
const n = {}, r = (o) => {
|
|
151
153
|
o.forEach((s) => {
|
|
152
154
|
n[s] = !0;
|
|
153
155
|
});
|
|
154
156
|
};
|
|
155
|
-
return
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
function
|
|
159
|
-
return !!(e &&
|
|
157
|
+
return q(e) ? r(e) : r(String(e).split(t)), n;
|
|
158
|
+
}, _n = () => {
|
|
159
|
+
}, Cn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
160
|
+
function xn(e) {
|
|
161
|
+
return !!(e && A(e.append) && e[ut] === "FormData" && e[ie]);
|
|
160
162
|
}
|
|
161
|
-
const
|
|
163
|
+
const kn = (e) => {
|
|
162
164
|
const t = new Array(10), n = (r, o) => {
|
|
163
|
-
if (
|
|
165
|
+
if (V(r)) {
|
|
164
166
|
if (t.indexOf(r) >= 0)
|
|
165
167
|
return;
|
|
166
|
-
if (
|
|
168
|
+
if (J(r))
|
|
167
169
|
return r;
|
|
168
170
|
if (!("toJSON" in r)) {
|
|
169
171
|
t[o] = r;
|
|
170
|
-
const s =
|
|
171
|
-
return
|
|
172
|
+
const s = q(r) ? [] : {};
|
|
173
|
+
return W(r, (i, a) => {
|
|
172
174
|
const f = n(i, o + 1);
|
|
173
|
-
!
|
|
175
|
+
!z(f) && (s[a] = f);
|
|
174
176
|
}), t[o] = void 0, s;
|
|
175
177
|
}
|
|
176
178
|
}
|
|
177
179
|
return r;
|
|
178
180
|
};
|
|
179
181
|
return n(e, 0);
|
|
180
|
-
},
|
|
181
|
-
o ===
|
|
182
|
+
}, Pn = C("AsyncFunction"), Un = (e) => e && (V(e) || A(e)) && A(e.then) && A(e.catch), mt = ((e, t) => e ? setImmediate : t ? ((n, r) => (D.addEventListener("message", ({ source: o, data: s }) => {
|
|
183
|
+
o === D && s === n && r.length && r.shift()();
|
|
182
184
|
}, !1), (o) => {
|
|
183
|
-
r.push(o),
|
|
185
|
+
r.push(o), D.postMessage(n, "*");
|
|
184
186
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
185
187
|
typeof setImmediate == "function",
|
|
186
|
-
|
|
187
|
-
),
|
|
188
|
-
isArray:
|
|
189
|
-
isArrayBuffer:
|
|
190
|
-
isBuffer:
|
|
191
|
-
isFormData:
|
|
192
|
-
isArrayBufferView:
|
|
193
|
-
isString:
|
|
194
|
-
isNumber:
|
|
195
|
-
isBoolean:
|
|
196
|
-
isObject:
|
|
197
|
-
isPlainObject:
|
|
198
|
-
isEmptyObject:
|
|
199
|
-
isReadableStream:
|
|
200
|
-
isRequest:
|
|
201
|
-
isResponse:
|
|
202
|
-
isHeaders:
|
|
203
|
-
isUndefined:
|
|
204
|
-
isDate:
|
|
205
|
-
isFile:
|
|
206
|
-
isBlob:
|
|
207
|
-
isRegExp:
|
|
208
|
-
isFunction:
|
|
209
|
-
isStream:
|
|
210
|
-
isURLSearchParams:
|
|
211
|
-
isTypedArray:
|
|
212
|
-
isFileList:
|
|
213
|
-
forEach:
|
|
188
|
+
A(D.postMessage)
|
|
189
|
+
), Ln = typeof queueMicrotask < "u" ? queueMicrotask.bind(D) : typeof process < "u" && process.nextTick || mt, Nn = (e) => e != null && A(e[ie]), c = {
|
|
190
|
+
isArray: q,
|
|
191
|
+
isArrayBuffer: lt,
|
|
192
|
+
isBuffer: J,
|
|
193
|
+
isFormData: on,
|
|
194
|
+
isArrayBufferView: Qt,
|
|
195
|
+
isString: Xt,
|
|
196
|
+
isNumber: ft,
|
|
197
|
+
isBoolean: Gt,
|
|
198
|
+
isObject: V,
|
|
199
|
+
isPlainObject: Y,
|
|
200
|
+
isEmptyObject: Yt,
|
|
201
|
+
isReadableStream: an,
|
|
202
|
+
isRequest: cn,
|
|
203
|
+
isResponse: un,
|
|
204
|
+
isHeaders: ln,
|
|
205
|
+
isUndefined: z,
|
|
206
|
+
isDate: Zt,
|
|
207
|
+
isFile: en,
|
|
208
|
+
isBlob: tn,
|
|
209
|
+
isRegExp: Tn,
|
|
210
|
+
isFunction: A,
|
|
211
|
+
isStream: rn,
|
|
212
|
+
isURLSearchParams: sn,
|
|
213
|
+
isTypedArray: gn,
|
|
214
|
+
isFileList: nn,
|
|
215
|
+
forEach: W,
|
|
214
216
|
merge: ge,
|
|
215
|
-
extend:
|
|
216
|
-
trim:
|
|
217
|
-
stripBOM:
|
|
218
|
-
inherits:
|
|
219
|
-
toFlatObject:
|
|
217
|
+
extend: dn,
|
|
218
|
+
trim: fn,
|
|
219
|
+
stripBOM: pn,
|
|
220
|
+
inherits: hn,
|
|
221
|
+
toFlatObject: mn,
|
|
220
222
|
kindOf: ae,
|
|
221
223
|
kindOfTest: C,
|
|
222
|
-
endsWith:
|
|
223
|
-
toArray:
|
|
224
|
-
forEachEntry:
|
|
225
|
-
matchAll:
|
|
226
|
-
isHTMLForm:
|
|
227
|
-
hasOwnProperty:
|
|
228
|
-
hasOwnProp:
|
|
224
|
+
endsWith: yn,
|
|
225
|
+
toArray: wn,
|
|
226
|
+
forEachEntry: bn,
|
|
227
|
+
matchAll: En,
|
|
228
|
+
isHTMLForm: Rn,
|
|
229
|
+
hasOwnProperty: De,
|
|
230
|
+
hasOwnProp: De,
|
|
229
231
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
230
|
-
reduceDescriptors:
|
|
231
|
-
freezeMethods:
|
|
232
|
-
toObjectSet:
|
|
233
|
-
toCamelCase:
|
|
234
|
-
noop:
|
|
235
|
-
toFiniteNumber:
|
|
236
|
-
findKey:
|
|
237
|
-
global:
|
|
238
|
-
isContextDefined:
|
|
239
|
-
isSpecCompliantForm:
|
|
240
|
-
toJSONObject:
|
|
241
|
-
isAsyncFn:
|
|
242
|
-
isThenable:
|
|
243
|
-
setImmediate:
|
|
244
|
-
asap:
|
|
245
|
-
isIterable:
|
|
232
|
+
reduceDescriptors: ht,
|
|
233
|
+
freezeMethods: On,
|
|
234
|
+
toObjectSet: An,
|
|
235
|
+
toCamelCase: Sn,
|
|
236
|
+
noop: _n,
|
|
237
|
+
toFiniteNumber: Cn,
|
|
238
|
+
findKey: dt,
|
|
239
|
+
global: D,
|
|
240
|
+
isContextDefined: pt,
|
|
241
|
+
isSpecCompliantForm: xn,
|
|
242
|
+
toJSONObject: kn,
|
|
243
|
+
isAsyncFn: Pn,
|
|
244
|
+
isThenable: Un,
|
|
245
|
+
setImmediate: mt,
|
|
246
|
+
asap: Ln,
|
|
247
|
+
isIterable: Nn
|
|
246
248
|
};
|
|
247
249
|
function w(e, t, n, r, o) {
|
|
248
250
|
Error.call(this), Error.captureStackTrace ? Error.captureStackTrace(this, this.constructor) : this.stack = new Error().stack, this.message = e, this.name = "AxiosError", t && (this.code = t), n && (this.config = n), r && (this.request = r), o && (this.response = o, this.status = o.status ? o.status : null);
|
|
@@ -268,7 +270,7 @@ c.inherits(w, Error, {
|
|
|
268
270
|
};
|
|
269
271
|
}
|
|
270
272
|
});
|
|
271
|
-
const
|
|
273
|
+
const yt = w.prototype, wt = {};
|
|
272
274
|
[
|
|
273
275
|
"ERR_BAD_OPTION_VALUE",
|
|
274
276
|
"ERR_BAD_OPTION",
|
|
@@ -284,32 +286,32 @@ const Tt = w.prototype, Ot = {};
|
|
|
284
286
|
"ERR_INVALID_URL"
|
|
285
287
|
// eslint-disable-next-line func-names
|
|
286
288
|
].forEach((e) => {
|
|
287
|
-
|
|
289
|
+
wt[e] = { value: e };
|
|
288
290
|
});
|
|
289
|
-
Object.defineProperties(w,
|
|
290
|
-
Object.defineProperty(
|
|
291
|
+
Object.defineProperties(w, wt);
|
|
292
|
+
Object.defineProperty(yt, "isAxiosError", { value: !0 });
|
|
291
293
|
w.from = (e, t, n, r, o, s) => {
|
|
292
|
-
const i = Object.create(
|
|
294
|
+
const i = Object.create(yt);
|
|
293
295
|
return c.toFlatObject(e, i, function(f) {
|
|
294
296
|
return f !== Error.prototype;
|
|
295
297
|
}, (a) => a !== "isAxiosError"), w.call(i, e.message, t, n, r, o), i.cause = e, i.name = e.name, s && Object.assign(i, s), i;
|
|
296
298
|
};
|
|
297
|
-
const
|
|
299
|
+
const Fn = null;
|
|
298
300
|
function be(e) {
|
|
299
301
|
return c.isPlainObject(e) || c.isArray(e);
|
|
300
302
|
}
|
|
301
|
-
function
|
|
303
|
+
function gt(e) {
|
|
302
304
|
return c.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
303
305
|
}
|
|
304
|
-
function
|
|
306
|
+
function ve(e, t, n) {
|
|
305
307
|
return e ? e.concat(t).map(function(o, s) {
|
|
306
|
-
return o =
|
|
308
|
+
return o = gt(o), !n && s ? "[" + o + "]" : o;
|
|
307
309
|
}).join(n ? "." : "") : t;
|
|
308
310
|
}
|
|
309
|
-
function
|
|
311
|
+
function Dn(e) {
|
|
310
312
|
return c.isArray(e) && !e.some(be);
|
|
311
313
|
}
|
|
312
|
-
const
|
|
314
|
+
const vn = c.toFlatObject(c, {}, null, function(t) {
|
|
313
315
|
return /^is[A-Z]/.test(t);
|
|
314
316
|
});
|
|
315
317
|
function ue(e, t, n) {
|
|
@@ -336,46 +338,46 @@ function ue(e, t, n) {
|
|
|
336
338
|
return c.isArrayBuffer(p) || c.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
337
339
|
}
|
|
338
340
|
function u(p, y, h) {
|
|
339
|
-
let
|
|
341
|
+
let E = p;
|
|
340
342
|
if (p && !h && typeof p == "object") {
|
|
341
343
|
if (c.endsWith(y, "{}"))
|
|
342
344
|
y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
|
|
343
|
-
else if (c.isArray(p) &&
|
|
344
|
-
return y =
|
|
345
|
-
!(c.isUndefined(
|
|
345
|
+
else if (c.isArray(p) && Dn(p) || (c.isFileList(p) || c.endsWith(y, "[]")) && (E = c.toArray(p)))
|
|
346
|
+
return y = gt(y), E.forEach(function(S, k) {
|
|
347
|
+
!(c.isUndefined(S) || S === null) && t.append(
|
|
346
348
|
// eslint-disable-next-line no-nested-ternary
|
|
347
|
-
i === !0 ?
|
|
348
|
-
l(
|
|
349
|
+
i === !0 ? ve([y], k, s) : i === null ? y : y + "[]",
|
|
350
|
+
l(S)
|
|
349
351
|
);
|
|
350
352
|
}), !1;
|
|
351
353
|
}
|
|
352
|
-
return be(p) ? !0 : (t.append(
|
|
354
|
+
return be(p) ? !0 : (t.append(ve(h, y, s), l(p)), !1);
|
|
353
355
|
}
|
|
354
|
-
const d = [], m = Object.assign(
|
|
356
|
+
const d = [], m = Object.assign(vn, {
|
|
355
357
|
defaultVisitor: u,
|
|
356
358
|
convertValue: l,
|
|
357
359
|
isVisitable: be
|
|
358
360
|
});
|
|
359
|
-
function
|
|
361
|
+
function g(p, y) {
|
|
360
362
|
if (!c.isUndefined(p)) {
|
|
361
363
|
if (d.indexOf(p) !== -1)
|
|
362
364
|
throw Error("Circular reference detected in " + y.join("."));
|
|
363
|
-
d.push(p), c.forEach(p, function(
|
|
364
|
-
(!(c.isUndefined(
|
|
365
|
+
d.push(p), c.forEach(p, function(E, R) {
|
|
366
|
+
(!(c.isUndefined(E) || E === null) && o.call(
|
|
365
367
|
t,
|
|
366
|
-
|
|
368
|
+
E,
|
|
367
369
|
c.isString(R) ? R.trim() : R,
|
|
368
370
|
y,
|
|
369
371
|
m
|
|
370
|
-
)) === !0 &&
|
|
372
|
+
)) === !0 && g(E, y ? y.concat(R) : [R]);
|
|
371
373
|
}), d.pop();
|
|
372
374
|
}
|
|
373
375
|
}
|
|
374
376
|
if (!c.isObject(e))
|
|
375
377
|
throw new TypeError("data must be an object");
|
|
376
|
-
return
|
|
378
|
+
return g(e), t;
|
|
377
379
|
}
|
|
378
|
-
function
|
|
380
|
+
function Ie(e) {
|
|
379
381
|
const t = {
|
|
380
382
|
"!": "%21",
|
|
381
383
|
"'": "%27",
|
|
@@ -389,40 +391,40 @@ function $e(e) {
|
|
|
389
391
|
return t[r];
|
|
390
392
|
});
|
|
391
393
|
}
|
|
392
|
-
function
|
|
394
|
+
function Ue(e, t) {
|
|
393
395
|
this._pairs = [], e && ue(e, this, t);
|
|
394
396
|
}
|
|
395
|
-
const
|
|
396
|
-
|
|
397
|
+
const bt = Ue.prototype;
|
|
398
|
+
bt.append = function(t, n) {
|
|
397
399
|
this._pairs.push([t, n]);
|
|
398
400
|
};
|
|
399
|
-
|
|
401
|
+
bt.toString = function(t) {
|
|
400
402
|
const n = t ? function(r) {
|
|
401
|
-
return t.call(this, r,
|
|
402
|
-
} :
|
|
403
|
+
return t.call(this, r, Ie);
|
|
404
|
+
} : Ie;
|
|
403
405
|
return this._pairs.map(function(o) {
|
|
404
406
|
return n(o[0]) + "=" + n(o[1]);
|
|
405
407
|
}, "").join("&");
|
|
406
408
|
};
|
|
407
|
-
function
|
|
409
|
+
function In(e) {
|
|
408
410
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
409
411
|
}
|
|
410
|
-
function
|
|
412
|
+
function Et(e, t, n) {
|
|
411
413
|
if (!t)
|
|
412
414
|
return e;
|
|
413
|
-
const r = n && n.encode ||
|
|
415
|
+
const r = n && n.encode || In;
|
|
414
416
|
c.isFunction(n) && (n = {
|
|
415
417
|
serialize: n
|
|
416
418
|
});
|
|
417
419
|
const o = n && n.serialize;
|
|
418
420
|
let s;
|
|
419
|
-
if (o ? s = o(t, n) : s = c.isURLSearchParams(t) ? t.toString() : new
|
|
421
|
+
if (o ? s = o(t, n) : s = c.isURLSearchParams(t) ? t.toString() : new Ue(t, n).toString(r), s) {
|
|
420
422
|
const i = e.indexOf("#");
|
|
421
423
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + s;
|
|
422
424
|
}
|
|
423
425
|
return e;
|
|
424
426
|
}
|
|
425
|
-
class
|
|
427
|
+
class Be {
|
|
426
428
|
constructor() {
|
|
427
429
|
this.handlers = [];
|
|
428
430
|
}
|
|
@@ -476,31 +478,31 @@ class ze {
|
|
|
476
478
|
});
|
|
477
479
|
}
|
|
478
480
|
}
|
|
479
|
-
const
|
|
481
|
+
const Rt = {
|
|
480
482
|
silentJSONParsing: !0,
|
|
481
483
|
forcedJSONParsing: !0,
|
|
482
484
|
clarifyTimeoutError: !1
|
|
483
|
-
},
|
|
485
|
+
}, Bn = typeof URLSearchParams < "u" ? URLSearchParams : Ue, jn = typeof FormData < "u" ? FormData : null, qn = typeof Blob < "u" ? Blob : null, Mn = {
|
|
484
486
|
isBrowser: !0,
|
|
485
487
|
classes: {
|
|
486
|
-
URLSearchParams:
|
|
487
|
-
FormData:
|
|
488
|
-
Blob:
|
|
488
|
+
URLSearchParams: Bn,
|
|
489
|
+
FormData: jn,
|
|
490
|
+
Blob: qn
|
|
489
491
|
},
|
|
490
492
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
491
|
-
},
|
|
492
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
493
|
+
}, Le = typeof window < "u" && typeof document < "u", Ee = typeof navigator == "object" && navigator || void 0, Hn = Le && (!Ee || ["ReactNative", "NativeScript", "NS"].indexOf(Ee.product) < 0), $n = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
494
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", zn = Le && window.location.href || "http://localhost", Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
493
495
|
__proto__: null,
|
|
494
|
-
hasBrowserEnv:
|
|
495
|
-
hasStandardBrowserEnv:
|
|
496
|
-
hasStandardBrowserWebWorkerEnv:
|
|
497
|
-
navigator:
|
|
498
|
-
origin:
|
|
496
|
+
hasBrowserEnv: Le,
|
|
497
|
+
hasStandardBrowserEnv: Hn,
|
|
498
|
+
hasStandardBrowserWebWorkerEnv: $n,
|
|
499
|
+
navigator: Ee,
|
|
500
|
+
origin: zn
|
|
499
501
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
500
|
-
...
|
|
501
|
-
...
|
|
502
|
+
...Jn,
|
|
503
|
+
...Mn
|
|
502
504
|
};
|
|
503
|
-
function
|
|
505
|
+
function Vn(e, t) {
|
|
504
506
|
return ue(e, new T.classes.URLSearchParams(), {
|
|
505
507
|
visitor: function(n, r, o, s) {
|
|
506
508
|
return T.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
@@ -508,10 +510,10 @@ function Gn(e, t) {
|
|
|
508
510
|
...t
|
|
509
511
|
});
|
|
510
512
|
}
|
|
511
|
-
function
|
|
513
|
+
function Wn(e) {
|
|
512
514
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
513
515
|
}
|
|
514
|
-
function
|
|
516
|
+
function Kn(e) {
|
|
515
517
|
const t = {}, n = Object.keys(e);
|
|
516
518
|
let r;
|
|
517
519
|
const o = n.length;
|
|
@@ -520,22 +522,22 @@ function Yn(e) {
|
|
|
520
522
|
s = n[r], t[s] = e[s];
|
|
521
523
|
return t;
|
|
522
524
|
}
|
|
523
|
-
function
|
|
525
|
+
function St(e) {
|
|
524
526
|
function t(n, r, o, s) {
|
|
525
527
|
let i = n[s++];
|
|
526
528
|
if (i === "__proto__") return !0;
|
|
527
529
|
const a = Number.isFinite(+i), f = s >= n.length;
|
|
528
|
-
return i = !i && c.isArray(o) ? o.length : i, f ? (c.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !c.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && c.isArray(o[i]) && (o[i] =
|
|
530
|
+
return i = !i && c.isArray(o) ? o.length : i, f ? (c.hasOwnProp(o, i) ? o[i] = [o[i], r] : o[i] = r, !a) : ((!o[i] || !c.isObject(o[i])) && (o[i] = []), t(n, r, o[i], s) && c.isArray(o[i]) && (o[i] = Kn(o[i])), !a);
|
|
529
531
|
}
|
|
530
532
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
531
533
|
const n = {};
|
|
532
534
|
return c.forEachEntry(e, (r, o) => {
|
|
533
|
-
t(
|
|
535
|
+
t(Wn(r), o, n, 0);
|
|
534
536
|
}), n;
|
|
535
537
|
}
|
|
536
538
|
return null;
|
|
537
539
|
}
|
|
538
|
-
function
|
|
540
|
+
function Qn(e, t, n) {
|
|
539
541
|
if (c.isString(e))
|
|
540
542
|
try {
|
|
541
543
|
return (t || JSON.parse)(e), c.trim(e);
|
|
@@ -545,13 +547,13 @@ function Zn(e, t, n) {
|
|
|
545
547
|
}
|
|
546
548
|
return (n || JSON.stringify)(e);
|
|
547
549
|
}
|
|
548
|
-
const
|
|
549
|
-
transitional:
|
|
550
|
+
const K = {
|
|
551
|
+
transitional: Rt,
|
|
550
552
|
adapter: ["xhr", "http", "fetch"],
|
|
551
553
|
transformRequest: [function(t, n) {
|
|
552
554
|
const r = n.getContentType() || "", o = r.indexOf("application/json") > -1, s = c.isObject(t);
|
|
553
555
|
if (s && c.isHTMLForm(t) && (t = new FormData(t)), c.isFormData(t))
|
|
554
|
-
return o ? JSON.stringify(
|
|
556
|
+
return o ? JSON.stringify(St(t)) : t;
|
|
555
557
|
if (c.isArrayBuffer(t) || c.isBuffer(t) || c.isStream(t) || c.isFile(t) || c.isBlob(t) || c.isReadableStream(t))
|
|
556
558
|
return t;
|
|
557
559
|
if (c.isArrayBufferView(t))
|
|
@@ -561,7 +563,7 @@ const Q = {
|
|
|
561
563
|
let a;
|
|
562
564
|
if (s) {
|
|
563
565
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
564
|
-
return
|
|
566
|
+
return Vn(t, this.formSerializer).toString();
|
|
565
567
|
if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
566
568
|
const f = this.env && this.env.FormData;
|
|
567
569
|
return ue(
|
|
@@ -571,10 +573,10 @@ const Q = {
|
|
|
571
573
|
);
|
|
572
574
|
}
|
|
573
575
|
}
|
|
574
|
-
return s || o ? (n.setContentType("application/json", !1),
|
|
576
|
+
return s || o ? (n.setContentType("application/json", !1), Qn(t)) : t;
|
|
575
577
|
}],
|
|
576
578
|
transformResponse: [function(t) {
|
|
577
|
-
const n = this.transitional ||
|
|
579
|
+
const n = this.transitional || K.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
578
580
|
if (c.isResponse(t) || c.isReadableStream(t))
|
|
579
581
|
return t;
|
|
580
582
|
if (t && c.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -612,9 +614,9 @@ const Q = {
|
|
|
612
614
|
}
|
|
613
615
|
};
|
|
614
616
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
615
|
-
|
|
617
|
+
K.headers[e] = {};
|
|
616
618
|
});
|
|
617
|
-
const
|
|
619
|
+
const Xn = c.toObjectSet([
|
|
618
620
|
"age",
|
|
619
621
|
"authorization",
|
|
620
622
|
"content-length",
|
|
@@ -632,28 +634,28 @@ const er = c.toObjectSet([
|
|
|
632
634
|
"referer",
|
|
633
635
|
"retry-after",
|
|
634
636
|
"user-agent"
|
|
635
|
-
]),
|
|
637
|
+
]), Gn = (e) => {
|
|
636
638
|
const t = {};
|
|
637
639
|
let n, r, o;
|
|
638
640
|
return e && e.split(`
|
|
639
641
|
`).forEach(function(i) {
|
|
640
|
-
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] &&
|
|
642
|
+
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Xn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
641
643
|
}), t;
|
|
642
|
-
},
|
|
643
|
-
function
|
|
644
|
+
}, je = Symbol("internals");
|
|
645
|
+
function H(e) {
|
|
644
646
|
return e && String(e).trim().toLowerCase();
|
|
645
647
|
}
|
|
646
|
-
function
|
|
647
|
-
return e === !1 || e == null ? e : c.isArray(e) ? e.map(
|
|
648
|
+
function Z(e) {
|
|
649
|
+
return e === !1 || e == null ? e : c.isArray(e) ? e.map(Z) : String(e);
|
|
648
650
|
}
|
|
649
|
-
function
|
|
651
|
+
function Yn(e) {
|
|
650
652
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
651
653
|
let r;
|
|
652
654
|
for (; r = n.exec(e); )
|
|
653
655
|
t[r[1]] = r[2];
|
|
654
656
|
return t;
|
|
655
657
|
}
|
|
656
|
-
const
|
|
658
|
+
const Zn = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
657
659
|
function de(e, t, n, r, o) {
|
|
658
660
|
if (c.isFunction(r))
|
|
659
661
|
return r.call(this, t, n);
|
|
@@ -664,10 +666,10 @@ function de(e, t, n, r, o) {
|
|
|
664
666
|
return r.test(t);
|
|
665
667
|
}
|
|
666
668
|
}
|
|
667
|
-
function
|
|
669
|
+
function er(e) {
|
|
668
670
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
669
671
|
}
|
|
670
|
-
function
|
|
672
|
+
function tr(e, t) {
|
|
671
673
|
const n = c.toCamelCase(" " + t);
|
|
672
674
|
["get", "set", "has"].forEach((r) => {
|
|
673
675
|
Object.defineProperty(e, r + n, {
|
|
@@ -678,24 +680,24 @@ function sr(e, t) {
|
|
|
678
680
|
});
|
|
679
681
|
});
|
|
680
682
|
}
|
|
681
|
-
let
|
|
683
|
+
let _ = class {
|
|
682
684
|
constructor(t) {
|
|
683
685
|
t && this.set(t);
|
|
684
686
|
}
|
|
685
687
|
set(t, n, r) {
|
|
686
688
|
const o = this;
|
|
687
689
|
function s(a, f, l) {
|
|
688
|
-
const u =
|
|
690
|
+
const u = H(f);
|
|
689
691
|
if (!u)
|
|
690
692
|
throw new Error("header name must be a non-empty string");
|
|
691
693
|
const d = c.findKey(o, u);
|
|
692
|
-
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || f] =
|
|
694
|
+
(!d || o[d] === void 0 || l === !0 || l === void 0 && o[d] !== !1) && (o[d || f] = Z(a));
|
|
693
695
|
}
|
|
694
696
|
const i = (a, f) => c.forEach(a, (l, u) => s(l, u, f));
|
|
695
697
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
696
698
|
i(t, n);
|
|
697
|
-
else if (c.isString(t) && (t = t.trim()) && !
|
|
698
|
-
i(
|
|
699
|
+
else if (c.isString(t) && (t = t.trim()) && !Zn(t))
|
|
700
|
+
i(Gn(t), n);
|
|
699
701
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
700
702
|
let a = {}, f, l;
|
|
701
703
|
for (const u of t) {
|
|
@@ -709,14 +711,14 @@ let A = class {
|
|
|
709
711
|
return this;
|
|
710
712
|
}
|
|
711
713
|
get(t, n) {
|
|
712
|
-
if (t =
|
|
714
|
+
if (t = H(t), t) {
|
|
713
715
|
const r = c.findKey(this, t);
|
|
714
716
|
if (r) {
|
|
715
717
|
const o = this[r];
|
|
716
718
|
if (!n)
|
|
717
719
|
return o;
|
|
718
720
|
if (n === !0)
|
|
719
|
-
return
|
|
721
|
+
return Yn(o);
|
|
720
722
|
if (c.isFunction(n))
|
|
721
723
|
return n.call(this, o, r);
|
|
722
724
|
if (c.isRegExp(n))
|
|
@@ -726,7 +728,7 @@ let A = class {
|
|
|
726
728
|
}
|
|
727
729
|
}
|
|
728
730
|
has(t, n) {
|
|
729
|
-
if (t =
|
|
731
|
+
if (t = H(t), t) {
|
|
730
732
|
const r = c.findKey(this, t);
|
|
731
733
|
return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
|
|
732
734
|
}
|
|
@@ -736,7 +738,7 @@ let A = class {
|
|
|
736
738
|
const r = this;
|
|
737
739
|
let o = !1;
|
|
738
740
|
function s(i) {
|
|
739
|
-
if (i =
|
|
741
|
+
if (i = H(i), i) {
|
|
740
742
|
const a = c.findKey(r, i);
|
|
741
743
|
a && (!n || de(r, r[a], a, n)) && (delete r[a], o = !0);
|
|
742
744
|
}
|
|
@@ -757,11 +759,11 @@ let A = class {
|
|
|
757
759
|
return c.forEach(this, (o, s) => {
|
|
758
760
|
const i = c.findKey(r, s);
|
|
759
761
|
if (i) {
|
|
760
|
-
n[i] =
|
|
762
|
+
n[i] = Z(o), delete n[s];
|
|
761
763
|
return;
|
|
762
764
|
}
|
|
763
|
-
const a = t ?
|
|
764
|
-
a !== s && delete n[s], n[a] =
|
|
765
|
+
const a = t ? er(s) : String(s).trim();
|
|
766
|
+
a !== s && delete n[s], n[a] = Z(o), r[a] = !0;
|
|
765
767
|
}), this;
|
|
766
768
|
}
|
|
767
769
|
concat(...t) {
|
|
@@ -794,18 +796,18 @@ let A = class {
|
|
|
794
796
|
return n.forEach((o) => r.set(o)), r;
|
|
795
797
|
}
|
|
796
798
|
static accessor(t) {
|
|
797
|
-
const r = (this[
|
|
799
|
+
const r = (this[je] = this[je] = {
|
|
798
800
|
accessors: {}
|
|
799
801
|
}).accessors, o = this.prototype;
|
|
800
802
|
function s(i) {
|
|
801
|
-
const a =
|
|
802
|
-
r[a] || (
|
|
803
|
+
const a = H(i);
|
|
804
|
+
r[a] || (tr(o, i), r[a] = !0);
|
|
803
805
|
}
|
|
804
806
|
return c.isArray(t) ? t.forEach(s) : s(t), this;
|
|
805
807
|
}
|
|
806
808
|
};
|
|
807
|
-
|
|
808
|
-
c.reduceDescriptors(
|
|
809
|
+
_.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
810
|
+
c.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
809
811
|
let n = t[0].toUpperCase() + t.slice(1);
|
|
810
812
|
return {
|
|
811
813
|
get: () => e,
|
|
@@ -814,24 +816,24 @@ c.reduceDescriptors(A.prototype, ({ value: e }, t) => {
|
|
|
814
816
|
}
|
|
815
817
|
};
|
|
816
818
|
});
|
|
817
|
-
c.freezeMethods(
|
|
819
|
+
c.freezeMethods(_);
|
|
818
820
|
function pe(e, t) {
|
|
819
|
-
const n = this ||
|
|
821
|
+
const n = this || K, r = t || n, o = _.from(r.headers);
|
|
820
822
|
let s = r.data;
|
|
821
823
|
return c.forEach(e, function(a) {
|
|
822
824
|
s = a.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
823
825
|
}), o.normalize(), s;
|
|
824
826
|
}
|
|
825
|
-
function
|
|
827
|
+
function Tt(e) {
|
|
826
828
|
return !!(e && e.__CANCEL__);
|
|
827
829
|
}
|
|
828
|
-
function
|
|
830
|
+
function M(e, t, n) {
|
|
829
831
|
w.call(this, e ?? "canceled", w.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
830
832
|
}
|
|
831
|
-
c.inherits(
|
|
833
|
+
c.inherits(M, w, {
|
|
832
834
|
__CANCEL__: !0
|
|
833
835
|
});
|
|
834
|
-
function
|
|
836
|
+
function Ot(e, t, n) {
|
|
835
837
|
const r = n.config.validateStatus;
|
|
836
838
|
!n.status || !r || r(n.status) ? e(n) : t(new w(
|
|
837
839
|
"Request failed with status code " + n.status,
|
|
@@ -841,11 +843,11 @@ function Ut(e, t, n) {
|
|
|
841
843
|
n
|
|
842
844
|
));
|
|
843
845
|
}
|
|
844
|
-
function
|
|
846
|
+
function nr(e) {
|
|
845
847
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
846
848
|
return t && t[1] || "";
|
|
847
849
|
}
|
|
848
|
-
function
|
|
850
|
+
function rr(e, t) {
|
|
849
851
|
e = e || 10;
|
|
850
852
|
const n = new Array(e), r = new Array(e);
|
|
851
853
|
let o = 0, s = 0, i;
|
|
@@ -857,11 +859,11 @@ function ar(e, t) {
|
|
|
857
859
|
m += n[d++], d = d % e;
|
|
858
860
|
if (o = (o + 1) % e, o === s && (s = (s + 1) % e), l - i < t)
|
|
859
861
|
return;
|
|
860
|
-
const
|
|
861
|
-
return
|
|
862
|
+
const g = u && l - u;
|
|
863
|
+
return g ? Math.round(m * 1e3 / g) : void 0;
|
|
862
864
|
};
|
|
863
865
|
}
|
|
864
|
-
function
|
|
866
|
+
function or(e, t) {
|
|
865
867
|
let n = 0, r = 1e3 / t, o, s;
|
|
866
868
|
const i = (l, u = Date.now()) => {
|
|
867
869
|
n = u, o = null, s && (clearTimeout(s), s = null), e(...l);
|
|
@@ -873,10 +875,10 @@ function cr(e, t) {
|
|
|
873
875
|
}, r - d)));
|
|
874
876
|
}, () => o && i(o)];
|
|
875
877
|
}
|
|
876
|
-
const
|
|
878
|
+
const re = (e, t, n = 3) => {
|
|
877
879
|
let r = 0;
|
|
878
|
-
const o =
|
|
879
|
-
return
|
|
880
|
+
const o = rr(50, 250);
|
|
881
|
+
return or((s) => {
|
|
880
882
|
const i = s.loaded, a = s.lengthComputable ? s.total : void 0, f = i - r, l = o(f), u = i <= a;
|
|
881
883
|
r = i;
|
|
882
884
|
const d = {
|
|
@@ -892,17 +894,17 @@ const oe = (e, t, n = 3) => {
|
|
|
892
894
|
};
|
|
893
895
|
e(d);
|
|
894
896
|
}, n);
|
|
895
|
-
},
|
|
897
|
+
}, qe = (e, t) => {
|
|
896
898
|
const n = e != null;
|
|
897
899
|
return [(r) => t[0]({
|
|
898
900
|
lengthComputable: n,
|
|
899
901
|
total: e,
|
|
900
902
|
loaded: r
|
|
901
903
|
}), t[1]];
|
|
902
|
-
},
|
|
904
|
+
}, Me = (e) => (...t) => c.asap(() => e(...t)), sr = 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)))(
|
|
903
905
|
new URL(T.origin),
|
|
904
906
|
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
905
|
-
) : () => !0,
|
|
907
|
+
) : () => !0, ir = T.hasStandardBrowserEnv ? (
|
|
906
908
|
// Standard browser envs support document.cookie
|
|
907
909
|
{
|
|
908
910
|
write(e, t, n, r, o, s) {
|
|
@@ -929,18 +931,18 @@ const oe = (e, t, n = 3) => {
|
|
|
929
931
|
}
|
|
930
932
|
}
|
|
931
933
|
);
|
|
932
|
-
function
|
|
934
|
+
function ar(e) {
|
|
933
935
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
934
936
|
}
|
|
935
|
-
function
|
|
937
|
+
function cr(e, t) {
|
|
936
938
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
937
939
|
}
|
|
938
|
-
function
|
|
939
|
-
let r = !
|
|
940
|
-
return e && (r || n == !1) ?
|
|
940
|
+
function At(e, t, n) {
|
|
941
|
+
let r = !ar(t);
|
|
942
|
+
return e && (r || n == !1) ? cr(e, t) : t;
|
|
941
943
|
}
|
|
942
|
-
const
|
|
943
|
-
function
|
|
944
|
+
const He = (e) => e instanceof _ ? { ...e } : e;
|
|
945
|
+
function B(e, t) {
|
|
944
946
|
t = t || {};
|
|
945
947
|
const n = {};
|
|
946
948
|
function r(l, u, d, m) {
|
|
@@ -997,17 +999,17 @@ function j(e, t) {
|
|
|
997
999
|
socketPath: i,
|
|
998
1000
|
responseEncoding: i,
|
|
999
1001
|
validateStatus: a,
|
|
1000
|
-
headers: (l, u, d) => o(
|
|
1002
|
+
headers: (l, u, d) => o(He(l), He(u), d, !0)
|
|
1001
1003
|
};
|
|
1002
1004
|
return c.forEach(Object.keys({ ...e, ...t }), function(u) {
|
|
1003
1005
|
const d = f[u] || o, m = d(e[u], t[u], u);
|
|
1004
1006
|
c.isUndefined(m) && d !== a || (n[u] = m);
|
|
1005
1007
|
}), n;
|
|
1006
1008
|
}
|
|
1007
|
-
const
|
|
1008
|
-
const t =
|
|
1009
|
+
const _t = (e) => {
|
|
1010
|
+
const t = B({}, e);
|
|
1009
1011
|
let { data: n, withXSRFToken: r, xsrfHeaderName: o, xsrfCookieName: s, headers: i, auth: a } = t;
|
|
1010
|
-
t.headers = i =
|
|
1012
|
+
t.headers = i = _.from(i), t.url = Et(At(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), a && i.set(
|
|
1011
1013
|
"Authorization",
|
|
1012
1014
|
"Basic " + btoa((a.username || "") + ":" + (a.password ? unescape(encodeURIComponent(a.password)) : ""))
|
|
1013
1015
|
);
|
|
@@ -1020,50 +1022,50 @@ const Nt = (e) => {
|
|
|
1020
1022
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1021
1023
|
}
|
|
1022
1024
|
}
|
|
1023
|
-
if (T.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1024
|
-
const l = o && s &&
|
|
1025
|
+
if (T.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && sr(t.url))) {
|
|
1026
|
+
const l = o && s && ir.read(s);
|
|
1025
1027
|
l && i.set(o, l);
|
|
1026
1028
|
}
|
|
1027
1029
|
return t;
|
|
1028
|
-
},
|
|
1030
|
+
}, ur = typeof XMLHttpRequest < "u", lr = ur && function(e) {
|
|
1029
1031
|
return new Promise(function(n, r) {
|
|
1030
|
-
const o =
|
|
1032
|
+
const o = _t(e);
|
|
1031
1033
|
let s = o.data;
|
|
1032
|
-
const i =
|
|
1033
|
-
let { responseType: a, onUploadProgress: f, onDownloadProgress: l } = o, u, d, m,
|
|
1034
|
+
const i = _.from(o.headers).normalize();
|
|
1035
|
+
let { responseType: a, onUploadProgress: f, onDownloadProgress: l } = o, u, d, m, g, p;
|
|
1034
1036
|
function y() {
|
|
1035
|
-
|
|
1037
|
+
g && g(), p && p(), o.cancelToken && o.cancelToken.unsubscribe(u), o.signal && o.signal.removeEventListener("abort", u);
|
|
1036
1038
|
}
|
|
1037
1039
|
let h = new XMLHttpRequest();
|
|
1038
1040
|
h.open(o.method.toUpperCase(), o.url, !0), h.timeout = o.timeout;
|
|
1039
|
-
function
|
|
1041
|
+
function E() {
|
|
1040
1042
|
if (!h)
|
|
1041
1043
|
return;
|
|
1042
|
-
const
|
|
1044
|
+
const S = _.from(
|
|
1043
1045
|
"getAllResponseHeaders" in h && h.getAllResponseHeaders()
|
|
1044
1046
|
), O = {
|
|
1045
1047
|
data: !a || a === "text" || a === "json" ? h.responseText : h.response,
|
|
1046
1048
|
status: h.status,
|
|
1047
1049
|
statusText: h.statusText,
|
|
1048
|
-
headers:
|
|
1050
|
+
headers: S,
|
|
1049
1051
|
config: e,
|
|
1050
1052
|
request: h
|
|
1051
1053
|
};
|
|
1052
|
-
|
|
1053
|
-
n(
|
|
1054
|
-
}, function(
|
|
1055
|
-
r(
|
|
1054
|
+
Ot(function(F) {
|
|
1055
|
+
n(F), y();
|
|
1056
|
+
}, function(F) {
|
|
1057
|
+
r(F), y();
|
|
1056
1058
|
}, O), h = null;
|
|
1057
1059
|
}
|
|
1058
|
-
"onloadend" in h ? h.onloadend =
|
|
1059
|
-
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(
|
|
1060
|
+
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function() {
|
|
1061
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1060
1062
|
}, h.onabort = function() {
|
|
1061
1063
|
h && (r(new w("Request aborted", w.ECONNABORTED, e, h)), h = null);
|
|
1062
1064
|
}, h.onerror = function() {
|
|
1063
1065
|
r(new w("Network Error", w.ERR_NETWORK, e, h)), h = null;
|
|
1064
1066
|
}, h.ontimeout = function() {
|
|
1065
1067
|
let k = o.timeout ? "timeout of " + o.timeout + "ms exceeded" : "timeout exceeded";
|
|
1066
|
-
const O = o.transitional ||
|
|
1068
|
+
const O = o.transitional || Rt;
|
|
1067
1069
|
o.timeoutErrorMessage && (k = o.timeoutErrorMessage), r(new w(
|
|
1068
1070
|
k,
|
|
1069
1071
|
O.clarifyTimeoutError ? w.ETIMEDOUT : w.ECONNABORTED,
|
|
@@ -1072,17 +1074,17 @@ const Nt = (e) => {
|
|
|
1072
1074
|
)), h = null;
|
|
1073
1075
|
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && c.forEach(i.toJSON(), function(k, O) {
|
|
1074
1076
|
h.setRequestHeader(O, k);
|
|
1075
|
-
}), c.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), a && a !== "json" && (h.responseType = o.responseType), l && ([m, p] =
|
|
1076
|
-
h && (r(!
|
|
1077
|
+
}), c.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), a && a !== "json" && (h.responseType = o.responseType), l && ([m, p] = re(l, !0), h.addEventListener("progress", m)), f && h.upload && ([d, g] = re(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (u = (S) => {
|
|
1078
|
+
h && (r(!S || S.type ? new M(null, e, h) : S), h.abort(), h = null);
|
|
1077
1079
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1078
|
-
const R =
|
|
1080
|
+
const R = nr(o.url);
|
|
1079
1081
|
if (R && T.protocols.indexOf(R) === -1) {
|
|
1080
1082
|
r(new w("Unsupported protocol " + R + ":", w.ERR_BAD_REQUEST, e));
|
|
1081
1083
|
return;
|
|
1082
1084
|
}
|
|
1083
1085
|
h.send(s || null);
|
|
1084
1086
|
});
|
|
1085
|
-
},
|
|
1087
|
+
}, fr = (e, t) => {
|
|
1086
1088
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1087
1089
|
if (t || n) {
|
|
1088
1090
|
let r = new AbortController(), o;
|
|
@@ -1090,7 +1092,7 @@ const Nt = (e) => {
|
|
|
1090
1092
|
if (!o) {
|
|
1091
1093
|
o = !0, a();
|
|
1092
1094
|
const u = l instanceof Error ? l : this.reason;
|
|
1093
|
-
r.abort(u instanceof w ? u : new
|
|
1095
|
+
r.abort(u instanceof w ? u : new M(u instanceof Error ? u.message : u));
|
|
1094
1096
|
}
|
|
1095
1097
|
};
|
|
1096
1098
|
let i = t && setTimeout(() => {
|
|
@@ -1105,7 +1107,7 @@ const Nt = (e) => {
|
|
|
1105
1107
|
const { signal: f } = r;
|
|
1106
1108
|
return f.unsubscribe = () => c.asap(a), f;
|
|
1107
1109
|
}
|
|
1108
|
-
},
|
|
1110
|
+
}, dr = function* (e, t) {
|
|
1109
1111
|
let n = e.byteLength;
|
|
1110
1112
|
if (n < t) {
|
|
1111
1113
|
yield e;
|
|
@@ -1114,10 +1116,10 @@ const Nt = (e) => {
|
|
|
1114
1116
|
let r = 0, o;
|
|
1115
1117
|
for (; r < n; )
|
|
1116
1118
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1117
|
-
},
|
|
1118
|
-
for await (const n of
|
|
1119
|
-
yield*
|
|
1120
|
-
},
|
|
1119
|
+
}, pr = async function* (e, t) {
|
|
1120
|
+
for await (const n of hr(e))
|
|
1121
|
+
yield* dr(n, t);
|
|
1122
|
+
}, hr = async function* (e) {
|
|
1121
1123
|
if (e[Symbol.asyncIterator]) {
|
|
1122
1124
|
yield* e;
|
|
1123
1125
|
return;
|
|
@@ -1133,8 +1135,8 @@ const Nt = (e) => {
|
|
|
1133
1135
|
} finally {
|
|
1134
1136
|
await t.cancel();
|
|
1135
1137
|
}
|
|
1136
|
-
},
|
|
1137
|
-
const o =
|
|
1138
|
+
}, $e = (e, t, n, r) => {
|
|
1139
|
+
const o = pr(e, t);
|
|
1138
1140
|
let s = 0, i, a = (f) => {
|
|
1139
1141
|
i || (i = !0, r && r(f));
|
|
1140
1142
|
};
|
|
@@ -1162,13 +1164,13 @@ const Nt = (e) => {
|
|
|
1162
1164
|
}, {
|
|
1163
1165
|
highWaterMark: 2
|
|
1164
1166
|
});
|
|
1165
|
-
}, le = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1167
|
+
}, le = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", Ct = le && typeof ReadableStream == "function", mr = le && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), xt = (e, ...t) => {
|
|
1166
1168
|
try {
|
|
1167
1169
|
return !!e(...t);
|
|
1168
1170
|
} catch {
|
|
1169
1171
|
return !1;
|
|
1170
1172
|
}
|
|
1171
|
-
},
|
|
1173
|
+
}, yr = Ct && xt(() => {
|
|
1172
1174
|
let e = !1;
|
|
1173
1175
|
const t = new Request(T.origin, {
|
|
1174
1176
|
body: new ReadableStream(),
|
|
@@ -1178,17 +1180,17 @@ const Nt = (e) => {
|
|
|
1178
1180
|
}
|
|
1179
1181
|
}).headers.has("Content-Type");
|
|
1180
1182
|
return e && !t;
|
|
1181
|
-
}),
|
|
1183
|
+
}), ze = 64 * 1024, Re = Ct && xt(() => c.isReadableStream(new Response("").body)), oe = {
|
|
1182
1184
|
stream: Re && ((e) => e.body)
|
|
1183
1185
|
};
|
|
1184
1186
|
le && ((e) => {
|
|
1185
1187
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1186
|
-
!
|
|
1188
|
+
!oe[t] && (oe[t] = c.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1187
1189
|
throw new w(`Response type '${t}' is not supported`, w.ERR_NOT_SUPPORT, r);
|
|
1188
1190
|
});
|
|
1189
1191
|
});
|
|
1190
1192
|
})(new Response());
|
|
1191
|
-
const
|
|
1193
|
+
const wr = async (e) => {
|
|
1192
1194
|
if (e == null)
|
|
1193
1195
|
return 0;
|
|
1194
1196
|
if (c.isBlob(e))
|
|
@@ -1201,11 +1203,11 @@ const Rr = async (e) => {
|
|
|
1201
1203
|
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
1202
1204
|
return e.byteLength;
|
|
1203
1205
|
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
1204
|
-
return (await
|
|
1205
|
-
},
|
|
1206
|
+
return (await mr(e)).byteLength;
|
|
1207
|
+
}, gr = async (e, t) => {
|
|
1206
1208
|
const n = c.toFiniteNumber(e.getContentLength());
|
|
1207
|
-
return n ??
|
|
1208
|
-
},
|
|
1209
|
+
return n ?? wr(t);
|
|
1210
|
+
}, br = le && (async (e) => {
|
|
1209
1211
|
let {
|
|
1210
1212
|
url: t,
|
|
1211
1213
|
method: n,
|
|
@@ -1219,83 +1221,83 @@ const Rr = async (e) => {
|
|
|
1219
1221
|
headers: u,
|
|
1220
1222
|
withCredentials: d = "same-origin",
|
|
1221
1223
|
fetchOptions: m
|
|
1222
|
-
} =
|
|
1224
|
+
} = _t(e);
|
|
1223
1225
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1224
|
-
let
|
|
1225
|
-
const y =
|
|
1226
|
-
|
|
1226
|
+
let g = fr([o, s && s.toAbortSignal()], i), p;
|
|
1227
|
+
const y = g && g.unsubscribe && (() => {
|
|
1228
|
+
g.unsubscribe();
|
|
1227
1229
|
});
|
|
1228
1230
|
let h;
|
|
1229
1231
|
try {
|
|
1230
|
-
if (f &&
|
|
1232
|
+
if (f && yr && n !== "get" && n !== "head" && (h = await gr(u, r)) !== 0) {
|
|
1231
1233
|
let O = new Request(t, {
|
|
1232
1234
|
method: "POST",
|
|
1233
1235
|
body: r,
|
|
1234
1236
|
duplex: "half"
|
|
1235
1237
|
}), P;
|
|
1236
1238
|
if (c.isFormData(r) && (P = O.headers.get("content-type")) && u.setContentType(P), O.body) {
|
|
1237
|
-
const [
|
|
1239
|
+
const [F, Q] = qe(
|
|
1238
1240
|
h,
|
|
1239
|
-
|
|
1241
|
+
re(Me(f))
|
|
1240
1242
|
);
|
|
1241
|
-
r =
|
|
1243
|
+
r = $e(O.body, ze, F, Q);
|
|
1242
1244
|
}
|
|
1243
1245
|
}
|
|
1244
1246
|
c.isString(d) || (d = d ? "include" : "omit");
|
|
1245
|
-
const
|
|
1247
|
+
const E = "credentials" in Request.prototype;
|
|
1246
1248
|
p = new Request(t, {
|
|
1247
1249
|
...m,
|
|
1248
|
-
signal:
|
|
1250
|
+
signal: g,
|
|
1249
1251
|
method: n.toUpperCase(),
|
|
1250
1252
|
headers: u.normalize().toJSON(),
|
|
1251
1253
|
body: r,
|
|
1252
1254
|
duplex: "half",
|
|
1253
|
-
credentials:
|
|
1255
|
+
credentials: E ? d : void 0
|
|
1254
1256
|
});
|
|
1255
1257
|
let R = await fetch(p, m);
|
|
1256
|
-
const
|
|
1257
|
-
if (Re && (a ||
|
|
1258
|
+
const S = Re && (l === "stream" || l === "response");
|
|
1259
|
+
if (Re && (a || S && y)) {
|
|
1258
1260
|
const O = {};
|
|
1259
|
-
["status", "statusText", "headers"].forEach((
|
|
1260
|
-
O[
|
|
1261
|
+
["status", "statusText", "headers"].forEach((Fe) => {
|
|
1262
|
+
O[Fe] = R[Fe];
|
|
1261
1263
|
});
|
|
1262
|
-
const P = c.toFiniteNumber(R.headers.get("content-length")), [
|
|
1264
|
+
const P = c.toFiniteNumber(R.headers.get("content-length")), [F, Q] = a && qe(
|
|
1263
1265
|
P,
|
|
1264
|
-
|
|
1266
|
+
re(Me(a), !0)
|
|
1265
1267
|
) || [];
|
|
1266
1268
|
R = new Response(
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
+
$e(R.body, ze, F, () => {
|
|
1270
|
+
Q && Q(), y && y();
|
|
1269
1271
|
}),
|
|
1270
1272
|
O
|
|
1271
1273
|
);
|
|
1272
1274
|
}
|
|
1273
1275
|
l = l || "text";
|
|
1274
|
-
let k = await
|
|
1275
|
-
return !
|
|
1276
|
-
|
|
1276
|
+
let k = await oe[c.findKey(oe, l) || "text"](R, e);
|
|
1277
|
+
return !S && y && y(), await new Promise((O, P) => {
|
|
1278
|
+
Ot(O, P, {
|
|
1277
1279
|
data: k,
|
|
1278
|
-
headers:
|
|
1280
|
+
headers: _.from(R.headers),
|
|
1279
1281
|
status: R.status,
|
|
1280
1282
|
statusText: R.statusText,
|
|
1281
1283
|
config: e,
|
|
1282
1284
|
request: p
|
|
1283
1285
|
});
|
|
1284
1286
|
});
|
|
1285
|
-
} catch (
|
|
1286
|
-
throw y && y(),
|
|
1287
|
+
} catch (E) {
|
|
1288
|
+
throw y && y(), E && E.name === "TypeError" && /Load failed|fetch/i.test(E.message) ? Object.assign(
|
|
1287
1289
|
new w("Network Error", w.ERR_NETWORK, e, p),
|
|
1288
1290
|
{
|
|
1289
|
-
cause:
|
|
1291
|
+
cause: E.cause || E
|
|
1290
1292
|
}
|
|
1291
|
-
) : w.from(
|
|
1293
|
+
) : w.from(E, E && E.code, e, p);
|
|
1292
1294
|
}
|
|
1293
|
-
}),
|
|
1294
|
-
http:
|
|
1295
|
-
xhr:
|
|
1296
|
-
fetch:
|
|
1295
|
+
}), Se = {
|
|
1296
|
+
http: Fn,
|
|
1297
|
+
xhr: lr,
|
|
1298
|
+
fetch: br
|
|
1297
1299
|
};
|
|
1298
|
-
c.forEach(
|
|
1300
|
+
c.forEach(Se, (e, t) => {
|
|
1299
1301
|
if (e) {
|
|
1300
1302
|
try {
|
|
1301
1303
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1304,7 +1306,7 @@ c.forEach(Ee, (e, t) => {
|
|
|
1304
1306
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1305
1307
|
}
|
|
1306
1308
|
});
|
|
1307
|
-
const
|
|
1309
|
+
const Je = (e) => `- ${e}`, Er = (e) => c.isFunction(e) || e === null || e === !1, kt = {
|
|
1308
1310
|
getAdapter: (e) => {
|
|
1309
1311
|
e = c.isArray(e) ? e : [e];
|
|
1310
1312
|
const { length: t } = e;
|
|
@@ -1313,7 +1315,7 @@ const Xe = (e) => `- ${e}`, Or = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1313
1315
|
for (let s = 0; s < t; s++) {
|
|
1314
1316
|
n = e[s];
|
|
1315
1317
|
let i;
|
|
1316
|
-
if (r = n, !
|
|
1318
|
+
if (r = n, !Er(n) && (r = Se[(i = String(n)).toLowerCase()], r === void 0))
|
|
1317
1319
|
throw new w(`Unknown adapter '${i}'`);
|
|
1318
1320
|
if (r)
|
|
1319
1321
|
break;
|
|
@@ -1324,8 +1326,8 @@ const Xe = (e) => `- ${e}`, Or = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1324
1326
|
([a, f]) => `adapter ${a} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1325
1327
|
);
|
|
1326
1328
|
let i = t ? s.length > 1 ? `since :
|
|
1327
|
-
` + s.map(
|
|
1328
|
-
`) : " " +
|
|
1329
|
+
` + s.map(Je).join(`
|
|
1330
|
+
`) : " " + Je(s[0]) : "as no adapter specified";
|
|
1329
1331
|
throw new w(
|
|
1330
1332
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1331
1333
|
"ERR_NOT_SUPPORT"
|
|
@@ -1333,40 +1335,40 @@ const Xe = (e) => `- ${e}`, Or = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1333
1335
|
}
|
|
1334
1336
|
return r;
|
|
1335
1337
|
},
|
|
1336
|
-
adapters:
|
|
1338
|
+
adapters: Se
|
|
1337
1339
|
};
|
|
1338
1340
|
function he(e) {
|
|
1339
1341
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1340
|
-
throw new
|
|
1342
|
+
throw new M(null, e);
|
|
1341
1343
|
}
|
|
1342
|
-
function
|
|
1343
|
-
return he(e), e.headers =
|
|
1344
|
+
function Ve(e) {
|
|
1345
|
+
return he(e), e.headers = _.from(e.headers), e.data = pe.call(
|
|
1344
1346
|
e,
|
|
1345
1347
|
e.transformRequest
|
|
1346
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1348
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), kt.getAdapter(e.adapter || K.adapter)(e).then(function(r) {
|
|
1347
1349
|
return he(e), r.data = pe.call(
|
|
1348
1350
|
e,
|
|
1349
1351
|
e.transformResponse,
|
|
1350
1352
|
r
|
|
1351
|
-
), r.headers =
|
|
1353
|
+
), r.headers = _.from(r.headers), r;
|
|
1352
1354
|
}, function(r) {
|
|
1353
|
-
return
|
|
1355
|
+
return Tt(r) || (he(e), r && r.response && (r.response.data = pe.call(
|
|
1354
1356
|
e,
|
|
1355
1357
|
e.transformResponse,
|
|
1356
1358
|
r.response
|
|
1357
|
-
), r.response.headers =
|
|
1359
|
+
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1358
1360
|
});
|
|
1359
1361
|
}
|
|
1360
|
-
const
|
|
1362
|
+
const Pt = "1.11.0", fe = {};
|
|
1361
1363
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1362
1364
|
fe[e] = function(r) {
|
|
1363
1365
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1364
1366
|
};
|
|
1365
1367
|
});
|
|
1366
|
-
const
|
|
1368
|
+
const We = {};
|
|
1367
1369
|
fe.transitional = function(t, n, r) {
|
|
1368
1370
|
function o(s, i) {
|
|
1369
|
-
return "[Axios v" +
|
|
1371
|
+
return "[Axios v" + Pt + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
1370
1372
|
}
|
|
1371
1373
|
return (s, i, a) => {
|
|
1372
1374
|
if (t === !1)
|
|
@@ -1374,13 +1376,13 @@ fe.transitional = function(t, n, r) {
|
|
|
1374
1376
|
o(i, " has been removed" + (n ? " in " + n : "")),
|
|
1375
1377
|
w.ERR_DEPRECATED
|
|
1376
1378
|
);
|
|
1377
|
-
return n && !
|
|
1379
|
+
return n && !We[i] && (We[i] = !0), t ? t(s, i, a) : !0;
|
|
1378
1380
|
};
|
|
1379
1381
|
};
|
|
1380
1382
|
fe.spelling = function(t) {
|
|
1381
1383
|
return (n, r) => !0;
|
|
1382
1384
|
};
|
|
1383
|
-
function
|
|
1385
|
+
function Rr(e, t, n) {
|
|
1384
1386
|
if (typeof e != "object")
|
|
1385
1387
|
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1386
1388
|
const r = Object.keys(e);
|
|
@@ -1397,15 +1399,15 @@ function _r(e, t, n) {
|
|
|
1397
1399
|
throw new w("Unknown option " + s, w.ERR_BAD_OPTION);
|
|
1398
1400
|
}
|
|
1399
1401
|
}
|
|
1400
|
-
const
|
|
1401
|
-
assertOptions:
|
|
1402
|
+
const ee = {
|
|
1403
|
+
assertOptions: Rr,
|
|
1402
1404
|
validators: fe
|
|
1403
|
-
}, x =
|
|
1404
|
-
let
|
|
1405
|
+
}, x = ee.validators;
|
|
1406
|
+
let v = class {
|
|
1405
1407
|
constructor(t) {
|
|
1406
1408
|
this.defaults = t || {}, this.interceptors = {
|
|
1407
|
-
request: new
|
|
1408
|
-
response: new
|
|
1409
|
+
request: new Be(),
|
|
1410
|
+
response: new Be()
|
|
1409
1411
|
};
|
|
1410
1412
|
}
|
|
1411
1413
|
/**
|
|
@@ -1434,18 +1436,18 @@ let D = class {
|
|
|
1434
1436
|
}
|
|
1435
1437
|
}
|
|
1436
1438
|
_request(t, n) {
|
|
1437
|
-
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n =
|
|
1439
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = B(this.defaults, n);
|
|
1438
1440
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1439
|
-
r !== void 0 &&
|
|
1441
|
+
r !== void 0 && ee.assertOptions(r, {
|
|
1440
1442
|
silentJSONParsing: x.transitional(x.boolean),
|
|
1441
1443
|
forcedJSONParsing: x.transitional(x.boolean),
|
|
1442
1444
|
clarifyTimeoutError: x.transitional(x.boolean)
|
|
1443
1445
|
}, !1), o != null && (c.isFunction(o) ? n.paramsSerializer = {
|
|
1444
1446
|
serialize: o
|
|
1445
|
-
} :
|
|
1447
|
+
} : ee.assertOptions(o, {
|
|
1446
1448
|
encode: x.function,
|
|
1447
1449
|
serialize: x.function
|
|
1448
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1450
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), ee.assertOptions(n, {
|
|
1449
1451
|
baseUrl: x.spelling("baseURL"),
|
|
1450
1452
|
withXsrfToken: x.spelling("withXSRFToken")
|
|
1451
1453
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1458,7 +1460,7 @@ let D = class {
|
|
|
1458
1460
|
(p) => {
|
|
1459
1461
|
delete s[p];
|
|
1460
1462
|
}
|
|
1461
|
-
), n.headers =
|
|
1463
|
+
), n.headers = _.concat(i, s);
|
|
1462
1464
|
const a = [];
|
|
1463
1465
|
let f = !0;
|
|
1464
1466
|
this.interceptors.request.forEach(function(y) {
|
|
@@ -1470,24 +1472,24 @@ let D = class {
|
|
|
1470
1472
|
});
|
|
1471
1473
|
let u, d = 0, m;
|
|
1472
1474
|
if (!f) {
|
|
1473
|
-
const p = [
|
|
1475
|
+
const p = [Ve.bind(this), void 0];
|
|
1474
1476
|
for (p.unshift(...a), p.push(...l), m = p.length, u = Promise.resolve(n); d < m; )
|
|
1475
1477
|
u = u.then(p[d++], p[d++]);
|
|
1476
1478
|
return u;
|
|
1477
1479
|
}
|
|
1478
1480
|
m = a.length;
|
|
1479
|
-
let
|
|
1481
|
+
let g = n;
|
|
1480
1482
|
for (d = 0; d < m; ) {
|
|
1481
1483
|
const p = a[d++], y = a[d++];
|
|
1482
1484
|
try {
|
|
1483
|
-
|
|
1485
|
+
g = p(g);
|
|
1484
1486
|
} catch (h) {
|
|
1485
1487
|
y.call(this, h);
|
|
1486
1488
|
break;
|
|
1487
1489
|
}
|
|
1488
1490
|
}
|
|
1489
1491
|
try {
|
|
1490
|
-
u =
|
|
1492
|
+
u = Ve.call(this, g);
|
|
1491
1493
|
} catch (p) {
|
|
1492
1494
|
return Promise.reject(p);
|
|
1493
1495
|
}
|
|
@@ -1496,14 +1498,14 @@ let D = class {
|
|
|
1496
1498
|
return u;
|
|
1497
1499
|
}
|
|
1498
1500
|
getUri(t) {
|
|
1499
|
-
t =
|
|
1500
|
-
const n =
|
|
1501
|
-
return
|
|
1501
|
+
t = B(this.defaults, t);
|
|
1502
|
+
const n = At(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1503
|
+
return Et(n, t.params, t.paramsSerializer);
|
|
1502
1504
|
}
|
|
1503
1505
|
};
|
|
1504
1506
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1505
|
-
|
|
1506
|
-
return this.request(
|
|
1507
|
+
v.prototype[t] = function(n, r) {
|
|
1508
|
+
return this.request(B(r || {}, {
|
|
1507
1509
|
method: t,
|
|
1508
1510
|
url: n,
|
|
1509
1511
|
data: (r || {}).data
|
|
@@ -1513,7 +1515,7 @@ c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
|
1513
1515
|
c.forEach(["post", "put", "patch"], function(t) {
|
|
1514
1516
|
function n(r) {
|
|
1515
1517
|
return function(s, i, a) {
|
|
1516
|
-
return this.request(
|
|
1518
|
+
return this.request(B(a || {}, {
|
|
1517
1519
|
method: t,
|
|
1518
1520
|
headers: r ? {
|
|
1519
1521
|
"Content-Type": "multipart/form-data"
|
|
@@ -1523,9 +1525,9 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1523
1525
|
}));
|
|
1524
1526
|
};
|
|
1525
1527
|
}
|
|
1526
|
-
|
|
1528
|
+
v.prototype[t] = n(), v.prototype[t + "Form"] = n(!0);
|
|
1527
1529
|
});
|
|
1528
|
-
let
|
|
1530
|
+
let Sr = class Ut {
|
|
1529
1531
|
constructor(t) {
|
|
1530
1532
|
if (typeof t != "function")
|
|
1531
1533
|
throw new TypeError("executor must be a function.");
|
|
@@ -1549,7 +1551,7 @@ let Ar = class jt {
|
|
|
1549
1551
|
r.unsubscribe(s);
|
|
1550
1552
|
}, i;
|
|
1551
1553
|
}, t(function(s, i, a) {
|
|
1552
|
-
r.reason || (r.reason = new
|
|
1554
|
+
r.reason || (r.reason = new M(s, i, a), n(r.reason));
|
|
1553
1555
|
});
|
|
1554
1556
|
}
|
|
1555
1557
|
/**
|
|
@@ -1591,19 +1593,19 @@ let Ar = class jt {
|
|
|
1591
1593
|
static source() {
|
|
1592
1594
|
let t;
|
|
1593
1595
|
return {
|
|
1594
|
-
token: new
|
|
1596
|
+
token: new Ut(function(o) {
|
|
1595
1597
|
t = o;
|
|
1596
1598
|
}),
|
|
1597
1599
|
cancel: t
|
|
1598
1600
|
};
|
|
1599
1601
|
}
|
|
1600
1602
|
};
|
|
1601
|
-
function
|
|
1603
|
+
function Tr(e) {
|
|
1602
1604
|
return function(n) {
|
|
1603
1605
|
return e.apply(null, n);
|
|
1604
1606
|
};
|
|
1605
1607
|
}
|
|
1606
|
-
function
|
|
1608
|
+
function Or(e) {
|
|
1607
1609
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
1608
1610
|
}
|
|
1609
1611
|
const Te = {
|
|
@@ -1674,50 +1676,50 @@ const Te = {
|
|
|
1674
1676
|
Object.entries(Te).forEach(([e, t]) => {
|
|
1675
1677
|
Te[t] = e;
|
|
1676
1678
|
});
|
|
1677
|
-
function
|
|
1678
|
-
const t = new
|
|
1679
|
-
return c.extend(n,
|
|
1680
|
-
return
|
|
1679
|
+
function Lt(e) {
|
|
1680
|
+
const t = new v(e), n = ct(v.prototype.request, t);
|
|
1681
|
+
return c.extend(n, v.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1682
|
+
return Lt(B(e, o));
|
|
1681
1683
|
}, n;
|
|
1682
1684
|
}
|
|
1683
|
-
const
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1685
|
+
const b = Lt(K);
|
|
1686
|
+
b.Axios = v;
|
|
1687
|
+
b.CanceledError = M;
|
|
1688
|
+
b.CancelToken = Sr;
|
|
1689
|
+
b.isCancel = Tt;
|
|
1690
|
+
b.VERSION = Pt;
|
|
1691
|
+
b.toFormData = ue;
|
|
1692
|
+
b.AxiosError = w;
|
|
1693
|
+
b.Cancel = b.CanceledError;
|
|
1694
|
+
b.all = function(t) {
|
|
1693
1695
|
return Promise.all(t);
|
|
1694
1696
|
};
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1697
|
+
b.spread = Tr;
|
|
1698
|
+
b.isAxiosError = Or;
|
|
1699
|
+
b.mergeConfig = B;
|
|
1700
|
+
b.AxiosHeaders = _;
|
|
1701
|
+
b.formToJSON = (e) => St(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
1702
|
+
b.getAdapter = kt.getAdapter;
|
|
1703
|
+
b.HttpStatusCode = Te;
|
|
1704
|
+
b.default = b;
|
|
1703
1705
|
const {
|
|
1704
|
-
Axios:
|
|
1705
|
-
AxiosError:
|
|
1706
|
-
CanceledError:
|
|
1707
|
-
isCancel:
|
|
1708
|
-
CancelToken:
|
|
1709
|
-
VERSION:
|
|
1710
|
-
all:
|
|
1711
|
-
Cancel:
|
|
1712
|
-
isAxiosError:
|
|
1713
|
-
spread:
|
|
1714
|
-
toFormData:
|
|
1715
|
-
AxiosHeaders:
|
|
1716
|
-
HttpStatusCode:
|
|
1717
|
-
formToJSON:
|
|
1718
|
-
getAdapter:
|
|
1719
|
-
mergeConfig:
|
|
1720
|
-
} =
|
|
1706
|
+
Axios: oo,
|
|
1707
|
+
AxiosError: so,
|
|
1708
|
+
CanceledError: io,
|
|
1709
|
+
isCancel: ao,
|
|
1710
|
+
CancelToken: co,
|
|
1711
|
+
VERSION: uo,
|
|
1712
|
+
all: lo,
|
|
1713
|
+
Cancel: fo,
|
|
1714
|
+
isAxiosError: po,
|
|
1715
|
+
spread: ho,
|
|
1716
|
+
toFormData: mo,
|
|
1717
|
+
AxiosHeaders: yo,
|
|
1718
|
+
HttpStatusCode: wo,
|
|
1719
|
+
formToJSON: go,
|
|
1720
|
+
getAdapter: bo,
|
|
1721
|
+
mergeConfig: Eo
|
|
1722
|
+
} = b;
|
|
1721
1723
|
/*! js-cookie v3.0.5 | MIT */
|
|
1722
1724
|
function X(e) {
|
|
1723
1725
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -1727,7 +1729,7 @@ function X(e) {
|
|
|
1727
1729
|
}
|
|
1728
1730
|
return e;
|
|
1729
1731
|
}
|
|
1730
|
-
var
|
|
1732
|
+
var Ar = {
|
|
1731
1733
|
read: function(e) {
|
|
1732
1734
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1733
1735
|
},
|
|
@@ -1788,14 +1790,14 @@ function Oe(e, t) {
|
|
|
1788
1790
|
}
|
|
1789
1791
|
);
|
|
1790
1792
|
}
|
|
1791
|
-
var
|
|
1792
|
-
const
|
|
1793
|
+
var _r = Oe(Ar, { path: "/" }), Ke;
|
|
1794
|
+
const Nt = typeof window < "u", Cr = (e) => typeof e == "string", Qe = () => +Date.now(), Ae = () => {
|
|
1793
1795
|
};
|
|
1794
|
-
|
|
1795
|
-
function
|
|
1796
|
-
return typeof e == "function" ? e() :
|
|
1796
|
+
Nt && ((Ke = window == null ? void 0 : window.navigator) != null && Ke.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1797
|
+
function Ne(e) {
|
|
1798
|
+
return typeof e == "function" ? e() : qt(e);
|
|
1797
1799
|
}
|
|
1798
|
-
function
|
|
1800
|
+
function xr(e, t) {
|
|
1799
1801
|
function n(...r) {
|
|
1800
1802
|
return new Promise((o, s) => {
|
|
1801
1803
|
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(o).catch(s);
|
|
@@ -1803,84 +1805,84 @@ function Ur(e, t) {
|
|
|
1803
1805
|
}
|
|
1804
1806
|
return n;
|
|
1805
1807
|
}
|
|
1806
|
-
function
|
|
1808
|
+
function kr(e, t = !0, n = !0, r = !1) {
|
|
1807
1809
|
let o = 0, s, i = !0, a = Ae, f;
|
|
1808
1810
|
const l = () => {
|
|
1809
1811
|
s && (clearTimeout(s), s = void 0, a(), a = Ae);
|
|
1810
1812
|
};
|
|
1811
1813
|
return (d) => {
|
|
1812
|
-
const m =
|
|
1813
|
-
return l(), m <= 0 ? (o = Date.now(), p()) : (
|
|
1814
|
+
const m = Ne(e), g = Date.now() - o, p = () => f = d();
|
|
1815
|
+
return l(), m <= 0 ? (o = Date.now(), p()) : (g > m && (n || !i) ? (o = Date.now(), p()) : t && (f = new Promise((y, h) => {
|
|
1814
1816
|
a = r ? h : y, s = setTimeout(() => {
|
|
1815
1817
|
o = Date.now(), i = !0, y(p()), l();
|
|
1816
|
-
}, Math.max(0, m -
|
|
1818
|
+
}, Math.max(0, m - g));
|
|
1817
1819
|
})), !n && !s && (s = setTimeout(() => i = !0, m)), i = !1, f);
|
|
1818
1820
|
};
|
|
1819
1821
|
}
|
|
1820
|
-
function
|
|
1822
|
+
function Pr(e) {
|
|
1821
1823
|
return e;
|
|
1822
1824
|
}
|
|
1823
|
-
function
|
|
1824
|
-
return
|
|
1825
|
+
function Ur(e) {
|
|
1826
|
+
return Mt() ? (Ht(e), !0) : !1;
|
|
1825
1827
|
}
|
|
1826
|
-
function
|
|
1828
|
+
function Lr(e) {
|
|
1827
1829
|
var t;
|
|
1828
|
-
const n =
|
|
1830
|
+
const n = Ne(e);
|
|
1829
1831
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
1830
1832
|
}
|
|
1831
|
-
const
|
|
1832
|
-
function
|
|
1833
|
+
const Ft = Nt ? window : void 0;
|
|
1834
|
+
function Xe(...e) {
|
|
1833
1835
|
let t, n, r, o;
|
|
1834
|
-
if (
|
|
1836
|
+
if (Cr(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Ft) : [t, n, r, o] = e, !t)
|
|
1835
1837
|
return Ae;
|
|
1836
1838
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1837
1839
|
const s = [], i = () => {
|
|
1838
1840
|
s.forEach((u) => u()), s.length = 0;
|
|
1839
|
-
}, a = (u, d, m,
|
|
1840
|
-
i(), u && s.push(...n.flatMap((m) => r.map((
|
|
1841
|
+
}, a = (u, d, m, g) => (u.addEventListener(d, m, g), () => u.removeEventListener(d, m, g)), f = xe(() => [Lr(t), Ne(o)], ([u, d]) => {
|
|
1842
|
+
i(), u && s.push(...n.flatMap((m) => r.map((g) => a(u, m, g, d))));
|
|
1841
1843
|
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1842
1844
|
f(), i();
|
|
1843
1845
|
};
|
|
1844
|
-
return
|
|
1846
|
+
return Ur(l), l;
|
|
1845
1847
|
}
|
|
1846
|
-
const
|
|
1847
|
-
|
|
1848
|
-
const
|
|
1849
|
-
function
|
|
1848
|
+
const Ge = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ye = "__vueuse_ssr_handlers__";
|
|
1849
|
+
Ge[Ye] = Ge[Ye] || {};
|
|
1850
|
+
const Nr = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], Fr = 6e4;
|
|
1851
|
+
function Dr(e = Fr, t = {}) {
|
|
1850
1852
|
const {
|
|
1851
1853
|
initialState: n = !1,
|
|
1852
1854
|
listenForVisibilityChange: r = !0,
|
|
1853
|
-
events: o =
|
|
1854
|
-
window: s =
|
|
1855
|
-
eventFilter: i =
|
|
1856
|
-
} = t, a =
|
|
1855
|
+
events: o = Nr,
|
|
1856
|
+
window: s = Ft,
|
|
1857
|
+
eventFilter: i = kr(50)
|
|
1858
|
+
} = t, a = te(n), f = te(Qe());
|
|
1857
1859
|
let l;
|
|
1858
|
-
const u =
|
|
1859
|
-
a.value = !1, f.value =
|
|
1860
|
+
const u = xr(i, () => {
|
|
1861
|
+
a.value = !1, f.value = Qe(), clearTimeout(l), l = setTimeout(() => a.value = !0, e);
|
|
1860
1862
|
});
|
|
1861
1863
|
if (s) {
|
|
1862
1864
|
const d = s.document;
|
|
1863
1865
|
for (const m of o)
|
|
1864
|
-
|
|
1865
|
-
r &&
|
|
1866
|
+
Xe(s, m, u, { passive: !0 });
|
|
1867
|
+
r && Xe(d, "visibilitychange", () => {
|
|
1866
1868
|
d.hidden || u();
|
|
1867
1869
|
});
|
|
1868
1870
|
}
|
|
1869
1871
|
return l = setTimeout(() => a.value = !0, e), { idle: a, lastActive: f };
|
|
1870
1872
|
}
|
|
1871
|
-
var
|
|
1873
|
+
var Ze;
|
|
1872
1874
|
(function(e) {
|
|
1873
1875
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1874
|
-
})(
|
|
1875
|
-
var
|
|
1876
|
+
})(Ze || (Ze = {}));
|
|
1877
|
+
var vr = Object.defineProperty, et = Object.getOwnPropertySymbols, Ir = Object.prototype.hasOwnProperty, Br = Object.prototype.propertyIsEnumerable, tt = (e, t, n) => t in e ? vr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, jr = (e, t) => {
|
|
1876
1878
|
for (var n in t || (t = {}))
|
|
1877
|
-
|
|
1878
|
-
if (
|
|
1879
|
-
for (var n of
|
|
1880
|
-
|
|
1879
|
+
Ir.call(t, n) && tt(e, n, t[n]);
|
|
1880
|
+
if (et)
|
|
1881
|
+
for (var n of et(t))
|
|
1882
|
+
Br.call(t, n) && tt(e, n, t[n]);
|
|
1881
1883
|
return e;
|
|
1882
1884
|
};
|
|
1883
|
-
const
|
|
1885
|
+
const qr = {
|
|
1884
1886
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
1885
1887
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
1886
1888
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -1906,27 +1908,27 @@ const $r = {
|
|
|
1906
1908
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
1907
1909
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1908
1910
|
};
|
|
1909
|
-
|
|
1910
|
-
linear:
|
|
1911
|
-
},
|
|
1912
|
-
let
|
|
1913
|
-
const
|
|
1914
|
-
|
|
1911
|
+
jr({
|
|
1912
|
+
linear: Pr
|
|
1913
|
+
}, qr);
|
|
1914
|
+
let _e;
|
|
1915
|
+
const Dt = { triggerProxySso: "triggerProxySso" }, Mr = () => {
|
|
1916
|
+
_e = (e) => {
|
|
1915
1917
|
var n;
|
|
1916
1918
|
const { origin: t } = new URL(location.href);
|
|
1917
1919
|
(n = window.top) == null || n.postMessage(
|
|
1918
|
-
{ type:
|
|
1920
|
+
{ type: Dt.triggerProxySso, data: { ...e || {}, redirect_uri: `${t}/` } },
|
|
1919
1921
|
t
|
|
1920
1922
|
);
|
|
1921
1923
|
};
|
|
1922
|
-
},
|
|
1924
|
+
}, Hr = (e) => {
|
|
1923
1925
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1924
1926
|
const { type: n, data: r } = t.data;
|
|
1925
|
-
n ===
|
|
1927
|
+
n === Dt.triggerProxySso && (e == null || e(r));
|
|
1926
1928
|
});
|
|
1927
1929
|
};
|
|
1928
|
-
window.top !== window.self &&
|
|
1929
|
-
let
|
|
1930
|
+
window.top !== window.self && Mr();
|
|
1931
|
+
let vt = (e = 21) => {
|
|
1930
1932
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1931
1933
|
for (; e--; ) {
|
|
1932
1934
|
let r = n[e] & 63;
|
|
@@ -1934,27 +1936,27 @@ let $t = (e = 21) => {
|
|
|
1934
1936
|
}
|
|
1935
1937
|
return t;
|
|
1936
1938
|
};
|
|
1937
|
-
const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e),
|
|
1939
|
+
const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), It = () => {
|
|
1938
1940
|
const e = U(me) || "";
|
|
1939
1941
|
return e ? (localStorage.setItem(me, e), e) : localStorage.getItem(me) || "";
|
|
1940
|
-
},
|
|
1942
|
+
}, Ce = (e) => {
|
|
1941
1943
|
const t = new URL(window.location.href), n = new URLSearchParams(t.search);
|
|
1942
1944
|
e.forEach((r) => {
|
|
1943
1945
|
n.delete(r);
|
|
1944
1946
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
1945
|
-
}, { baseURL:
|
|
1947
|
+
}, { baseURL: nt } = se(), rt = {
|
|
1946
1948
|
feishu: {
|
|
1947
1949
|
login: "/api/justauth/client/v1/visitor/feishu/login",
|
|
1948
1950
|
ssoParam: "/api/justauth/client/v1/visitor/sso-param"
|
|
1949
1951
|
}
|
|
1950
|
-
},
|
|
1952
|
+
}, $r = async () => {
|
|
1951
1953
|
const e = U("authorizer") || "", t = U("_redirect_url") || "";
|
|
1952
|
-
if (
|
|
1954
|
+
if (Ce(["authorizer", "_redirect_url"]), e === "feishu") {
|
|
1953
1955
|
if (!window.tt) return "";
|
|
1954
1956
|
const n = async () => {
|
|
1955
|
-
const r =
|
|
1956
|
-
return (await
|
|
1957
|
-
baseURL:
|
|
1957
|
+
const r = rt.feishu.ssoParam;
|
|
1958
|
+
return (await b.create().get(r, {
|
|
1959
|
+
baseURL: nt,
|
|
1958
1960
|
params: {
|
|
1959
1961
|
source: "feishu",
|
|
1960
1962
|
fieldKey: "appId"
|
|
@@ -1964,10 +1966,10 @@ const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), v
|
|
|
1964
1966
|
return new Promise(async (r) => {
|
|
1965
1967
|
const o = async (a) => {
|
|
1966
1968
|
try {
|
|
1967
|
-
const f =
|
|
1969
|
+
const f = rt.feishu.login, l = ke(t, { ignoreAuth: !0 }), d = (await b.create().get(f, { baseURL: nt, params: { code: a, _redirect_url: l } })).request.responseURL;
|
|
1968
1970
|
location.replace(d), r();
|
|
1969
1971
|
} catch {
|
|
1970
|
-
|
|
1972
|
+
I({ ...N, redirect_uri: L }), r();
|
|
1971
1973
|
}
|
|
1972
1974
|
}, s = await n(), i = () => {
|
|
1973
1975
|
window.tt.requestAuthCode({
|
|
@@ -1977,7 +1979,7 @@ const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), v
|
|
|
1977
1979
|
o(f);
|
|
1978
1980
|
},
|
|
1979
1981
|
fail: (a) => {
|
|
1980
|
-
|
|
1982
|
+
I({ ...N, redirect_uri: L }), r();
|
|
1981
1983
|
}
|
|
1982
1984
|
});
|
|
1983
1985
|
};
|
|
@@ -1990,139 +1992,68 @@ const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), v
|
|
|
1990
1992
|
},
|
|
1991
1993
|
fail: (a) => {
|
|
1992
1994
|
const { errno: f } = a;
|
|
1993
|
-
f === 103 ? i() : (
|
|
1995
|
+
f === 103 ? i() : (I({ ...N, redirect_uri: L }), r());
|
|
1994
1996
|
}
|
|
1995
1997
|
}) : i();
|
|
1996
1998
|
});
|
|
1997
1999
|
}
|
|
1998
|
-
},
|
|
1999
|
-
uat: "https://sso-uat.jmc.com.cn"
|
|
2000
|
-
};
|
|
2001
|
-
let je = "";
|
|
2002
|
-
const lt = (e) => {
|
|
2003
|
-
if (e == null) return "";
|
|
2004
|
-
const t = String(e).trim();
|
|
2005
|
-
if (!t) return "";
|
|
2006
|
-
const n = t.toLowerCase();
|
|
2007
|
-
return n === "undefined" || n === "null" ? "" : t;
|
|
2008
|
-
}, Be = () => {
|
|
2009
|
-
const e = localStorage.getItem(ke), t = lt(e);
|
|
2010
|
-
return e !== null && !t && localStorage.removeItem(ke), t || lt(je);
|
|
2011
|
-
}, zt = (e) => {
|
|
2012
|
-
const t = ve();
|
|
2013
|
-
return e === "jmc" && t === "das" ? !1 : Qr.includes(e);
|
|
2014
|
-
}, Xr = () => zt(Be()), Jt = (e) => {
|
|
2015
|
-
je = Be(), localStorage.removeItem(ke), window.__isAutoCloseApp = !1, location.href = e;
|
|
2016
|
-
}, Yr = (e) => {
|
|
2017
|
-
Ue();
|
|
2018
|
-
const n = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2019
|
-
Jt(n);
|
|
2020
|
-
}, Zr = async (e = "") => {
|
|
2021
|
-
try {
|
|
2022
|
-
const { baseURL: t } = M();
|
|
2023
|
-
await g.create().post(
|
|
2024
|
-
Kr,
|
|
2025
|
-
{
|
|
2026
|
-
ssoToken: e,
|
|
2027
|
-
// 平台退出前已清理本地 token,这里通过 cookie 兜底读取,便于后端定位并清理 cookie token。
|
|
2028
|
-
platformToken: B()
|
|
2029
|
-
},
|
|
2030
|
-
{ baseURL: t }
|
|
2031
|
-
);
|
|
2032
|
-
} catch {
|
|
2033
|
-
}
|
|
2034
|
-
}, eo = async () => {
|
|
2035
|
-
let e = "";
|
|
2036
|
-
try {
|
|
2037
|
-
const { baseURL: o } = M();
|
|
2038
|
-
e = (await g.create().get(Wr, {
|
|
2039
|
-
baseURL: o,
|
|
2040
|
-
params: {
|
|
2041
|
-
source: "jmc",
|
|
2042
|
-
fieldKey: "homeUrl"
|
|
2043
|
-
}
|
|
2044
|
-
})).data || "";
|
|
2045
|
-
} catch {
|
|
2046
|
-
}
|
|
2047
|
-
const t = (() => {
|
|
2048
|
-
if (!e) return "";
|
|
2049
|
-
try {
|
|
2050
|
-
return new URL(e).origin;
|
|
2051
|
-
} catch {
|
|
2052
|
-
return "";
|
|
2053
|
-
}
|
|
2054
|
-
})(), n = t === Gr.uat ? _e.get("sso_access_token_uat") : _e.get("sso_access_token"), r = `${t}/oauth2/system/auth/logout?sso_token=${n}`;
|
|
2055
|
-
try {
|
|
2056
|
-
await g.post(r);
|
|
2057
|
-
} catch {
|
|
2058
|
-
}
|
|
2059
|
-
await Zr(n), Ue(), Jt(e);
|
|
2060
|
-
}, to = async (e = "") => {
|
|
2061
|
-
const t = Be();
|
|
2062
|
-
if (zt(t)) {
|
|
2063
|
-
if (je = t, t === "zhongshen") {
|
|
2064
|
-
Yr(e);
|
|
2065
|
-
return;
|
|
2066
|
-
}
|
|
2067
|
-
t === "jmc" && await eo();
|
|
2068
|
-
}
|
|
2069
|
-
}, q = {
|
|
2000
|
+
}, j = {
|
|
2070
2001
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
2071
2002
|
// 重定向到登录页
|
|
2072
2003
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
2073
2004
|
// 清除登录信息
|
|
2074
2005
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
2075
2006
|
// 通过code获取token
|
|
2076
|
-
}, { baseURL:
|
|
2007
|
+
}, { baseURL: ot, noRedireLogin: zr = !1 } = se(), st = localStorage.getItem("oauth-redirect_url") || "", L = st || location.origin + "/home", N = {
|
|
2077
2008
|
response_type: "code",
|
|
2078
2009
|
scope: "sever",
|
|
2079
2010
|
client_id: "sys",
|
|
2080
|
-
client_secret:
|
|
2011
|
+
client_secret: $t("das123"),
|
|
2081
2012
|
state: +/* @__PURE__ */ new Date()
|
|
2082
|
-
},
|
|
2013
|
+
}, Bt = te(!1), jt = (e) => {
|
|
2083
2014
|
if (e <= 0) return;
|
|
2084
|
-
const { idle: t } =
|
|
2085
|
-
|
|
2015
|
+
const { idle: t } = Dr(e);
|
|
2016
|
+
xe(
|
|
2086
2017
|
() => t.value,
|
|
2087
2018
|
(n) => {
|
|
2088
|
-
n === !0 && (
|
|
2019
|
+
n === !0 && (Bt.value = !0);
|
|
2089
2020
|
}
|
|
2090
2021
|
);
|
|
2091
2022
|
};
|
|
2092
|
-
localStorage.getItem("idelTime") &&
|
|
2093
|
-
let
|
|
2094
|
-
const
|
|
2095
|
-
const e = U("code") || "", t = U("redirect_url") || "/", n = U("kingdee_token") || "", r =
|
|
2096
|
-
if (!e) return
|
|
2023
|
+
localStorage.getItem("idelTime") && jt(Number(localStorage.getItem("idelTime")));
|
|
2024
|
+
let it = "";
|
|
2025
|
+
const Jr = async () => {
|
|
2026
|
+
const e = U("code") || "", t = U("redirect_url") || "/", n = U("kingdee_token") || "", r = It();
|
|
2027
|
+
if (!e) return $();
|
|
2097
2028
|
const o = ["code", "state", "kingdee_token", "redirect_url", "source"];
|
|
2098
|
-
if (e ===
|
|
2099
|
-
return
|
|
2100
|
-
|
|
2029
|
+
if (e === it)
|
|
2030
|
+
return Ce(o), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), localStorage.removeItem("oauth-redirect_url"), $();
|
|
2031
|
+
it = e, Ce(o);
|
|
2101
2032
|
let s = {};
|
|
2102
2033
|
const i = {
|
|
2103
2034
|
grant_type: "authorization_code",
|
|
2104
2035
|
code: e,
|
|
2105
2036
|
client_id: N.client_id,
|
|
2106
2037
|
client_secret: N.client_secret,
|
|
2107
|
-
redirect_uri: r ?
|
|
2038
|
+
redirect_uri: r ? ke(L, { loginType: r }) : L,
|
|
2108
2039
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2109
|
-
nonce:
|
|
2040
|
+
nonce: vt()
|
|
2110
2041
|
};
|
|
2111
2042
|
n && (sessionStorage.setItem("kingdee_token", n), i.redirect_uri = `${i.redirect_uri}?kingdee_token=${n}`);
|
|
2112
2043
|
try {
|
|
2113
|
-
await
|
|
2044
|
+
await b.create().get(j.token, { baseURL: ot });
|
|
2114
2045
|
} catch {
|
|
2115
2046
|
}
|
|
2116
2047
|
try {
|
|
2117
|
-
s = await
|
|
2118
|
-
|
|
2048
|
+
s = await b.create().post(
|
|
2049
|
+
j.token,
|
|
2119
2050
|
{},
|
|
2120
2051
|
{
|
|
2121
|
-
baseURL:
|
|
2052
|
+
baseURL: ot,
|
|
2122
2053
|
params: i,
|
|
2123
2054
|
headers: {
|
|
2124
2055
|
"Content-Type": "application/x-www-form-urlencoded",
|
|
2125
|
-
"csrf-token":
|
|
2056
|
+
"csrf-token": _r.get("csrf-token")
|
|
2126
2057
|
}
|
|
2127
2058
|
}
|
|
2128
2059
|
);
|
|
@@ -2132,87 +2063,88 @@ const ro = async () => {
|
|
|
2132
2063
|
refreshToken: f,
|
|
2133
2064
|
info: s.data
|
|
2134
2065
|
};
|
|
2135
|
-
|
|
2066
|
+
ne().save(d), await at(a);
|
|
2136
2067
|
const m = Number(u) - (/* @__PURE__ */ new Date()).getTime();
|
|
2137
|
-
return m && m > 0 && (
|
|
2068
|
+
return m && m > 0 && (jt(m), m && localStorage.setItem("idelTime", m.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), localStorage.removeItem("oauth-redirect_url"), a;
|
|
2138
2069
|
} catch {
|
|
2139
|
-
return
|
|
2070
|
+
return I({ ...N, redirect_uri: L });
|
|
2140
2071
|
}
|
|
2141
|
-
},
|
|
2072
|
+
}, G = te(!1), Ro = async (e) => {
|
|
2142
2073
|
if (e.public) return "";
|
|
2143
|
-
if (
|
|
2144
|
-
return we() ?
|
|
2145
|
-
if (
|
|
2074
|
+
if (Bt.value)
|
|
2075
|
+
return we() ? $() : I({ ...N, redirect_uri: L });
|
|
2076
|
+
if (G.value)
|
|
2146
2077
|
return await new Promise(async (r) => {
|
|
2147
|
-
|
|
2148
|
-
() =>
|
|
2078
|
+
xe(
|
|
2079
|
+
() => G.value,
|
|
2149
2080
|
(o) => {
|
|
2150
2081
|
if (!o) {
|
|
2151
|
-
const s =
|
|
2082
|
+
const s = $();
|
|
2152
2083
|
r(s);
|
|
2153
2084
|
}
|
|
2154
2085
|
}
|
|
2155
2086
|
);
|
|
2156
2087
|
});
|
|
2157
|
-
let t =
|
|
2158
|
-
const { accessTokenExpiredAt: n = 0 } =
|
|
2159
|
-
|
|
2088
|
+
let t = $();
|
|
2089
|
+
const { accessTokenExpiredAt: n = 0 } = ne().getData();
|
|
2090
|
+
G.value = !0;
|
|
2160
2091
|
try {
|
|
2161
2092
|
const r = U("code") || "";
|
|
2162
2093
|
if ((U("authorizer") || "") === "feishu")
|
|
2163
|
-
await
|
|
2094
|
+
await $r();
|
|
2164
2095
|
else if (r)
|
|
2165
|
-
t = await
|
|
2096
|
+
t = await Jr();
|
|
2166
2097
|
else {
|
|
2167
2098
|
const s = Date.now() + 6e4;
|
|
2168
|
-
n > 0 && s > n && !we() && (t = await
|
|
2099
|
+
n > 0 && s > n && !we() && (t = await Vr(N));
|
|
2169
2100
|
}
|
|
2170
2101
|
} catch {
|
|
2171
2102
|
} finally {
|
|
2172
|
-
|
|
2103
|
+
G.value = !1;
|
|
2173
2104
|
}
|
|
2174
2105
|
return t;
|
|
2175
2106
|
};
|
|
2176
2107
|
let ye = !1;
|
|
2177
|
-
const
|
|
2178
|
-
if (!
|
|
2108
|
+
const I = async (e) => {
|
|
2109
|
+
if (!zr && !ye) {
|
|
2179
2110
|
ye = !0;
|
|
2180
2111
|
try {
|
|
2181
|
-
const t = { ...e }, n =
|
|
2182
|
-
n && (t.redirect_uri =
|
|
2183
|
-
const { baseURL: r, ssoLocale: o } =
|
|
2184
|
-
if (
|
|
2112
|
+
const t = { ...e }, n = It();
|
|
2113
|
+
n && (t.redirect_uri = ke(t.redirect_uri, { loginType: n }));
|
|
2114
|
+
const { baseURL: r, ssoLocale: o } = se();
|
|
2115
|
+
if (_e) return _e(t);
|
|
2185
2116
|
t.logout = "true", o && (t.locale = "locale");
|
|
2186
2117
|
const s = new URLSearchParams();
|
|
2187
2118
|
Object.entries(t).forEach(([f, l]) => {
|
|
2188
2119
|
f !== "client_secret" && s.set(f, String(l));
|
|
2189
2120
|
});
|
|
2190
|
-
const i = s.toString(), a = `${r}${
|
|
2191
|
-
if (
|
|
2192
|
-
|
|
2121
|
+
const i = s.toString(), a = `${r}${j.oauth}?${i}`;
|
|
2122
|
+
if (Vt())
|
|
2123
|
+
Wt(a);
|
|
2193
2124
|
else {
|
|
2125
|
+
await Jt();
|
|
2194
2126
|
try {
|
|
2195
|
-
|
|
2127
|
+
b.create().get(j.logoutCurpage, { baseURL: r });
|
|
2196
2128
|
} catch {
|
|
2197
2129
|
}
|
|
2198
|
-
|
|
2130
|
+
zt(), window.__isAutoCloseApp = !1, location.replace(a);
|
|
2199
2131
|
}
|
|
2200
2132
|
} finally {
|
|
2201
2133
|
ye = !1;
|
|
2202
2134
|
}
|
|
2203
2135
|
}
|
|
2204
2136
|
};
|
|
2205
|
-
|
|
2206
|
-
const
|
|
2137
|
+
Hr(I);
|
|
2138
|
+
const Vr = async (e) => {
|
|
2207
2139
|
if (we()) return "";
|
|
2208
|
-
const { baseURL: t } =
|
|
2140
|
+
const { baseURL: t } = se(), { refreshToken: n } = ne().getData();
|
|
2209
2141
|
try {
|
|
2210
|
-
await
|
|
2142
|
+
await b.create().get(j.token, { baseURL: t });
|
|
2211
2143
|
} catch {
|
|
2212
2144
|
}
|
|
2213
2145
|
try {
|
|
2214
|
-
const r = await
|
|
2215
|
-
|
|
2146
|
+
const r = await b.create().post(
|
|
2147
|
+
j.token,
|
|
2216
2148
|
{},
|
|
2217
2149
|
{
|
|
2218
2150
|
baseURL: t,
|
|
@@ -2222,7 +2154,7 @@ const oo = async (e) => {
|
|
|
2222
2154
|
client_id: e.client_id,
|
|
2223
2155
|
client_secret: e.client_secret,
|
|
2224
2156
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2225
|
-
nonce:
|
|
2157
|
+
nonce: vt()
|
|
2226
2158
|
}
|
|
2227
2159
|
}
|
|
2228
2160
|
), { access_token: o = "", refresh_token: s = "", exp: i = 0 } = r.data, a = {
|
|
@@ -2231,19 +2163,19 @@ const oo = async (e) => {
|
|
|
2231
2163
|
refreshToken: s,
|
|
2232
2164
|
info: r.data
|
|
2233
2165
|
};
|
|
2234
|
-
return
|
|
2166
|
+
return ne().save(a), await at(o), o;
|
|
2235
2167
|
} catch {
|
|
2236
|
-
return
|
|
2168
|
+
return I({ ...e, redirect_uri: L });
|
|
2237
2169
|
}
|
|
2238
2170
|
};
|
|
2239
2171
|
export {
|
|
2240
|
-
|
|
2172
|
+
It as getLoginType,
|
|
2241
2173
|
U as getQuery,
|
|
2242
|
-
|
|
2243
|
-
|
|
2174
|
+
Ro as getToken,
|
|
2175
|
+
Jr as getTokenFromCode,
|
|
2244
2176
|
N as getTokenParams,
|
|
2245
|
-
|
|
2177
|
+
I as login,
|
|
2246
2178
|
L as real_uri,
|
|
2247
|
-
|
|
2248
|
-
|
|
2179
|
+
Vr as refreshToken,
|
|
2180
|
+
Oo as tokenStorage
|
|
2249
2181
|
};
|