@das-fed/utils 7.1.0-hongfa.1 → 7.1.0-jiangling.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-services/modules/authentication/index.js +1035 -1053
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +756 -774
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +774 -756
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +755 -773
- package/api-services/src/create-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +245 -249
- package/create-api-service/sso/index.js.gz +0 -0
- package/package.json +4 -4
|
@@ -1,8 +1,7 @@
|
|
|
1
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
2
|
import { getConfig as j } from "@das-fed/utils/config";
|
|
4
3
|
import { clearPlatformAuthStorage as Ue, getAccessToken as q, tokenStorage as re } from "@das-fed/utils/token-tools";
|
|
5
|
-
import { tokenStorage as
|
|
4
|
+
import { tokenStorage as No } from "@das-fed/utils/token-tools";
|
|
6
5
|
import { appendQueryParams as Le } from "@das-fed/utils/common-tools";
|
|
7
6
|
import { setPersonalInfo as ht } from "@das-fed/utils/common-info/set-personal-info";
|
|
8
7
|
import { hasUnauthorizedRecovery as we } from "@das-fed/utils/create-api-service/unauthorized-recovery";
|
|
@@ -11,24 +10,24 @@ function mt(e, t) {
|
|
|
11
10
|
return e.apply(t, arguments);
|
|
12
11
|
};
|
|
13
12
|
}
|
|
14
|
-
const { toString:
|
|
15
|
-
const n =
|
|
13
|
+
const { toString: Xt } = Object.prototype, { getPrototypeOf: Ne } = Object, { iterator: ie, toStringTag: yt } = Symbol, ae = /* @__PURE__ */ ((e) => (t) => {
|
|
14
|
+
const n = Xt.call(t);
|
|
16
15
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
17
16
|
})(/* @__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
17
|
function V(e) {
|
|
19
18
|
return e !== null && !J(e) && e.constructor !== null && !J(e.constructor) && _(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
20
19
|
}
|
|
21
20
|
const wt = C("ArrayBuffer");
|
|
22
|
-
function
|
|
21
|
+
function Yt(e) {
|
|
23
22
|
let t;
|
|
24
23
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && wt(e.buffer), t;
|
|
25
24
|
}
|
|
26
|
-
const
|
|
25
|
+
const Zt = ce("string"), _ = ce("function"), gt = ce("number"), W = (e) => e !== null && typeof e == "object", en = (e) => e === !0 || e === !1, Z = (e) => {
|
|
27
26
|
if (ae(e) !== "object")
|
|
28
27
|
return !1;
|
|
29
28
|
const t = Ne(e);
|
|
30
29
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(yt in e) && !(ie in e);
|
|
31
|
-
},
|
|
30
|
+
}, tn = (e) => {
|
|
32
31
|
if (!W(e) || V(e))
|
|
33
32
|
return !1;
|
|
34
33
|
try {
|
|
@@ -36,11 +35,11 @@ const en = ce("string"), _ = ce("function"), gt = ce("number"), W = (e) => e !==
|
|
|
36
35
|
} catch {
|
|
37
36
|
return !1;
|
|
38
37
|
}
|
|
39
|
-
},
|
|
38
|
+
}, nn = C("Date"), rn = C("File"), on = C("Blob"), sn = C("FileList"), an = (e) => W(e) && _(e.pipe), cn = (e) => {
|
|
40
39
|
let t;
|
|
41
40
|
return e && (typeof FormData == "function" && e instanceof FormData || _(e.append) && ((t = ae(e)) === "formdata" || // detect form-data instance
|
|
42
41
|
t === "object" && _(e.toString) && e.toString() === "[object FormData]"));
|
|
43
|
-
},
|
|
42
|
+
}, un = C("URLSearchParams"), [ln, fn, dn, pn] = ["ReadableStream", "Request", "Response", "Headers"].map(C), hn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
44
43
|
function K(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
45
44
|
if (e === null || typeof e > "u")
|
|
46
45
|
return;
|
|
@@ -68,7 +67,7 @@ function bt(e, t) {
|
|
|
68
67
|
return o;
|
|
69
68
|
return null;
|
|
70
69
|
}
|
|
71
|
-
const
|
|
70
|
+
const I = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, St = (e) => !J(e) && e !== I;
|
|
72
71
|
function ge() {
|
|
73
72
|
const { caseless: e } = St(this) && this || {}, t = {}, n = (r, o) => {
|
|
74
73
|
const s = e && bt(t, o) || o;
|
|
@@ -78,13 +77,13 @@ function ge() {
|
|
|
78
77
|
arguments[r] && K(arguments[r], n);
|
|
79
78
|
return t;
|
|
80
79
|
}
|
|
81
|
-
const
|
|
80
|
+
const mn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (o, s) => {
|
|
82
81
|
n && _(o) ? e[s] = mt(o, n) : e[s] = o;
|
|
83
|
-
}, { allOwnKeys: r }), e),
|
|
82
|
+
}, { allOwnKeys: r }), e), yn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), wn = (e, t, n, r) => {
|
|
84
83
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
85
84
|
value: t.prototype
|
|
86
85
|
}), n && Object.assign(e.prototype, n);
|
|
87
|
-
},
|
|
86
|
+
}, gn = (e, t, n, r) => {
|
|
88
87
|
let o, s, i;
|
|
89
88
|
const a = {};
|
|
90
89
|
if (t = t || {}, e == null) return t;
|
|
@@ -94,11 +93,11 @@ const yn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (o, s) => {
|
|
|
94
93
|
e = n !== !1 && Ne(e);
|
|
95
94
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
96
95
|
return t;
|
|
97
|
-
},
|
|
96
|
+
}, bn = (e, t, n) => {
|
|
98
97
|
e = String(e), (n === void 0 || n > e.length) && (n = e.length), n -= t.length;
|
|
99
98
|
const r = e.indexOf(t, n);
|
|
100
99
|
return r !== -1 && r === n;
|
|
101
|
-
},
|
|
100
|
+
}, Sn = (e) => {
|
|
102
101
|
if (!e) return null;
|
|
103
102
|
if (H(e)) return e;
|
|
104
103
|
let t = e.length;
|
|
@@ -107,31 +106,31 @@ const yn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (o, s) => {
|
|
|
107
106
|
for (; t-- > 0; )
|
|
108
107
|
n[t] = e[t];
|
|
109
108
|
return n;
|
|
110
|
-
},
|
|
109
|
+
}, Rn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && Ne(Uint8Array)), En = (e, t) => {
|
|
111
110
|
const r = (e && e[ie]).call(e);
|
|
112
111
|
let o;
|
|
113
112
|
for (; (o = r.next()) && !o.done; ) {
|
|
114
113
|
const s = o.value;
|
|
115
114
|
t.call(e, s[0], s[1]);
|
|
116
115
|
}
|
|
117
|
-
},
|
|
116
|
+
}, Tn = (e, t) => {
|
|
118
117
|
let n;
|
|
119
118
|
const r = [];
|
|
120
119
|
for (; (n = e.exec(t)) !== null; )
|
|
121
120
|
r.push(n);
|
|
122
121
|
return r;
|
|
123
|
-
},
|
|
122
|
+
}, On = C("HTMLFormElement"), _n = (e) => e.toLowerCase().replace(
|
|
124
123
|
/[-_\s]([a-z\d])(\w*)/g,
|
|
125
124
|
function(n, r, o) {
|
|
126
125
|
return r.toUpperCase() + o;
|
|
127
126
|
}
|
|
128
|
-
), Me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype),
|
|
127
|
+
), Me = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), An = C("RegExp"), Rt = (e, t) => {
|
|
129
128
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
130
129
|
K(n, (o, s) => {
|
|
131
130
|
let i;
|
|
132
131
|
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
133
132
|
}), Object.defineProperties(e, r);
|
|
134
|
-
},
|
|
133
|
+
}, Cn = (e) => {
|
|
135
134
|
Rt(e, (t, n) => {
|
|
136
135
|
if (_(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
137
136
|
return !1;
|
|
@@ -146,19 +145,19 @@ const yn = (e, t, n, { allOwnKeys: r } = {}) => (K(t, (o, s) => {
|
|
|
146
145
|
});
|
|
147
146
|
}
|
|
148
147
|
});
|
|
149
|
-
},
|
|
148
|
+
}, xn = (e, t) => {
|
|
150
149
|
const n = {}, r = (o) => {
|
|
151
150
|
o.forEach((s) => {
|
|
152
151
|
n[s] = !0;
|
|
153
152
|
});
|
|
154
153
|
};
|
|
155
154
|
return H(e) ? r(e) : r(String(e).split(t)), n;
|
|
156
|
-
},
|
|
157
|
-
},
|
|
158
|
-
function
|
|
155
|
+
}, Pn = () => {
|
|
156
|
+
}, kn = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
157
|
+
function Un(e) {
|
|
159
158
|
return !!(e && _(e.append) && e[yt] === "FormData" && e[ie]);
|
|
160
159
|
}
|
|
161
|
-
const
|
|
160
|
+
const Ln = (e) => {
|
|
162
161
|
const t = new Array(10), n = (r, o) => {
|
|
163
162
|
if (W(r)) {
|
|
164
163
|
if (t.indexOf(r) >= 0)
|
|
@@ -177,72 +176,72 @@ const Nn = (e) => {
|
|
|
177
176
|
return r;
|
|
178
177
|
};
|
|
179
178
|
return n(e, 0);
|
|
180
|
-
},
|
|
181
|
-
o ===
|
|
179
|
+
}, Nn = C("AsyncFunction"), In = (e) => e && (W(e) || _(e)) && _(e.then) && _(e.catch), Et = ((e, t) => e ? setImmediate : t ? ((n, r) => (I.addEventListener("message", ({ source: o, data: s }) => {
|
|
180
|
+
o === I && s === n && r.length && r.shift()();
|
|
182
181
|
}, !1), (o) => {
|
|
183
|
-
r.push(o),
|
|
182
|
+
r.push(o), I.postMessage(n, "*");
|
|
184
183
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
185
184
|
typeof setImmediate == "function",
|
|
186
|
-
_(
|
|
187
|
-
),
|
|
185
|
+
_(I.postMessage)
|
|
186
|
+
), Fn = typeof queueMicrotask < "u" ? queueMicrotask.bind(I) : typeof process < "u" && process.nextTick || Et, Dn = (e) => e != null && _(e[ie]), c = {
|
|
188
187
|
isArray: H,
|
|
189
188
|
isArrayBuffer: wt,
|
|
190
189
|
isBuffer: V,
|
|
191
|
-
isFormData:
|
|
192
|
-
isArrayBufferView:
|
|
193
|
-
isString:
|
|
190
|
+
isFormData: cn,
|
|
191
|
+
isArrayBufferView: Yt,
|
|
192
|
+
isString: Zt,
|
|
194
193
|
isNumber: gt,
|
|
195
|
-
isBoolean:
|
|
194
|
+
isBoolean: en,
|
|
196
195
|
isObject: W,
|
|
197
196
|
isPlainObject: Z,
|
|
198
|
-
isEmptyObject:
|
|
199
|
-
isReadableStream:
|
|
200
|
-
isRequest:
|
|
201
|
-
isResponse:
|
|
202
|
-
isHeaders:
|
|
197
|
+
isEmptyObject: tn,
|
|
198
|
+
isReadableStream: ln,
|
|
199
|
+
isRequest: fn,
|
|
200
|
+
isResponse: dn,
|
|
201
|
+
isHeaders: pn,
|
|
203
202
|
isUndefined: J,
|
|
204
|
-
isDate:
|
|
205
|
-
isFile:
|
|
206
|
-
isBlob:
|
|
207
|
-
isRegExp:
|
|
203
|
+
isDate: nn,
|
|
204
|
+
isFile: rn,
|
|
205
|
+
isBlob: on,
|
|
206
|
+
isRegExp: An,
|
|
208
207
|
isFunction: _,
|
|
209
|
-
isStream:
|
|
210
|
-
isURLSearchParams:
|
|
211
|
-
isTypedArray:
|
|
212
|
-
isFileList:
|
|
208
|
+
isStream: an,
|
|
209
|
+
isURLSearchParams: un,
|
|
210
|
+
isTypedArray: Rn,
|
|
211
|
+
isFileList: sn,
|
|
213
212
|
forEach: K,
|
|
214
213
|
merge: ge,
|
|
215
|
-
extend:
|
|
216
|
-
trim:
|
|
217
|
-
stripBOM:
|
|
218
|
-
inherits:
|
|
219
|
-
toFlatObject:
|
|
214
|
+
extend: mn,
|
|
215
|
+
trim: hn,
|
|
216
|
+
stripBOM: yn,
|
|
217
|
+
inherits: wn,
|
|
218
|
+
toFlatObject: gn,
|
|
220
219
|
kindOf: ae,
|
|
221
220
|
kindOfTest: C,
|
|
222
|
-
endsWith:
|
|
223
|
-
toArray:
|
|
224
|
-
forEachEntry:
|
|
225
|
-
matchAll:
|
|
226
|
-
isHTMLForm:
|
|
221
|
+
endsWith: bn,
|
|
222
|
+
toArray: Sn,
|
|
223
|
+
forEachEntry: En,
|
|
224
|
+
matchAll: Tn,
|
|
225
|
+
isHTMLForm: On,
|
|
227
226
|
hasOwnProperty: Me,
|
|
228
227
|
hasOwnProp: Me,
|
|
229
228
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
230
229
|
reduceDescriptors: Rt,
|
|
231
|
-
freezeMethods:
|
|
232
|
-
toObjectSet:
|
|
233
|
-
toCamelCase:
|
|
234
|
-
noop:
|
|
235
|
-
toFiniteNumber:
|
|
230
|
+
freezeMethods: Cn,
|
|
231
|
+
toObjectSet: xn,
|
|
232
|
+
toCamelCase: _n,
|
|
233
|
+
noop: Pn,
|
|
234
|
+
toFiniteNumber: kn,
|
|
236
235
|
findKey: bt,
|
|
237
|
-
global:
|
|
236
|
+
global: I,
|
|
238
237
|
isContextDefined: St,
|
|
239
|
-
isSpecCompliantForm:
|
|
240
|
-
toJSONObject:
|
|
241
|
-
isAsyncFn:
|
|
242
|
-
isThenable:
|
|
238
|
+
isSpecCompliantForm: Un,
|
|
239
|
+
toJSONObject: Ln,
|
|
240
|
+
isAsyncFn: Nn,
|
|
241
|
+
isThenable: In,
|
|
243
242
|
setImmediate: Et,
|
|
244
|
-
asap:
|
|
245
|
-
isIterable:
|
|
243
|
+
asap: Fn,
|
|
244
|
+
isIterable: Dn
|
|
246
245
|
};
|
|
247
246
|
function w(e, t, n, r, o) {
|
|
248
247
|
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);
|
|
@@ -294,7 +293,7 @@ w.from = (e, t, n, r, o, s) => {
|
|
|
294
293
|
return f !== Error.prototype;
|
|
295
294
|
}, (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
295
|
};
|
|
297
|
-
const
|
|
296
|
+
const vn = null;
|
|
298
297
|
function be(e) {
|
|
299
298
|
return c.isPlainObject(e) || c.isArray(e);
|
|
300
299
|
}
|
|
@@ -306,10 +305,10 @@ function He(e, t, n) {
|
|
|
306
305
|
return o = _t(o), !n && s ? "[" + o + "]" : o;
|
|
307
306
|
}).join(n ? "." : "") : t;
|
|
308
307
|
}
|
|
309
|
-
function
|
|
308
|
+
function jn(e) {
|
|
310
309
|
return c.isArray(e) && !e.some(be);
|
|
311
310
|
}
|
|
312
|
-
const
|
|
311
|
+
const Bn = c.toFlatObject(c, {}, null, function(t) {
|
|
313
312
|
return /^is[A-Z]/.test(t);
|
|
314
313
|
});
|
|
315
314
|
function ue(e, t, n) {
|
|
@@ -340,7 +339,7 @@ function ue(e, t, n) {
|
|
|
340
339
|
if (p && !h && typeof p == "object") {
|
|
341
340
|
if (c.endsWith(y, "{}"))
|
|
342
341
|
y = r ? y : y.slice(0, -2), p = JSON.stringify(p);
|
|
343
|
-
else if (c.isArray(p) &&
|
|
342
|
+
else if (c.isArray(p) && jn(p) || (c.isFileList(p) || c.endsWith(y, "[]")) && (S = c.toArray(p)))
|
|
344
343
|
return y = _t(y), S.forEach(function(E, P) {
|
|
345
344
|
!(c.isUndefined(E) || E === null) && t.append(
|
|
346
345
|
// eslint-disable-next-line no-nested-ternary
|
|
@@ -351,7 +350,7 @@ function ue(e, t, n) {
|
|
|
351
350
|
}
|
|
352
351
|
return be(p) ? !0 : (t.append(He(h, y, s), l(p)), !1);
|
|
353
352
|
}
|
|
354
|
-
const d = [], m = Object.assign(
|
|
353
|
+
const d = [], m = Object.assign(Bn, {
|
|
355
354
|
defaultVisitor: u,
|
|
356
355
|
convertValue: l,
|
|
357
356
|
isVisitable: be
|
|
@@ -404,13 +403,13 @@ At.toString = function(t) {
|
|
|
404
403
|
return n(o[0]) + "=" + n(o[1]);
|
|
405
404
|
}, "").join("&");
|
|
406
405
|
};
|
|
407
|
-
function
|
|
406
|
+
function qn(e) {
|
|
408
407
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
409
408
|
}
|
|
410
409
|
function Ct(e, t, n) {
|
|
411
410
|
if (!t)
|
|
412
411
|
return e;
|
|
413
|
-
const r = n && n.encode ||
|
|
412
|
+
const r = n && n.encode || qn;
|
|
414
413
|
c.isFunction(n) && (n = {
|
|
415
414
|
serialize: n
|
|
416
415
|
});
|
|
@@ -480,27 +479,27 @@ const xt = {
|
|
|
480
479
|
silentJSONParsing: !0,
|
|
481
480
|
forcedJSONParsing: !0,
|
|
482
481
|
clarifyTimeoutError: !1
|
|
483
|
-
},
|
|
482
|
+
}, Mn = typeof URLSearchParams < "u" ? URLSearchParams : Ie, Hn = typeof FormData < "u" ? FormData : null, zn = typeof Blob < "u" ? Blob : null, $n = {
|
|
484
483
|
isBrowser: !0,
|
|
485
484
|
classes: {
|
|
486
|
-
URLSearchParams:
|
|
487
|
-
FormData:
|
|
488
|
-
Blob:
|
|
485
|
+
URLSearchParams: Mn,
|
|
486
|
+
FormData: Hn,
|
|
487
|
+
Blob: zn
|
|
489
488
|
},
|
|
490
489
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
491
|
-
}, Fe = typeof window < "u" && typeof document < "u", Se = typeof navigator == "object" && navigator || void 0,
|
|
492
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
490
|
+
}, Fe = typeof window < "u" && typeof document < "u", Se = typeof navigator == "object" && navigator || void 0, Jn = Fe && (!Se || ["ReactNative", "NativeScript", "NS"].indexOf(Se.product) < 0), Vn = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
491
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Wn = Fe && window.location.href || "http://localhost", Kn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
493
492
|
__proto__: null,
|
|
494
493
|
hasBrowserEnv: Fe,
|
|
495
|
-
hasStandardBrowserEnv:
|
|
496
|
-
hasStandardBrowserWebWorkerEnv:
|
|
494
|
+
hasStandardBrowserEnv: Jn,
|
|
495
|
+
hasStandardBrowserWebWorkerEnv: Vn,
|
|
497
496
|
navigator: Se,
|
|
498
|
-
origin:
|
|
497
|
+
origin: Wn
|
|
499
498
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
500
|
-
...
|
|
501
|
-
|
|
499
|
+
...Kn,
|
|
500
|
+
...$n
|
|
502
501
|
};
|
|
503
|
-
function
|
|
502
|
+
function Qn(e, t) {
|
|
504
503
|
return ue(e, new T.classes.URLSearchParams(), {
|
|
505
504
|
visitor: function(n, r, o, s) {
|
|
506
505
|
return T.isNode && c.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
@@ -508,10 +507,10 @@ function Gn(e, t) {
|
|
|
508
507
|
...t
|
|
509
508
|
});
|
|
510
509
|
}
|
|
511
|
-
function
|
|
510
|
+
function Gn(e) {
|
|
512
511
|
return c.matchAll(/\w+|\[(\w*)]/g, e).map((t) => t[0] === "[]" ? "" : t[1] || t[0]);
|
|
513
512
|
}
|
|
514
|
-
function
|
|
513
|
+
function Xn(e) {
|
|
515
514
|
const t = {}, n = Object.keys(e);
|
|
516
515
|
let r;
|
|
517
516
|
const o = n.length;
|
|
@@ -525,17 +524,17 @@ function Pt(e) {
|
|
|
525
524
|
let i = n[s++];
|
|
526
525
|
if (i === "__proto__") return !0;
|
|
527
526
|
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] =
|
|
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] = Xn(o[i])), !a);
|
|
529
528
|
}
|
|
530
529
|
if (c.isFormData(e) && c.isFunction(e.entries)) {
|
|
531
530
|
const n = {};
|
|
532
531
|
return c.forEachEntry(e, (r, o) => {
|
|
533
|
-
t(
|
|
532
|
+
t(Gn(r), o, n, 0);
|
|
534
533
|
}), n;
|
|
535
534
|
}
|
|
536
535
|
return null;
|
|
537
536
|
}
|
|
538
|
-
function
|
|
537
|
+
function Yn(e, t, n) {
|
|
539
538
|
if (c.isString(e))
|
|
540
539
|
try {
|
|
541
540
|
return (t || JSON.parse)(e), c.trim(e);
|
|
@@ -561,7 +560,7 @@ const Q = {
|
|
|
561
560
|
let a;
|
|
562
561
|
if (s) {
|
|
563
562
|
if (r.indexOf("application/x-www-form-urlencoded") > -1)
|
|
564
|
-
return
|
|
563
|
+
return Qn(t, this.formSerializer).toString();
|
|
565
564
|
if ((a = c.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
566
565
|
const f = this.env && this.env.FormData;
|
|
567
566
|
return ue(
|
|
@@ -571,7 +570,7 @@ const Q = {
|
|
|
571
570
|
);
|
|
572
571
|
}
|
|
573
572
|
}
|
|
574
|
-
return s || o ? (n.setContentType("application/json", !1),
|
|
573
|
+
return s || o ? (n.setContentType("application/json", !1), Yn(t)) : t;
|
|
575
574
|
}],
|
|
576
575
|
transformResponse: [function(t) {
|
|
577
576
|
const n = this.transitional || Q.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
@@ -614,7 +613,7 @@ const Q = {
|
|
|
614
613
|
c.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
615
614
|
Q.headers[e] = {};
|
|
616
615
|
});
|
|
617
|
-
const
|
|
616
|
+
const Zn = c.toObjectSet([
|
|
618
617
|
"age",
|
|
619
618
|
"authorization",
|
|
620
619
|
"content-length",
|
|
@@ -632,12 +631,12 @@ const er = c.toObjectSet([
|
|
|
632
631
|
"referer",
|
|
633
632
|
"retry-after",
|
|
634
633
|
"user-agent"
|
|
635
|
-
]),
|
|
634
|
+
]), er = (e) => {
|
|
636
635
|
const t = {};
|
|
637
636
|
let n, r, o;
|
|
638
637
|
return e && e.split(`
|
|
639
638
|
`).forEach(function(i) {
|
|
640
|
-
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] &&
|
|
639
|
+
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && Zn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
641
640
|
}), t;
|
|
642
641
|
}, Je = Symbol("internals");
|
|
643
642
|
function $(e) {
|
|
@@ -646,14 +645,14 @@ function $(e) {
|
|
|
646
645
|
function ee(e) {
|
|
647
646
|
return e === !1 || e == null ? e : c.isArray(e) ? e.map(ee) : String(e);
|
|
648
647
|
}
|
|
649
|
-
function
|
|
648
|
+
function tr(e) {
|
|
650
649
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
651
650
|
let r;
|
|
652
651
|
for (; r = n.exec(e); )
|
|
653
652
|
t[r[1]] = r[2];
|
|
654
653
|
return t;
|
|
655
654
|
}
|
|
656
|
-
const
|
|
655
|
+
const nr = (e) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
657
656
|
function de(e, t, n, r, o) {
|
|
658
657
|
if (c.isFunction(r))
|
|
659
658
|
return r.call(this, t, n);
|
|
@@ -664,10 +663,10 @@ function de(e, t, n, r, o) {
|
|
|
664
663
|
return r.test(t);
|
|
665
664
|
}
|
|
666
665
|
}
|
|
667
|
-
function
|
|
666
|
+
function rr(e) {
|
|
668
667
|
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, (t, n, r) => n.toUpperCase() + r);
|
|
669
668
|
}
|
|
670
|
-
function
|
|
669
|
+
function or(e, t) {
|
|
671
670
|
const n = c.toCamelCase(" " + t);
|
|
672
671
|
["get", "set", "has"].forEach((r) => {
|
|
673
672
|
Object.defineProperty(e, r + n, {
|
|
@@ -694,8 +693,8 @@ let A = class {
|
|
|
694
693
|
const i = (a, f) => c.forEach(a, (l, u) => s(l, u, f));
|
|
695
694
|
if (c.isPlainObject(t) || t instanceof this.constructor)
|
|
696
695
|
i(t, n);
|
|
697
|
-
else if (c.isString(t) && (t = t.trim()) && !
|
|
698
|
-
i(
|
|
696
|
+
else if (c.isString(t) && (t = t.trim()) && !nr(t))
|
|
697
|
+
i(er(t), n);
|
|
699
698
|
else if (c.isObject(t) && c.isIterable(t)) {
|
|
700
699
|
let a = {}, f, l;
|
|
701
700
|
for (const u of t) {
|
|
@@ -716,7 +715,7 @@ let A = class {
|
|
|
716
715
|
if (!n)
|
|
717
716
|
return o;
|
|
718
717
|
if (n === !0)
|
|
719
|
-
return
|
|
718
|
+
return tr(o);
|
|
720
719
|
if (c.isFunction(n))
|
|
721
720
|
return n.call(this, o, r);
|
|
722
721
|
if (c.isRegExp(n))
|
|
@@ -760,7 +759,7 @@ let A = class {
|
|
|
760
759
|
n[i] = ee(o), delete n[s];
|
|
761
760
|
return;
|
|
762
761
|
}
|
|
763
|
-
const a = t ?
|
|
762
|
+
const a = t ? rr(s) : String(s).trim();
|
|
764
763
|
a !== s && delete n[s], n[a] = ee(o), r[a] = !0;
|
|
765
764
|
}), this;
|
|
766
765
|
}
|
|
@@ -799,7 +798,7 @@ let A = class {
|
|
|
799
798
|
}).accessors, o = this.prototype;
|
|
800
799
|
function s(i) {
|
|
801
800
|
const a = $(i);
|
|
802
|
-
r[a] || (
|
|
801
|
+
r[a] || (or(o, i), r[a] = !0);
|
|
803
802
|
}
|
|
804
803
|
return c.isArray(t) ? t.forEach(s) : s(t), this;
|
|
805
804
|
}
|
|
@@ -841,11 +840,11 @@ function Ut(e, t, n) {
|
|
|
841
840
|
n
|
|
842
841
|
));
|
|
843
842
|
}
|
|
844
|
-
function
|
|
843
|
+
function sr(e) {
|
|
845
844
|
const t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
846
845
|
return t && t[1] || "";
|
|
847
846
|
}
|
|
848
|
-
function
|
|
847
|
+
function ir(e, t) {
|
|
849
848
|
e = e || 10;
|
|
850
849
|
const n = new Array(e), r = new Array(e);
|
|
851
850
|
let o = 0, s = 0, i;
|
|
@@ -861,7 +860,7 @@ function ar(e, t) {
|
|
|
861
860
|
return b ? Math.round(m * 1e3 / b) : void 0;
|
|
862
861
|
};
|
|
863
862
|
}
|
|
864
|
-
function
|
|
863
|
+
function ar(e, t) {
|
|
865
864
|
let n = 0, r = 1e3 / t, o, s;
|
|
866
865
|
const i = (l, u = Date.now()) => {
|
|
867
866
|
n = u, o = null, s && (clearTimeout(s), s = null), e(...l);
|
|
@@ -875,8 +874,8 @@ function cr(e, t) {
|
|
|
875
874
|
}
|
|
876
875
|
const oe = (e, t, n = 3) => {
|
|
877
876
|
let r = 0;
|
|
878
|
-
const o =
|
|
879
|
-
return
|
|
877
|
+
const o = ir(50, 250);
|
|
878
|
+
return ar((s) => {
|
|
880
879
|
const i = s.loaded, a = s.lengthComputable ? s.total : void 0, f = i - r, l = o(f), u = i <= a;
|
|
881
880
|
r = i;
|
|
882
881
|
const d = {
|
|
@@ -899,10 +898,10 @@ const oe = (e, t, n = 3) => {
|
|
|
899
898
|
total: e,
|
|
900
899
|
loaded: r
|
|
901
900
|
}), t[1]];
|
|
902
|
-
}, We = (e) => (...t) => c.asap(() => e(...t)),
|
|
901
|
+
}, We = (e) => (...t) => c.asap(() => e(...t)), cr = 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
902
|
new URL(T.origin),
|
|
904
903
|
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
905
|
-
) : () => !0,
|
|
904
|
+
) : () => !0, ur = T.hasStandardBrowserEnv ? (
|
|
906
905
|
// Standard browser envs support document.cookie
|
|
907
906
|
{
|
|
908
907
|
write(e, t, n, r, o, s) {
|
|
@@ -929,15 +928,15 @@ const oe = (e, t, n = 3) => {
|
|
|
929
928
|
}
|
|
930
929
|
}
|
|
931
930
|
);
|
|
932
|
-
function
|
|
931
|
+
function lr(e) {
|
|
933
932
|
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
934
933
|
}
|
|
935
|
-
function
|
|
934
|
+
function fr(e, t) {
|
|
936
935
|
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
937
936
|
}
|
|
938
937
|
function Lt(e, t, n) {
|
|
939
|
-
let r = !
|
|
940
|
-
return e && (r || n == !1) ?
|
|
938
|
+
let r = !lr(t);
|
|
939
|
+
return e && (r || n == !1) ? fr(e, t) : t;
|
|
941
940
|
}
|
|
942
941
|
const Ke = (e) => e instanceof A ? { ...e } : e;
|
|
943
942
|
function B(e, t) {
|
|
@@ -1020,12 +1019,12 @@ const Nt = (e) => {
|
|
|
1020
1019
|
i.setContentType([l || "multipart/form-data", ...u].join("; "));
|
|
1021
1020
|
}
|
|
1022
1021
|
}
|
|
1023
|
-
if (T.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 &&
|
|
1024
|
-
const l = o && s &&
|
|
1022
|
+
if (T.hasStandardBrowserEnv && (r && c.isFunction(r) && (r = r(t)), r || r !== !1 && cr(t.url))) {
|
|
1023
|
+
const l = o && s && ur.read(s);
|
|
1025
1024
|
l && i.set(o, l);
|
|
1026
1025
|
}
|
|
1027
1026
|
return t;
|
|
1028
|
-
},
|
|
1027
|
+
}, dr = typeof XMLHttpRequest < "u", pr = dr && function(e) {
|
|
1029
1028
|
return new Promise(function(n, r) {
|
|
1030
1029
|
const o = Nt(e);
|
|
1031
1030
|
let s = o.data;
|
|
@@ -1049,10 +1048,10 @@ const Nt = (e) => {
|
|
|
1049
1048
|
config: e,
|
|
1050
1049
|
request: h
|
|
1051
1050
|
};
|
|
1052
|
-
Ut(function(
|
|
1053
|
-
n(
|
|
1054
|
-
}, function(
|
|
1055
|
-
r(
|
|
1051
|
+
Ut(function(N) {
|
|
1052
|
+
n(N), y();
|
|
1053
|
+
}, function(N) {
|
|
1054
|
+
r(N), y();
|
|
1056
1055
|
}, O), h = null;
|
|
1057
1056
|
}
|
|
1058
1057
|
"onloadend" in h ? h.onloadend = S : h.onreadystatechange = function() {
|
|
@@ -1075,14 +1074,14 @@ const Nt = (e) => {
|
|
|
1075
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 = (E) => {
|
|
1076
1075
|
h && (r(!E || E.type ? new z(null, e, h) : E), h.abort(), h = null);
|
|
1077
1076
|
}, o.cancelToken && o.cancelToken.subscribe(u), o.signal && (o.signal.aborted ? u() : o.signal.addEventListener("abort", u)));
|
|
1078
|
-
const R =
|
|
1077
|
+
const R = sr(o.url);
|
|
1079
1078
|
if (R && T.protocols.indexOf(R) === -1) {
|
|
1080
1079
|
r(new w("Unsupported protocol " + R + ":", w.ERR_BAD_REQUEST, e));
|
|
1081
1080
|
return;
|
|
1082
1081
|
}
|
|
1083
1082
|
h.send(s || null);
|
|
1084
1083
|
});
|
|
1085
|
-
},
|
|
1084
|
+
}, hr = (e, t) => {
|
|
1086
1085
|
const { length: n } = e = e ? e.filter(Boolean) : [];
|
|
1087
1086
|
if (t || n) {
|
|
1088
1087
|
let r = new AbortController(), o;
|
|
@@ -1105,7 +1104,7 @@ const Nt = (e) => {
|
|
|
1105
1104
|
const { signal: f } = r;
|
|
1106
1105
|
return f.unsubscribe = () => c.asap(a), f;
|
|
1107
1106
|
}
|
|
1108
|
-
},
|
|
1107
|
+
}, mr = function* (e, t) {
|
|
1109
1108
|
let n = e.byteLength;
|
|
1110
1109
|
if (n < t) {
|
|
1111
1110
|
yield e;
|
|
@@ -1114,10 +1113,10 @@ const Nt = (e) => {
|
|
|
1114
1113
|
let r = 0, o;
|
|
1115
1114
|
for (; r < n; )
|
|
1116
1115
|
o = r + t, yield e.slice(r, o), r = o;
|
|
1117
|
-
},
|
|
1118
|
-
for await (const n of
|
|
1119
|
-
yield*
|
|
1120
|
-
},
|
|
1116
|
+
}, yr = async function* (e, t) {
|
|
1117
|
+
for await (const n of wr(e))
|
|
1118
|
+
yield* mr(n, t);
|
|
1119
|
+
}, wr = async function* (e) {
|
|
1121
1120
|
if (e[Symbol.asyncIterator]) {
|
|
1122
1121
|
yield* e;
|
|
1123
1122
|
return;
|
|
@@ -1134,7 +1133,7 @@ const Nt = (e) => {
|
|
|
1134
1133
|
await t.cancel();
|
|
1135
1134
|
}
|
|
1136
1135
|
}, Qe = (e, t, n, r) => {
|
|
1137
|
-
const o =
|
|
1136
|
+
const o = yr(e, t);
|
|
1138
1137
|
let s = 0, i, a = (f) => {
|
|
1139
1138
|
i || (i = !0, r && r(f));
|
|
1140
1139
|
};
|
|
@@ -1162,13 +1161,13 @@ const Nt = (e) => {
|
|
|
1162
1161
|
}, {
|
|
1163
1162
|
highWaterMark: 2
|
|
1164
1163
|
});
|
|
1165
|
-
}, le = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", It = le && typeof ReadableStream == "function",
|
|
1164
|
+
}, le = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", It = le && typeof ReadableStream == "function", gr = le && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Ft = (e, ...t) => {
|
|
1166
1165
|
try {
|
|
1167
1166
|
return !!e(...t);
|
|
1168
1167
|
} catch {
|
|
1169
1168
|
return !1;
|
|
1170
1169
|
}
|
|
1171
|
-
},
|
|
1170
|
+
}, br = It && Ft(() => {
|
|
1172
1171
|
let e = !1;
|
|
1173
1172
|
const t = new Request(T.origin, {
|
|
1174
1173
|
body: new ReadableStream(),
|
|
@@ -1188,7 +1187,7 @@ le && ((e) => {
|
|
|
1188
1187
|
});
|
|
1189
1188
|
});
|
|
1190
1189
|
})(new Response());
|
|
1191
|
-
const
|
|
1190
|
+
const Sr = async (e) => {
|
|
1192
1191
|
if (e == null)
|
|
1193
1192
|
return 0;
|
|
1194
1193
|
if (c.isBlob(e))
|
|
@@ -1201,11 +1200,11 @@ const Rr = async (e) => {
|
|
|
1201
1200
|
if (c.isArrayBufferView(e) || c.isArrayBuffer(e))
|
|
1202
1201
|
return e.byteLength;
|
|
1203
1202
|
if (c.isURLSearchParams(e) && (e = e + ""), c.isString(e))
|
|
1204
|
-
return (await
|
|
1205
|
-
},
|
|
1203
|
+
return (await gr(e)).byteLength;
|
|
1204
|
+
}, Rr = async (e, t) => {
|
|
1206
1205
|
const n = c.toFiniteNumber(e.getContentLength());
|
|
1207
|
-
return n ??
|
|
1208
|
-
},
|
|
1206
|
+
return n ?? Sr(t);
|
|
1207
|
+
}, Er = le && (async (e) => {
|
|
1209
1208
|
let {
|
|
1210
1209
|
url: t,
|
|
1211
1210
|
method: n,
|
|
@@ -1221,24 +1220,24 @@ const Rr = async (e) => {
|
|
|
1221
1220
|
fetchOptions: m
|
|
1222
1221
|
} = Nt(e);
|
|
1223
1222
|
l = l ? (l + "").toLowerCase() : "text";
|
|
1224
|
-
let b =
|
|
1223
|
+
let b = hr([o, s && s.toAbortSignal()], i), p;
|
|
1225
1224
|
const y = b && b.unsubscribe && (() => {
|
|
1226
1225
|
b.unsubscribe();
|
|
1227
1226
|
});
|
|
1228
1227
|
let h;
|
|
1229
1228
|
try {
|
|
1230
|
-
if (f &&
|
|
1229
|
+
if (f && br && n !== "get" && n !== "head" && (h = await Rr(u, r)) !== 0) {
|
|
1231
1230
|
let O = new Request(t, {
|
|
1232
1231
|
method: "POST",
|
|
1233
1232
|
body: r,
|
|
1234
1233
|
duplex: "half"
|
|
1235
1234
|
}), k;
|
|
1236
1235
|
if (c.isFormData(r) && (k = O.headers.get("content-type")) && u.setContentType(k), O.body) {
|
|
1237
|
-
const [
|
|
1236
|
+
const [N, G] = Ve(
|
|
1238
1237
|
h,
|
|
1239
1238
|
oe(We(f))
|
|
1240
1239
|
);
|
|
1241
|
-
r = Qe(O.body, Ge,
|
|
1240
|
+
r = Qe(O.body, Ge, N, G);
|
|
1242
1241
|
}
|
|
1243
1242
|
}
|
|
1244
1243
|
c.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1259,12 +1258,12 @@ const Rr = async (e) => {
|
|
|
1259
1258
|
["status", "statusText", "headers"].forEach((qe) => {
|
|
1260
1259
|
O[qe] = R[qe];
|
|
1261
1260
|
});
|
|
1262
|
-
const k = c.toFiniteNumber(R.headers.get("content-length")), [
|
|
1261
|
+
const k = c.toFiniteNumber(R.headers.get("content-length")), [N, G] = a && Ve(
|
|
1263
1262
|
k,
|
|
1264
1263
|
oe(We(a), !0)
|
|
1265
1264
|
) || [];
|
|
1266
1265
|
R = new Response(
|
|
1267
|
-
Qe(R.body, Ge,
|
|
1266
|
+
Qe(R.body, Ge, N, () => {
|
|
1268
1267
|
G && G(), y && y();
|
|
1269
1268
|
}),
|
|
1270
1269
|
O
|
|
@@ -1291,9 +1290,9 @@ const Rr = async (e) => {
|
|
|
1291
1290
|
) : w.from(S, S && S.code, e, p);
|
|
1292
1291
|
}
|
|
1293
1292
|
}), Ee = {
|
|
1294
|
-
http:
|
|
1295
|
-
xhr:
|
|
1296
|
-
fetch:
|
|
1293
|
+
http: vn,
|
|
1294
|
+
xhr: pr,
|
|
1295
|
+
fetch: Er
|
|
1297
1296
|
};
|
|
1298
1297
|
c.forEach(Ee, (e, t) => {
|
|
1299
1298
|
if (e) {
|
|
@@ -1304,7 +1303,7 @@ c.forEach(Ee, (e, t) => {
|
|
|
1304
1303
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1305
1304
|
}
|
|
1306
1305
|
});
|
|
1307
|
-
const Xe = (e) => `- ${e}`,
|
|
1306
|
+
const Xe = (e) => `- ${e}`, Tr = (e) => c.isFunction(e) || e === null || e === !1, Dt = {
|
|
1308
1307
|
getAdapter: (e) => {
|
|
1309
1308
|
e = c.isArray(e) ? e : [e];
|
|
1310
1309
|
const { length: t } = e;
|
|
@@ -1313,7 +1312,7 @@ const Xe = (e) => `- ${e}`, Or = (e) => c.isFunction(e) || e === null || e === !
|
|
|
1313
1312
|
for (let s = 0; s < t; s++) {
|
|
1314
1313
|
n = e[s];
|
|
1315
1314
|
let i;
|
|
1316
|
-
if (r = n, !
|
|
1315
|
+
if (r = n, !Tr(n) && (r = Ee[(i = String(n)).toLowerCase()], r === void 0))
|
|
1317
1316
|
throw new w(`Unknown adapter '${i}'`);
|
|
1318
1317
|
if (r)
|
|
1319
1318
|
break;
|
|
@@ -1380,7 +1379,7 @@ fe.transitional = function(t, n, r) {
|
|
|
1380
1379
|
fe.spelling = function(t) {
|
|
1381
1380
|
return (n, r) => !0;
|
|
1382
1381
|
};
|
|
1383
|
-
function
|
|
1382
|
+
function Or(e, t, n) {
|
|
1384
1383
|
if (typeof e != "object")
|
|
1385
1384
|
throw new w("options must be an object", w.ERR_BAD_OPTION_VALUE);
|
|
1386
1385
|
const r = Object.keys(e);
|
|
@@ -1398,10 +1397,10 @@ function _r(e, t, n) {
|
|
|
1398
1397
|
}
|
|
1399
1398
|
}
|
|
1400
1399
|
const te = {
|
|
1401
|
-
assertOptions:
|
|
1400
|
+
assertOptions: Or,
|
|
1402
1401
|
validators: fe
|
|
1403
1402
|
}, x = te.validators;
|
|
1404
|
-
let
|
|
1403
|
+
let F = class {
|
|
1405
1404
|
constructor(t) {
|
|
1406
1405
|
this.defaults = t || {}, this.interceptors = {
|
|
1407
1406
|
request: new $e(),
|
|
@@ -1502,7 +1501,7 @@ let D = class {
|
|
|
1502
1501
|
}
|
|
1503
1502
|
};
|
|
1504
1503
|
c.forEach(["delete", "get", "head", "options"], function(t) {
|
|
1505
|
-
|
|
1504
|
+
F.prototype[t] = function(n, r) {
|
|
1506
1505
|
return this.request(B(r || {}, {
|
|
1507
1506
|
method: t,
|
|
1508
1507
|
url: n,
|
|
@@ -1523,9 +1522,9 @@ c.forEach(["post", "put", "patch"], function(t) {
|
|
|
1523
1522
|
}));
|
|
1524
1523
|
};
|
|
1525
1524
|
}
|
|
1526
|
-
|
|
1525
|
+
F.prototype[t] = n(), F.prototype[t + "Form"] = n(!0);
|
|
1527
1526
|
});
|
|
1528
|
-
let
|
|
1527
|
+
let _r = class jt {
|
|
1529
1528
|
constructor(t) {
|
|
1530
1529
|
if (typeof t != "function")
|
|
1531
1530
|
throw new TypeError("executor must be a function.");
|
|
@@ -1598,12 +1597,12 @@ let Ar = class jt {
|
|
|
1598
1597
|
};
|
|
1599
1598
|
}
|
|
1600
1599
|
};
|
|
1601
|
-
function
|
|
1600
|
+
function Ar(e) {
|
|
1602
1601
|
return function(n) {
|
|
1603
1602
|
return e.apply(null, n);
|
|
1604
1603
|
};
|
|
1605
1604
|
}
|
|
1606
|
-
function
|
|
1605
|
+
function Cr(e) {
|
|
1607
1606
|
return c.isObject(e) && e.isAxiosError === !0;
|
|
1608
1607
|
}
|
|
1609
1608
|
const Te = {
|
|
@@ -1675,15 +1674,15 @@ Object.entries(Te).forEach(([e, t]) => {
|
|
|
1675
1674
|
Te[t] = e;
|
|
1676
1675
|
});
|
|
1677
1676
|
function Bt(e) {
|
|
1678
|
-
const t = new
|
|
1679
|
-
return c.extend(n,
|
|
1677
|
+
const t = new F(e), n = mt(F.prototype.request, t);
|
|
1678
|
+
return c.extend(n, F.prototype, t, { allOwnKeys: !0 }), c.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(o) {
|
|
1680
1679
|
return Bt(B(e, o));
|
|
1681
1680
|
}, n;
|
|
1682
1681
|
}
|
|
1683
1682
|
const g = Bt(Q);
|
|
1684
|
-
g.Axios =
|
|
1683
|
+
g.Axios = F;
|
|
1685
1684
|
g.CanceledError = z;
|
|
1686
|
-
g.CancelToken =
|
|
1685
|
+
g.CancelToken = _r;
|
|
1687
1686
|
g.isCancel = kt;
|
|
1688
1687
|
g.VERSION = vt;
|
|
1689
1688
|
g.toFormData = ue;
|
|
@@ -1692,8 +1691,8 @@ g.Cancel = g.CanceledError;
|
|
|
1692
1691
|
g.all = function(t) {
|
|
1693
1692
|
return Promise.all(t);
|
|
1694
1693
|
};
|
|
1695
|
-
g.spread =
|
|
1696
|
-
g.isAxiosError =
|
|
1694
|
+
g.spread = Ar;
|
|
1695
|
+
g.isAxiosError = Cr;
|
|
1697
1696
|
g.mergeConfig = B;
|
|
1698
1697
|
g.AxiosHeaders = A;
|
|
1699
1698
|
g.formToJSON = (e) => Pt(c.isHTMLForm(e) ? new FormData(e) : e);
|
|
@@ -1701,22 +1700,22 @@ g.getAdapter = Dt.getAdapter;
|
|
|
1701
1700
|
g.HttpStatusCode = Te;
|
|
1702
1701
|
g.default = g;
|
|
1703
1702
|
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:
|
|
1703
|
+
Axios: ho,
|
|
1704
|
+
AxiosError: mo,
|
|
1705
|
+
CanceledError: yo,
|
|
1706
|
+
isCancel: wo,
|
|
1707
|
+
CancelToken: go,
|
|
1708
|
+
VERSION: bo,
|
|
1709
|
+
all: So,
|
|
1710
|
+
Cancel: Ro,
|
|
1711
|
+
isAxiosError: Eo,
|
|
1712
|
+
spread: To,
|
|
1713
|
+
toFormData: Oo,
|
|
1714
|
+
AxiosHeaders: _o,
|
|
1715
|
+
HttpStatusCode: Ao,
|
|
1716
|
+
formToJSON: Co,
|
|
1717
|
+
getAdapter: xo,
|
|
1718
|
+
mergeConfig: Po
|
|
1720
1719
|
} = g;
|
|
1721
1720
|
/*! js-cookie v3.0.5 | MIT */
|
|
1722
1721
|
function X(e) {
|
|
@@ -1727,7 +1726,7 @@ function X(e) {
|
|
|
1727
1726
|
}
|
|
1728
1727
|
return e;
|
|
1729
1728
|
}
|
|
1730
|
-
var
|
|
1729
|
+
var xr = {
|
|
1731
1730
|
read: function(e) {
|
|
1732
1731
|
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
1733
1732
|
},
|
|
@@ -1788,14 +1787,14 @@ function Oe(e, t) {
|
|
|
1788
1787
|
}
|
|
1789
1788
|
);
|
|
1790
1789
|
}
|
|
1791
|
-
var _e = Oe(
|
|
1792
|
-
const qt = typeof window < "u",
|
|
1790
|
+
var _e = Oe(xr, { path: "/" }), et;
|
|
1791
|
+
const qt = typeof window < "u", Pr = (e) => typeof e == "string", tt = () => +Date.now(), Ae = () => {
|
|
1793
1792
|
};
|
|
1794
1793
|
qt && ((et = window == null ? void 0 : window.navigator) != null && et.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
1795
1794
|
function De(e) {
|
|
1796
1795
|
return typeof e == "function" ? e() : Kt(e);
|
|
1797
1796
|
}
|
|
1798
|
-
function
|
|
1797
|
+
function kr(e, t) {
|
|
1799
1798
|
function n(...r) {
|
|
1800
1799
|
return new Promise((o, s) => {
|
|
1801
1800
|
Promise.resolve(e(() => t.apply(this, r), { fn: t, thisArg: this, args: r })).then(o).catch(s);
|
|
@@ -1803,7 +1802,7 @@ function Ur(e, t) {
|
|
|
1803
1802
|
}
|
|
1804
1803
|
return n;
|
|
1805
1804
|
}
|
|
1806
|
-
function
|
|
1805
|
+
function Ur(e, t = !0, n = !0, r = !1) {
|
|
1807
1806
|
let o = 0, s, i = !0, a = Ae, f;
|
|
1808
1807
|
const l = () => {
|
|
1809
1808
|
s && (clearTimeout(s), s = void 0, a(), a = Ae);
|
|
@@ -1817,13 +1816,13 @@ function Lr(e, t = !0, n = !0, r = !1) {
|
|
|
1817
1816
|
})), !n && !s && (s = setTimeout(() => i = !0, m)), i = !1, f);
|
|
1818
1817
|
};
|
|
1819
1818
|
}
|
|
1820
|
-
function
|
|
1819
|
+
function Lr(e) {
|
|
1821
1820
|
return e;
|
|
1822
1821
|
}
|
|
1823
|
-
function
|
|
1822
|
+
function Nr(e) {
|
|
1824
1823
|
return Qt() ? (Gt(e), !0) : !1;
|
|
1825
1824
|
}
|
|
1826
|
-
function
|
|
1825
|
+
function Ir(e) {
|
|
1827
1826
|
var t;
|
|
1828
1827
|
const n = De(e);
|
|
1829
1828
|
return (t = n == null ? void 0 : n.$el) != null ? t : n;
|
|
@@ -1831,31 +1830,31 @@ function Fr(e) {
|
|
|
1831
1830
|
const Mt = qt ? window : void 0;
|
|
1832
1831
|
function nt(...e) {
|
|
1833
1832
|
let t, n, r, o;
|
|
1834
|
-
if (
|
|
1833
|
+
if (Pr(e[0]) || Array.isArray(e[0]) ? ([n, r, o] = e, t = Mt) : [t, n, r, o] = e, !t)
|
|
1835
1834
|
return Ae;
|
|
1836
1835
|
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
1837
1836
|
const s = [], i = () => {
|
|
1838
1837
|
s.forEach((u) => u()), s.length = 0;
|
|
1839
|
-
}, a = (u, d, m, b) => (u.addEventListener(d, m, b), () => u.removeEventListener(d, m, b)), f = ke(() => [
|
|
1838
|
+
}, a = (u, d, m, b) => (u.addEventListener(d, m, b), () => u.removeEventListener(d, m, b)), f = ke(() => [Ir(t), De(o)], ([u, d]) => {
|
|
1840
1839
|
i(), u && s.push(...n.flatMap((m) => r.map((b) => a(u, m, b, d))));
|
|
1841
1840
|
}, { immediate: !0, flush: "post" }), l = () => {
|
|
1842
1841
|
f(), i();
|
|
1843
1842
|
};
|
|
1844
|
-
return
|
|
1843
|
+
return Nr(l), l;
|
|
1845
1844
|
}
|
|
1846
1845
|
const rt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, ot = "__vueuse_ssr_handlers__";
|
|
1847
1846
|
rt[ot] = rt[ot] || {};
|
|
1848
|
-
const
|
|
1849
|
-
function
|
|
1847
|
+
const Fr = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"], Dr = 6e4;
|
|
1848
|
+
function vr(e = Dr, t = {}) {
|
|
1850
1849
|
const {
|
|
1851
1850
|
initialState: n = !1,
|
|
1852
1851
|
listenForVisibilityChange: r = !0,
|
|
1853
|
-
events: o =
|
|
1852
|
+
events: o = Fr,
|
|
1854
1853
|
window: s = Mt,
|
|
1855
|
-
eventFilter: i =
|
|
1854
|
+
eventFilter: i = Ur(50)
|
|
1856
1855
|
} = t, a = ne(n), f = ne(tt());
|
|
1857
1856
|
let l;
|
|
1858
|
-
const u =
|
|
1857
|
+
const u = kr(i, () => {
|
|
1859
1858
|
a.value = !1, f.value = tt(), clearTimeout(l), l = setTimeout(() => a.value = !0, e);
|
|
1860
1859
|
});
|
|
1861
1860
|
if (s) {
|
|
@@ -1872,15 +1871,15 @@ var st;
|
|
|
1872
1871
|
(function(e) {
|
|
1873
1872
|
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
1874
1873
|
})(st || (st = {}));
|
|
1875
|
-
var
|
|
1874
|
+
var jr = Object.defineProperty, it = Object.getOwnPropertySymbols, Br = Object.prototype.hasOwnProperty, qr = Object.prototype.propertyIsEnumerable, at = (e, t, n) => t in e ? jr(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, Mr = (e, t) => {
|
|
1876
1875
|
for (var n in t || (t = {}))
|
|
1877
|
-
|
|
1876
|
+
Br.call(t, n) && at(e, n, t[n]);
|
|
1878
1877
|
if (it)
|
|
1879
1878
|
for (var n of it(t))
|
|
1880
|
-
|
|
1879
|
+
qr.call(t, n) && at(e, n, t[n]);
|
|
1881
1880
|
return e;
|
|
1882
1881
|
};
|
|
1883
|
-
const
|
|
1882
|
+
const Hr = {
|
|
1884
1883
|
easeInSine: [0.12, 0, 0.39, 0],
|
|
1885
1884
|
easeOutSine: [0.61, 1, 0.88, 1],
|
|
1886
1885
|
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
@@ -1906,11 +1905,11 @@ const zr = {
|
|
|
1906
1905
|
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
1907
1906
|
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
1908
1907
|
};
|
|
1909
|
-
|
|
1910
|
-
linear:
|
|
1911
|
-
},
|
|
1908
|
+
Mr({
|
|
1909
|
+
linear: Lr
|
|
1910
|
+
}, Hr);
|
|
1912
1911
|
let Ce;
|
|
1913
|
-
const Ht = { triggerProxySso: "triggerProxySso" },
|
|
1912
|
+
const Ht = { triggerProxySso: "triggerProxySso" }, zr = () => {
|
|
1914
1913
|
Ce = (e) => {
|
|
1915
1914
|
var n;
|
|
1916
1915
|
const { origin: t } = new URL(location.href);
|
|
@@ -1919,13 +1918,13 @@ const Ht = { triggerProxySso: "triggerProxySso" }, $r = () => {
|
|
|
1919
1918
|
t
|
|
1920
1919
|
);
|
|
1921
1920
|
};
|
|
1922
|
-
},
|
|
1921
|
+
}, $r = (e) => {
|
|
1923
1922
|
window.top === window.self && window.addEventListener("message", (t) => {
|
|
1924
1923
|
const { type: n, data: r } = t.data;
|
|
1925
1924
|
n === Ht.triggerProxySso && (e == null || e(r));
|
|
1926
1925
|
});
|
|
1927
1926
|
};
|
|
1928
|
-
window.top !== window.self &&
|
|
1927
|
+
window.top !== window.self && zr();
|
|
1929
1928
|
let zt = (e = 21) => {
|
|
1930
1929
|
let t = "", n = crypto.getRandomValues(new Uint8Array(e));
|
|
1931
1930
|
for (; e--; ) {
|
|
@@ -1947,7 +1946,7 @@ const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), v
|
|
|
1947
1946
|
login: "/api/justauth/client/v1/visitor/feishu/login",
|
|
1948
1947
|
ssoParam: "/api/justauth/client/v1/visitor/sso-param"
|
|
1949
1948
|
}
|
|
1950
|
-
},
|
|
1949
|
+
}, Jr = async () => {
|
|
1951
1950
|
const e = U("authorizer") || "", t = U("_redirect_url") || "";
|
|
1952
1951
|
if (xe(["authorizer", "_redirect_url"]), e === "feishu") {
|
|
1953
1952
|
if (!window.tt) return "";
|
|
@@ -1967,7 +1966,7 @@ const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), v
|
|
|
1967
1966
|
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;
|
|
1968
1967
|
location.replace(d), r();
|
|
1969
1968
|
} catch {
|
|
1970
|
-
v({ ...
|
|
1969
|
+
v({ ...D, redirect_uri: L }), r();
|
|
1971
1970
|
}
|
|
1972
1971
|
}, s = await n(), i = () => {
|
|
1973
1972
|
window.tt.requestAuthCode({
|
|
@@ -1977,7 +1976,7 @@ const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), v
|
|
|
1977
1976
|
o(f);
|
|
1978
1977
|
},
|
|
1979
1978
|
fail: (a) => {
|
|
1980
|
-
v({ ...
|
|
1979
|
+
v({ ...D, redirect_uri: L }), r();
|
|
1981
1980
|
}
|
|
1982
1981
|
});
|
|
1983
1982
|
};
|
|
@@ -1990,12 +1989,12 @@ const me = "loginType", U = (e) => new URL(location.href).searchParams.get(e), v
|
|
|
1990
1989
|
},
|
|
1991
1990
|
fail: (a) => {
|
|
1992
1991
|
const { errno: f } = a;
|
|
1993
|
-
f === 103 ? i() : (v({ ...
|
|
1992
|
+
f === 103 ? i() : (v({ ...D, redirect_uri: L }), r());
|
|
1994
1993
|
}
|
|
1995
1994
|
}) : i();
|
|
1996
1995
|
});
|
|
1997
1996
|
}
|
|
1998
|
-
},
|
|
1997
|
+
}, Vr = "/api/justauth/client/v1/visitor/sso-param", Wr = "/api/justauth/client/v1/visitor/jmc/sso/status", Kr = "/api/justauth/client/v1/visitor/jmc/sso/logout", Pe = "thirdLogouSource", Qr = ["zhongshen", "jmc"], Gr = {
|
|
1999
1998
|
uat: "https://sso-uat.jmc.com.cn"
|
|
2000
1999
|
};
|
|
2001
2000
|
let je = "";
|
|
@@ -2010,18 +2009,18 @@ const lt = (e) => {
|
|
|
2010
2009
|
return e !== null && !t && localStorage.removeItem(Pe), t || lt(je);
|
|
2011
2010
|
}, $t = (e) => {
|
|
2012
2011
|
const t = ve();
|
|
2013
|
-
return e === "jmc" && t === "das" ? !1 :
|
|
2014
|
-
},
|
|
2012
|
+
return e === "jmc" && t === "das" ? !1 : Qr.includes(e);
|
|
2013
|
+
}, Xr = () => $t(Be()), Jt = (e) => {
|
|
2015
2014
|
je = Be(), localStorage.removeItem(Pe), window.__isAutoCloseApp = !1, location.href = e;
|
|
2016
|
-
},
|
|
2015
|
+
}, Yr = (e) => {
|
|
2017
2016
|
Ue();
|
|
2018
2017
|
const n = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2019
2018
|
Jt(n);
|
|
2020
|
-
},
|
|
2019
|
+
}, Zr = async (e = "") => {
|
|
2021
2020
|
try {
|
|
2022
2021
|
const { baseURL: t } = j();
|
|
2023
2022
|
await g.create().post(
|
|
2024
|
-
|
|
2023
|
+
Wr,
|
|
2025
2024
|
{
|
|
2026
2025
|
ssoToken: e,
|
|
2027
2026
|
// 平台退出前已清理本地 token,这里通过 cookie 兜底读取,便于后端定位并清理 cookie token。
|
|
@@ -2031,11 +2030,11 @@ const lt = (e) => {
|
|
|
2031
2030
|
);
|
|
2032
2031
|
} catch {
|
|
2033
2032
|
}
|
|
2034
|
-
},
|
|
2033
|
+
}, eo = async () => {
|
|
2035
2034
|
let e = "";
|
|
2036
2035
|
try {
|
|
2037
2036
|
const { baseURL: r } = j();
|
|
2038
|
-
e = (await g.create().get(
|
|
2037
|
+
e = (await g.create().get(Vr, {
|
|
2039
2038
|
baseURL: r,
|
|
2040
2039
|
params: {
|
|
2041
2040
|
source: "jmc",
|
|
@@ -2051,21 +2050,21 @@ const lt = (e) => {
|
|
|
2051
2050
|
} catch {
|
|
2052
2051
|
return "";
|
|
2053
2052
|
}
|
|
2054
|
-
})() ===
|
|
2053
|
+
})() === Gr.uat ? _e.get("sso_access_token_uat") : _e.get("sso_access_token");
|
|
2055
2054
|
try {
|
|
2056
2055
|
const { baseURL: r } = j();
|
|
2057
|
-
await g.create().post(
|
|
2056
|
+
await g.create().post(Kr, { ssoToken: n }, { baseURL: r });
|
|
2058
2057
|
} catch {
|
|
2059
2058
|
}
|
|
2060
|
-
await
|
|
2061
|
-
},
|
|
2059
|
+
await Zr(n), Ue(), Jt(e);
|
|
2060
|
+
}, to = async (e = "") => {
|
|
2062
2061
|
const t = Be();
|
|
2063
2062
|
if ($t(t)) {
|
|
2064
2063
|
if (je = t, t === "zhongshen") {
|
|
2065
|
-
|
|
2064
|
+
Yr(e);
|
|
2066
2065
|
return;
|
|
2067
2066
|
}
|
|
2068
|
-
t === "jmc" && await
|
|
2067
|
+
t === "jmc" && await eo();
|
|
2069
2068
|
}
|
|
2070
2069
|
}, M = {
|
|
2071
2070
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
@@ -2074,15 +2073,14 @@ const lt = (e) => {
|
|
|
2074
2073
|
// 清除登录信息
|
|
2075
2074
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
2076
2075
|
// 通过code获取token
|
|
2077
|
-
}, { baseURL: ft, noRedireLogin:
|
|
2076
|
+
}, { baseURL: ft, noRedireLogin: no = !1 } = j(), dt = localStorage.getItem("oauth-redirect_url") || "", L = dt || location.origin + "/home", D = {
|
|
2078
2077
|
response_type: "code",
|
|
2079
2078
|
scope: "sever",
|
|
2080
2079
|
client_id: "sys",
|
|
2081
|
-
client_secret: Xt("das123"),
|
|
2082
2080
|
state: +/* @__PURE__ */ new Date()
|
|
2083
2081
|
}, Vt = ne(!1), Wt = (e) => {
|
|
2084
2082
|
if (e <= 0) return;
|
|
2085
|
-
const { idle: t } =
|
|
2083
|
+
const { idle: t } = vr(e);
|
|
2086
2084
|
ke(
|
|
2087
2085
|
() => t.value,
|
|
2088
2086
|
(n) => {
|
|
@@ -2092,7 +2090,7 @@ const lt = (e) => {
|
|
|
2092
2090
|
};
|
|
2093
2091
|
localStorage.getItem("idelTime") && Wt(Number(localStorage.getItem("idelTime")));
|
|
2094
2092
|
let pt = "";
|
|
2095
|
-
const
|
|
2093
|
+
const ro = async () => {
|
|
2096
2094
|
const e = U("code") || "", t = U("redirect_url") || "/", n = U("kingdee_token") || "", r = ve();
|
|
2097
2095
|
if (!e) return q();
|
|
2098
2096
|
const o = ["code", "state", "kingdee_token", "redirect_url", "source"];
|
|
@@ -2103,8 +2101,7 @@ const oo = async () => {
|
|
|
2103
2101
|
const i = {
|
|
2104
2102
|
grant_type: "authorization_code",
|
|
2105
2103
|
code: e,
|
|
2106
|
-
client_id:
|
|
2107
|
-
client_secret: N.client_secret,
|
|
2104
|
+
client_id: D.client_id,
|
|
2108
2105
|
redirect_uri: r ? Le(L, { loginType: r }) : L,
|
|
2109
2106
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2110
2107
|
nonce: zt()
|
|
@@ -2137,12 +2134,12 @@ const oo = async () => {
|
|
|
2137
2134
|
const m = Number(u) - (/* @__PURE__ */ new Date()).getTime();
|
|
2138
2135
|
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;
|
|
2139
2136
|
} catch {
|
|
2140
|
-
return v({ ...
|
|
2137
|
+
return v({ ...D, redirect_uri: L });
|
|
2141
2138
|
}
|
|
2142
|
-
}, Y = ne(!1),
|
|
2139
|
+
}, Y = ne(!1), ko = async (e) => {
|
|
2143
2140
|
if (e.public) return "";
|
|
2144
2141
|
if (Vt.value)
|
|
2145
|
-
return we() ? q() : v({ ...
|
|
2142
|
+
return we() ? q() : v({ ...D, redirect_uri: L });
|
|
2146
2143
|
if (Y.value)
|
|
2147
2144
|
return await new Promise(async (r) => {
|
|
2148
2145
|
ke(
|
|
@@ -2161,12 +2158,12 @@ const oo = async () => {
|
|
|
2161
2158
|
try {
|
|
2162
2159
|
const r = U("code") || "";
|
|
2163
2160
|
if ((U("authorizer") || "") === "feishu")
|
|
2164
|
-
await
|
|
2161
|
+
await Jr();
|
|
2165
2162
|
else if (r)
|
|
2166
|
-
t = await
|
|
2163
|
+
t = await ro();
|
|
2167
2164
|
else {
|
|
2168
2165
|
const s = Date.now() + 6e4;
|
|
2169
|
-
n > 0 && s > n && !we() && (t = await
|
|
2166
|
+
n > 0 && s > n && !we() && (t = await oo(D));
|
|
2170
2167
|
}
|
|
2171
2168
|
} catch {
|
|
2172
2169
|
} finally {
|
|
@@ -2176,7 +2173,7 @@ const oo = async () => {
|
|
|
2176
2173
|
};
|
|
2177
2174
|
let ye = !1;
|
|
2178
2175
|
const v = (e) => {
|
|
2179
|
-
if (!
|
|
2176
|
+
if (!no && !ye) {
|
|
2180
2177
|
ye = !0;
|
|
2181
2178
|
try {
|
|
2182
2179
|
const t = { ...e }, n = ve();
|
|
@@ -2186,11 +2183,11 @@ const v = (e) => {
|
|
|
2186
2183
|
t.logout = "true", o && (t.locale = "locale");
|
|
2187
2184
|
const s = new URLSearchParams();
|
|
2188
2185
|
Object.entries(t).forEach(([f, l]) => {
|
|
2189
|
-
|
|
2186
|
+
s.set(f, String(l));
|
|
2190
2187
|
});
|
|
2191
2188
|
const i = s.toString(), a = `${r}${M.oauth}?${i}`;
|
|
2192
|
-
if (
|
|
2193
|
-
|
|
2189
|
+
if (Xr())
|
|
2190
|
+
to(a);
|
|
2194
2191
|
else {
|
|
2195
2192
|
try {
|
|
2196
2193
|
g.create().get(M.logoutCurpage, { baseURL: r });
|
|
@@ -2203,8 +2200,8 @@ const v = (e) => {
|
|
|
2203
2200
|
}
|
|
2204
2201
|
}
|
|
2205
2202
|
};
|
|
2206
|
-
|
|
2207
|
-
const
|
|
2203
|
+
$r(v);
|
|
2204
|
+
const oo = async (e) => {
|
|
2208
2205
|
if (we()) return "";
|
|
2209
2206
|
const { baseURL: t } = j(), { refreshToken: n } = re().getData();
|
|
2210
2207
|
try {
|
|
@@ -2221,7 +2218,6 @@ const so = async (e) => {
|
|
|
2221
2218
|
refresh_token: n,
|
|
2222
2219
|
grant_type: "refresh_token",
|
|
2223
2220
|
client_id: e.client_id,
|
|
2224
|
-
client_secret: e.client_secret,
|
|
2225
2221
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
2226
2222
|
nonce: zt()
|
|
2227
2223
|
}
|
|
@@ -2240,11 +2236,11 @@ const so = async (e) => {
|
|
|
2240
2236
|
export {
|
|
2241
2237
|
ve as getLoginType,
|
|
2242
2238
|
U as getQuery,
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2239
|
+
ko as getToken,
|
|
2240
|
+
ro as getTokenFromCode,
|
|
2241
|
+
D as getTokenParams,
|
|
2246
2242
|
v as login,
|
|
2247
2243
|
L as real_uri,
|
|
2248
|
-
|
|
2249
|
-
|
|
2244
|
+
oo as refreshToken,
|
|
2245
|
+
No as tokenStorage
|
|
2250
2246
|
};
|