@das-fed/utils 7.0.7-hot.3 → 7.0.7-hot.5
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/app-manage/index.js +743 -725
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +746 -728
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +725 -743
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/file/index.js +748 -766
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +984 -1002
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +725 -743
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +745 -727
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/create-api-service/index.js +699 -717
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/index.js +131 -131
- package/create-api-service/sso/index.js.gz +0 -0
- package/package.json +4 -4
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { unref as Nt, getCurrentScope as Ft, onScopeDispose as Dt, ref as
|
|
1
|
+
import { unref as Nt, getCurrentScope as Ft, onScopeDispose as Dt, ref as ee, watch as Oe } from "vue";
|
|
2
2
|
import { encryption as vt } from "@das-fed/utils/atob";
|
|
3
3
|
import { getConfig as Ae } from "@das-fed/utils/config";
|
|
4
4
|
import { getAccessToken as D, removeAccessToken as It, setAccessToken as Bt, getAccessTokenInfo as fe } from "@das-fed/utils/token-tools";
|
|
@@ -9,11 +9,11 @@ function nt(e, t) {
|
|
|
9
9
|
return e.apply(t, arguments);
|
|
10
10
|
};
|
|
11
11
|
}
|
|
12
|
-
const { toString: Ht } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator:
|
|
12
|
+
const { toString: Ht } = Object.prototype, { getPrototypeOf: _e } = Object, { iterator: oe, toStringTag: rt } = Symbol, se = /* @__PURE__ */ ((e) => (t) => {
|
|
13
13
|
const n = Ht.call(t);
|
|
14
14
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
15
|
-
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) =>
|
|
16
|
-
function
|
|
15
|
+
})(/* @__PURE__ */ Object.create(null)), x = (e) => (e = e.toLowerCase(), (t) => se(t) === e), ie = (e) => (t) => typeof t === e, { isArray: I } = Array, $ = ie("undefined");
|
|
16
|
+
function J(e) {
|
|
17
17
|
return e !== null && !$(e) && e.constructor !== null && !$(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
18
18
|
}
|
|
19
19
|
const ot = x("ArrayBuffer");
|
|
@@ -21,33 +21,33 @@ function Mt(e) {
|
|
|
21
21
|
let t;
|
|
22
22
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && ot(e.buffer), t;
|
|
23
23
|
}
|
|
24
|
-
const $t =
|
|
25
|
-
if (
|
|
24
|
+
const $t = ie("string"), A = ie("function"), st = ie("number"), V = (e) => e !== null && typeof e == "object", zt = (e) => e === !0 || e === !1, G = (e) => {
|
|
25
|
+
if (se(e) !== "object")
|
|
26
26
|
return !1;
|
|
27
27
|
const t = _e(e);
|
|
28
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(
|
|
28
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(rt in e) && !(oe in e);
|
|
29
29
|
}, Jt = (e) => {
|
|
30
|
-
if (!
|
|
30
|
+
if (!V(e) || J(e))
|
|
31
31
|
return !1;
|
|
32
32
|
try {
|
|
33
33
|
return Object.keys(e).length === 0 && Object.getPrototypeOf(e) === Object.prototype;
|
|
34
34
|
} catch {
|
|
35
35
|
return !1;
|
|
36
36
|
}
|
|
37
|
-
}, Vt = x("Date"), Wt = x("File"), Kt = x("Blob"), Qt = x("FileList"), Xt = (e) =>
|
|
37
|
+
}, Vt = x("Date"), Wt = x("File"), Kt = x("Blob"), Qt = x("FileList"), Xt = (e) => V(e) && A(e.pipe), Gt = (e) => {
|
|
38
38
|
let t;
|
|
39
|
-
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t =
|
|
39
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = se(e)) === "formdata" || // detect form-data instance
|
|
40
40
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
41
41
|
}, Zt = x("URLSearchParams"), [Yt, en, tn, nn] = ["ReadableStream", "Request", "Response", "Headers"].map(x), rn = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
42
|
-
function
|
|
42
|
+
function W(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
43
43
|
if (e === null || typeof e > "u")
|
|
44
44
|
return;
|
|
45
45
|
let r, o;
|
|
46
|
-
if (typeof e != "object" && (e = [e]),
|
|
46
|
+
if (typeof e != "object" && (e = [e]), I(e))
|
|
47
47
|
for (r = 0, o = e.length; r < o; r++)
|
|
48
48
|
t.call(null, e[r], r, e);
|
|
49
49
|
else {
|
|
50
|
-
if (
|
|
50
|
+
if (J(e))
|
|
51
51
|
return;
|
|
52
52
|
const s = n ? Object.getOwnPropertyNames(e) : Object.keys(e), i = s.length;
|
|
53
53
|
let c;
|
|
@@ -56,7 +56,7 @@ function Q(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
58
|
function it(e, t) {
|
|
59
|
-
if (
|
|
59
|
+
if (J(e))
|
|
60
60
|
return null;
|
|
61
61
|
t = t.toLowerCase();
|
|
62
62
|
const n = Object.keys(e);
|
|
@@ -70,13 +70,13 @@ const L = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : type
|
|
|
70
70
|
function me() {
|
|
71
71
|
const { caseless: e } = at(this) && this || {}, t = {}, n = (r, o) => {
|
|
72
72
|
const s = e && it(t, o) || o;
|
|
73
|
-
|
|
73
|
+
G(t[s]) && G(r) ? t[s] = me(t[s], r) : G(r) ? t[s] = me({}, r) : I(r) ? t[s] = r.slice() : t[s] = r;
|
|
74
74
|
};
|
|
75
75
|
for (let r = 0, o = arguments.length; r < o; r++)
|
|
76
|
-
arguments[r] &&
|
|
76
|
+
arguments[r] && W(arguments[r], n);
|
|
77
77
|
return t;
|
|
78
78
|
}
|
|
79
|
-
const on = (e, t, n, { allOwnKeys: r } = {}) => (
|
|
79
|
+
const on = (e, t, n, { allOwnKeys: r } = {}) => (W(t, (o, s) => {
|
|
80
80
|
n && A(o) ? e[s] = nt(o, n) : e[s] = o;
|
|
81
81
|
}, { allOwnKeys: r }), e), sn = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), an = (e, t, n, r) => {
|
|
82
82
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
@@ -98,7 +98,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
98
98
|
return r !== -1 && r === n;
|
|
99
99
|
}, un = (e) => {
|
|
100
100
|
if (!e) return null;
|
|
101
|
-
if (
|
|
101
|
+
if (I(e)) return e;
|
|
102
102
|
let t = e.length;
|
|
103
103
|
if (!st(t)) return null;
|
|
104
104
|
const n = new Array(t);
|
|
@@ -106,7 +106,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
106
106
|
n[t] = e[t];
|
|
107
107
|
return n;
|
|
108
108
|
}, fn = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && _e(Uint8Array)), dn = (e, t) => {
|
|
109
|
-
const r = (e && e[
|
|
109
|
+
const r = (e && e[oe]).call(e);
|
|
110
110
|
let o;
|
|
111
111
|
for (; (o = r.next()) && !o.done; ) {
|
|
112
112
|
const s = o.value;
|
|
@@ -125,7 +125,7 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
125
125
|
}
|
|
126
126
|
), Ue = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), yn = x("RegExp"), ct = (e, t) => {
|
|
127
127
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
128
|
-
|
|
128
|
+
W(n, (o, s) => {
|
|
129
129
|
let i;
|
|
130
130
|
(i = t(o, s, e)) !== !1 && (r[s] = i || o);
|
|
131
131
|
}), Object.defineProperties(e, r);
|
|
@@ -150,23 +150,23 @@ const on = (e, t, n, { allOwnKeys: r } = {}) => (Q(t, (o, s) => {
|
|
|
150
150
|
n[s] = !0;
|
|
151
151
|
});
|
|
152
152
|
};
|
|
153
|
-
return
|
|
153
|
+
return I(e) ? r(e) : r(String(e).split(t)), n;
|
|
154
154
|
}, bn = () => {
|
|
155
155
|
}, En = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
156
156
|
function Sn(e) {
|
|
157
|
-
return !!(e && A(e.append) && e[rt] === "FormData" && e[
|
|
157
|
+
return !!(e && A(e.append) && e[rt] === "FormData" && e[oe]);
|
|
158
158
|
}
|
|
159
159
|
const Tn = (e) => {
|
|
160
160
|
const t = new Array(10), n = (r, o) => {
|
|
161
|
-
if (
|
|
161
|
+
if (V(r)) {
|
|
162
162
|
if (t.indexOf(r) >= 0)
|
|
163
163
|
return;
|
|
164
|
-
if (
|
|
164
|
+
if (J(r))
|
|
165
165
|
return r;
|
|
166
166
|
if (!("toJSON" in r)) {
|
|
167
167
|
t[o] = r;
|
|
168
|
-
const s =
|
|
169
|
-
return
|
|
168
|
+
const s = I(r) ? [] : {};
|
|
169
|
+
return W(r, (i, c) => {
|
|
170
170
|
const f = n(i, o + 1);
|
|
171
171
|
!$(f) && (s[c] = f);
|
|
172
172
|
}), t[o] = void 0, s;
|
|
@@ -175,24 +175,24 @@ const Tn = (e) => {
|
|
|
175
175
|
return r;
|
|
176
176
|
};
|
|
177
177
|
return n(e, 0);
|
|
178
|
-
}, Rn = x("AsyncFunction"), On = (e) => e && (
|
|
178
|
+
}, Rn = x("AsyncFunction"), On = (e) => e && (V(e) || A(e)) && A(e.then) && A(e.catch), lt = ((e, t) => e ? setImmediate : t ? ((n, r) => (L.addEventListener("message", ({ source: o, data: s }) => {
|
|
179
179
|
o === L && s === n && r.length && r.shift()();
|
|
180
180
|
}, !1), (o) => {
|
|
181
181
|
r.push(o), L.postMessage(n, "*");
|
|
182
182
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
183
183
|
typeof setImmediate == "function",
|
|
184
184
|
A(L.postMessage)
|
|
185
|
-
), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || lt, _n = (e) => e != null && A(e[
|
|
186
|
-
isArray:
|
|
185
|
+
), An = typeof queueMicrotask < "u" ? queueMicrotask.bind(L) : typeof process < "u" && process.nextTick || lt, _n = (e) => e != null && A(e[oe]), a = {
|
|
186
|
+
isArray: I,
|
|
187
187
|
isArrayBuffer: ot,
|
|
188
|
-
isBuffer:
|
|
188
|
+
isBuffer: J,
|
|
189
189
|
isFormData: Gt,
|
|
190
190
|
isArrayBufferView: Mt,
|
|
191
191
|
isString: $t,
|
|
192
192
|
isNumber: st,
|
|
193
193
|
isBoolean: zt,
|
|
194
|
-
isObject:
|
|
195
|
-
isPlainObject:
|
|
194
|
+
isObject: V,
|
|
195
|
+
isPlainObject: G,
|
|
196
196
|
isEmptyObject: Jt,
|
|
197
197
|
isReadableStream: Yt,
|
|
198
198
|
isRequest: en,
|
|
@@ -208,14 +208,14 @@ const Tn = (e) => {
|
|
|
208
208
|
isURLSearchParams: Zt,
|
|
209
209
|
isTypedArray: fn,
|
|
210
210
|
isFileList: Qt,
|
|
211
|
-
forEach:
|
|
211
|
+
forEach: W,
|
|
212
212
|
merge: me,
|
|
213
213
|
extend: on,
|
|
214
214
|
trim: rn,
|
|
215
215
|
stripBOM: sn,
|
|
216
216
|
inherits: an,
|
|
217
217
|
toFlatObject: cn,
|
|
218
|
-
kindOf:
|
|
218
|
+
kindOf: se,
|
|
219
219
|
kindOfTest: x,
|
|
220
220
|
endsWith: ln,
|
|
221
221
|
toArray: un,
|
|
@@ -310,7 +310,7 @@ function Cn(e) {
|
|
|
310
310
|
const kn = a.toFlatObject(a, {}, null, function(t) {
|
|
311
311
|
return /^is[A-Z]/.test(t);
|
|
312
312
|
});
|
|
313
|
-
function
|
|
313
|
+
function ae(e, t, n) {
|
|
314
314
|
if (!a.isObject(e))
|
|
315
315
|
throw new TypeError("target must be an object");
|
|
316
316
|
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
@@ -388,7 +388,7 @@ function Ne(e) {
|
|
|
388
388
|
});
|
|
389
389
|
}
|
|
390
390
|
function xe(e, t) {
|
|
391
|
-
this._pairs = [], e &&
|
|
391
|
+
this._pairs = [], e && ae(e, this, t);
|
|
392
392
|
}
|
|
393
393
|
const pt = xe.prototype;
|
|
394
394
|
pt.append = function(t, n) {
|
|
@@ -499,7 +499,7 @@ self instanceof WorkerGlobalScope && typeof self.importScripts == "function", In
|
|
|
499
499
|
...Fn
|
|
500
500
|
};
|
|
501
501
|
function jn(e, t) {
|
|
502
|
-
return
|
|
502
|
+
return ae(e, new R.classes.URLSearchParams(), {
|
|
503
503
|
visitor: function(n, r, o, s) {
|
|
504
504
|
return R.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), !1) : s.defaultVisitor.apply(this, arguments);
|
|
505
505
|
},
|
|
@@ -543,7 +543,7 @@ function Mn(e, t, n) {
|
|
|
543
543
|
}
|
|
544
544
|
return (n || JSON.stringify)(e);
|
|
545
545
|
}
|
|
546
|
-
const
|
|
546
|
+
const K = {
|
|
547
547
|
transitional: mt,
|
|
548
548
|
adapter: ["xhr", "http", "fetch"],
|
|
549
549
|
transformRequest: [function(t, n) {
|
|
@@ -562,7 +562,7 @@ const X = {
|
|
|
562
562
|
return jn(t, this.formSerializer).toString();
|
|
563
563
|
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
564
564
|
const f = this.env && this.env.FormData;
|
|
565
|
-
return
|
|
565
|
+
return ae(
|
|
566
566
|
c ? { "files[]": t } : t,
|
|
567
567
|
f && new f(),
|
|
568
568
|
this.formSerializer
|
|
@@ -572,7 +572,7 @@ const X = {
|
|
|
572
572
|
return s || o ? (n.setContentType("application/json", !1), Mn(t)) : t;
|
|
573
573
|
}],
|
|
574
574
|
transformResponse: [function(t) {
|
|
575
|
-
const n = this.transitional ||
|
|
575
|
+
const n = this.transitional || K.transitional, r = n && n.forcedJSONParsing, o = this.responseType === "json";
|
|
576
576
|
if (a.isResponse(t) || a.isReadableStream(t))
|
|
577
577
|
return t;
|
|
578
578
|
if (t && a.isString(t) && (r && !this.responseType || o)) {
|
|
@@ -610,7 +610,7 @@ const X = {
|
|
|
610
610
|
}
|
|
611
611
|
};
|
|
612
612
|
a.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
613
|
-
|
|
613
|
+
K.headers[e] = {};
|
|
614
614
|
});
|
|
615
615
|
const $n = a.toObjectSet([
|
|
616
616
|
"age",
|
|
@@ -638,11 +638,11 @@ const $n = a.toObjectSet([
|
|
|
638
638
|
o = i.indexOf(":"), n = i.substring(0, o).trim().toLowerCase(), r = i.substring(o + 1).trim(), !(!n || t[n] && $n[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
639
639
|
}), t;
|
|
640
640
|
}, De = Symbol("internals");
|
|
641
|
-
function
|
|
641
|
+
function j(e) {
|
|
642
642
|
return e && String(e).trim().toLowerCase();
|
|
643
643
|
}
|
|
644
|
-
function
|
|
645
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
644
|
+
function Z(e) {
|
|
645
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(Z) : String(e);
|
|
646
646
|
}
|
|
647
647
|
function Jn(e) {
|
|
648
648
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -683,11 +683,11 @@ let _ = class {
|
|
|
683
683
|
set(t, n, r) {
|
|
684
684
|
const o = this;
|
|
685
685
|
function s(c, f, u) {
|
|
686
|
-
const l =
|
|
686
|
+
const l = j(f);
|
|
687
687
|
if (!l)
|
|
688
688
|
throw new Error("header name must be a non-empty string");
|
|
689
689
|
const d = a.findKey(o, l);
|
|
690
|
-
(!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || f] =
|
|
690
|
+
(!d || o[d] === void 0 || u === !0 || u === void 0 && o[d] !== !1) && (o[d || f] = Z(c));
|
|
691
691
|
}
|
|
692
692
|
const i = (c, f) => a.forEach(c, (u, l) => s(u, l, f));
|
|
693
693
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -707,7 +707,7 @@ let _ = class {
|
|
|
707
707
|
return this;
|
|
708
708
|
}
|
|
709
709
|
get(t, n) {
|
|
710
|
-
if (t =
|
|
710
|
+
if (t = j(t), t) {
|
|
711
711
|
const r = a.findKey(this, t);
|
|
712
712
|
if (r) {
|
|
713
713
|
const o = this[r];
|
|
@@ -724,7 +724,7 @@ let _ = class {
|
|
|
724
724
|
}
|
|
725
725
|
}
|
|
726
726
|
has(t, n) {
|
|
727
|
-
if (t =
|
|
727
|
+
if (t = j(t), t) {
|
|
728
728
|
const r = a.findKey(this, t);
|
|
729
729
|
return !!(r && this[r] !== void 0 && (!n || de(this, this[r], r, n)));
|
|
730
730
|
}
|
|
@@ -734,7 +734,7 @@ let _ = class {
|
|
|
734
734
|
const r = this;
|
|
735
735
|
let o = !1;
|
|
736
736
|
function s(i) {
|
|
737
|
-
if (i =
|
|
737
|
+
if (i = j(i), i) {
|
|
738
738
|
const c = a.findKey(r, i);
|
|
739
739
|
c && (!n || de(r, r[c], c, n)) && (delete r[c], o = !0);
|
|
740
740
|
}
|
|
@@ -755,11 +755,11 @@ let _ = class {
|
|
|
755
755
|
return a.forEach(this, (o, s) => {
|
|
756
756
|
const i = a.findKey(r, s);
|
|
757
757
|
if (i) {
|
|
758
|
-
n[i] =
|
|
758
|
+
n[i] = Z(o), delete n[s];
|
|
759
759
|
return;
|
|
760
760
|
}
|
|
761
761
|
const c = t ? Wn(s) : String(s).trim();
|
|
762
|
-
c !== s && delete n[s], n[c] =
|
|
762
|
+
c !== s && delete n[s], n[c] = Z(o), r[c] = !0;
|
|
763
763
|
}), this;
|
|
764
764
|
}
|
|
765
765
|
concat(...t) {
|
|
@@ -796,7 +796,7 @@ let _ = class {
|
|
|
796
796
|
accessors: {}
|
|
797
797
|
}).accessors, o = this.prototype;
|
|
798
798
|
function s(i) {
|
|
799
|
-
const c =
|
|
799
|
+
const c = j(i);
|
|
800
800
|
r[c] || (Kn(o, i), r[c] = !0);
|
|
801
801
|
}
|
|
802
802
|
return a.isArray(t) ? t.forEach(s) : s(t), this;
|
|
@@ -814,7 +814,7 @@ a.reduceDescriptors(_.prototype, ({ value: e }, t) => {
|
|
|
814
814
|
});
|
|
815
815
|
a.freezeMethods(_);
|
|
816
816
|
function pe(e, t) {
|
|
817
|
-
const n = this ||
|
|
817
|
+
const n = this || K, r = t || n, o = _.from(r.headers);
|
|
818
818
|
let s = r.data;
|
|
819
819
|
return a.forEach(e, function(c) {
|
|
820
820
|
s = c.call(n, s, o.normalize(), t ? t.status : void 0);
|
|
@@ -823,10 +823,10 @@ function pe(e, t) {
|
|
|
823
823
|
function wt(e) {
|
|
824
824
|
return !!(e && e.__CANCEL__);
|
|
825
825
|
}
|
|
826
|
-
function
|
|
826
|
+
function B(e, t, n) {
|
|
827
827
|
y.call(this, e ?? "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
828
828
|
}
|
|
829
|
-
a.inherits(
|
|
829
|
+
a.inherits(B, y, {
|
|
830
830
|
__CANCEL__: !0
|
|
831
831
|
});
|
|
832
832
|
function gt(e, t, n) {
|
|
@@ -871,7 +871,7 @@ function Gn(e, t) {
|
|
|
871
871
|
}, r - d)));
|
|
872
872
|
}, () => o && i(o)];
|
|
873
873
|
}
|
|
874
|
-
const
|
|
874
|
+
const te = (e, t, n = 3) => {
|
|
875
875
|
let r = 0;
|
|
876
876
|
const o = Xn(50, 250);
|
|
877
877
|
return Gn((s) => {
|
|
@@ -1070,8 +1070,8 @@ const Et = (e) => {
|
|
|
1070
1070
|
)), h = null;
|
|
1071
1071
|
}, s === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(k, O) {
|
|
1072
1072
|
h.setRequestHeader(O, k);
|
|
1073
|
-
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), u && ([w, p] =
|
|
1074
|
-
h && (r(!T || T.type ? new
|
|
1073
|
+
}), a.isUndefined(o.withCredentials) || (h.withCredentials = !!o.withCredentials), c && c !== "json" && (h.responseType = o.responseType), u && ([w, p] = te(u, !0), h.addEventListener("progress", w)), f && h.upload && ([d, g] = te(f), h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (o.cancelToken || o.signal) && (l = (T) => {
|
|
1074
|
+
h && (r(!T || T.type ? new B(null, e, h) : T), h.abort(), h = null);
|
|
1075
1075
|
}, o.cancelToken && o.cancelToken.subscribe(l), o.signal && (o.signal.aborted ? l() : o.signal.addEventListener("abort", l)));
|
|
1076
1076
|
const S = Qn(o.url);
|
|
1077
1077
|
if (S && R.protocols.indexOf(S) === -1) {
|
|
@@ -1088,7 +1088,7 @@ const Et = (e) => {
|
|
|
1088
1088
|
if (!o) {
|
|
1089
1089
|
o = !0, c();
|
|
1090
1090
|
const l = u instanceof Error ? u : this.reason;
|
|
1091
|
-
r.abort(l instanceof y ? l : new
|
|
1091
|
+
r.abort(l instanceof y ? l : new B(l instanceof Error ? l.message : l));
|
|
1092
1092
|
}
|
|
1093
1093
|
};
|
|
1094
1094
|
let i = t && setTimeout(() => {
|
|
@@ -1160,7 +1160,7 @@ const Et = (e) => {
|
|
|
1160
1160
|
}, {
|
|
1161
1161
|
highWaterMark: 2
|
|
1162
1162
|
});
|
|
1163
|
-
},
|
|
1163
|
+
}, ce = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", St = ce && typeof ReadableStream == "function", cr = ce && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), Tt = (e, ...t) => {
|
|
1164
1164
|
try {
|
|
1165
1165
|
return !!e(...t);
|
|
1166
1166
|
} catch {
|
|
@@ -1176,12 +1176,12 @@ const Et = (e) => {
|
|
|
1176
1176
|
}
|
|
1177
1177
|
}).headers.has("Content-Type");
|
|
1178
1178
|
return e && !t;
|
|
1179
|
-
}), qe = 64 * 1024, ge = St && Tt(() => a.isReadableStream(new Response("").body)),
|
|
1179
|
+
}), qe = 64 * 1024, ge = St && Tt(() => a.isReadableStream(new Response("").body)), ne = {
|
|
1180
1180
|
stream: ge && ((e) => e.body)
|
|
1181
1181
|
};
|
|
1182
|
-
|
|
1182
|
+
ce && ((e) => {
|
|
1183
1183
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1184
|
-
!
|
|
1184
|
+
!ne[t] && (ne[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1185
1185
|
throw new y(`Response type '${t}' is not supported`, y.ERR_NOT_SUPPORT, r);
|
|
1186
1186
|
});
|
|
1187
1187
|
});
|
|
@@ -1203,7 +1203,7 @@ const ur = async (e) => {
|
|
|
1203
1203
|
}, fr = async (e, t) => {
|
|
1204
1204
|
const n = a.toFiniteNumber(e.getContentLength());
|
|
1205
1205
|
return n ?? ur(t);
|
|
1206
|
-
}, dr =
|
|
1206
|
+
}, dr = ce && (async (e) => {
|
|
1207
1207
|
let {
|
|
1208
1208
|
url: t,
|
|
1209
1209
|
method: n,
|
|
@@ -1232,11 +1232,11 @@ const ur = async (e) => {
|
|
|
1232
1232
|
duplex: "half"
|
|
1233
1233
|
}), P;
|
|
1234
1234
|
if (a.isFormData(r) && (P = O.headers.get("content-type")) && l.setContentType(P), O.body) {
|
|
1235
|
-
const [U,
|
|
1235
|
+
const [U, Q] = ve(
|
|
1236
1236
|
h,
|
|
1237
|
-
|
|
1237
|
+
te(Ie(f))
|
|
1238
1238
|
);
|
|
1239
|
-
r = je(O.body, qe, U,
|
|
1239
|
+
r = je(O.body, qe, U, Q);
|
|
1240
1240
|
}
|
|
1241
1241
|
}
|
|
1242
1242
|
a.isString(d) || (d = d ? "include" : "omit");
|
|
@@ -1257,19 +1257,19 @@ const ur = async (e) => {
|
|
|
1257
1257
|
["status", "statusText", "headers"].forEach((Pe) => {
|
|
1258
1258
|
O[Pe] = S[Pe];
|
|
1259
1259
|
});
|
|
1260
|
-
const P = a.toFiniteNumber(S.headers.get("content-length")), [U,
|
|
1260
|
+
const P = a.toFiniteNumber(S.headers.get("content-length")), [U, Q] = c && ve(
|
|
1261
1261
|
P,
|
|
1262
|
-
|
|
1262
|
+
te(Ie(c), !0)
|
|
1263
1263
|
) || [];
|
|
1264
1264
|
S = new Response(
|
|
1265
1265
|
je(S.body, qe, U, () => {
|
|
1266
|
-
|
|
1266
|
+
Q && Q(), m && m();
|
|
1267
1267
|
}),
|
|
1268
1268
|
O
|
|
1269
1269
|
);
|
|
1270
1270
|
}
|
|
1271
1271
|
u = u || "text";
|
|
1272
|
-
let k = await
|
|
1272
|
+
let k = await ne[a.findKey(ne, u) || "text"](S, e);
|
|
1273
1273
|
return !T && m && m(), await new Promise((O, P) => {
|
|
1274
1274
|
gt(O, P, {
|
|
1275
1275
|
data: k,
|
|
@@ -1335,13 +1335,13 @@ const He = (e) => `- ${e}`, pr = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1335
1335
|
};
|
|
1336
1336
|
function he(e) {
|
|
1337
1337
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1338
|
-
throw new
|
|
1338
|
+
throw new B(null, e);
|
|
1339
1339
|
}
|
|
1340
1340
|
function Me(e) {
|
|
1341
1341
|
return he(e), e.headers = _.from(e.headers), e.data = pe.call(
|
|
1342
1342
|
e,
|
|
1343
1343
|
e.transformRequest
|
|
1344
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Rt.getAdapter(e.adapter ||
|
|
1344
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Rt.getAdapter(e.adapter || K.adapter)(e).then(function(r) {
|
|
1345
1345
|
return he(e), r.data = pe.call(
|
|
1346
1346
|
e,
|
|
1347
1347
|
e.transformResponse,
|
|
@@ -1355,14 +1355,14 @@ function Me(e) {
|
|
|
1355
1355
|
), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1356
1356
|
});
|
|
1357
1357
|
}
|
|
1358
|
-
const Ot = "1.11.0",
|
|
1358
|
+
const Ot = "1.11.0", le = {};
|
|
1359
1359
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
1360
|
-
|
|
1360
|
+
le[e] = function(r) {
|
|
1361
1361
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1362
1362
|
};
|
|
1363
1363
|
});
|
|
1364
1364
|
const $e = {};
|
|
1365
|
-
|
|
1365
|
+
le.transitional = function(t, n, r) {
|
|
1366
1366
|
function o(s, i) {
|
|
1367
1367
|
return "[Axios v" + Ot + "] Transitional option '" + s + "'" + i + (r ? ". " + r : "");
|
|
1368
1368
|
}
|
|
@@ -1375,7 +1375,7 @@ ue.transitional = function(t, n, r) {
|
|
|
1375
1375
|
return n && !$e[i] && ($e[i] = !0), t ? t(s, i, c) : !0;
|
|
1376
1376
|
};
|
|
1377
1377
|
};
|
|
1378
|
-
|
|
1378
|
+
le.spelling = function(t) {
|
|
1379
1379
|
return (n, r) => !0;
|
|
1380
1380
|
};
|
|
1381
1381
|
function hr(e, t, n) {
|
|
@@ -1395,10 +1395,10 @@ function hr(e, t, n) {
|
|
|
1395
1395
|
throw new y("Unknown option " + s, y.ERR_BAD_OPTION);
|
|
1396
1396
|
}
|
|
1397
1397
|
}
|
|
1398
|
-
const
|
|
1398
|
+
const Y = {
|
|
1399
1399
|
assertOptions: hr,
|
|
1400
|
-
validators:
|
|
1401
|
-
}, C =
|
|
1400
|
+
validators: le
|
|
1401
|
+
}, C = Y.validators;
|
|
1402
1402
|
let N = class {
|
|
1403
1403
|
constructor(t) {
|
|
1404
1404
|
this.defaults = t || {}, this.interceptors = {
|
|
@@ -1434,16 +1434,16 @@ let N = class {
|
|
|
1434
1434
|
_request(t, n) {
|
|
1435
1435
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1436
1436
|
const { transitional: r, paramsSerializer: o, headers: s } = n;
|
|
1437
|
-
r !== void 0 &&
|
|
1437
|
+
r !== void 0 && Y.assertOptions(r, {
|
|
1438
1438
|
silentJSONParsing: C.transitional(C.boolean),
|
|
1439
1439
|
forcedJSONParsing: C.transitional(C.boolean),
|
|
1440
1440
|
clarifyTimeoutError: C.transitional(C.boolean)
|
|
1441
1441
|
}, !1), o != null && (a.isFunction(o) ? n.paramsSerializer = {
|
|
1442
1442
|
serialize: o
|
|
1443
|
-
} :
|
|
1443
|
+
} : Y.assertOptions(o, {
|
|
1444
1444
|
encode: C.function,
|
|
1445
1445
|
serialize: C.function
|
|
1446
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1446
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), Y.assertOptions(n, {
|
|
1447
1447
|
baseUrl: C.spelling("baseURL"),
|
|
1448
1448
|
withXsrfToken: C.spelling("withXSRFToken")
|
|
1449
1449
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1547,7 +1547,7 @@ let mr = class At {
|
|
|
1547
1547
|
r.unsubscribe(s);
|
|
1548
1548
|
}, i;
|
|
1549
1549
|
}, t(function(s, i, c) {
|
|
1550
|
-
r.reason || (r.reason = new
|
|
1550
|
+
r.reason || (r.reason = new B(s, i, c), n(r.reason));
|
|
1551
1551
|
});
|
|
1552
1552
|
}
|
|
1553
1553
|
/**
|
|
@@ -1678,13 +1678,13 @@ function _t(e) {
|
|
|
1678
1678
|
return _t(F(e, o));
|
|
1679
1679
|
}, n;
|
|
1680
1680
|
}
|
|
1681
|
-
const b = _t(
|
|
1681
|
+
const b = _t(K);
|
|
1682
1682
|
b.Axios = N;
|
|
1683
|
-
b.CanceledError =
|
|
1683
|
+
b.CanceledError = B;
|
|
1684
1684
|
b.CancelToken = mr;
|
|
1685
1685
|
b.isCancel = wt;
|
|
1686
1686
|
b.VERSION = Ot;
|
|
1687
|
-
b.toFormData =
|
|
1687
|
+
b.toFormData = ae;
|
|
1688
1688
|
b.AxiosError = y;
|
|
1689
1689
|
b.Cancel = b.CanceledError;
|
|
1690
1690
|
b.all = function(t) {
|
|
@@ -1717,7 +1717,7 @@ const {
|
|
|
1717
1717
|
mergeConfig: fo
|
|
1718
1718
|
} = b;
|
|
1719
1719
|
/*! js-cookie v3.0.5 | MIT */
|
|
1720
|
-
function
|
|
1720
|
+
function X(e) {
|
|
1721
1721
|
for (var t = 1; t < arguments.length; t++) {
|
|
1722
1722
|
var n = arguments[t];
|
|
1723
1723
|
for (var r in n)
|
|
@@ -1739,7 +1739,7 @@ var gr = {
|
|
|
1739
1739
|
function Se(e, t) {
|
|
1740
1740
|
function n(o, s, i) {
|
|
1741
1741
|
if (!(typeof document > "u")) {
|
|
1742
|
-
i =
|
|
1742
|
+
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);
|
|
1743
1743
|
var c = "";
|
|
1744
1744
|
for (var f in i)
|
|
1745
1745
|
i[f] && (c += "; " + f, i[f] !== !0 && (c += "=" + i[f].split(";")[0]));
|
|
@@ -1768,16 +1768,16 @@ function Se(e, t) {
|
|
|
1768
1768
|
n(
|
|
1769
1769
|
o,
|
|
1770
1770
|
"",
|
|
1771
|
-
|
|
1771
|
+
X({}, s, {
|
|
1772
1772
|
expires: -1
|
|
1773
1773
|
})
|
|
1774
1774
|
);
|
|
1775
1775
|
},
|
|
1776
1776
|
withAttributes: function(o) {
|
|
1777
|
-
return Se(this.converter,
|
|
1777
|
+
return Se(this.converter, X({}, this.attributes, o));
|
|
1778
1778
|
},
|
|
1779
1779
|
withConverter: function(o) {
|
|
1780
|
-
return Se(
|
|
1780
|
+
return Se(X({}, this.converter, o), this.attributes);
|
|
1781
1781
|
}
|
|
1782
1782
|
},
|
|
1783
1783
|
{
|
|
@@ -1851,7 +1851,7 @@ function Cr(e = xr, t = {}) {
|
|
|
1851
1851
|
events: o = _r,
|
|
1852
1852
|
window: s = Ct,
|
|
1853
1853
|
eventFilter: i = Tr(50)
|
|
1854
|
-
} = t, c =
|
|
1854
|
+
} = t, c = ee(n), f = ee(Je());
|
|
1855
1855
|
let u;
|
|
1856
1856
|
const l = Sr(i, () => {
|
|
1857
1857
|
c.value = !1, f.value = Je(), clearTimeout(u), u = setTimeout(() => c.value = !0, e);
|
|
@@ -1932,14 +1932,14 @@ let Pt = (e = 21) => {
|
|
|
1932
1932
|
}
|
|
1933
1933
|
return t;
|
|
1934
1934
|
};
|
|
1935
|
-
const
|
|
1935
|
+
const H = (e) => new URL(location.href).searchParams.get(e), v = {
|
|
1936
1936
|
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
1937
1937
|
// 重定向到登录页
|
|
1938
1938
|
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
1939
1939
|
// 清除登录信息
|
|
1940
1940
|
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
1941
1941
|
// 通过code获取token
|
|
1942
|
-
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Ae(), Ir = "/home",
|
|
1942
|
+
}, { baseURL: Ze, noRedireLogin: vr = !1 } = Ae(), Ir = "/home", re = location.origin + Ir, M = {
|
|
1943
1943
|
response_type: "code",
|
|
1944
1944
|
scope: "sever",
|
|
1945
1945
|
client_id: "sys",
|
|
@@ -1950,7 +1950,7 @@ const M = (e) => new URL(location.href).searchParams.get(e), I = {
|
|
|
1950
1950
|
e.forEach((r) => {
|
|
1951
1951
|
n.delete(r);
|
|
1952
1952
|
}), t.search = n.toString(), window.history.replaceState({}, "", t);
|
|
1953
|
-
}, Ut =
|
|
1953
|
+
}, Ut = ee(!1), Lt = (e) => {
|
|
1954
1954
|
if (e <= 0) return;
|
|
1955
1955
|
const { idle: t } = Cr(e);
|
|
1956
1956
|
Oe(
|
|
@@ -1963,9 +1963,9 @@ const M = (e) => new URL(location.href).searchParams.get(e), I = {
|
|
|
1963
1963
|
localStorage.getItem("idelTime") && Lt(Number(localStorage.getItem("idelTime")));
|
|
1964
1964
|
let et = "";
|
|
1965
1965
|
const Br = async () => {
|
|
1966
|
-
const e =
|
|
1966
|
+
const e = H("code") || "", t = H("redirect_url") || "/", n = H("kingdee_token") || "";
|
|
1967
1967
|
if (!e) return D();
|
|
1968
|
-
const r =
|
|
1968
|
+
const r = H("loginType") || "";
|
|
1969
1969
|
if (!localStorage.getItem("loginType") && r && localStorage.setItem("loginType", r), e === et)
|
|
1970
1970
|
return Ye(["code", "state", "kingdee_token", "redirect_url"]), window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t)), D();
|
|
1971
1971
|
et = e, Ye(["code", "state", "kingdee_token", "redirect_url", "loginType"]);
|
|
@@ -1973,20 +1973,20 @@ const Br = async () => {
|
|
|
1973
1973
|
const s = {
|
|
1974
1974
|
grant_type: "authorization_code",
|
|
1975
1975
|
code: e,
|
|
1976
|
-
client_id:
|
|
1977
|
-
client_secret:
|
|
1978
|
-
redirect_uri:
|
|
1976
|
+
client_id: M.client_id,
|
|
1977
|
+
client_secret: M.client_secret,
|
|
1978
|
+
redirect_uri: re,
|
|
1979
1979
|
timestamp: (/* @__PURE__ */ new Date()).getTime(),
|
|
1980
1980
|
nonce: Pt()
|
|
1981
1981
|
};
|
|
1982
1982
|
n && (sessionStorage.setItem("kingdee_token", n), s.redirect_uri = `${s.redirect_uri}?kingdee_token=${n}`);
|
|
1983
1983
|
try {
|
|
1984
|
-
await b.create().get(
|
|
1984
|
+
await b.create().get(v.token, { baseURL: Ze });
|
|
1985
1985
|
} catch {
|
|
1986
1986
|
}
|
|
1987
1987
|
try {
|
|
1988
1988
|
o = await b.create().post(
|
|
1989
|
-
|
|
1989
|
+
v.token,
|
|
1990
1990
|
{},
|
|
1991
1991
|
{
|
|
1992
1992
|
baseURL: Ze,
|
|
@@ -2003,20 +2003,21 @@ const Br = async () => {
|
|
|
2003
2003
|
refreshToken: f,
|
|
2004
2004
|
info: o.data
|
|
2005
2005
|
};
|
|
2006
|
-
|
|
2006
|
+
z().save(l), await tt(i);
|
|
2007
2007
|
const d = Number(u) - (/* @__PURE__ */ new Date()).getTime();
|
|
2008
2008
|
return d && d > 0 && (Lt(d), d && localStorage.setItem("idelTime", d.toString())), t && (window.__isAutoCloseApp = !1, window.location.replace(decodeURIComponent(t))), i;
|
|
2009
2009
|
} catch {
|
|
2010
|
-
return
|
|
2010
|
+
return ue({ ...M, redirect_uri: re });
|
|
2011
2011
|
}
|
|
2012
|
-
},
|
|
2012
|
+
}, q = ee(!1), po = async (e) => {
|
|
2013
2013
|
var o;
|
|
2014
2014
|
if (e.public) return "";
|
|
2015
|
-
if (Ut.value)
|
|
2016
|
-
|
|
2015
|
+
if (Ut.value)
|
|
2016
|
+
return ue({ ...M, redirect_uri: re });
|
|
2017
|
+
if (q.value)
|
|
2017
2018
|
return await new Promise(async (s) => {
|
|
2018
2019
|
Oe(
|
|
2019
|
-
() =>
|
|
2020
|
+
() => q.value,
|
|
2020
2021
|
(i) => {
|
|
2021
2022
|
if (!i) {
|
|
2022
2023
|
const c = D();
|
|
@@ -2025,15 +2026,14 @@ const Br = async () => {
|
|
|
2025
2026
|
}
|
|
2026
2027
|
);
|
|
2027
2028
|
});
|
|
2028
|
-
const { accessTokenExpiredAt: t } =
|
|
2029
|
-
|
|
2030
|
-
return J({ ...v, redirect_uri: z });
|
|
2029
|
+
const { accessTokenExpiredAt: t } = z().getData(), n = H("code") || "";
|
|
2030
|
+
(o = window.webConfig) != null && o.disableSaveToken || D();
|
|
2031
2031
|
let r = D();
|
|
2032
|
-
|
|
2032
|
+
q.value = !0;
|
|
2033
2033
|
try {
|
|
2034
|
-
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await Hr(
|
|
2034
|
+
typeof t == "number" && t > 0 && +/* @__PURE__ */ new Date() + 6e4 > t && (r = await Hr(M)), r = await Br(), q.value = !1;
|
|
2035
2035
|
} catch {
|
|
2036
|
-
|
|
2036
|
+
q.value = !1;
|
|
2037
2037
|
}
|
|
2038
2038
|
return r;
|
|
2039
2039
|
}, jr = () => {
|
|
@@ -2044,34 +2044,34 @@ const Br = async () => {
|
|
|
2044
2044
|
const r = `https://iam.shenyejituan.com:443/idp/profile/OAUTH2/Redirect/GLO?redirctToUrl=${encodeURIComponent(e)}&entityId=AIoT&redirectToLogin=true`;
|
|
2045
2045
|
localStorage.removeItem("thirdLogouSource"), location.href = r;
|
|
2046
2046
|
}
|
|
2047
|
-
},
|
|
2047
|
+
}, ue = (e) => {
|
|
2048
2048
|
if (vr) return;
|
|
2049
2049
|
const t = { ...e }, n = localStorage.getItem("loginType");
|
|
2050
2050
|
n && (t.loginType = n);
|
|
2051
2051
|
const { baseURL: r, ssoLocale: o } = Ae();
|
|
2052
2052
|
if (Re) return Re(t);
|
|
2053
2053
|
t.logout = "true", o && (t.locale = "locale");
|
|
2054
|
-
const s = Object.keys(t).filter((c) => c !== "client_secret").map((c) => `${c}=${t[c]}`).join("&"), i = `${r}${
|
|
2055
|
-
if (localStorage.removeItem("idelTime"), localStorage.removeItem("loginType"), sessionStorage.clear(),
|
|
2054
|
+
const s = Object.keys(t).filter((c) => c !== "client_secret").map((c) => `${c}=${t[c]}`).join("&"), i = `${r}${v.oauth}?${s}`;
|
|
2055
|
+
if (localStorage.removeItem("idelTime"), localStorage.removeItem("loginType"), sessionStorage.clear(), z().remove(), jr())
|
|
2056
2056
|
qr(i);
|
|
2057
2057
|
else {
|
|
2058
2058
|
try {
|
|
2059
|
-
b.create().get(
|
|
2059
|
+
b.create().get(v.logoutCurpage, { baseURL: r });
|
|
2060
2060
|
} catch {
|
|
2061
2061
|
}
|
|
2062
2062
|
window.__isAutoCloseApp = !1, location.replace(i);
|
|
2063
2063
|
}
|
|
2064
2064
|
};
|
|
2065
|
-
Dr(
|
|
2065
|
+
Dr(ue);
|
|
2066
2066
|
const Hr = async (e) => {
|
|
2067
|
-
const { baseURL: t } = Ae(), { refreshToken: n } =
|
|
2067
|
+
const { baseURL: t } = Ae(), { refreshToken: n } = z().getData();
|
|
2068
2068
|
try {
|
|
2069
|
-
await b.create().get(
|
|
2069
|
+
await b.create().get(v.token, { baseURL: t });
|
|
2070
2070
|
} catch {
|
|
2071
2071
|
}
|
|
2072
2072
|
try {
|
|
2073
2073
|
const r = await b.create().post(
|
|
2074
|
-
|
|
2074
|
+
v.token,
|
|
2075
2075
|
{},
|
|
2076
2076
|
{
|
|
2077
2077
|
baseURL: t,
|
|
@@ -2090,11 +2090,11 @@ const Hr = async (e) => {
|
|
|
2090
2090
|
refreshToken: i,
|
|
2091
2091
|
info: r.data
|
|
2092
2092
|
};
|
|
2093
|
-
return
|
|
2093
|
+
return z().save(c), await tt(o), o;
|
|
2094
2094
|
} catch {
|
|
2095
|
-
return
|
|
2095
|
+
return ue({ ...e, redirect_uri: re });
|
|
2096
2096
|
}
|
|
2097
|
-
},
|
|
2097
|
+
}, z = () => ({
|
|
2098
2098
|
getData: () => ({
|
|
2099
2099
|
accessToken: D(),
|
|
2100
2100
|
accessTokenExpiredAt: fe("accessTokenExpiredAt") ? Number(fe("accessTokenExpiredAt")) : "",
|
|
@@ -2111,11 +2111,11 @@ const Hr = async (e) => {
|
|
|
2111
2111
|
}
|
|
2112
2112
|
});
|
|
2113
2113
|
export {
|
|
2114
|
-
|
|
2114
|
+
H as getQuery,
|
|
2115
2115
|
po as getToken,
|
|
2116
2116
|
Br as getTokenFromCode,
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2117
|
+
M as getTokenParams,
|
|
2118
|
+
ue as login,
|
|
2119
|
+
re as real_uri,
|
|
2120
|
+
z as tokenStorage
|
|
2121
2121
|
};
|