@das-fed/upf-utils 6.4.0-dev.210 → 6.4.0-dev.211
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/es5.js +2 -2
- package/api-services/index.js +2 -7
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +2 -2
- package/api-services/modules/app-manage/index.js +2 -7
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +2 -2
- package/api-services/modules/authentication/index.js +2 -7
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +2 -2
- package/api-services/modules/bems/index.js +2 -7
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +967 -955
- package/api-services/modules/contract/index.js +788 -775
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +977 -965
- package/api-services/modules/duty-manage/index.js +797 -784
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +2 -2
- package/api-services/modules/enterpriseright/index.js +2 -7
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +2 -2
- package/api-services/modules/file/es5.js +1243 -1255
- package/api-services/modules/file/index.js +1036 -1059
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +955 -967
- package/api-services/modules/gateway-edge/index.js +770 -793
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +2 -7
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +850 -847
- package/api-services/modules/iot/index.js +661 -662
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +803 -801
- package/api-services/modules/justauth/index.js +624 -625
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +955 -967
- package/api-services/modules/knowledge/index.js +770 -793
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +832 -835
- package/api-services/modules/link/index.js +644 -653
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +2 -2
- package/api-services/modules/permission/index.js +2 -7
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +941 -953
- package/api-services/modules/platformManage/index.js +754 -777
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +2 -2
- package/api-services/modules/portal/index.js +2 -7
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +2 -2
- package/api-services/modules/space-manage/index.js +2 -7
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +2 -2
- package/api-services/modules/super-admin/index.js +2 -7
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +976 -988
- package/api-services/modules/supplier/index.js +787 -810
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +967 -955
- package/api-services/modules/supplychain-manage/index.js +788 -775
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +2 -2
- package/api-services/modules/systemConfiguration/index.js +2 -7
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +955 -967
- package/api-services/modules/tool/index.js +770 -793
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +938 -929
- package/api-services/src/create-service/index.js +763 -754
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +22 -24
- package/common-info/getInfoFromUrl/es5.js +40 -40
- package/common-info/getInfoFromUrl/index.js +36 -36
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.js +17 -21
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.js +22 -22
- package/common-info/set-personal-info/index.js +20 -25
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/es5.js +2 -2
- package/common-tools/extract-file-name/index.js +2 -7
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/handle-data/es5.js +111 -118
- package/common-tools/handle-data/index.js +86 -89
- package/common-tools/handle-data/index.js.gz +0 -0
- package/create-api-service/check-token/es5.js +125 -127
- package/create-api-service/check-token/index.js +118 -123
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/es5.js +962 -952
- package/create-api-service/index.js +782 -773
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/es5.js +3 -3
- package/create-api-service/sso/index.js +3 -8
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/es5.js +2 -2
- package/curring-http/index.js +2 -7
- package/curring-http/index.js.gz +0 -0
- package/front-end/i18n/front-end-page/dasutils_en-US.js +20 -1
- package/front-end/i18n/front-end-page/dasutils_zh-CN.js +19 -1
- package/front-end/i18n/front-end-page/dasutils_zh-MO.js +19 -1
- package/package.json +4 -4
- package/pinyin-first-character/es5.js +1 -1
- package/pinyin-first-character/index.js +1 -1
- package/pinyin-first-character/index.js.gz +0 -0
- package/webSocket-service/es5.js +41 -53
- package/webSocket-service/index.js +40 -50
- package/webSocket-service/index.js.gz +0 -0
|
@@ -4,7 +4,7 @@ function Le(e, t) {
|
|
|
4
4
|
return e.apply(t, arguments);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
|
-
const { toString: ot } = Object.prototype, { getPrototypeOf:
|
|
7
|
+
const { toString: ot } = Object.prototype, { getPrototypeOf: fe } = Object, { iterator: X, toStringTag: ke } = Symbol, G = /* @__PURE__ */ ((e) => (t) => {
|
|
8
8
|
const n = ot.call(t);
|
|
9
9
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
10
10
|
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => G(t) === e), Q = (e) => (t) => typeof t === e, { isArray: B } = Array, I = Q("undefined");
|
|
@@ -19,7 +19,7 @@ function at(e) {
|
|
|
19
19
|
const ct = Q("string"), A = Q("function"), De = Q("number"), Y = (e) => e !== null && typeof e == "object", lt = (e) => e === !0 || e === !1, J = (e) => {
|
|
20
20
|
if (G(e) !== "object")
|
|
21
21
|
return !1;
|
|
22
|
-
const t =
|
|
22
|
+
const t = fe(e);
|
|
23
23
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(ke in e) && !(X in e);
|
|
24
24
|
}, ut = C("Date"), ft = C("File"), dt = C("Blob"), pt = C("FileList"), ht = (e) => Y(e) && A(e.pipe), mt = (e) => {
|
|
25
25
|
let t;
|
|
@@ -50,10 +50,10 @@ function je(e, t) {
|
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
const U = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global, qe = (e) => !I(e) && e !== U;
|
|
53
|
-
function
|
|
53
|
+
function oe() {
|
|
54
54
|
const { caseless: e } = qe(this) && this || {}, t = {}, n = (r, s) => {
|
|
55
55
|
const o = e && je(t, s) || s;
|
|
56
|
-
J(t[o]) && J(r) ? t[o] =
|
|
56
|
+
J(t[o]) && J(r) ? t[o] = oe(t[o], r) : J(r) ? t[o] = oe({}, r) : B(r) ? t[o] = r.slice() : t[o] = r;
|
|
57
57
|
};
|
|
58
58
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
59
59
|
arguments[r] && M(arguments[r], n);
|
|
@@ -72,7 +72,7 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
|
72
72
|
do {
|
|
73
73
|
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0; )
|
|
74
74
|
i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = !0);
|
|
75
|
-
e = n !== !1 &&
|
|
75
|
+
e = n !== !1 && fe(e);
|
|
76
76
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
77
77
|
return t;
|
|
78
78
|
}, xt = (e, t, n) => {
|
|
@@ -88,7 +88,7 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
|
88
88
|
for (; t-- > 0; )
|
|
89
89
|
n[t] = e[t];
|
|
90
90
|
return n;
|
|
91
|
-
}, Nt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
91
|
+
}, Nt = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && fe(Uint8Array)), Pt = (e, t) => {
|
|
92
92
|
const r = (e && e[X]).call(e);
|
|
93
93
|
let s;
|
|
94
94
|
for (; (s = r.next()) && !s.done; ) {
|
|
@@ -106,7 +106,7 @@ const St = (e, t, n, { allOwnKeys: r } = {}) => (M(t, (s, o) => {
|
|
|
106
106
|
function(n, r, s) {
|
|
107
107
|
return r.toUpperCase() + s;
|
|
108
108
|
}
|
|
109
|
-
),
|
|
109
|
+
), ye = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), Lt = C("RegExp"), Ie = (e, t) => {
|
|
110
110
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
111
111
|
M(n, (s, o) => {
|
|
112
112
|
let i;
|
|
@@ -189,7 +189,7 @@ const It = (e) => {
|
|
|
189
189
|
isTypedArray: Nt,
|
|
190
190
|
isFileList: pt,
|
|
191
191
|
forEach: M,
|
|
192
|
-
merge:
|
|
192
|
+
merge: oe,
|
|
193
193
|
extend: St,
|
|
194
194
|
trim: gt,
|
|
195
195
|
stripBOM: Tt,
|
|
@@ -202,8 +202,8 @@ const It = (e) => {
|
|
|
202
202
|
forEachEntry: Pt,
|
|
203
203
|
matchAll: _t,
|
|
204
204
|
isHTMLForm: Ft,
|
|
205
|
-
hasOwnProperty:
|
|
206
|
-
hasOwnProp:
|
|
205
|
+
hasOwnProperty: ye,
|
|
206
|
+
hasOwnProp: ye,
|
|
207
207
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
208
208
|
reduceDescriptors: Ie,
|
|
209
209
|
freezeMethods: kt,
|
|
@@ -272,22 +272,22 @@ m.from = (e, t, n, r, s, o) => {
|
|
|
272
272
|
return f !== Error.prototype;
|
|
273
273
|
}, (c) => c !== "isAxiosError"), m.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
274
274
|
};
|
|
275
|
-
const
|
|
276
|
-
function
|
|
275
|
+
const Vt = null;
|
|
276
|
+
function ie(e) {
|
|
277
277
|
return a.isPlainObject(e) || a.isArray(e);
|
|
278
278
|
}
|
|
279
279
|
function Je(e) {
|
|
280
280
|
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
281
281
|
}
|
|
282
|
-
function
|
|
282
|
+
function we(e, t, n) {
|
|
283
283
|
return e ? e.concat(t).map(function(s, o) {
|
|
284
284
|
return s = Je(s), !n && o ? "[" + s + "]" : s;
|
|
285
285
|
}).join(n ? "." : "") : t;
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
return a.isArray(e) && !e.some(
|
|
287
|
+
function Wt(e) {
|
|
288
|
+
return a.isArray(e) && !e.some(ie);
|
|
289
289
|
}
|
|
290
|
-
const
|
|
290
|
+
const $t = a.toFlatObject(a, {}, null, function(t) {
|
|
291
291
|
return /^is[A-Z]/.test(t);
|
|
292
292
|
});
|
|
293
293
|
function Z(e, t, n) {
|
|
@@ -318,21 +318,21 @@ function Z(e, t, n) {
|
|
|
318
318
|
if (d && !h && typeof d == "object") {
|
|
319
319
|
if (a.endsWith(y, "{}"))
|
|
320
320
|
y = r ? y : y.slice(0, -2), d = JSON.stringify(d);
|
|
321
|
-
else if (a.isArray(d) &&
|
|
321
|
+
else if (a.isArray(d) && Wt(d) || (a.isFileList(d) || a.endsWith(y, "[]")) && (b = a.toArray(d)))
|
|
322
322
|
return y = Je(y), b.forEach(function(S, P) {
|
|
323
323
|
!(a.isUndefined(S) || S === null) && t.append(
|
|
324
324
|
// eslint-disable-next-line no-nested-ternary
|
|
325
|
-
i === !0 ?
|
|
325
|
+
i === !0 ? we([y], P, o) : i === null ? y : y + "[]",
|
|
326
326
|
l(S)
|
|
327
327
|
);
|
|
328
328
|
}), !1;
|
|
329
329
|
}
|
|
330
|
-
return
|
|
330
|
+
return ie(d) ? !0 : (t.append(we(h, y, o), l(d)), !1);
|
|
331
331
|
}
|
|
332
|
-
const p = [], w = Object.assign(
|
|
332
|
+
const p = [], w = Object.assign($t, {
|
|
333
333
|
defaultVisitor: u,
|
|
334
334
|
convertValue: l,
|
|
335
|
-
isVisitable:
|
|
335
|
+
isVisitable: ie
|
|
336
336
|
});
|
|
337
337
|
function R(d, y) {
|
|
338
338
|
if (!a.isUndefined(d)) {
|
|
@@ -353,7 +353,7 @@ function Z(e, t, n) {
|
|
|
353
353
|
throw new TypeError("data must be an object");
|
|
354
354
|
return R(e), t;
|
|
355
355
|
}
|
|
356
|
-
function
|
|
356
|
+
function be(e) {
|
|
357
357
|
const t = {
|
|
358
358
|
"!": "%21",
|
|
359
359
|
"'": "%27",
|
|
@@ -367,40 +367,40 @@ function Ee(e) {
|
|
|
367
367
|
return t[r];
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
|
-
function
|
|
370
|
+
function de(e, t) {
|
|
371
371
|
this._pairs = [], e && Z(e, this, t);
|
|
372
372
|
}
|
|
373
|
-
const
|
|
374
|
-
|
|
373
|
+
const Ve = de.prototype;
|
|
374
|
+
Ve.append = function(t, n) {
|
|
375
375
|
this._pairs.push([t, n]);
|
|
376
376
|
};
|
|
377
|
-
|
|
377
|
+
Ve.toString = function(t) {
|
|
378
378
|
const n = t ? function(r) {
|
|
379
|
-
return t.call(this, r,
|
|
380
|
-
} :
|
|
379
|
+
return t.call(this, r, be);
|
|
380
|
+
} : be;
|
|
381
381
|
return this._pairs.map(function(s) {
|
|
382
382
|
return n(s[0]) + "=" + n(s[1]);
|
|
383
383
|
}, "").join("&");
|
|
384
384
|
};
|
|
385
|
-
function
|
|
385
|
+
function vt(e) {
|
|
386
386
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function We(e, t, n) {
|
|
389
389
|
if (!t)
|
|
390
390
|
return e;
|
|
391
|
-
const r = n && n.encode ||
|
|
391
|
+
const r = n && n.encode || vt;
|
|
392
392
|
a.isFunction(n) && (n = {
|
|
393
393
|
serialize: n
|
|
394
394
|
});
|
|
395
395
|
const s = n && n.serialize;
|
|
396
396
|
let o;
|
|
397
|
-
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new
|
|
397
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new de(t, n).toString(r), o) {
|
|
398
398
|
const i = e.indexOf("#");
|
|
399
399
|
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
400
400
|
}
|
|
401
401
|
return e;
|
|
402
402
|
}
|
|
403
|
-
class
|
|
403
|
+
class Ee {
|
|
404
404
|
constructor() {
|
|
405
405
|
this.handlers = [];
|
|
406
406
|
}
|
|
@@ -454,25 +454,25 @@ class Re {
|
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
|
-
const
|
|
457
|
+
const $e = {
|
|
458
458
|
silentJSONParsing: !0,
|
|
459
459
|
forcedJSONParsing: !0,
|
|
460
460
|
clarifyTimeoutError: !1
|
|
461
|
-
},
|
|
461
|
+
}, Kt = typeof URLSearchParams < "u" ? URLSearchParams : de, Xt = typeof FormData < "u" ? FormData : null, Gt = typeof Blob < "u" ? Blob : null, Qt = {
|
|
462
462
|
isBrowser: !0,
|
|
463
463
|
classes: {
|
|
464
|
-
URLSearchParams:
|
|
464
|
+
URLSearchParams: Kt,
|
|
465
465
|
FormData: Xt,
|
|
466
466
|
Blob: Gt
|
|
467
467
|
},
|
|
468
468
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
469
|
-
},
|
|
470
|
-
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", en =
|
|
469
|
+
}, pe = typeof window < "u" && typeof document < "u", ae = typeof navigator == "object" && navigator || void 0, Yt = pe && (!ae || ["ReactNative", "NativeScript", "NS"].indexOf(ae.product) < 0), Zt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
470
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", en = pe && window.location.href || "http://localhost", tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
471
471
|
__proto__: null,
|
|
472
|
-
hasBrowserEnv:
|
|
472
|
+
hasBrowserEnv: pe,
|
|
473
473
|
hasStandardBrowserEnv: Yt,
|
|
474
474
|
hasStandardBrowserWebWorkerEnv: Zt,
|
|
475
|
-
navigator:
|
|
475
|
+
navigator: ae,
|
|
476
476
|
origin: en
|
|
477
477
|
}, Symbol.toStringTag, { value: "Module" })), T = {
|
|
478
478
|
...tn,
|
|
@@ -497,7 +497,7 @@ function sn(e) {
|
|
|
497
497
|
o = n[r], t[o] = e[o];
|
|
498
498
|
return t;
|
|
499
499
|
}
|
|
500
|
-
function
|
|
500
|
+
function ve(e) {
|
|
501
501
|
function t(n, r, s, o) {
|
|
502
502
|
let i = n[o++];
|
|
503
503
|
if (i === "__proto__") return !0;
|
|
@@ -523,12 +523,12 @@ function on(e, t, n) {
|
|
|
523
523
|
return (0, JSON.stringify)(e);
|
|
524
524
|
}
|
|
525
525
|
const H = {
|
|
526
|
-
transitional:
|
|
526
|
+
transitional: $e,
|
|
527
527
|
adapter: ["xhr", "http", "fetch"],
|
|
528
528
|
transformRequest: [function(t, n) {
|
|
529
529
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, o = a.isObject(t);
|
|
530
530
|
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t))
|
|
531
|
-
return s ? JSON.stringify(
|
|
531
|
+
return s ? JSON.stringify(ve(t)) : t;
|
|
532
532
|
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t))
|
|
533
533
|
return t;
|
|
534
534
|
if (a.isArrayBufferView(t))
|
|
@@ -616,12 +616,12 @@ const an = a.toObjectSet([
|
|
|
616
616
|
`).forEach(function(i) {
|
|
617
617
|
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && an[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
618
618
|
}), t;
|
|
619
|
-
},
|
|
619
|
+
}, Re = Symbol("internals");
|
|
620
620
|
function j(e) {
|
|
621
621
|
return e && String(e).trim().toLowerCase();
|
|
622
622
|
}
|
|
623
|
-
function
|
|
624
|
-
return e === !1 || e == null ? e : a.isArray(e) ? e.map(
|
|
623
|
+
function V(e) {
|
|
624
|
+
return e === !1 || e == null ? e : a.isArray(e) ? e.map(V) : String(e);
|
|
625
625
|
}
|
|
626
626
|
function ln(e) {
|
|
627
627
|
const t = /* @__PURE__ */ Object.create(null), n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
@@ -666,7 +666,7 @@ class x {
|
|
|
666
666
|
if (!u)
|
|
667
667
|
throw new Error("header name must be a non-empty string");
|
|
668
668
|
const p = a.findKey(s, u);
|
|
669
|
-
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || f] =
|
|
669
|
+
(!p || s[p] === void 0 || l === !0 || l === void 0 && s[p] !== !1) && (s[p || f] = V(c));
|
|
670
670
|
}
|
|
671
671
|
const i = (c, f) => a.forEach(c, (l, u) => o(l, u, f));
|
|
672
672
|
if (a.isPlainObject(t) || t instanceof this.constructor)
|
|
@@ -734,11 +734,11 @@ class x {
|
|
|
734
734
|
return a.forEach(this, (s, o) => {
|
|
735
735
|
const i = a.findKey(r, o);
|
|
736
736
|
if (i) {
|
|
737
|
-
n[i] =
|
|
737
|
+
n[i] = V(s), delete n[o];
|
|
738
738
|
return;
|
|
739
739
|
}
|
|
740
740
|
const c = t ? fn(o) : String(o).trim();
|
|
741
|
-
c !== o && delete n[o], n[c] =
|
|
741
|
+
c !== o && delete n[o], n[c] = V(s), r[c] = !0;
|
|
742
742
|
}), this;
|
|
743
743
|
}
|
|
744
744
|
concat(...t) {
|
|
@@ -771,7 +771,7 @@ class x {
|
|
|
771
771
|
return n.forEach((s) => r.set(s)), r;
|
|
772
772
|
}
|
|
773
773
|
static accessor(t) {
|
|
774
|
-
const r = (this[
|
|
774
|
+
const r = (this[Re] = this[Re] = {
|
|
775
775
|
accessors: {}
|
|
776
776
|
}).accessors, s = this.prototype;
|
|
777
777
|
function o(i) {
|
|
@@ -799,7 +799,7 @@ function re(e, t) {
|
|
|
799
799
|
o = c.call(n, o, s.normalize(), t ? t.status : void 0);
|
|
800
800
|
}), s.normalize(), o;
|
|
801
801
|
}
|
|
802
|
-
function
|
|
802
|
+
function Ke(e) {
|
|
803
803
|
return !!(e && e.__CANCEL__);
|
|
804
804
|
}
|
|
805
805
|
function D(e, t, n) {
|
|
@@ -850,7 +850,7 @@ function mn(e, t) {
|
|
|
850
850
|
}, r - p)));
|
|
851
851
|
}, () => s && i(s)];
|
|
852
852
|
}
|
|
853
|
-
const
|
|
853
|
+
const v = (e, t, n = 3) => {
|
|
854
854
|
let r = 0;
|
|
855
855
|
const s = hn(50, 250);
|
|
856
856
|
return mn((o) => {
|
|
@@ -869,14 +869,14 @@ const K = (e, t, n = 3) => {
|
|
|
869
869
|
};
|
|
870
870
|
e(p);
|
|
871
871
|
}, n);
|
|
872
|
-
},
|
|
872
|
+
}, ge = (e, t) => {
|
|
873
873
|
const n = e != null;
|
|
874
874
|
return [(r) => t[0]({
|
|
875
875
|
lengthComputable: n,
|
|
876
876
|
total: e,
|
|
877
877
|
loaded: r
|
|
878
878
|
}), t[1]];
|
|
879
|
-
},
|
|
879
|
+
}, Se = (e) => (...t) => a.asap(() => e(...t)), yn = 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)))(
|
|
880
880
|
new URL(T.origin),
|
|
881
881
|
T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)
|
|
882
882
|
) : () => !0, wn = T.hasStandardBrowserEnv ? (
|
|
@@ -916,7 +916,7 @@ function Ge(e, t, n) {
|
|
|
916
916
|
let r = !bn(t);
|
|
917
917
|
return e && (r || n == !1) ? En(e, t) : t;
|
|
918
918
|
}
|
|
919
|
-
const
|
|
919
|
+
const Te = (e) => e instanceof x ? { ...e } : e;
|
|
920
920
|
function k(e, t) {
|
|
921
921
|
t = t || {};
|
|
922
922
|
const n = {};
|
|
@@ -974,7 +974,7 @@ function k(e, t) {
|
|
|
974
974
|
socketPath: i,
|
|
975
975
|
responseEncoding: i,
|
|
976
976
|
validateStatus: c,
|
|
977
|
-
headers: (l, u, p) => s(
|
|
977
|
+
headers: (l, u, p) => s(Te(l), Te(u), p, !0)
|
|
978
978
|
};
|
|
979
979
|
return a.forEach(Object.keys(Object.assign({}, e, t)), function(u) {
|
|
980
980
|
const p = f[u] || s, w = p(e[u], t[u], u);
|
|
@@ -984,7 +984,7 @@ function k(e, t) {
|
|
|
984
984
|
const Qe = (e) => {
|
|
985
985
|
const t = k({}, e);
|
|
986
986
|
let { data: n, withXSRFToken: r, xsrfHeaderName: s, xsrfCookieName: o, headers: i, auth: c } = t;
|
|
987
|
-
t.headers = i = x.from(i), t.url =
|
|
987
|
+
t.headers = i = x.from(i), t.url = We(Ge(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set(
|
|
988
988
|
"Authorization",
|
|
989
989
|
"Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : ""))
|
|
990
990
|
);
|
|
@@ -1040,7 +1040,7 @@ const Qe = (e) => {
|
|
|
1040
1040
|
r(new m("Network Error", m.ERR_NETWORK, e, h)), h = null;
|
|
1041
1041
|
}, h.ontimeout = function() {
|
|
1042
1042
|
let P = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1043
|
-
const O = s.transitional ||
|
|
1043
|
+
const O = s.transitional || $e;
|
|
1044
1044
|
s.timeoutErrorMessage && (P = s.timeoutErrorMessage), r(new m(
|
|
1045
1045
|
P,
|
|
1046
1046
|
O.clarifyTimeoutError ? m.ETIMEDOUT : m.ECONNABORTED,
|
|
@@ -1049,7 +1049,7 @@ const Qe = (e) => {
|
|
|
1049
1049
|
)), h = null;
|
|
1050
1050
|
}, o === void 0 && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function(P, O) {
|
|
1051
1051
|
h.setRequestHeader(O, P);
|
|
1052
|
-
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, d] =
|
|
1052
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), l && ([w, d] = v(l, !0), h.addEventListener("progress", w)), f && h.upload && ([p, R] = v(f), h.upload.addEventListener("progress", p), h.upload.addEventListener("loadend", R)), (s.cancelToken || s.signal) && (u = (S) => {
|
|
1053
1053
|
h && (r(!S || S.type ? new D(null, e, h) : S), h.abort(), h = null);
|
|
1054
1054
|
}, s.cancelToken && s.cancelToken.subscribe(u), s.signal && (s.signal.aborted ? u() : s.signal.addEventListener("abort", u)));
|
|
1055
1055
|
const g = pn(s.url);
|
|
@@ -1110,7 +1110,7 @@ const Qe = (e) => {
|
|
|
1110
1110
|
} finally {
|
|
1111
1111
|
await t.cancel();
|
|
1112
1112
|
}
|
|
1113
|
-
},
|
|
1113
|
+
}, Oe = (e, t, n, r) => {
|
|
1114
1114
|
const s = On(e, t);
|
|
1115
1115
|
let o = 0, i, c = (f) => {
|
|
1116
1116
|
i || (i = !0, r && r(f));
|
|
@@ -1155,12 +1155,12 @@ const Qe = (e) => {
|
|
|
1155
1155
|
}
|
|
1156
1156
|
}).headers.has("Content-Type");
|
|
1157
1157
|
return e && !t;
|
|
1158
|
-
}),
|
|
1159
|
-
stream:
|
|
1158
|
+
}), Ae = 64 * 1024, ce = Ye && Ze(() => a.isReadableStream(new Response("").body)), K = {
|
|
1159
|
+
stream: ce && ((e) => e.body)
|
|
1160
1160
|
};
|
|
1161
1161
|
ee && ((e) => {
|
|
1162
1162
|
["text", "arrayBuffer", "blob", "formData", "stream"].forEach((t) => {
|
|
1163
|
-
!
|
|
1163
|
+
!K[t] && (K[t] = a.isFunction(e[t]) ? (n) => n[t]() : (n, r) => {
|
|
1164
1164
|
throw new m(`Response type '${t}' is not supported`, m.ERR_NOT_SUPPORT, r);
|
|
1165
1165
|
});
|
|
1166
1166
|
});
|
|
@@ -1211,11 +1211,11 @@ const Nn = async (e) => {
|
|
|
1211
1211
|
duplex: "half"
|
|
1212
1212
|
}), _;
|
|
1213
1213
|
if (a.isFormData(r) && (_ = O.headers.get("content-type")) && u.setContentType(_), O.body) {
|
|
1214
|
-
const [F, z] =
|
|
1214
|
+
const [F, z] = ge(
|
|
1215
1215
|
h,
|
|
1216
|
-
|
|
1216
|
+
v(Se(f))
|
|
1217
1217
|
);
|
|
1218
|
-
r =
|
|
1218
|
+
r = Oe(O.body, Ae, F, z);
|
|
1219
1219
|
}
|
|
1220
1220
|
}
|
|
1221
1221
|
a.isString(p) || (p = p ? "include" : "omit");
|
|
@@ -1230,25 +1230,25 @@ const Nn = async (e) => {
|
|
|
1230
1230
|
credentials: b ? p : void 0
|
|
1231
1231
|
});
|
|
1232
1232
|
let g = await fetch(d, w);
|
|
1233
|
-
const S =
|
|
1234
|
-
if (
|
|
1233
|
+
const S = ce && (l === "stream" || l === "response");
|
|
1234
|
+
if (ce && (c || S && y)) {
|
|
1235
1235
|
const O = {};
|
|
1236
|
-
["status", "statusText", "headers"].forEach((
|
|
1237
|
-
O[
|
|
1236
|
+
["status", "statusText", "headers"].forEach((me) => {
|
|
1237
|
+
O[me] = g[me];
|
|
1238
1238
|
});
|
|
1239
|
-
const _ = a.toFiniteNumber(g.headers.get("content-length")), [F, z] = c &&
|
|
1239
|
+
const _ = a.toFiniteNumber(g.headers.get("content-length")), [F, z] = c && ge(
|
|
1240
1240
|
_,
|
|
1241
|
-
|
|
1241
|
+
v(Se(c), !0)
|
|
1242
1242
|
) || [];
|
|
1243
1243
|
g = new Response(
|
|
1244
|
-
|
|
1244
|
+
Oe(g.body, Ae, F, () => {
|
|
1245
1245
|
z && z(), y && y();
|
|
1246
1246
|
}),
|
|
1247
1247
|
O
|
|
1248
1248
|
);
|
|
1249
1249
|
}
|
|
1250
1250
|
l = l || "text";
|
|
1251
|
-
let P = await
|
|
1251
|
+
let P = await K[a.findKey(K, l) || "text"](g, e);
|
|
1252
1252
|
return !S && y && y(), await new Promise((O, _) => {
|
|
1253
1253
|
Xe(O, _, {
|
|
1254
1254
|
data: P,
|
|
@@ -1267,12 +1267,12 @@ const Nn = async (e) => {
|
|
|
1267
1267
|
}
|
|
1268
1268
|
) : m.from(b, b && b.code, e, d);
|
|
1269
1269
|
}
|
|
1270
|
-
}),
|
|
1271
|
-
http:
|
|
1270
|
+
}), le = {
|
|
1271
|
+
http: Vt,
|
|
1272
1272
|
xhr: gn,
|
|
1273
1273
|
fetch: _n
|
|
1274
1274
|
};
|
|
1275
|
-
a.forEach(
|
|
1275
|
+
a.forEach(le, (e, t) => {
|
|
1276
1276
|
if (e) {
|
|
1277
1277
|
try {
|
|
1278
1278
|
Object.defineProperty(e, "name", { value: t });
|
|
@@ -1281,7 +1281,7 @@ a.forEach(ue, (e, t) => {
|
|
|
1281
1281
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1282
1282
|
}
|
|
1283
1283
|
});
|
|
1284
|
-
const
|
|
1284
|
+
const xe = (e) => `- ${e}`, Fn = (e) => a.isFunction(e) || e === null || e === !1, et = {
|
|
1285
1285
|
getAdapter: (e) => {
|
|
1286
1286
|
e = a.isArray(e) ? e : [e];
|
|
1287
1287
|
const { length: t } = e;
|
|
@@ -1290,7 +1290,7 @@ const Ce = (e) => `- ${e}`, Fn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1290
1290
|
for (let o = 0; o < t; o++) {
|
|
1291
1291
|
n = e[o];
|
|
1292
1292
|
let i;
|
|
1293
|
-
if (r = n, !Fn(n) && (r =
|
|
1293
|
+
if (r = n, !Fn(n) && (r = le[(i = String(n)).toLowerCase()], r === void 0))
|
|
1294
1294
|
throw new m(`Unknown adapter '${i}'`);
|
|
1295
1295
|
if (r)
|
|
1296
1296
|
break;
|
|
@@ -1301,8 +1301,8 @@ const Ce = (e) => `- ${e}`, Fn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1301
1301
|
([c, f]) => `adapter ${c} ` + (f === !1 ? "is not supported by the environment" : "is not available in the build")
|
|
1302
1302
|
);
|
|
1303
1303
|
let i = t ? o.length > 1 ? `since :
|
|
1304
|
-
` + o.map(
|
|
1305
|
-
`) : " " +
|
|
1304
|
+
` + o.map(xe).join(`
|
|
1305
|
+
`) : " " + xe(o[0]) : "as no adapter specified";
|
|
1306
1306
|
throw new m(
|
|
1307
1307
|
"There is no suitable adapter to dispatch the request " + i,
|
|
1308
1308
|
"ERR_NOT_SUPPORT"
|
|
@@ -1310,13 +1310,13 @@ const Ce = (e) => `- ${e}`, Fn = (e) => a.isFunction(e) || e === null || e === !
|
|
|
1310
1310
|
}
|
|
1311
1311
|
return r;
|
|
1312
1312
|
},
|
|
1313
|
-
adapters:
|
|
1313
|
+
adapters: le
|
|
1314
1314
|
};
|
|
1315
1315
|
function se(e) {
|
|
1316
1316
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
1317
1317
|
throw new D(null, e);
|
|
1318
1318
|
}
|
|
1319
|
-
function
|
|
1319
|
+
function Ce(e) {
|
|
1320
1320
|
return se(e), e.headers = x.from(e.headers), e.data = re.call(
|
|
1321
1321
|
e,
|
|
1322
1322
|
e.transformRequest
|
|
@@ -1327,7 +1327,7 @@ function Ne(e) {
|
|
|
1327
1327
|
r
|
|
1328
1328
|
), r.headers = x.from(r.headers), r;
|
|
1329
1329
|
}, function(r) {
|
|
1330
|
-
return
|
|
1330
|
+
return Ke(r) || (se(e), r && r.response && (r.response.data = re.call(
|
|
1331
1331
|
e,
|
|
1332
1332
|
e.transformResponse,
|
|
1333
1333
|
r.response
|
|
@@ -1340,7 +1340,7 @@ const tt = "1.10.0", te = {};
|
|
|
1340
1340
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1341
1341
|
};
|
|
1342
1342
|
});
|
|
1343
|
-
const
|
|
1343
|
+
const Ne = {};
|
|
1344
1344
|
te.transitional = function(t, n, r) {
|
|
1345
1345
|
function s(o, i) {
|
|
1346
1346
|
return "[Axios v" + tt + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
@@ -1351,16 +1351,11 @@ te.transitional = function(t, n, r) {
|
|
|
1351
1351
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1352
1352
|
m.ERR_DEPRECATED
|
|
1353
1353
|
);
|
|
1354
|
-
return n && !
|
|
1355
|
-
s(
|
|
1356
|
-
i,
|
|
1357
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1358
|
-
)
|
|
1359
|
-
)), t ? t(o, i, c) : !0;
|
|
1354
|
+
return n && !Ne[i] && (Ne[i] = !0), t ? t(o, i, c) : !0;
|
|
1360
1355
|
};
|
|
1361
1356
|
};
|
|
1362
1357
|
te.spelling = function(t) {
|
|
1363
|
-
return (n, r) =>
|
|
1358
|
+
return (n, r) => !0;
|
|
1364
1359
|
};
|
|
1365
1360
|
function Un(e, t, n) {
|
|
1366
1361
|
if (typeof e != "object")
|
|
@@ -1379,15 +1374,15 @@ function Un(e, t, n) {
|
|
|
1379
1374
|
throw new m("Unknown option " + o, m.ERR_BAD_OPTION);
|
|
1380
1375
|
}
|
|
1381
1376
|
}
|
|
1382
|
-
const
|
|
1377
|
+
const W = {
|
|
1383
1378
|
assertOptions: Un,
|
|
1384
1379
|
validators: te
|
|
1385
|
-
}, N =
|
|
1380
|
+
}, N = W.validators;
|
|
1386
1381
|
class L {
|
|
1387
1382
|
constructor(t) {
|
|
1388
1383
|
this.defaults = t || {}, this.interceptors = {
|
|
1389
|
-
request: new
|
|
1390
|
-
response: new
|
|
1384
|
+
request: new Ee(),
|
|
1385
|
+
response: new Ee()
|
|
1391
1386
|
};
|
|
1392
1387
|
}
|
|
1393
1388
|
/**
|
|
@@ -1418,16 +1413,16 @@ class L {
|
|
|
1418
1413
|
_request(t, n) {
|
|
1419
1414
|
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = k(this.defaults, n);
|
|
1420
1415
|
const { transitional: r, paramsSerializer: s, headers: o } = n;
|
|
1421
|
-
r !== void 0 &&
|
|
1416
|
+
r !== void 0 && W.assertOptions(r, {
|
|
1422
1417
|
silentJSONParsing: N.transitional(N.boolean),
|
|
1423
1418
|
forcedJSONParsing: N.transitional(N.boolean),
|
|
1424
1419
|
clarifyTimeoutError: N.transitional(N.boolean)
|
|
1425
1420
|
}, !1), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1426
1421
|
serialize: s
|
|
1427
|
-
} :
|
|
1422
|
+
} : W.assertOptions(s, {
|
|
1428
1423
|
encode: N.function,
|
|
1429
1424
|
serialize: N.function
|
|
1430
|
-
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0),
|
|
1425
|
+
}, !0)), n.allowAbsoluteUrls !== void 0 || (this.defaults.allowAbsoluteUrls !== void 0 ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = !0), W.assertOptions(n, {
|
|
1431
1426
|
baseUrl: N.spelling("baseURL"),
|
|
1432
1427
|
withXsrfToken: N.spelling("withXSRFToken")
|
|
1433
1428
|
}, !0), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
@@ -1452,7 +1447,7 @@ class L {
|
|
|
1452
1447
|
});
|
|
1453
1448
|
let u, p = 0, w;
|
|
1454
1449
|
if (!f) {
|
|
1455
|
-
const d = [
|
|
1450
|
+
const d = [Ce.bind(this), void 0];
|
|
1456
1451
|
for (d.unshift.apply(d, c), d.push.apply(d, l), w = d.length, u = Promise.resolve(n); p < w; )
|
|
1457
1452
|
u = u.then(d[p++], d[p++]);
|
|
1458
1453
|
return u;
|
|
@@ -1469,7 +1464,7 @@ class L {
|
|
|
1469
1464
|
}
|
|
1470
1465
|
}
|
|
1471
1466
|
try {
|
|
1472
|
-
u =
|
|
1467
|
+
u = Ce.call(this, R);
|
|
1473
1468
|
} catch (d) {
|
|
1474
1469
|
return Promise.reject(d);
|
|
1475
1470
|
}
|
|
@@ -1480,7 +1475,7 @@ class L {
|
|
|
1480
1475
|
getUri(t) {
|
|
1481
1476
|
t = k(this.defaults, t);
|
|
1482
1477
|
const n = Ge(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1483
|
-
return
|
|
1478
|
+
return We(n, t.params, t.paramsSerializer);
|
|
1484
1479
|
}
|
|
1485
1480
|
}
|
|
1486
1481
|
a.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -1507,7 +1502,7 @@ a.forEach(["post", "put", "patch"], function(t) {
|
|
|
1507
1502
|
}
|
|
1508
1503
|
L.prototype[t] = n(), L.prototype[t + "Form"] = n(!0);
|
|
1509
1504
|
});
|
|
1510
|
-
class
|
|
1505
|
+
class he {
|
|
1511
1506
|
constructor(t) {
|
|
1512
1507
|
if (typeof t != "function")
|
|
1513
1508
|
throw new TypeError("executor must be a function.");
|
|
@@ -1573,7 +1568,7 @@ class me {
|
|
|
1573
1568
|
static source() {
|
|
1574
1569
|
let t;
|
|
1575
1570
|
return {
|
|
1576
|
-
token: new
|
|
1571
|
+
token: new he(function(s) {
|
|
1577
1572
|
t = s;
|
|
1578
1573
|
}),
|
|
1579
1574
|
cancel: t
|
|
@@ -1588,7 +1583,7 @@ function Ln(e) {
|
|
|
1588
1583
|
function kn(e) {
|
|
1589
1584
|
return a.isObject(e) && e.isAxiosError === !0;
|
|
1590
1585
|
}
|
|
1591
|
-
const
|
|
1586
|
+
const ue = {
|
|
1592
1587
|
Continue: 100,
|
|
1593
1588
|
SwitchingProtocols: 101,
|
|
1594
1589
|
Processing: 102,
|
|
@@ -1653,8 +1648,8 @@ const fe = {
|
|
|
1653
1648
|
NotExtended: 510,
|
|
1654
1649
|
NetworkAuthenticationRequired: 511
|
|
1655
1650
|
};
|
|
1656
|
-
Object.entries(
|
|
1657
|
-
|
|
1651
|
+
Object.entries(ue).forEach(([e, t]) => {
|
|
1652
|
+
ue[t] = e;
|
|
1658
1653
|
});
|
|
1659
1654
|
function nt(e) {
|
|
1660
1655
|
const t = new L(e), n = Le(L.prototype.request, t);
|
|
@@ -1665,8 +1660,8 @@ function nt(e) {
|
|
|
1665
1660
|
const E = nt(H);
|
|
1666
1661
|
E.Axios = L;
|
|
1667
1662
|
E.CanceledError = D;
|
|
1668
|
-
E.CancelToken =
|
|
1669
|
-
E.isCancel =
|
|
1663
|
+
E.CancelToken = he;
|
|
1664
|
+
E.isCancel = Ke;
|
|
1670
1665
|
E.VERSION = tt;
|
|
1671
1666
|
E.toFormData = Z;
|
|
1672
1667
|
E.AxiosError = m;
|
|
@@ -1678,37 +1673,37 @@ E.spread = Ln;
|
|
|
1678
1673
|
E.isAxiosError = kn;
|
|
1679
1674
|
E.mergeConfig = k;
|
|
1680
1675
|
E.AxiosHeaders = x;
|
|
1681
|
-
E.formToJSON = (e) =>
|
|
1676
|
+
E.formToJSON = (e) => ve(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1682
1677
|
E.getAdapter = et.getAdapter;
|
|
1683
|
-
E.HttpStatusCode =
|
|
1678
|
+
E.HttpStatusCode = ue;
|
|
1684
1679
|
E.default = E;
|
|
1685
1680
|
const { baseURL: Bn } = st();
|
|
1686
|
-
let
|
|
1687
|
-
const
|
|
1681
|
+
let $ = !1, q = [];
|
|
1682
|
+
const Pe = 1 * 60 * 1e3, _e = 1, Fe = 1e3, Dn = async (e, t, n = 0) => {
|
|
1688
1683
|
const r = Date.now();
|
|
1689
|
-
if (r < +e.accessExp -
|
|
1684
|
+
if (r < +e.accessExp - Pe)
|
|
1690
1685
|
return e.accessToken;
|
|
1691
|
-
if (r >= +e.refreshExp -
|
|
1686
|
+
if (r >= +e.refreshExp - Pe)
|
|
1692
1687
|
return Ue(), Promise.reject("Refresh token expired");
|
|
1693
|
-
if (
|
|
1688
|
+
if ($)
|
|
1694
1689
|
return new Promise((s, o) => {
|
|
1695
1690
|
q.push({ resolve: s, reject: o });
|
|
1696
1691
|
});
|
|
1697
|
-
|
|
1692
|
+
$ = !0;
|
|
1698
1693
|
try {
|
|
1699
|
-
const s = await rt(e.refreshToken,
|
|
1694
|
+
const s = await rt(e.refreshToken, _e, Fe), o = {
|
|
1700
1695
|
accessToken: s.accessToken,
|
|
1701
1696
|
accessExp: s.accessExp,
|
|
1702
1697
|
refreshToken: s.refreshToken || e.refreshToken,
|
|
1703
1698
|
refreshExp: s.refreshExp || e.refreshExp
|
|
1704
1699
|
};
|
|
1705
1700
|
return t(o), jn(o.accessToken), o.accessToken;
|
|
1706
|
-
} catch
|
|
1701
|
+
} catch {
|
|
1707
1702
|
if (q.forEach((o) => {
|
|
1708
1703
|
o.reject("Token refresh failed");
|
|
1709
|
-
}),
|
|
1704
|
+
}), $ = !1, q = [], n < _e) {
|
|
1710
1705
|
const o = n + 1;
|
|
1711
|
-
return
|
|
1706
|
+
return await new Promise((i) => setTimeout(i, Fe)), Dn(e, t, o);
|
|
1712
1707
|
}
|
|
1713
1708
|
return Ue(), Promise.reject("Token refresh failed after retries");
|
|
1714
1709
|
}
|
|
@@ -1725,14 +1720,14 @@ async function rt(e, t, n, r = 0) {
|
|
|
1725
1720
|
return (s == null ? void 0 : s.data) || {};
|
|
1726
1721
|
} catch {
|
|
1727
1722
|
if (r < t)
|
|
1728
|
-
return
|
|
1723
|
+
return await new Promise((o) => setTimeout(o, n)), rt(e, t, n, r + 1);
|
|
1729
1724
|
throw new Error("Token refresh failed after retries");
|
|
1730
1725
|
}
|
|
1731
1726
|
}
|
|
1732
1727
|
function jn(e) {
|
|
1733
1728
|
q.forEach((t) => {
|
|
1734
1729
|
t.resolve(e);
|
|
1735
|
-
}), q = [],
|
|
1730
|
+
}), q = [], $ = !1;
|
|
1736
1731
|
}
|
|
1737
1732
|
function Ue() {
|
|
1738
1733
|
var t, n;
|