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