@das-fed/upf-utils 6.4.0-dev.169 → 6.4.0-dev.171
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 +4622 -0
- package/api-services/i18n/es5.js +53 -0
- package/api-services/index.js +593 -611
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/index.js +487 -505
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/index.js +487 -505
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/index.js +479 -497
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/index.js +847 -883
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/index.js +822 -858
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/index.js +847 -883
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +4569 -0
- package/api-services/modules/file/index.js +942 -978
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/index.js +487 -505
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +1022 -1058
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/index.js +831 -849
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/index.js +478 -496
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/index.js +880 -880
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/index.js +880 -880
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/index.js +880 -880
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/index.js +873 -877
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/index.js +487 -505
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/index.js +847 -883
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/index.js +479 -497
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/index.js +882 -882
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/index.js +847 -883
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/index.js +490 -508
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/index.js +880 -880
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/index.js +865 -901
- package/api-services/src/create-service/index.js.gz +0 -0
- package/atob/es5.js +9 -0
- package/common-info/es5.js +201 -0
- package/common-info/getIframeUrl/es5.js +16 -0
- package/common-info/getInfoFromUrl/es5.js +91 -0
- package/common-info/index.js +18 -18
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.js +2210 -0
- package/common-info/set-personal-info/index.js +172 -189
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/arr-tools/es5.js +11 -0
- package/common-tools/calc-text-width/es5.js +8 -0
- package/common-tools/date-format/es5.js +18 -0
- package/common-tools/es5.js +14 -0
- package/common-tools/extract-file-name/es5.js +2211 -0
- package/common-tools/extract-file-name/index.js +138 -155
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/get-file-extension/es5.js +5 -0
- package/common-tools/get-url-params/es5.js +101 -0
- package/common-tools/handle-data/es5.js +146 -0
- package/common-tools/handle-data/index.d.ts +1 -2
- package/common-tools/handle-data/index.js +41 -73
- package/common-tools/handle-data/index.js.gz +0 -0
- package/common-tools/nest-tree-format/es5.js +53 -0
- package/common-tools/obj-tools/es5.js +13 -0
- package/common-tools/platform-tools/es5.js +19 -0
- package/common-tools/queue-promise/es5.js +13 -0
- package/common-tools/setHtmlMinWH/es5.js +6 -0
- package/common-tools/update-browser-title/es5.js +54 -0
- package/common-tools/update-fav-icon/es5.js +73 -0
- package/config/es5.js +15 -0
- package/create-api-service/check-token/es5.js +2305 -0
- package/create-api-service/check-token/index.js +158 -175
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/es5.js +3947 -0
- package/create-api-service/i18n/es5.js +33 -0
- package/create-api-service/index.js +865 -901
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/proxy-sso/es5.js +33 -0
- package/create-api-service/sso/es5.js +2815 -0
- package/create-api-service/sso/index.js +309 -327
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/es5.js +2913 -0
- package/curring-http/index.js +285 -303
- package/curring-http/index.js.gz +0 -0
- package/dimple-canvas/es5.js +1 -0
- package/directive/auth/es5.js +94 -0
- package/directive/clickOutside/es5.js +85 -0
- package/directive/es5.js +3 -0
- package/directive/hoverInside/es5.js +59 -0
- package/directive/utils/es5.js +36 -0
- package/dom-check-in/es5.js +11 -0
- package/dom-watcher/es5.js +13 -0
- package/esm-map.json +1 -2
- package/hooks/use-get-auth/es5.js +199 -0
- package/hooks/use-get-auth/index.js +22 -22
- package/hooks/use-get-auth/index.js.gz +0 -0
- package/load-js/es5.js +13 -0
- package/nextTiken/es5.js +64 -0
- package/oss/es5.js +10 -0
- package/package.json +7 -4
- package/pinyin-first-character/es5.js +9311 -0
- package/pinyin-first-character/index.js +24 -24
- package/pinyin-first-character/index.js.gz +0 -0
- package/process-engine-info/es5.js +15 -0
- package/pure-image-src/es5.js +28 -0
- package/size-watcher/es5.js +32 -0
- package/style/es5.js +134 -0
- package/token-tools/es5.js +21 -0
- package/use-low-code/es5.js +115 -0
- package/use-low-code/index.js +2 -2
- package/use-low-code/index.js.gz +0 -0
- package/vue/es5.js +1 -0
- package/webSocket-service/es5.js +120 -0
- package/with-install/es5.js +6 -0
|
@@ -0,0 +1,2815 @@
|
|
|
1
|
+
function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.value; } catch (n) { return void e(n); } i.done ? t(u) : Promise.resolve(u).then(r, o); }
|
|
2
|
+
function _asyncToGenerator(n) { return function () { var t = this, e = arguments; return new Promise(function (r, o) { var a = n.apply(t, e); function _next(n) { asyncGeneratorStep(a, r, o, _next, _throw, "next", n); } function _throw(n) { asyncGeneratorStep(a, r, o, _next, _throw, "throw", n); } _next(void 0); }); }; }
|
|
3
|
+
function _regeneratorValues(e) { if (null != e) { var t = e["function" == typeof Symbol && Symbol.iterator || "@@iterator"], r = 0; if (t) return t.call(e); if ("function" == typeof e.next) return e; if (!isNaN(e.length)) return { next: function next() { return e && r >= e.length && (e = void 0), { value: e && e[r++], done: !e }; } }; } throw new TypeError(_typeof(e) + " is not iterable"); }
|
|
4
|
+
function _regenerator() { /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */ var e, t, r = "function" == typeof Symbol ? Symbol : {}, n = r.iterator || "@@iterator", o = r.toStringTag || "@@toStringTag"; function i(r, n, o, i) { var c = n && n.prototype instanceof Generator ? n : Generator, u = Object.create(c.prototype); return _regeneratorDefine2(u, "_invoke", function (r, n, o) { var i, c, u, f = 0, p = o || [], y = !1, G = { p: 0, n: 0, v: e, a: d, f: d.bind(e, 4), d: function d(t, r) { return i = t, c = 0, u = e, G.n = r, a; } }; function d(r, n) { for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) { var o, i = p[t], d = G.p, l = i[2]; r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0)); } if (o || r > 1) return a; throw y = !0, n; } return function (o, p, l) { if (f > 1) throw TypeError("Generator is already running"); for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) { i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u); try { if (f = 2, i) { if (c || (o = "next"), t = i[o]) { if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object"); if (!t.done) return t; u = t.value, c < 2 && (c = 0); } else 1 === c && (t = i["return"]) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1); i = e; } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break; } catch (t) { i = e, c = 1, u = t; } finally { f = 1; } } return { value: t, done: y }; }; }(r, o, i), !0), u; } var a = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} t = Object.getPrototypeOf; var c = [][n] ? t(t([][n]())) : (_regeneratorDefine2(t = {}, n, function () { return this; }), t), u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c); function f(e) { return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine2(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine2(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine2(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine2(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine2(u), _regeneratorDefine2(u, o, "Generator"), _regeneratorDefine2(u, n, function () { return this; }), _regeneratorDefine2(u, "toString", function () { return "[object Generator]"; }), (_regenerator = function _regenerator() { return { w: i, m: f }; })(); }
|
|
5
|
+
function _regeneratorDefine2(e, r, n, t) { var i = Object.defineProperty; try { i({}, "", {}); } catch (e) { i = 0; } _regeneratorDefine2 = function _regeneratorDefine(e, r, n, t) { if (r) i ? i(e, r, { value: n, enumerable: !t, configurable: !t, writable: !t }) : e[r] = n;else { var o = function o(r, n) { _regeneratorDefine2(e, r, function (e) { return this._invoke(r, n, e); }); }; o("next", 0), o("throw", 1), o("return", 2); } }, _regeneratorDefine2(e, r, n, t); }
|
|
6
|
+
function _toArray(r) { return _arrayWithHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableRest(); }
|
|
7
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
8
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
9
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
10
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
11
|
+
function _createForOfIteratorHelper(r, e) { var t = "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (!t) { if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e && r && "number" == typeof r.length) { t && (r = t); var _n4 = 0, F = function F() {}; return { s: F, n: function n() { return _n4 >= r.length ? { done: !0 } : { done: !1, value: r[_n4++] }; }, e: function e(r) { throw r; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var o, a = !0, u = !1; return { s: function s() { t = t.call(r); }, n: function n() { var r = t.next(); return a = r.done, r; }, e: function e(r) { u = !0, o = r; }, f: function f() { try { a || null == t["return"] || t["return"](); } finally { if (u) throw o; } } }; }
|
|
12
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
13
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
14
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
15
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
16
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
17
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
20
|
+
function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|
21
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
22
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
23
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
24
|
+
function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|
25
|
+
function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|
26
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
27
|
+
function _wrapAsyncGenerator(e) { return function () { return new AsyncGenerator(e.apply(this, arguments)); }; }
|
|
28
|
+
function AsyncGenerator(e) { var r, t; function resume(r, t) { try { var n = e[r](t), o = n.value, u = o instanceof _OverloadYield; Promise.resolve(u ? o.v : o).then(function (t) { if (u) { var i = "return" === r ? "return" : "next"; if (!o.k || t.done) return resume(i, t); t = e[i](t).value; } settle(n.done ? "return" : "normal", t); }, function (e) { resume("throw", e); }); } catch (e) { settle("throw", e); } } function settle(e, n) { switch (e) { case "return": r.resolve({ value: n, done: !0 }); break; case "throw": r.reject(n); break; default: r.resolve({ value: n, done: !1 }); } (r = r.next) ? resume(r.key, r.arg) : t = null; } this._invoke = function (e, n) { return new Promise(function (o, u) { var i = { key: e, arg: n, resolve: o, reject: u, next: null }; t ? t = t.next = i : (r = t = i, resume(e, n)); }); }, "function" != typeof e["return"] && (this["return"] = void 0); }
|
|
29
|
+
AsyncGenerator.prototype["function" == typeof Symbol && Symbol.asyncIterator || "@@asyncIterator"] = function () { return this; }, AsyncGenerator.prototype.next = function (e) { return this._invoke("next", e); }, AsyncGenerator.prototype["throw"] = function (e) { return this._invoke("throw", e); }, AsyncGenerator.prototype["return"] = function (e) { return this._invoke("return", e); };
|
|
30
|
+
function _awaitAsyncGenerator(e) { return new _OverloadYield(e, 0); }
|
|
31
|
+
function _asyncGeneratorDelegate(t) { var e = {}, n = !1; function pump(e, r) { return n = !0, r = new Promise(function (n) { n(t[e](r)); }), { done: !1, value: new _OverloadYield(r, 1) }; } return e["undefined" != typeof Symbol && Symbol.iterator || "@@iterator"] = function () { return this; }, e.next = function (t) { return n ? (n = !1, t) : pump("next", t); }, "function" == typeof t["throw"] && (e["throw"] = function (t) { if (n) throw n = !1, t; return pump("throw", t); }), "function" == typeof t["return"] && (e["return"] = function (t) { return n ? (n = !1, t) : pump("return", t); }), e; }
|
|
32
|
+
function _OverloadYield(e, d) { this.v = e, this.k = d; }
|
|
33
|
+
function _asyncIterator(r) { var n, t, o, e = 2; for ("undefined" != typeof Symbol && (t = Symbol.asyncIterator, o = Symbol.iterator); e--;) { if (t && null != (n = r[t])) return n.call(r); if (o && null != (n = r[o])) return new AsyncFromSyncIterator(n.call(r)); t = "@@asyncIterator", o = "@@iterator"; } throw new TypeError("Object is not async iterable"); }
|
|
34
|
+
function AsyncFromSyncIterator(r) { function AsyncFromSyncIteratorContinuation(r) { if (Object(r) !== r) return Promise.reject(new TypeError(r + " is not an object.")); var n = r.done; return Promise.resolve(r.value).then(function (r) { return { value: r, done: n }; }); } return AsyncFromSyncIterator = function AsyncFromSyncIterator(r) { this.s = r, this.n = r.next; }, AsyncFromSyncIterator.prototype = { s: null, n: null, next: function next() { return AsyncFromSyncIteratorContinuation(this.n.apply(this.s, arguments)); }, "return": function _return(r) { var n = this.s["return"]; return void 0 === n ? Promise.resolve({ value: r, done: !0 }) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); }, "throw": function _throw(r) { var n = this.s["return"]; return void 0 === n ? Promise.reject(r) : AsyncFromSyncIteratorContinuation(n.apply(this.s, arguments)); } }, new AsyncFromSyncIterator(r); }
|
|
35
|
+
import { ref, watch, unref, getCurrentScope, onScopeDispose } from 'vue';
|
|
36
|
+
import { encryption } from '@das-fed/upf-utils/atob';
|
|
37
|
+
import { getConfig } from '@das-fed/upf-utils/config';
|
|
38
|
+
import { getUrlParams, funcUrlDel } from '@das-fed/upf-utils/common-tools';
|
|
39
|
+
import { getAccessToken, getAccessTokenInfo, setAccessToken, removeAccessToken } from '@das-fed/upf-utils/token-tools';
|
|
40
|
+
import { setProcessEngineToken, removeProcessEngineToken } from '@das-fed/upf-utils/process-engine-info';
|
|
41
|
+
import { setPersonalInfo } from '@das-fed/upf-utils/common-info/set-personal-info';
|
|
42
|
+
function et(e, t) {
|
|
43
|
+
return function () {
|
|
44
|
+
return e.apply(t, arguments);
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
var qt = Object.prototype.toString,
|
|
48
|
+
Oe = Object.getPrototypeOf,
|
|
49
|
+
ne = Symbol.iterator,
|
|
50
|
+
tt = Symbol.toStringTag,
|
|
51
|
+
re = /* @__PURE__ */function (e) {
|
|
52
|
+
return function (t) {
|
|
53
|
+
var n = qt.call(t);
|
|
54
|
+
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
55
|
+
};
|
|
56
|
+
}(/* @__PURE__ */Object.create(null)),
|
|
57
|
+
x = function x(e) {
|
|
58
|
+
return e = e.toLowerCase(), function (t) {
|
|
59
|
+
return re(t) === e;
|
|
60
|
+
};
|
|
61
|
+
},
|
|
62
|
+
se = function se(e) {
|
|
63
|
+
return function (t) {
|
|
64
|
+
return _typeof(t) === e;
|
|
65
|
+
};
|
|
66
|
+
},
|
|
67
|
+
B = Array.isArray,
|
|
68
|
+
H = se("undefined");
|
|
69
|
+
function Mt(e) {
|
|
70
|
+
return e !== null && !H(e) && e.constructor !== null && !H(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
71
|
+
}
|
|
72
|
+
var nt = x("ArrayBuffer");
|
|
73
|
+
function Ht(e) {
|
|
74
|
+
var t;
|
|
75
|
+
return (typeof ArrayBuffer === "undefined" ? "undefined" : _typeof(ArrayBuffer)) < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && nt(e.buffer), t;
|
|
76
|
+
}
|
|
77
|
+
var zt = se("string"),
|
|
78
|
+
A = se("function"),
|
|
79
|
+
rt = se("number"),
|
|
80
|
+
oe = function oe(e) {
|
|
81
|
+
return e !== null && _typeof(e) == "object";
|
|
82
|
+
},
|
|
83
|
+
$t = function $t(e) {
|
|
84
|
+
return e === true || e === false;
|
|
85
|
+
},
|
|
86
|
+
X = function X(e) {
|
|
87
|
+
if (re(e) !== "object") return false;
|
|
88
|
+
var t = Oe(e);
|
|
89
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(tt in e) && !(ne in e);
|
|
90
|
+
},
|
|
91
|
+
Jt = x("Date"),
|
|
92
|
+
Vt = x("File"),
|
|
93
|
+
Wt = x("Blob"),
|
|
94
|
+
Kt = x("FileList"),
|
|
95
|
+
Qt = function Qt(e) {
|
|
96
|
+
return oe(e) && A(e.pipe);
|
|
97
|
+
},
|
|
98
|
+
Xt = function Xt(e) {
|
|
99
|
+
var t;
|
|
100
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = re(e)) === "formdata" ||
|
|
101
|
+
// detect form-data instance
|
|
102
|
+
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
103
|
+
},
|
|
104
|
+
Gt = x("URLSearchParams"),
|
|
105
|
+
_map = ["ReadableStream", "Request", "Response", "Headers"].map(x),
|
|
106
|
+
_map2 = _slicedToArray(_map, 4),
|
|
107
|
+
Zt = _map2[0],
|
|
108
|
+
Yt = _map2[1],
|
|
109
|
+
en = _map2[2],
|
|
110
|
+
tn = _map2[3],
|
|
111
|
+
nn = function nn(e) {
|
|
112
|
+
return e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
113
|
+
};
|
|
114
|
+
function V(e, t) {
|
|
115
|
+
var _ref3 = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {},
|
|
116
|
+
_ref3$allOwnKeys = _ref3.allOwnKeys,
|
|
117
|
+
n = _ref3$allOwnKeys === void 0 ? false : _ref3$allOwnKeys;
|
|
118
|
+
if (e === null || _typeof(e) > "u") return;
|
|
119
|
+
var r, s;
|
|
120
|
+
if (_typeof(e) != "object" && (e = [e]), B(e)) for (r = 0, s = e.length; r < s; r++) t.call(null, e[r], r, e);else {
|
|
121
|
+
var o = n ? Object.getOwnPropertyNames(e) : Object.keys(e),
|
|
122
|
+
i = o.length;
|
|
123
|
+
var c;
|
|
124
|
+
for (r = 0; r < i; r++) c = o[r], t.call(null, e[c], c, e);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function st(e, t) {
|
|
128
|
+
t = t.toLowerCase();
|
|
129
|
+
var n = Object.keys(e);
|
|
130
|
+
var r = n.length,
|
|
131
|
+
s;
|
|
132
|
+
for (; r-- > 0;) if (s = n[r], t === s.toLowerCase()) return s;
|
|
133
|
+
return null;
|
|
134
|
+
}
|
|
135
|
+
var N = (typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) < "u" ? globalThis : (typeof self === "undefined" ? "undefined" : _typeof(self)) < "u" ? self : (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" ? window : global,
|
|
136
|
+
ot = function ot(e) {
|
|
137
|
+
return !H(e) && e !== N;
|
|
138
|
+
};
|
|
139
|
+
function pe() {
|
|
140
|
+
var _ref4 = ot(this) && this || {},
|
|
141
|
+
e = _ref4.caseless,
|
|
142
|
+
t = {},
|
|
143
|
+
n = function n(r, s) {
|
|
144
|
+
var o = e && st(t, s) || s;
|
|
145
|
+
X(t[o]) && X(r) ? t[o] = pe(t[o], r) : X(r) ? t[o] = pe({}, r) : B(r) ? t[o] = r.slice() : t[o] = r;
|
|
146
|
+
};
|
|
147
|
+
for (var r = 0, s = arguments.length; r < s; r++) arguments[r] && V(arguments[r], n);
|
|
148
|
+
return t;
|
|
149
|
+
}
|
|
150
|
+
var rn = function rn(e, t, n) {
|
|
151
|
+
var _ref5 = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {},
|
|
152
|
+
r = _ref5.allOwnKeys;
|
|
153
|
+
return V(t, function (s, o) {
|
|
154
|
+
n && A(s) ? e[o] = et(s, n) : e[o] = s;
|
|
155
|
+
}, {
|
|
156
|
+
allOwnKeys: r
|
|
157
|
+
}), e;
|
|
158
|
+
},
|
|
159
|
+
sn = function sn(e) {
|
|
160
|
+
return e.charCodeAt(0) === 65279 && (e = e.slice(1)), e;
|
|
161
|
+
},
|
|
162
|
+
on = function on(e, t, n, r) {
|
|
163
|
+
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
164
|
+
value: t.prototype
|
|
165
|
+
}), n && Object.assign(e.prototype, n);
|
|
166
|
+
},
|
|
167
|
+
an = function an(e, t, n, r) {
|
|
168
|
+
var s, o, i;
|
|
169
|
+
var c = {};
|
|
170
|
+
if (t = t || {}, e == null) return t;
|
|
171
|
+
do {
|
|
172
|
+
for (s = Object.getOwnPropertyNames(e), o = s.length; o-- > 0;) i = s[o], (!r || r(i, e, t)) && !c[i] && (t[i] = e[i], c[i] = true);
|
|
173
|
+
e = n !== false && Oe(e);
|
|
174
|
+
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
175
|
+
return t;
|
|
176
|
+
},
|
|
177
|
+
cn = function cn(e, t, n) {
|
|
178
|
+
e = String(e), (n === undefined || n > e.length) && (n = e.length), n -= t.length;
|
|
179
|
+
var r = e.indexOf(t, n);
|
|
180
|
+
return r !== -1 && r === n;
|
|
181
|
+
},
|
|
182
|
+
un = function un(e) {
|
|
183
|
+
if (!e) return null;
|
|
184
|
+
if (B(e)) return e;
|
|
185
|
+
var t = e.length;
|
|
186
|
+
if (!rt(t)) return null;
|
|
187
|
+
var n = new Array(t);
|
|
188
|
+
for (; t-- > 0;) n[t] = e[t];
|
|
189
|
+
return n;
|
|
190
|
+
},
|
|
191
|
+
ln = /* @__PURE__ */function (e) {
|
|
192
|
+
return function (t) {
|
|
193
|
+
return e && t instanceof e;
|
|
194
|
+
};
|
|
195
|
+
}((typeof Uint8Array === "undefined" ? "undefined" : _typeof(Uint8Array)) < "u" && Oe(Uint8Array)),
|
|
196
|
+
fn = function fn(e, t) {
|
|
197
|
+
var r = (e && e[ne]).call(e);
|
|
198
|
+
var s;
|
|
199
|
+
for (; (s = r.next()) && !s.done;) {
|
|
200
|
+
var o = s.value;
|
|
201
|
+
t.call(e, o[0], o[1]);
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
dn = function dn(e, t) {
|
|
205
|
+
var n;
|
|
206
|
+
var r = [];
|
|
207
|
+
for (; (n = e.exec(t)) !== null;) r.push(n);
|
|
208
|
+
return r;
|
|
209
|
+
},
|
|
210
|
+
pn = x("HTMLFormElement"),
|
|
211
|
+
hn = function hn(e) {
|
|
212
|
+
return e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g, function (n, r, s) {
|
|
213
|
+
return r.toUpperCase() + s;
|
|
214
|
+
});
|
|
215
|
+
},
|
|
216
|
+
Pe = function (_ref6) {
|
|
217
|
+
var e = _ref6.hasOwnProperty;
|
|
218
|
+
return function (t, n) {
|
|
219
|
+
return e.call(t, n);
|
|
220
|
+
};
|
|
221
|
+
}(Object.prototype),
|
|
222
|
+
mn = x("RegExp"),
|
|
223
|
+
it = function it(e, t) {
|
|
224
|
+
var n = Object.getOwnPropertyDescriptors(e),
|
|
225
|
+
r = {};
|
|
226
|
+
V(n, function (s, o) {
|
|
227
|
+
var i;
|
|
228
|
+
(i = t(s, o, e)) !== false && (r[o] = i || s);
|
|
229
|
+
}), Object.defineProperties(e, r);
|
|
230
|
+
},
|
|
231
|
+
yn = function yn(e) {
|
|
232
|
+
it(e, function (t, n) {
|
|
233
|
+
if (A(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1) return false;
|
|
234
|
+
var r = e[n];
|
|
235
|
+
if (A(r)) {
|
|
236
|
+
if (t.enumerable = false, "writable" in t) {
|
|
237
|
+
t.writable = false;
|
|
238
|
+
return;
|
|
239
|
+
}
|
|
240
|
+
t.set || (t.set = function () {
|
|
241
|
+
throw Error("Can not rewrite read-only method '" + n + "'");
|
|
242
|
+
});
|
|
243
|
+
}
|
|
244
|
+
});
|
|
245
|
+
},
|
|
246
|
+
wn = function wn(e, t) {
|
|
247
|
+
var n = {},
|
|
248
|
+
r = function r(s) {
|
|
249
|
+
s.forEach(function (o) {
|
|
250
|
+
n[o] = true;
|
|
251
|
+
});
|
|
252
|
+
};
|
|
253
|
+
return B(e) ? r(e) : r(String(e).split(t)), n;
|
|
254
|
+
},
|
|
255
|
+
gn = function gn() {},
|
|
256
|
+
bn = function bn(e, t) {
|
|
257
|
+
return e != null && Number.isFinite(e = +e) ? e : t;
|
|
258
|
+
};
|
|
259
|
+
function En(e) {
|
|
260
|
+
return !!(e && A(e.append) && e[tt] === "FormData" && e[ne]);
|
|
261
|
+
}
|
|
262
|
+
var Rn = function Rn(e) {
|
|
263
|
+
var t = new Array(10),
|
|
264
|
+
_n2 = function n(r, s) {
|
|
265
|
+
if (oe(r)) {
|
|
266
|
+
if (t.indexOf(r) >= 0) return;
|
|
267
|
+
if (!("toJSON" in r)) {
|
|
268
|
+
t[s] = r;
|
|
269
|
+
var o = B(r) ? [] : {};
|
|
270
|
+
return V(r, function (i, c) {
|
|
271
|
+
var f = _n2(i, s + 1);
|
|
272
|
+
!H(f) && (o[c] = f);
|
|
273
|
+
}), t[s] = undefined, o;
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
return r;
|
|
277
|
+
};
|
|
278
|
+
return _n2(e, 0);
|
|
279
|
+
},
|
|
280
|
+
Sn = x("AsyncFunction"),
|
|
281
|
+
Tn = function Tn(e) {
|
|
282
|
+
return e && (oe(e) || A(e)) && A(e.then) && A(e["catch"]);
|
|
283
|
+
},
|
|
284
|
+
at = function (e, t) {
|
|
285
|
+
return e ? setImmediate : t ? function (n, r) {
|
|
286
|
+
return N.addEventListener("message", function (_ref7) {
|
|
287
|
+
var s = _ref7.source,
|
|
288
|
+
o = _ref7.data;
|
|
289
|
+
s === N && o === n && r.length && r.shift()();
|
|
290
|
+
}, false), function (s) {
|
|
291
|
+
r.push(s), N.postMessage(n, "*");
|
|
292
|
+
};
|
|
293
|
+
}("axios@".concat(Math.random()), []) : function (n) {
|
|
294
|
+
return setTimeout(n);
|
|
295
|
+
};
|
|
296
|
+
}(typeof setImmediate == "function", A(N.postMessage)),
|
|
297
|
+
On = (typeof queueMicrotask === "undefined" ? "undefined" : _typeof(queueMicrotask)) < "u" ? queueMicrotask.bind(N) : (typeof process === "undefined" ? "undefined" : _typeof(process)) < "u" && process.nextTick || at,
|
|
298
|
+
An = function An(e) {
|
|
299
|
+
return e != null && A(e[ne]);
|
|
300
|
+
},
|
|
301
|
+
a = {
|
|
302
|
+
isArray: B,
|
|
303
|
+
isArrayBuffer: nt,
|
|
304
|
+
isBuffer: Mt,
|
|
305
|
+
isFormData: Xt,
|
|
306
|
+
isArrayBufferView: Ht,
|
|
307
|
+
isString: zt,
|
|
308
|
+
isNumber: rt,
|
|
309
|
+
isBoolean: $t,
|
|
310
|
+
isObject: oe,
|
|
311
|
+
isPlainObject: X,
|
|
312
|
+
isReadableStream: Zt,
|
|
313
|
+
isRequest: Yt,
|
|
314
|
+
isResponse: en,
|
|
315
|
+
isHeaders: tn,
|
|
316
|
+
isUndefined: H,
|
|
317
|
+
isDate: Jt,
|
|
318
|
+
isFile: Vt,
|
|
319
|
+
isBlob: Wt,
|
|
320
|
+
isRegExp: mn,
|
|
321
|
+
isFunction: A,
|
|
322
|
+
isStream: Qt,
|
|
323
|
+
isURLSearchParams: Gt,
|
|
324
|
+
isTypedArray: ln,
|
|
325
|
+
isFileList: Kt,
|
|
326
|
+
forEach: V,
|
|
327
|
+
merge: pe,
|
|
328
|
+
extend: rn,
|
|
329
|
+
trim: nn,
|
|
330
|
+
stripBOM: sn,
|
|
331
|
+
inherits: on,
|
|
332
|
+
toFlatObject: an,
|
|
333
|
+
kindOf: re,
|
|
334
|
+
kindOfTest: x,
|
|
335
|
+
endsWith: cn,
|
|
336
|
+
toArray: un,
|
|
337
|
+
forEachEntry: fn,
|
|
338
|
+
matchAll: dn,
|
|
339
|
+
isHTMLForm: pn,
|
|
340
|
+
hasOwnProperty: Pe,
|
|
341
|
+
hasOwnProp: Pe,
|
|
342
|
+
// an alias to avoid ESLint no-prototype-builtins detection
|
|
343
|
+
reduceDescriptors: it,
|
|
344
|
+
freezeMethods: yn,
|
|
345
|
+
toObjectSet: wn,
|
|
346
|
+
toCamelCase: hn,
|
|
347
|
+
noop: gn,
|
|
348
|
+
toFiniteNumber: bn,
|
|
349
|
+
findKey: st,
|
|
350
|
+
global: N,
|
|
351
|
+
isContextDefined: ot,
|
|
352
|
+
isSpecCompliantForm: En,
|
|
353
|
+
toJSONObject: Rn,
|
|
354
|
+
isAsyncFn: Sn,
|
|
355
|
+
isThenable: Tn,
|
|
356
|
+
setImmediate: at,
|
|
357
|
+
asap: On,
|
|
358
|
+
isIterable: An
|
|
359
|
+
};
|
|
360
|
+
function y(e, t, n, r, s) {
|
|
361
|
+
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), s && (this.response = s, this.status = s.status ? s.status : null);
|
|
362
|
+
}
|
|
363
|
+
a.inherits(y, Error, {
|
|
364
|
+
toJSON: function toJSON() {
|
|
365
|
+
return {
|
|
366
|
+
// Standard
|
|
367
|
+
message: this.message,
|
|
368
|
+
name: this.name,
|
|
369
|
+
// Microsoft
|
|
370
|
+
description: this.description,
|
|
371
|
+
number: this.number,
|
|
372
|
+
// Mozilla
|
|
373
|
+
fileName: this.fileName,
|
|
374
|
+
lineNumber: this.lineNumber,
|
|
375
|
+
columnNumber: this.columnNumber,
|
|
376
|
+
stack: this.stack,
|
|
377
|
+
// Axios
|
|
378
|
+
config: a.toJSONObject(this.config),
|
|
379
|
+
code: this.code,
|
|
380
|
+
status: this.status
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
});
|
|
384
|
+
var ct = y.prototype,
|
|
385
|
+
ut = {};
|
|
386
|
+
["ERR_BAD_OPTION_VALUE", "ERR_BAD_OPTION", "ECONNABORTED", "ETIMEDOUT", "ERR_NETWORK", "ERR_FR_TOO_MANY_REDIRECTS", "ERR_DEPRECATED", "ERR_BAD_RESPONSE", "ERR_BAD_REQUEST", "ERR_CANCELED", "ERR_NOT_SUPPORT", "ERR_INVALID_URL"
|
|
387
|
+
// eslint-disable-next-line func-names
|
|
388
|
+
].forEach(function (e) {
|
|
389
|
+
ut[e] = {
|
|
390
|
+
value: e
|
|
391
|
+
};
|
|
392
|
+
});
|
|
393
|
+
Object.defineProperties(y, ut);
|
|
394
|
+
Object.defineProperty(ct, "isAxiosError", {
|
|
395
|
+
value: true
|
|
396
|
+
});
|
|
397
|
+
y.from = function (e, t, n, r, s, o) {
|
|
398
|
+
var i = Object.create(ct);
|
|
399
|
+
return a.toFlatObject(e, i, function (f) {
|
|
400
|
+
return f !== Error.prototype;
|
|
401
|
+
}, function (c) {
|
|
402
|
+
return c !== "isAxiosError";
|
|
403
|
+
}), y.call(i, e.message, t, n, r, s), i.cause = e, i.name = e.name, o && Object.assign(i, o), i;
|
|
404
|
+
};
|
|
405
|
+
var _n = null;
|
|
406
|
+
function he(e) {
|
|
407
|
+
return a.isPlainObject(e) || a.isArray(e);
|
|
408
|
+
}
|
|
409
|
+
function lt(e) {
|
|
410
|
+
return a.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
411
|
+
}
|
|
412
|
+
function Ue(e, t, n) {
|
|
413
|
+
return e ? e.concat(t).map(function (s, o) {
|
|
414
|
+
return s = lt(s), !n && o ? "[" + s + "]" : s;
|
|
415
|
+
}).join(n ? "." : "") : t;
|
|
416
|
+
}
|
|
417
|
+
function xn(e) {
|
|
418
|
+
return a.isArray(e) && !e.some(he);
|
|
419
|
+
}
|
|
420
|
+
var kn = a.toFlatObject(a, {}, null, function (t) {
|
|
421
|
+
return /^is[A-Z]/.test(t);
|
|
422
|
+
});
|
|
423
|
+
function ie(e, t, n) {
|
|
424
|
+
if (!a.isObject(e)) throw new TypeError("target must be an object");
|
|
425
|
+
t = t || new FormData(), n = a.toFlatObject(n, {
|
|
426
|
+
metaTokens: true,
|
|
427
|
+
dots: false,
|
|
428
|
+
indexes: false
|
|
429
|
+
}, false, function (m, h) {
|
|
430
|
+
return !a.isUndefined(h[m]);
|
|
431
|
+
});
|
|
432
|
+
var r = n.metaTokens,
|
|
433
|
+
s = n.visitor || l,
|
|
434
|
+
o = n.dots,
|
|
435
|
+
i = n.indexes,
|
|
436
|
+
f = (n.Blob || (typeof Blob === "undefined" ? "undefined" : _typeof(Blob)) < "u" && Blob) && a.isSpecCompliantForm(t);
|
|
437
|
+
if (!a.isFunction(s)) throw new TypeError("visitor must be a function");
|
|
438
|
+
function u(p) {
|
|
439
|
+
if (p === null) return "";
|
|
440
|
+
if (a.isDate(p)) return p.toISOString();
|
|
441
|
+
if (a.isBoolean(p)) return p.toString();
|
|
442
|
+
if (!f && a.isBlob(p)) throw new y("Blob is not supported. Use a Buffer instead.");
|
|
443
|
+
return a.isArrayBuffer(p) || a.isTypedArray(p) ? f && typeof Blob == "function" ? new Blob([p]) : Buffer.from(p) : p;
|
|
444
|
+
}
|
|
445
|
+
function l(p, m, h) {
|
|
446
|
+
var E = p;
|
|
447
|
+
if (p && !h && _typeof(p) == "object") {
|
|
448
|
+
if (a.endsWith(m, "{}")) m = r ? m : m.slice(0, -2), p = JSON.stringify(p);else if (a.isArray(p) && xn(p) || (a.isFileList(p) || a.endsWith(m, "[]")) && (E = a.toArray(p))) return m = lt(m), E.forEach(function (S, C) {
|
|
449
|
+
!(a.isUndefined(S) || S === null) && t.append(
|
|
450
|
+
// eslint-disable-next-line no-nested-ternary
|
|
451
|
+
i === true ? Ue([m], C, o) : i === null ? m : m + "[]", u(S));
|
|
452
|
+
}), false;
|
|
453
|
+
}
|
|
454
|
+
return he(p) ? true : (t.append(Ue(h, m, o), u(p)), false);
|
|
455
|
+
}
|
|
456
|
+
var d = [],
|
|
457
|
+
w = Object.assign(kn, {
|
|
458
|
+
defaultVisitor: l,
|
|
459
|
+
convertValue: u,
|
|
460
|
+
isVisitable: he
|
|
461
|
+
});
|
|
462
|
+
function g(p, m) {
|
|
463
|
+
if (!a.isUndefined(p)) {
|
|
464
|
+
if (d.indexOf(p) !== -1) throw Error("Circular reference detected in " + m.join("."));
|
|
465
|
+
d.push(p), a.forEach(p, function (E, R) {
|
|
466
|
+
(!(a.isUndefined(E) || E === null) && s.call(t, E, a.isString(R) ? R.trim() : R, m, w)) === true && g(E, m ? m.concat(R) : [R]);
|
|
467
|
+
}), d.pop();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
if (!a.isObject(e)) throw new TypeError("data must be an object");
|
|
471
|
+
return g(e), t;
|
|
472
|
+
}
|
|
473
|
+
function Ne(e) {
|
|
474
|
+
var t = {
|
|
475
|
+
"!": "%21",
|
|
476
|
+
"'": "%27",
|
|
477
|
+
"(": "%28",
|
|
478
|
+
")": "%29",
|
|
479
|
+
"~": "%7E",
|
|
480
|
+
"%20": "+",
|
|
481
|
+
"%00": "\0"
|
|
482
|
+
};
|
|
483
|
+
return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g, function (r) {
|
|
484
|
+
return t[r];
|
|
485
|
+
});
|
|
486
|
+
}
|
|
487
|
+
function Ae(e, t) {
|
|
488
|
+
this._pairs = [], e && ie(e, this, t);
|
|
489
|
+
}
|
|
490
|
+
var ft = Ae.prototype;
|
|
491
|
+
ft.append = function (t, n) {
|
|
492
|
+
this._pairs.push([t, n]);
|
|
493
|
+
};
|
|
494
|
+
ft.toString = function (t) {
|
|
495
|
+
var n = t ? function (r) {
|
|
496
|
+
return t.call(this, r, Ne);
|
|
497
|
+
} : Ne;
|
|
498
|
+
return this._pairs.map(function (s) {
|
|
499
|
+
return n(s[0]) + "=" + n(s[1]);
|
|
500
|
+
}, "").join("&");
|
|
501
|
+
};
|
|
502
|
+
function Cn(e) {
|
|
503
|
+
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
504
|
+
}
|
|
505
|
+
function dt(e, t, n) {
|
|
506
|
+
if (!t) return e;
|
|
507
|
+
var r = n && n.encode || Cn;
|
|
508
|
+
a.isFunction(n) && (n = {
|
|
509
|
+
serialize: n
|
|
510
|
+
});
|
|
511
|
+
var s = n && n.serialize;
|
|
512
|
+
var o;
|
|
513
|
+
if (s ? o = s(t, n) : o = a.isURLSearchParams(t) ? t.toString() : new Ae(t, n).toString(r), o) {
|
|
514
|
+
var i = e.indexOf("#");
|
|
515
|
+
i !== -1 && (e = e.slice(0, i)), e += (e.indexOf("?") === -1 ? "?" : "&") + o;
|
|
516
|
+
}
|
|
517
|
+
return e;
|
|
518
|
+
}
|
|
519
|
+
var Le = /*#__PURE__*/function () {
|
|
520
|
+
function Le() {
|
|
521
|
+
_classCallCheck(this, Le);
|
|
522
|
+
this.handlers = [];
|
|
523
|
+
}
|
|
524
|
+
/**
|
|
525
|
+
* Add a new interceptor to the stack
|
|
526
|
+
*
|
|
527
|
+
* @param {Function} fulfilled The function to handle `then` for a `Promise`
|
|
528
|
+
* @param {Function} rejected The function to handle `reject` for a `Promise`
|
|
529
|
+
*
|
|
530
|
+
* @return {Number} An ID used to remove interceptor later
|
|
531
|
+
*/
|
|
532
|
+
return _createClass(Le, [{
|
|
533
|
+
key: "use",
|
|
534
|
+
value: function use(t, n, r) {
|
|
535
|
+
return this.handlers.push({
|
|
536
|
+
fulfilled: t,
|
|
537
|
+
rejected: n,
|
|
538
|
+
synchronous: r ? r.synchronous : false,
|
|
539
|
+
runWhen: r ? r.runWhen : null
|
|
540
|
+
}), this.handlers.length - 1;
|
|
541
|
+
}
|
|
542
|
+
/**
|
|
543
|
+
* Remove an interceptor from the stack
|
|
544
|
+
*
|
|
545
|
+
* @param {Number} id The ID that was returned by `use`
|
|
546
|
+
*
|
|
547
|
+
* @returns {Boolean} `true` if the interceptor was removed, `false` otherwise
|
|
548
|
+
*/
|
|
549
|
+
}, {
|
|
550
|
+
key: "eject",
|
|
551
|
+
value: function eject(t) {
|
|
552
|
+
this.handlers[t] && (this.handlers[t] = null);
|
|
553
|
+
}
|
|
554
|
+
/**
|
|
555
|
+
* Clear all interceptors from the stack
|
|
556
|
+
*
|
|
557
|
+
* @returns {void}
|
|
558
|
+
*/
|
|
559
|
+
}, {
|
|
560
|
+
key: "clear",
|
|
561
|
+
value: function clear() {
|
|
562
|
+
this.handlers && (this.handlers = []);
|
|
563
|
+
}
|
|
564
|
+
/**
|
|
565
|
+
* Iterate over all the registered interceptors
|
|
566
|
+
*
|
|
567
|
+
* This method is particularly useful for skipping over any
|
|
568
|
+
* interceptors that may have become `null` calling `eject`.
|
|
569
|
+
*
|
|
570
|
+
* @param {Function} fn The function to call for each interceptor
|
|
571
|
+
*
|
|
572
|
+
* @returns {void}
|
|
573
|
+
*/
|
|
574
|
+
}, {
|
|
575
|
+
key: "forEach",
|
|
576
|
+
value: function forEach(t) {
|
|
577
|
+
a.forEach(this.handlers, function (r) {
|
|
578
|
+
r !== null && t(r);
|
|
579
|
+
});
|
|
580
|
+
}
|
|
581
|
+
}]);
|
|
582
|
+
}();
|
|
583
|
+
var pt = {
|
|
584
|
+
silentJSONParsing: true,
|
|
585
|
+
forcedJSONParsing: true,
|
|
586
|
+
clarifyTimeoutError: false
|
|
587
|
+
},
|
|
588
|
+
Pn = (typeof URLSearchParams === "undefined" ? "undefined" : _typeof(URLSearchParams)) < "u" ? URLSearchParams : Ae,
|
|
589
|
+
Un = (typeof FormData === "undefined" ? "undefined" : _typeof(FormData)) < "u" ? FormData : null,
|
|
590
|
+
Nn = (typeof Blob === "undefined" ? "undefined" : _typeof(Blob)) < "u" ? Blob : null,
|
|
591
|
+
Ln = {
|
|
592
|
+
isBrowser: true,
|
|
593
|
+
classes: {
|
|
594
|
+
URLSearchParams: Pn,
|
|
595
|
+
FormData: Un,
|
|
596
|
+
Blob: Nn
|
|
597
|
+
},
|
|
598
|
+
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
599
|
+
},
|
|
600
|
+
_e = (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" && (typeof document === "undefined" ? "undefined" : _typeof(document)) < "u",
|
|
601
|
+
me = (typeof navigator === "undefined" ? "undefined" : _typeof(navigator)) == "object" && navigator || undefined,
|
|
602
|
+
Fn = _e && (!me || ["ReactNative", "NativeScript", "NS"].indexOf(me.product) < 0),
|
|
603
|
+
Dn = (typeof WorkerGlobalScope === "undefined" ? "undefined" : _typeof(WorkerGlobalScope)) < "u" &&
|
|
604
|
+
// eslint-disable-next-line no-undef
|
|
605
|
+
self instanceof WorkerGlobalScope && typeof self.importScripts == "function",
|
|
606
|
+
vn = _e && window.location.href || "http://localhost",
|
|
607
|
+
Bn = /* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({
|
|
608
|
+
__proto__: null,
|
|
609
|
+
hasBrowserEnv: _e,
|
|
610
|
+
hasStandardBrowserEnv: Fn,
|
|
611
|
+
hasStandardBrowserWebWorkerEnv: Dn,
|
|
612
|
+
navigator: me,
|
|
613
|
+
origin: vn
|
|
614
|
+
}, Symbol.toStringTag, {
|
|
615
|
+
value: "Module"
|
|
616
|
+
})),
|
|
617
|
+
T = _objectSpread(_objectSpread({}, Bn), Ln);
|
|
618
|
+
function In(e, t) {
|
|
619
|
+
return ie(e, new T.classes.URLSearchParams(), Object.assign({
|
|
620
|
+
visitor: function visitor(n, r, s, o) {
|
|
621
|
+
return T.isNode && a.isBuffer(n) ? (this.append(r, n.toString("base64")), false) : o.defaultVisitor.apply(this, arguments);
|
|
622
|
+
}
|
|
623
|
+
}, t));
|
|
624
|
+
}
|
|
625
|
+
function jn(e) {
|
|
626
|
+
return a.matchAll(/\w+|\[(\w*)]/g, e).map(function (t) {
|
|
627
|
+
return t[0] === "[]" ? "" : t[1] || t[0];
|
|
628
|
+
});
|
|
629
|
+
}
|
|
630
|
+
function qn(e) {
|
|
631
|
+
var t = {},
|
|
632
|
+
n = Object.keys(e);
|
|
633
|
+
var r;
|
|
634
|
+
var s = n.length;
|
|
635
|
+
var o;
|
|
636
|
+
for (r = 0; r < s; r++) o = n[r], t[o] = e[o];
|
|
637
|
+
return t;
|
|
638
|
+
}
|
|
639
|
+
function ht(e) {
|
|
640
|
+
function t(n, r, s, o) {
|
|
641
|
+
var i = n[o++];
|
|
642
|
+
if (i === "__proto__") return true;
|
|
643
|
+
var c = Number.isFinite(+i),
|
|
644
|
+
f = o >= n.length;
|
|
645
|
+
return i = !i && a.isArray(s) ? s.length : i, f ? (a.hasOwnProp(s, i) ? s[i] = [s[i], r] : s[i] = r, !c) : ((!s[i] || !a.isObject(s[i])) && (s[i] = []), t(n, r, s[i], o) && a.isArray(s[i]) && (s[i] = qn(s[i])), !c);
|
|
646
|
+
}
|
|
647
|
+
if (a.isFormData(e) && a.isFunction(e.entries)) {
|
|
648
|
+
var n = {};
|
|
649
|
+
return a.forEachEntry(e, function (r, s) {
|
|
650
|
+
t(jn(r), s, n, 0);
|
|
651
|
+
}), n;
|
|
652
|
+
}
|
|
653
|
+
return null;
|
|
654
|
+
}
|
|
655
|
+
function Mn(e, t, n) {
|
|
656
|
+
if (a.isString(e)) try {
|
|
657
|
+
return (t || JSON.parse)(e), a.trim(e);
|
|
658
|
+
} catch (r) {
|
|
659
|
+
if (r.name !== "SyntaxError") throw r;
|
|
660
|
+
}
|
|
661
|
+
return (0, JSON.stringify)(e);
|
|
662
|
+
}
|
|
663
|
+
var W = {
|
|
664
|
+
transitional: pt,
|
|
665
|
+
adapter: ["xhr", "http", "fetch"],
|
|
666
|
+
transformRequest: [function (t, n) {
|
|
667
|
+
var r = n.getContentType() || "",
|
|
668
|
+
s = r.indexOf("application/json") > -1,
|
|
669
|
+
o = a.isObject(t);
|
|
670
|
+
if (o && a.isHTMLForm(t) && (t = new FormData(t)), a.isFormData(t)) return s ? JSON.stringify(ht(t)) : t;
|
|
671
|
+
if (a.isArrayBuffer(t) || a.isBuffer(t) || a.isStream(t) || a.isFile(t) || a.isBlob(t) || a.isReadableStream(t)) return t;
|
|
672
|
+
if (a.isArrayBufferView(t)) return t.buffer;
|
|
673
|
+
if (a.isURLSearchParams(t)) return n.setContentType("application/x-www-form-urlencoded;charset=utf-8", false), t.toString();
|
|
674
|
+
var c;
|
|
675
|
+
if (o) {
|
|
676
|
+
if (r.indexOf("application/x-www-form-urlencoded") > -1) return In(t, this.formSerializer).toString();
|
|
677
|
+
if ((c = a.isFileList(t)) || r.indexOf("multipart/form-data") > -1) {
|
|
678
|
+
var f = this.env && this.env.FormData;
|
|
679
|
+
return ie(c ? {
|
|
680
|
+
"files[]": t
|
|
681
|
+
} : t, f && new f(), this.formSerializer);
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
return o || s ? (n.setContentType("application/json", false), Mn(t)) : t;
|
|
685
|
+
}],
|
|
686
|
+
transformResponse: [function (t) {
|
|
687
|
+
var n = this.transitional || W.transitional,
|
|
688
|
+
r = n && n.forcedJSONParsing,
|
|
689
|
+
s = this.responseType === "json";
|
|
690
|
+
if (a.isResponse(t) || a.isReadableStream(t)) return t;
|
|
691
|
+
if (t && a.isString(t) && (r && !this.responseType || s)) {
|
|
692
|
+
var i = !(n && n.silentJSONParsing) && s;
|
|
693
|
+
try {
|
|
694
|
+
return JSON.parse(t);
|
|
695
|
+
} catch (c) {
|
|
696
|
+
if (i) throw c.name === "SyntaxError" ? y.from(c, y.ERR_BAD_RESPONSE, this, null, this.response) : c;
|
|
697
|
+
}
|
|
698
|
+
}
|
|
699
|
+
return t;
|
|
700
|
+
}],
|
|
701
|
+
/**
|
|
702
|
+
* A timeout in milliseconds to abort a request. If set to 0 (default) a
|
|
703
|
+
* timeout is not created.
|
|
704
|
+
*/
|
|
705
|
+
timeout: 0,
|
|
706
|
+
xsrfCookieName: "XSRF-TOKEN",
|
|
707
|
+
xsrfHeaderName: "X-XSRF-TOKEN",
|
|
708
|
+
maxContentLength: -1,
|
|
709
|
+
maxBodyLength: -1,
|
|
710
|
+
env: {
|
|
711
|
+
FormData: T.classes.FormData,
|
|
712
|
+
Blob: T.classes.Blob
|
|
713
|
+
},
|
|
714
|
+
validateStatus: function validateStatus(t) {
|
|
715
|
+
return t >= 200 && t < 300;
|
|
716
|
+
},
|
|
717
|
+
headers: {
|
|
718
|
+
common: {
|
|
719
|
+
Accept: "application/json, text/plain, */*",
|
|
720
|
+
"Content-Type": undefined
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
};
|
|
724
|
+
a.forEach(["delete", "get", "head", "post", "put", "patch"], function (e) {
|
|
725
|
+
W.headers[e] = {};
|
|
726
|
+
});
|
|
727
|
+
var Hn = a.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]),
|
|
728
|
+
zn = function zn(e) {
|
|
729
|
+
var t = {};
|
|
730
|
+
var n, r, s;
|
|
731
|
+
return e && e.split("\n").forEach(function (i) {
|
|
732
|
+
s = i.indexOf(":"), n = i.substring(0, s).trim().toLowerCase(), r = i.substring(s + 1).trim(), !(!n || t[n] && Hn[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
733
|
+
}), t;
|
|
734
|
+
},
|
|
735
|
+
Fe = Symbol("internals");
|
|
736
|
+
function j(e) {
|
|
737
|
+
return e && String(e).trim().toLowerCase();
|
|
738
|
+
}
|
|
739
|
+
function G(e) {
|
|
740
|
+
return e === false || e == null ? e : a.isArray(e) ? e.map(G) : String(e);
|
|
741
|
+
}
|
|
742
|
+
function $n(e) {
|
|
743
|
+
var t = /* @__PURE__ */Object.create(null),
|
|
744
|
+
n = /([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;
|
|
745
|
+
var r;
|
|
746
|
+
for (; r = n.exec(e);) t[r[1]] = r[2];
|
|
747
|
+
return t;
|
|
748
|
+
}
|
|
749
|
+
var Jn = function Jn(e) {
|
|
750
|
+
return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());
|
|
751
|
+
};
|
|
752
|
+
function le(e, t, n, r, s) {
|
|
753
|
+
if (a.isFunction(r)) return r.call(this, t, n);
|
|
754
|
+
if (s && (t = n), !!a.isString(t)) {
|
|
755
|
+
if (a.isString(r)) return t.indexOf(r) !== -1;
|
|
756
|
+
if (a.isRegExp(r)) return r.test(t);
|
|
757
|
+
}
|
|
758
|
+
}
|
|
759
|
+
function Vn(e) {
|
|
760
|
+
return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g, function (t, n, r) {
|
|
761
|
+
return n.toUpperCase() + r;
|
|
762
|
+
});
|
|
763
|
+
}
|
|
764
|
+
function Wn(e, t) {
|
|
765
|
+
var n = a.toCamelCase(" " + t);
|
|
766
|
+
["get", "set", "has"].forEach(function (r) {
|
|
767
|
+
Object.defineProperty(e, r + n, {
|
|
768
|
+
value: function value(s, o, i) {
|
|
769
|
+
return this[r].call(this, t, s, o, i);
|
|
770
|
+
},
|
|
771
|
+
configurable: true
|
|
772
|
+
});
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
var _ = /*#__PURE__*/function () {
|
|
776
|
+
function _(t) {
|
|
777
|
+
_classCallCheck(this, _);
|
|
778
|
+
t && this.set(t);
|
|
779
|
+
}
|
|
780
|
+
return _createClass(_, [{
|
|
781
|
+
key: "set",
|
|
782
|
+
value: function set(t, n, r) {
|
|
783
|
+
var s = this;
|
|
784
|
+
function o(c, f, u) {
|
|
785
|
+
var l = j(f);
|
|
786
|
+
if (!l) throw new Error("header name must be a non-empty string");
|
|
787
|
+
var d = a.findKey(s, l);
|
|
788
|
+
(!d || s[d] === undefined || u === true || u === undefined && s[d] !== false) && (s[d || f] = G(c));
|
|
789
|
+
}
|
|
790
|
+
var i = function i(c, f) {
|
|
791
|
+
return a.forEach(c, function (u, l) {
|
|
792
|
+
return o(u, l, f);
|
|
793
|
+
});
|
|
794
|
+
};
|
|
795
|
+
if (a.isPlainObject(t) || t instanceof this.constructor) i(t, n);else if (a.isString(t) && (t = t.trim()) && !Jn(t)) i(zn(t), n);else if (a.isObject(t) && a.isIterable(t)) {
|
|
796
|
+
var c = {},
|
|
797
|
+
f,
|
|
798
|
+
u;
|
|
799
|
+
var _iterator2 = _createForOfIteratorHelper(t),
|
|
800
|
+
_step2;
|
|
801
|
+
try {
|
|
802
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
|
803
|
+
var l = _step2.value;
|
|
804
|
+
if (!a.isArray(l)) throw TypeError("Object iterator must return a key-value pair");
|
|
805
|
+
c[u = l[0]] = (f = c[u]) ? a.isArray(f) ? [].concat(_toConsumableArray(f), [l[1]]) : [f, l[1]] : l[1];
|
|
806
|
+
}
|
|
807
|
+
} catch (err) {
|
|
808
|
+
_iterator2.e(err);
|
|
809
|
+
} finally {
|
|
810
|
+
_iterator2.f();
|
|
811
|
+
}
|
|
812
|
+
i(c, n);
|
|
813
|
+
} else t != null && o(n, t, r);
|
|
814
|
+
return this;
|
|
815
|
+
}
|
|
816
|
+
}, {
|
|
817
|
+
key: "get",
|
|
818
|
+
value: function get(t, n) {
|
|
819
|
+
if (t = j(t), t) {
|
|
820
|
+
var r = a.findKey(this, t);
|
|
821
|
+
if (r) {
|
|
822
|
+
var s = this[r];
|
|
823
|
+
if (!n) return s;
|
|
824
|
+
if (n === true) return $n(s);
|
|
825
|
+
if (a.isFunction(n)) return n.call(this, s, r);
|
|
826
|
+
if (a.isRegExp(n)) return n.exec(s);
|
|
827
|
+
throw new TypeError("parser must be boolean|regexp|function");
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
}, {
|
|
832
|
+
key: "has",
|
|
833
|
+
value: function has(t, n) {
|
|
834
|
+
if (t = j(t), t) {
|
|
835
|
+
var r = a.findKey(this, t);
|
|
836
|
+
return !!(r && this[r] !== undefined && (!n || le(this, this[r], r, n)));
|
|
837
|
+
}
|
|
838
|
+
return false;
|
|
839
|
+
}
|
|
840
|
+
}, {
|
|
841
|
+
key: "delete",
|
|
842
|
+
value: function _delete(t, n) {
|
|
843
|
+
var r = this;
|
|
844
|
+
var s = false;
|
|
845
|
+
function o(i) {
|
|
846
|
+
if (i = j(i), i) {
|
|
847
|
+
var c = a.findKey(r, i);
|
|
848
|
+
c && (!n || le(r, r[c], c, n)) && (delete r[c], s = true);
|
|
849
|
+
}
|
|
850
|
+
}
|
|
851
|
+
return a.isArray(t) ? t.forEach(o) : o(t), s;
|
|
852
|
+
}
|
|
853
|
+
}, {
|
|
854
|
+
key: "clear",
|
|
855
|
+
value: function clear(t) {
|
|
856
|
+
var n = Object.keys(this);
|
|
857
|
+
var r = n.length,
|
|
858
|
+
s = false;
|
|
859
|
+
for (; r--;) {
|
|
860
|
+
var o = n[r];
|
|
861
|
+
(!t || le(this, this[o], o, t, true)) && (delete this[o], s = true);
|
|
862
|
+
}
|
|
863
|
+
return s;
|
|
864
|
+
}
|
|
865
|
+
}, {
|
|
866
|
+
key: "normalize",
|
|
867
|
+
value: function normalize(t) {
|
|
868
|
+
var n = this,
|
|
869
|
+
r = {};
|
|
870
|
+
return a.forEach(this, function (s, o) {
|
|
871
|
+
var i = a.findKey(r, o);
|
|
872
|
+
if (i) {
|
|
873
|
+
n[i] = G(s), delete n[o];
|
|
874
|
+
return;
|
|
875
|
+
}
|
|
876
|
+
var c = t ? Vn(o) : String(o).trim();
|
|
877
|
+
c !== o && delete n[o], n[c] = G(s), r[c] = true;
|
|
878
|
+
}), this;
|
|
879
|
+
}
|
|
880
|
+
}, {
|
|
881
|
+
key: "concat",
|
|
882
|
+
value: function concat() {
|
|
883
|
+
var _this$constructor;
|
|
884
|
+
for (var _len = arguments.length, t = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
885
|
+
t[_key] = arguments[_key];
|
|
886
|
+
}
|
|
887
|
+
return (_this$constructor = this.constructor).concat.apply(_this$constructor, [this].concat(t));
|
|
888
|
+
}
|
|
889
|
+
}, {
|
|
890
|
+
key: "toJSON",
|
|
891
|
+
value: function toJSON(t) {
|
|
892
|
+
var n = /* @__PURE__ */Object.create(null);
|
|
893
|
+
return a.forEach(this, function (r, s) {
|
|
894
|
+
r != null && r !== false && (n[s] = t && a.isArray(r) ? r.join(", ") : r);
|
|
895
|
+
}), n;
|
|
896
|
+
}
|
|
897
|
+
}, {
|
|
898
|
+
key: Symbol.iterator,
|
|
899
|
+
value: function value() {
|
|
900
|
+
return Object.entries(this.toJSON())[Symbol.iterator]();
|
|
901
|
+
}
|
|
902
|
+
}, {
|
|
903
|
+
key: "toString",
|
|
904
|
+
value: function toString() {
|
|
905
|
+
return Object.entries(this.toJSON()).map(function (_ref8) {
|
|
906
|
+
var _ref9 = _slicedToArray(_ref8, 2),
|
|
907
|
+
t = _ref9[0],
|
|
908
|
+
n = _ref9[1];
|
|
909
|
+
return t + ": " + n;
|
|
910
|
+
}).join("\n");
|
|
911
|
+
}
|
|
912
|
+
}, {
|
|
913
|
+
key: "getSetCookie",
|
|
914
|
+
value: function getSetCookie() {
|
|
915
|
+
return this.get("set-cookie") || [];
|
|
916
|
+
}
|
|
917
|
+
}, {
|
|
918
|
+
key: Symbol.toStringTag,
|
|
919
|
+
get: function get() {
|
|
920
|
+
return "AxiosHeaders";
|
|
921
|
+
}
|
|
922
|
+
}], [{
|
|
923
|
+
key: "from",
|
|
924
|
+
value: function from(t) {
|
|
925
|
+
return t instanceof this ? t : new this(t);
|
|
926
|
+
}
|
|
927
|
+
}, {
|
|
928
|
+
key: "concat",
|
|
929
|
+
value: function concat(t) {
|
|
930
|
+
var r = new this(t);
|
|
931
|
+
for (var _len2 = arguments.length, n = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {
|
|
932
|
+
n[_key2 - 1] = arguments[_key2];
|
|
933
|
+
}
|
|
934
|
+
return n.forEach(function (s) {
|
|
935
|
+
return r.set(s);
|
|
936
|
+
}), r;
|
|
937
|
+
}
|
|
938
|
+
}, {
|
|
939
|
+
key: "accessor",
|
|
940
|
+
value: function accessor(t) {
|
|
941
|
+
var r = (this[Fe] = this[Fe] = {
|
|
942
|
+
accessors: {}
|
|
943
|
+
}).accessors,
|
|
944
|
+
s = this.prototype;
|
|
945
|
+
function o(i) {
|
|
946
|
+
var c = j(i);
|
|
947
|
+
r[c] || (Wn(s, i), r[c] = true);
|
|
948
|
+
}
|
|
949
|
+
return a.isArray(t) ? t.forEach(o) : o(t), this;
|
|
950
|
+
}
|
|
951
|
+
}]);
|
|
952
|
+
}();
|
|
953
|
+
_.accessor(["Content-Type", "Content-Length", "Accept", "Accept-Encoding", "User-Agent", "Authorization"]);
|
|
954
|
+
a.reduceDescriptors(_.prototype, function (_ref0, t) {
|
|
955
|
+
var e = _ref0.value;
|
|
956
|
+
var n = t[0].toUpperCase() + t.slice(1);
|
|
957
|
+
return {
|
|
958
|
+
get: function get() {
|
|
959
|
+
return e;
|
|
960
|
+
},
|
|
961
|
+
set: function set(r) {
|
|
962
|
+
this[n] = r;
|
|
963
|
+
}
|
|
964
|
+
};
|
|
965
|
+
});
|
|
966
|
+
a.freezeMethods(_);
|
|
967
|
+
function fe(e, t) {
|
|
968
|
+
var n = this || W,
|
|
969
|
+
r = t || n,
|
|
970
|
+
s = _.from(r.headers);
|
|
971
|
+
var o = r.data;
|
|
972
|
+
return a.forEach(e, function (c) {
|
|
973
|
+
o = c.call(n, o, s.normalize(), t ? t.status : undefined);
|
|
974
|
+
}), s.normalize(), o;
|
|
975
|
+
}
|
|
976
|
+
function mt(e) {
|
|
977
|
+
return !!(e && e.__CANCEL__);
|
|
978
|
+
}
|
|
979
|
+
function I(e, t, n) {
|
|
980
|
+
y.call(this, e !== null && e !== void 0 ? e : "canceled", y.ERR_CANCELED, t, n), this.name = "CanceledError";
|
|
981
|
+
}
|
|
982
|
+
a.inherits(I, y, {
|
|
983
|
+
__CANCEL__: true
|
|
984
|
+
});
|
|
985
|
+
function yt(e, t, n) {
|
|
986
|
+
var r = n.config.validateStatus;
|
|
987
|
+
!n.status || !r || r(n.status) ? e(n) : t(new y("Request failed with status code " + n.status, [y.ERR_BAD_REQUEST, y.ERR_BAD_RESPONSE][Math.floor(n.status / 100) - 4], n.config, n.request, n));
|
|
988
|
+
}
|
|
989
|
+
function Kn(e) {
|
|
990
|
+
var t = /^([-+\w]{1,25})(:?\/\/|:)/.exec(e);
|
|
991
|
+
return t && t[1] || "";
|
|
992
|
+
}
|
|
993
|
+
function Qn(e, t) {
|
|
994
|
+
e = e || 10;
|
|
995
|
+
var n = new Array(e),
|
|
996
|
+
r = new Array(e);
|
|
997
|
+
var s = 0,
|
|
998
|
+
o = 0,
|
|
999
|
+
i;
|
|
1000
|
+
return t = t !== undefined ? t : 1e3, function (f) {
|
|
1001
|
+
var u = Date.now(),
|
|
1002
|
+
l = r[o];
|
|
1003
|
+
i || (i = u), n[s] = f, r[s] = u;
|
|
1004
|
+
var d = o,
|
|
1005
|
+
w = 0;
|
|
1006
|
+
for (; d !== s;) w += n[d++], d = d % e;
|
|
1007
|
+
if (s = (s + 1) % e, s === o && (o = (o + 1) % e), u - i < t) return;
|
|
1008
|
+
var g = l && u - l;
|
|
1009
|
+
return g ? Math.round(w * 1e3 / g) : undefined;
|
|
1010
|
+
};
|
|
1011
|
+
}
|
|
1012
|
+
function Xn(e, t) {
|
|
1013
|
+
var n = 0,
|
|
1014
|
+
r = 1e3 / t,
|
|
1015
|
+
s,
|
|
1016
|
+
o;
|
|
1017
|
+
var i = function i(u) {
|
|
1018
|
+
var l = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : Date.now();
|
|
1019
|
+
n = l, s = null, o && (clearTimeout(o), o = null), e.apply(null, u);
|
|
1020
|
+
};
|
|
1021
|
+
return [function () {
|
|
1022
|
+
var l = Date.now(),
|
|
1023
|
+
d = l - n;
|
|
1024
|
+
for (var _len3 = arguments.length, u = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {
|
|
1025
|
+
u[_key3] = arguments[_key3];
|
|
1026
|
+
}
|
|
1027
|
+
d >= r ? i(u, l) : (s = u, o || (o = setTimeout(function () {
|
|
1028
|
+
o = null, i(s);
|
|
1029
|
+
}, r - d)));
|
|
1030
|
+
}, function () {
|
|
1031
|
+
return s && i(s);
|
|
1032
|
+
}];
|
|
1033
|
+
}
|
|
1034
|
+
var ee = function ee(e, t) {
|
|
1035
|
+
var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 3;
|
|
1036
|
+
var r = 0;
|
|
1037
|
+
var s = Qn(50, 250);
|
|
1038
|
+
return Xn(function (o) {
|
|
1039
|
+
var i = o.loaded,
|
|
1040
|
+
c = o.lengthComputable ? o.total : undefined,
|
|
1041
|
+
f = i - r,
|
|
1042
|
+
u = s(f),
|
|
1043
|
+
l = i <= c;
|
|
1044
|
+
r = i;
|
|
1045
|
+
var d = _defineProperty({
|
|
1046
|
+
loaded: i,
|
|
1047
|
+
total: c,
|
|
1048
|
+
progress: c ? i / c : undefined,
|
|
1049
|
+
bytes: f,
|
|
1050
|
+
rate: u || undefined,
|
|
1051
|
+
estimated: u && c && l ? (c - i) / u : undefined,
|
|
1052
|
+
event: o,
|
|
1053
|
+
lengthComputable: c != null
|
|
1054
|
+
}, t ? "download" : "upload", true);
|
|
1055
|
+
e(d);
|
|
1056
|
+
}, n);
|
|
1057
|
+
},
|
|
1058
|
+
De = function De(e, t) {
|
|
1059
|
+
var n = e != null;
|
|
1060
|
+
return [function (r) {
|
|
1061
|
+
return t[0]({
|
|
1062
|
+
lengthComputable: n,
|
|
1063
|
+
total: e,
|
|
1064
|
+
loaded: r
|
|
1065
|
+
});
|
|
1066
|
+
}, t[1]];
|
|
1067
|
+
},
|
|
1068
|
+
ve = function ve(e) {
|
|
1069
|
+
return function () {
|
|
1070
|
+
for (var _len4 = arguments.length, t = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {
|
|
1071
|
+
t[_key4] = arguments[_key4];
|
|
1072
|
+
}
|
|
1073
|
+
return a.asap(function () {
|
|
1074
|
+
return e.apply(void 0, t);
|
|
1075
|
+
});
|
|
1076
|
+
};
|
|
1077
|
+
},
|
|
1078
|
+
Gn = T.hasStandardBrowserEnv ? /* @__PURE__ */function (e, t) {
|
|
1079
|
+
return function (n) {
|
|
1080
|
+
return n = new URL(n, T.origin), e.protocol === n.protocol && e.host === n.host && (t || e.port === n.port);
|
|
1081
|
+
};
|
|
1082
|
+
}(new URL(T.origin), T.navigator && /(msie|trident)/i.test(T.navigator.userAgent)) : function () {
|
|
1083
|
+
return true;
|
|
1084
|
+
},
|
|
1085
|
+
Zn = T.hasStandardBrowserEnv ?
|
|
1086
|
+
// Standard browser envs support document.cookie
|
|
1087
|
+
{
|
|
1088
|
+
write: function write(e, t, n, r, s, o) {
|
|
1089
|
+
var i = [e + "=" + encodeURIComponent(t)];
|
|
1090
|
+
a.isNumber(n) && i.push("expires=" + new Date(n).toGMTString()), a.isString(r) && i.push("path=" + r), a.isString(s) && i.push("domain=" + s), o === true && i.push("secure"), document.cookie = i.join("; ");
|
|
1091
|
+
},
|
|
1092
|
+
read: function read(e) {
|
|
1093
|
+
var t = document.cookie.match(new RegExp("(^|;\\s*)(" + e + ")=([^;]*)"));
|
|
1094
|
+
return t ? decodeURIComponent(t[3]) : null;
|
|
1095
|
+
},
|
|
1096
|
+
remove: function remove(e) {
|
|
1097
|
+
this.write(e, "", Date.now() - 864e5);
|
|
1098
|
+
}
|
|
1099
|
+
} :
|
|
1100
|
+
// Non-standard browser env (web workers, react-native) lack needed support.
|
|
1101
|
+
{
|
|
1102
|
+
write: function write() {},
|
|
1103
|
+
read: function read() {
|
|
1104
|
+
return null;
|
|
1105
|
+
},
|
|
1106
|
+
remove: function remove() {}
|
|
1107
|
+
};
|
|
1108
|
+
function Yn(e) {
|
|
1109
|
+
return /^([a-z][a-z\d+\-.]*:)?\/\//i.test(e);
|
|
1110
|
+
}
|
|
1111
|
+
function er(e, t) {
|
|
1112
|
+
return t ? e.replace(/\/?\/$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
1113
|
+
}
|
|
1114
|
+
function wt(e, t, n) {
|
|
1115
|
+
var r = !Yn(t);
|
|
1116
|
+
return e && (r || n == false) ? er(e, t) : t;
|
|
1117
|
+
}
|
|
1118
|
+
var Be = function Be(e) {
|
|
1119
|
+
return e instanceof _ ? _objectSpread({}, e) : e;
|
|
1120
|
+
};
|
|
1121
|
+
function F(e, t) {
|
|
1122
|
+
t = t || {};
|
|
1123
|
+
var n = {};
|
|
1124
|
+
function r(u, l, d, w) {
|
|
1125
|
+
return a.isPlainObject(u) && a.isPlainObject(l) ? a.merge.call({
|
|
1126
|
+
caseless: w
|
|
1127
|
+
}, u, l) : a.isPlainObject(l) ? a.merge({}, l) : a.isArray(l) ? l.slice() : l;
|
|
1128
|
+
}
|
|
1129
|
+
function s(u, l, d, w) {
|
|
1130
|
+
if (a.isUndefined(l)) {
|
|
1131
|
+
if (!a.isUndefined(u)) return r(undefined, u, d, w);
|
|
1132
|
+
} else return r(u, l, d, w);
|
|
1133
|
+
}
|
|
1134
|
+
function o(u, l) {
|
|
1135
|
+
if (!a.isUndefined(l)) return r(undefined, l);
|
|
1136
|
+
}
|
|
1137
|
+
function i(u, l) {
|
|
1138
|
+
if (a.isUndefined(l)) {
|
|
1139
|
+
if (!a.isUndefined(u)) return r(undefined, u);
|
|
1140
|
+
} else return r(undefined, l);
|
|
1141
|
+
}
|
|
1142
|
+
function c(u, l, d) {
|
|
1143
|
+
if (d in t) return r(u, l);
|
|
1144
|
+
if (d in e) return r(undefined, u);
|
|
1145
|
+
}
|
|
1146
|
+
var f = {
|
|
1147
|
+
url: o,
|
|
1148
|
+
method: o,
|
|
1149
|
+
data: o,
|
|
1150
|
+
baseURL: i,
|
|
1151
|
+
transformRequest: i,
|
|
1152
|
+
transformResponse: i,
|
|
1153
|
+
paramsSerializer: i,
|
|
1154
|
+
timeout: i,
|
|
1155
|
+
timeoutMessage: i,
|
|
1156
|
+
withCredentials: i,
|
|
1157
|
+
withXSRFToken: i,
|
|
1158
|
+
adapter: i,
|
|
1159
|
+
responseType: i,
|
|
1160
|
+
xsrfCookieName: i,
|
|
1161
|
+
xsrfHeaderName: i,
|
|
1162
|
+
onUploadProgress: i,
|
|
1163
|
+
onDownloadProgress: i,
|
|
1164
|
+
decompress: i,
|
|
1165
|
+
maxContentLength: i,
|
|
1166
|
+
maxBodyLength: i,
|
|
1167
|
+
beforeRedirect: i,
|
|
1168
|
+
transport: i,
|
|
1169
|
+
httpAgent: i,
|
|
1170
|
+
httpsAgent: i,
|
|
1171
|
+
cancelToken: i,
|
|
1172
|
+
socketPath: i,
|
|
1173
|
+
responseEncoding: i,
|
|
1174
|
+
validateStatus: c,
|
|
1175
|
+
headers: function headers(u, l, d) {
|
|
1176
|
+
return s(Be(u), Be(l), d, true);
|
|
1177
|
+
}
|
|
1178
|
+
};
|
|
1179
|
+
return a.forEach(Object.keys(Object.assign({}, e, t)), function (l) {
|
|
1180
|
+
var d = f[l] || s,
|
|
1181
|
+
w = d(e[l], t[l], l);
|
|
1182
|
+
a.isUndefined(w) && d !== c || (n[l] = w);
|
|
1183
|
+
}), n;
|
|
1184
|
+
}
|
|
1185
|
+
var gt = function gt(e) {
|
|
1186
|
+
var t = F({}, e);
|
|
1187
|
+
var n = t.data,
|
|
1188
|
+
r = t.withXSRFToken,
|
|
1189
|
+
s = t.xsrfHeaderName,
|
|
1190
|
+
o = t.xsrfCookieName,
|
|
1191
|
+
i = t.headers,
|
|
1192
|
+
c = t.auth;
|
|
1193
|
+
t.headers = i = _.from(i), t.url = dt(wt(t.baseURL, t.url, t.allowAbsoluteUrls), e.params, e.paramsSerializer), c && i.set("Authorization", "Basic " + btoa((c.username || "") + ":" + (c.password ? unescape(encodeURIComponent(c.password)) : "")));
|
|
1194
|
+
var f;
|
|
1195
|
+
if (a.isFormData(n)) {
|
|
1196
|
+
if (T.hasStandardBrowserEnv || T.hasStandardBrowserWebWorkerEnv) i.setContentType(undefined);else if ((f = i.getContentType()) !== false) {
|
|
1197
|
+
var _ref1 = f ? f.split(";").map(function (d) {
|
|
1198
|
+
return d.trim();
|
|
1199
|
+
}).filter(Boolean) : [],
|
|
1200
|
+
_ref10 = _toArray(_ref1),
|
|
1201
|
+
u = _ref10[0],
|
|
1202
|
+
l = _ref10.slice(1);
|
|
1203
|
+
i.setContentType([u || "multipart/form-data"].concat(_toConsumableArray(l)).join("; "));
|
|
1204
|
+
}
|
|
1205
|
+
}
|
|
1206
|
+
if (T.hasStandardBrowserEnv && (r && a.isFunction(r) && (r = r(t)), r || r !== false && Gn(t.url))) {
|
|
1207
|
+
var _u = s && o && Zn.read(o);
|
|
1208
|
+
_u && i.set(s, _u);
|
|
1209
|
+
}
|
|
1210
|
+
return t;
|
|
1211
|
+
},
|
|
1212
|
+
tr = (typeof XMLHttpRequest === "undefined" ? "undefined" : _typeof(XMLHttpRequest)) < "u",
|
|
1213
|
+
nr = tr && function (e) {
|
|
1214
|
+
return new Promise(function (n, r) {
|
|
1215
|
+
var _ee, _ee2, _ee3, _ee4;
|
|
1216
|
+
var s = gt(e);
|
|
1217
|
+
var o = s.data;
|
|
1218
|
+
var i = _.from(s.headers).normalize();
|
|
1219
|
+
var c = s.responseType,
|
|
1220
|
+
f = s.onUploadProgress,
|
|
1221
|
+
u = s.onDownloadProgress,
|
|
1222
|
+
l,
|
|
1223
|
+
d,
|
|
1224
|
+
w,
|
|
1225
|
+
g,
|
|
1226
|
+
p;
|
|
1227
|
+
function m() {
|
|
1228
|
+
g && g(), p && p(), s.cancelToken && s.cancelToken.unsubscribe(l), s.signal && s.signal.removeEventListener("abort", l);
|
|
1229
|
+
}
|
|
1230
|
+
var h = new XMLHttpRequest();
|
|
1231
|
+
h.open(s.method.toUpperCase(), s.url, true), h.timeout = s.timeout;
|
|
1232
|
+
function E() {
|
|
1233
|
+
if (!h) return;
|
|
1234
|
+
var S = _.from("getAllResponseHeaders" in h && h.getAllResponseHeaders()),
|
|
1235
|
+
O = {
|
|
1236
|
+
data: !c || c === "text" || c === "json" ? h.responseText : h.response,
|
|
1237
|
+
status: h.status,
|
|
1238
|
+
statusText: h.statusText,
|
|
1239
|
+
headers: S,
|
|
1240
|
+
config: e,
|
|
1241
|
+
request: h
|
|
1242
|
+
};
|
|
1243
|
+
yt(function (U) {
|
|
1244
|
+
n(U), m();
|
|
1245
|
+
}, function (U) {
|
|
1246
|
+
r(U), m();
|
|
1247
|
+
}, O), h = null;
|
|
1248
|
+
}
|
|
1249
|
+
"onloadend" in h ? h.onloadend = E : h.onreadystatechange = function () {
|
|
1250
|
+
!h || h.readyState !== 4 || h.status === 0 && !(h.responseURL && h.responseURL.indexOf("file:") === 0) || setTimeout(E);
|
|
1251
|
+
}, h.onabort = function () {
|
|
1252
|
+
h && (r(new y("Request aborted", y.ECONNABORTED, e, h)), h = null);
|
|
1253
|
+
}, h.onerror = function () {
|
|
1254
|
+
r(new y("Network Error", y.ERR_NETWORK, e, h)), h = null;
|
|
1255
|
+
}, h.ontimeout = function () {
|
|
1256
|
+
var C = s.timeout ? "timeout of " + s.timeout + "ms exceeded" : "timeout exceeded";
|
|
1257
|
+
var O = s.transitional || pt;
|
|
1258
|
+
s.timeoutErrorMessage && (C = s.timeoutErrorMessage), r(new y(C, O.clarifyTimeoutError ? y.ETIMEDOUT : y.ECONNABORTED, e, h)), h = null;
|
|
1259
|
+
}, o === undefined && i.setContentType(null), "setRequestHeader" in h && a.forEach(i.toJSON(), function (C, O) {
|
|
1260
|
+
h.setRequestHeader(O, C);
|
|
1261
|
+
}), a.isUndefined(s.withCredentials) || (h.withCredentials = !!s.withCredentials), c && c !== "json" && (h.responseType = s.responseType), u && (_ee = ee(u, true), _ee2 = _slicedToArray(_ee, 2), w = _ee2[0], p = _ee2[1], h.addEventListener("progress", w)), f && h.upload && (_ee3 = ee(f), _ee4 = _slicedToArray(_ee3, 2), d = _ee4[0], g = _ee4[1], h.upload.addEventListener("progress", d), h.upload.addEventListener("loadend", g)), (s.cancelToken || s.signal) && (l = function l(S) {
|
|
1262
|
+
h && (r(!S || S.type ? new I(null, e, h) : S), h.abort(), h = null);
|
|
1263
|
+
}, s.cancelToken && s.cancelToken.subscribe(l), s.signal && (s.signal.aborted ? l() : s.signal.addEventListener("abort", l)));
|
|
1264
|
+
var R = Kn(s.url);
|
|
1265
|
+
if (R && T.protocols.indexOf(R) === -1) {
|
|
1266
|
+
r(new y("Unsupported protocol " + R + ":", y.ERR_BAD_REQUEST, e));
|
|
1267
|
+
return;
|
|
1268
|
+
}
|
|
1269
|
+
h.send(o || null);
|
|
1270
|
+
});
|
|
1271
|
+
},
|
|
1272
|
+
rr = function rr(e, t) {
|
|
1273
|
+
var _e2 = e = e ? e.filter(Boolean) : [],
|
|
1274
|
+
n = _e2.length;
|
|
1275
|
+
if (t || n) {
|
|
1276
|
+
var r = new AbortController(),
|
|
1277
|
+
s;
|
|
1278
|
+
var o = function o(u) {
|
|
1279
|
+
if (!s) {
|
|
1280
|
+
s = true, c();
|
|
1281
|
+
var l = u instanceof Error ? u : this.reason;
|
|
1282
|
+
r.abort(l instanceof y ? l : new I(l instanceof Error ? l.message : l));
|
|
1283
|
+
}
|
|
1284
|
+
};
|
|
1285
|
+
var i = t && setTimeout(function () {
|
|
1286
|
+
i = null, o(new y("timeout ".concat(t, " of ms exceeded"), y.ETIMEDOUT));
|
|
1287
|
+
}, t);
|
|
1288
|
+
var c = function c() {
|
|
1289
|
+
e && (i && clearTimeout(i), i = null, e.forEach(function (u) {
|
|
1290
|
+
u.unsubscribe ? u.unsubscribe(o) : u.removeEventListener("abort", o);
|
|
1291
|
+
}), e = null);
|
|
1292
|
+
};
|
|
1293
|
+
e.forEach(function (u) {
|
|
1294
|
+
return u.addEventListener("abort", o);
|
|
1295
|
+
});
|
|
1296
|
+
var f = r.signal;
|
|
1297
|
+
return f.unsubscribe = function () {
|
|
1298
|
+
return a.asap(c);
|
|
1299
|
+
}, f;
|
|
1300
|
+
}
|
|
1301
|
+
},
|
|
1302
|
+
sr = /*#__PURE__*/_regenerator().m(function sr(e, t) {
|
|
1303
|
+
var n, r, s;
|
|
1304
|
+
return _regenerator().w(function (_context) {
|
|
1305
|
+
while (1) switch (_context.n) {
|
|
1306
|
+
case 0:
|
|
1307
|
+
n = e.byteLength;
|
|
1308
|
+
if (!(n < t)) {
|
|
1309
|
+
_context.n = 2;
|
|
1310
|
+
break;
|
|
1311
|
+
}
|
|
1312
|
+
_context.n = 1;
|
|
1313
|
+
return e;
|
|
1314
|
+
case 1:
|
|
1315
|
+
return _context.a(2);
|
|
1316
|
+
case 2:
|
|
1317
|
+
r = 0;
|
|
1318
|
+
case 3:
|
|
1319
|
+
if (!(r < n)) {
|
|
1320
|
+
_context.n = 6;
|
|
1321
|
+
break;
|
|
1322
|
+
}
|
|
1323
|
+
s = r + t;
|
|
1324
|
+
_context.n = 4;
|
|
1325
|
+
return e.slice(r, s);
|
|
1326
|
+
case 4:
|
|
1327
|
+
r = s;
|
|
1328
|
+
case 5:
|
|
1329
|
+
_context.n = 3;
|
|
1330
|
+
break;
|
|
1331
|
+
case 6:
|
|
1332
|
+
return _context.a(2);
|
|
1333
|
+
}
|
|
1334
|
+
}, sr);
|
|
1335
|
+
}),
|
|
1336
|
+
or = /*#__PURE__*/function () {
|
|
1337
|
+
var _ref = _wrapAsyncGenerator(/*#__PURE__*/_regenerator().m(function _callee(e, t) {
|
|
1338
|
+
var _iteratorAbruptCompletion, _didIteratorError, _iteratorError, _iterator, _step, n, _t2;
|
|
1339
|
+
return _regenerator().w(function (_context2) {
|
|
1340
|
+
while (1) switch (_context2.p = _context2.n) {
|
|
1341
|
+
case 0:
|
|
1342
|
+
_iteratorAbruptCompletion = false;
|
|
1343
|
+
_didIteratorError = false;
|
|
1344
|
+
_context2.p = 1;
|
|
1345
|
+
_iterator = _asyncIterator(ir(e));
|
|
1346
|
+
case 2:
|
|
1347
|
+
_context2.n = 3;
|
|
1348
|
+
return _awaitAsyncGenerator(_iterator.next());
|
|
1349
|
+
case 3:
|
|
1350
|
+
if (!(_iteratorAbruptCompletion = !(_step = _context2.v).done)) {
|
|
1351
|
+
_context2.n = 5;
|
|
1352
|
+
break;
|
|
1353
|
+
}
|
|
1354
|
+
n = _step.value;
|
|
1355
|
+
return _context2.d(_regeneratorValues(_asyncGeneratorDelegate(_asyncIterator(sr(n, t)), _awaitAsyncGenerator)), 4);
|
|
1356
|
+
case 4:
|
|
1357
|
+
_iteratorAbruptCompletion = false;
|
|
1358
|
+
_context2.n = 2;
|
|
1359
|
+
break;
|
|
1360
|
+
case 5:
|
|
1361
|
+
_context2.n = 7;
|
|
1362
|
+
break;
|
|
1363
|
+
case 6:
|
|
1364
|
+
_context2.p = 6;
|
|
1365
|
+
_t2 = _context2.v;
|
|
1366
|
+
_didIteratorError = true;
|
|
1367
|
+
_iteratorError = _t2;
|
|
1368
|
+
case 7:
|
|
1369
|
+
_context2.p = 7;
|
|
1370
|
+
_context2.p = 8;
|
|
1371
|
+
if (!(_iteratorAbruptCompletion && _iterator["return"] != null)) {
|
|
1372
|
+
_context2.n = 9;
|
|
1373
|
+
break;
|
|
1374
|
+
}
|
|
1375
|
+
_context2.n = 9;
|
|
1376
|
+
return _awaitAsyncGenerator(_iterator["return"]());
|
|
1377
|
+
case 9:
|
|
1378
|
+
_context2.p = 9;
|
|
1379
|
+
if (!_didIteratorError) {
|
|
1380
|
+
_context2.n = 10;
|
|
1381
|
+
break;
|
|
1382
|
+
}
|
|
1383
|
+
throw _iteratorError;
|
|
1384
|
+
case 10:
|
|
1385
|
+
return _context2.f(9);
|
|
1386
|
+
case 11:
|
|
1387
|
+
return _context2.f(7);
|
|
1388
|
+
case 12:
|
|
1389
|
+
return _context2.a(2);
|
|
1390
|
+
}
|
|
1391
|
+
}, _callee, null, [[8,, 9, 11], [1, 6, 7, 12]]);
|
|
1392
|
+
}));
|
|
1393
|
+
return function or(_x, _x2) {
|
|
1394
|
+
return _ref.apply(this, arguments);
|
|
1395
|
+
};
|
|
1396
|
+
}(),
|
|
1397
|
+
ir = /*#__PURE__*/function () {
|
|
1398
|
+
var _ref2 = _wrapAsyncGenerator(/*#__PURE__*/_regenerator().m(function _callee2(e) {
|
|
1399
|
+
var t, _yield$_awaitAsyncGen, n, r;
|
|
1400
|
+
return _regenerator().w(function (_context3) {
|
|
1401
|
+
while (1) switch (_context3.p = _context3.n) {
|
|
1402
|
+
case 0:
|
|
1403
|
+
if (!e[Symbol.asyncIterator]) {
|
|
1404
|
+
_context3.n = 2;
|
|
1405
|
+
break;
|
|
1406
|
+
}
|
|
1407
|
+
return _context3.d(_regeneratorValues(_asyncGeneratorDelegate(_asyncIterator(e), _awaitAsyncGenerator)), 1);
|
|
1408
|
+
case 1:
|
|
1409
|
+
return _context3.a(2);
|
|
1410
|
+
case 2:
|
|
1411
|
+
t = e.getReader();
|
|
1412
|
+
_context3.p = 3;
|
|
1413
|
+
case 4:
|
|
1414
|
+
_context3.n = 5;
|
|
1415
|
+
return _awaitAsyncGenerator(t.read());
|
|
1416
|
+
case 5:
|
|
1417
|
+
_yield$_awaitAsyncGen = _context3.v;
|
|
1418
|
+
n = _yield$_awaitAsyncGen.done;
|
|
1419
|
+
r = _yield$_awaitAsyncGen.value;
|
|
1420
|
+
if (!n) {
|
|
1421
|
+
_context3.n = 6;
|
|
1422
|
+
break;
|
|
1423
|
+
}
|
|
1424
|
+
return _context3.a(3, 8);
|
|
1425
|
+
case 6:
|
|
1426
|
+
_context3.n = 7;
|
|
1427
|
+
return r;
|
|
1428
|
+
case 7:
|
|
1429
|
+
_context3.n = 4;
|
|
1430
|
+
break;
|
|
1431
|
+
case 8:
|
|
1432
|
+
_context3.p = 8;
|
|
1433
|
+
_context3.n = 9;
|
|
1434
|
+
return _awaitAsyncGenerator(t.cancel());
|
|
1435
|
+
case 9:
|
|
1436
|
+
return _context3.f(8);
|
|
1437
|
+
case 10:
|
|
1438
|
+
return _context3.a(2);
|
|
1439
|
+
}
|
|
1440
|
+
}, _callee2, null, [[3,, 8, 10]]);
|
|
1441
|
+
}));
|
|
1442
|
+
return function ir(_x3) {
|
|
1443
|
+
return _ref2.apply(this, arguments);
|
|
1444
|
+
};
|
|
1445
|
+
}(),
|
|
1446
|
+
Ie = function Ie(e, t, n, r) {
|
|
1447
|
+
var s = or(e, t);
|
|
1448
|
+
var o = 0,
|
|
1449
|
+
i,
|
|
1450
|
+
c = function c(f) {
|
|
1451
|
+
i || (i = true, r && r(f));
|
|
1452
|
+
};
|
|
1453
|
+
return new ReadableStream({
|
|
1454
|
+
pull: function pull(f) {
|
|
1455
|
+
return _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
|
|
1456
|
+
var _yield$s$next, u, l, d, w, _t3;
|
|
1457
|
+
return _regenerator().w(function (_context4) {
|
|
1458
|
+
while (1) switch (_context4.p = _context4.n) {
|
|
1459
|
+
case 0:
|
|
1460
|
+
_context4.p = 0;
|
|
1461
|
+
_context4.n = 1;
|
|
1462
|
+
return s.next();
|
|
1463
|
+
case 1:
|
|
1464
|
+
_yield$s$next = _context4.v;
|
|
1465
|
+
u = _yield$s$next.done;
|
|
1466
|
+
l = _yield$s$next.value;
|
|
1467
|
+
if (!u) {
|
|
1468
|
+
_context4.n = 2;
|
|
1469
|
+
break;
|
|
1470
|
+
}
|
|
1471
|
+
c(), f.close();
|
|
1472
|
+
return _context4.a(2);
|
|
1473
|
+
case 2:
|
|
1474
|
+
d = l.byteLength;
|
|
1475
|
+
if (n) {
|
|
1476
|
+
w = o += d;
|
|
1477
|
+
n(w);
|
|
1478
|
+
}
|
|
1479
|
+
f.enqueue(new Uint8Array(l));
|
|
1480
|
+
_context4.n = 4;
|
|
1481
|
+
break;
|
|
1482
|
+
case 3:
|
|
1483
|
+
_context4.p = 3;
|
|
1484
|
+
_t3 = _context4.v;
|
|
1485
|
+
throw c(_t3), _t3;
|
|
1486
|
+
case 4:
|
|
1487
|
+
return _context4.a(2);
|
|
1488
|
+
}
|
|
1489
|
+
}, _callee3, null, [[0, 3]]);
|
|
1490
|
+
}))();
|
|
1491
|
+
},
|
|
1492
|
+
cancel: function cancel(f) {
|
|
1493
|
+
return c(f), s["return"]();
|
|
1494
|
+
}
|
|
1495
|
+
}, {
|
|
1496
|
+
highWaterMark: 2
|
|
1497
|
+
});
|
|
1498
|
+
},
|
|
1499
|
+
ae = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function",
|
|
1500
|
+
bt = ae && typeof ReadableStream == "function",
|
|
1501
|
+
ar = ae && (typeof TextEncoder == "function" ? /* @__PURE__ */function (e) {
|
|
1502
|
+
return function (t) {
|
|
1503
|
+
return e.encode(t);
|
|
1504
|
+
};
|
|
1505
|
+
}(new TextEncoder()) : (/*#__PURE__*/function () {
|
|
1506
|
+
var _ref11 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(e) {
|
|
1507
|
+
var _t4, _t5;
|
|
1508
|
+
return _regenerator().w(function (_context5) {
|
|
1509
|
+
while (1) switch (_context5.n) {
|
|
1510
|
+
case 0:
|
|
1511
|
+
_t4 = Uint8Array;
|
|
1512
|
+
_context5.n = 1;
|
|
1513
|
+
return new Response(e).arrayBuffer();
|
|
1514
|
+
case 1:
|
|
1515
|
+
_t5 = _context5.v;
|
|
1516
|
+
return _context5.a(2, new _t4(_t5));
|
|
1517
|
+
}
|
|
1518
|
+
}, _callee4);
|
|
1519
|
+
}));
|
|
1520
|
+
return function (_x4) {
|
|
1521
|
+
return _ref11.apply(this, arguments);
|
|
1522
|
+
};
|
|
1523
|
+
}())),
|
|
1524
|
+
Et = function Et(e) {
|
|
1525
|
+
try {
|
|
1526
|
+
for (var _len5 = arguments.length, t = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) {
|
|
1527
|
+
t[_key5 - 1] = arguments[_key5];
|
|
1528
|
+
}
|
|
1529
|
+
return !!e.apply(void 0, t);
|
|
1530
|
+
} catch (_unused) {
|
|
1531
|
+
return false;
|
|
1532
|
+
}
|
|
1533
|
+
},
|
|
1534
|
+
cr = bt && Et(function () {
|
|
1535
|
+
var e = !1;
|
|
1536
|
+
var t = new Request(T.origin, {
|
|
1537
|
+
body: new ReadableStream(),
|
|
1538
|
+
method: "POST",
|
|
1539
|
+
get duplex() {
|
|
1540
|
+
return e = !0, "half";
|
|
1541
|
+
}
|
|
1542
|
+
}).headers.has("Content-Type");
|
|
1543
|
+
return e && !t;
|
|
1544
|
+
}),
|
|
1545
|
+
je = 64 * 1024,
|
|
1546
|
+
ye = bt && Et(function () {
|
|
1547
|
+
return a.isReadableStream(new Response("").body);
|
|
1548
|
+
}),
|
|
1549
|
+
te = {
|
|
1550
|
+
stream: ye && function (e) {
|
|
1551
|
+
return e.body;
|
|
1552
|
+
}
|
|
1553
|
+
};
|
|
1554
|
+
ae && function (e) {
|
|
1555
|
+
["text", "arrayBuffer", "blob", "formData", "stream"].forEach(function (t) {
|
|
1556
|
+
!te[t] && (te[t] = a.isFunction(e[t]) ? function (n) {
|
|
1557
|
+
return n[t]();
|
|
1558
|
+
} : function (n, r) {
|
|
1559
|
+
throw new y("Response type '".concat(t, "' is not supported"), y.ERR_NOT_SUPPORT, r);
|
|
1560
|
+
});
|
|
1561
|
+
});
|
|
1562
|
+
}(new Response());
|
|
1563
|
+
var ur = /*#__PURE__*/function () {
|
|
1564
|
+
var _ref12 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee5(e) {
|
|
1565
|
+
return _regenerator().w(function (_context6) {
|
|
1566
|
+
while (1) switch (_context6.n) {
|
|
1567
|
+
case 0:
|
|
1568
|
+
if (!(e == null)) {
|
|
1569
|
+
_context6.n = 1;
|
|
1570
|
+
break;
|
|
1571
|
+
}
|
|
1572
|
+
return _context6.a(2, 0);
|
|
1573
|
+
case 1:
|
|
1574
|
+
if (!a.isBlob(e)) {
|
|
1575
|
+
_context6.n = 2;
|
|
1576
|
+
break;
|
|
1577
|
+
}
|
|
1578
|
+
return _context6.a(2, e.size);
|
|
1579
|
+
case 2:
|
|
1580
|
+
if (!a.isSpecCompliantForm(e)) {
|
|
1581
|
+
_context6.n = 4;
|
|
1582
|
+
break;
|
|
1583
|
+
}
|
|
1584
|
+
_context6.n = 3;
|
|
1585
|
+
return new Request(T.origin, {
|
|
1586
|
+
method: "POST",
|
|
1587
|
+
body: e
|
|
1588
|
+
}).arrayBuffer();
|
|
1589
|
+
case 3:
|
|
1590
|
+
return _context6.a(2, _context6.v.byteLength);
|
|
1591
|
+
case 4:
|
|
1592
|
+
if (!(a.isArrayBufferView(e) || a.isArrayBuffer(e))) {
|
|
1593
|
+
_context6.n = 5;
|
|
1594
|
+
break;
|
|
1595
|
+
}
|
|
1596
|
+
return _context6.a(2, e.byteLength);
|
|
1597
|
+
case 5:
|
|
1598
|
+
if (!(a.isURLSearchParams(e) && (e = e + ""), a.isString(e))) {
|
|
1599
|
+
_context6.n = 7;
|
|
1600
|
+
break;
|
|
1601
|
+
}
|
|
1602
|
+
_context6.n = 6;
|
|
1603
|
+
return ar(e);
|
|
1604
|
+
case 6:
|
|
1605
|
+
return _context6.a(2, _context6.v.byteLength);
|
|
1606
|
+
case 7:
|
|
1607
|
+
return _context6.a(2);
|
|
1608
|
+
}
|
|
1609
|
+
}, _callee5);
|
|
1610
|
+
}));
|
|
1611
|
+
return function ur(_x5) {
|
|
1612
|
+
return _ref12.apply(this, arguments);
|
|
1613
|
+
};
|
|
1614
|
+
}(),
|
|
1615
|
+
lr = /*#__PURE__*/function () {
|
|
1616
|
+
var _ref13 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee6(e, t) {
|
|
1617
|
+
var n;
|
|
1618
|
+
return _regenerator().w(function (_context7) {
|
|
1619
|
+
while (1) switch (_context7.n) {
|
|
1620
|
+
case 0:
|
|
1621
|
+
n = a.toFiniteNumber(e.getContentLength());
|
|
1622
|
+
return _context7.a(2, n !== null && n !== void 0 ? n : ur(t));
|
|
1623
|
+
}
|
|
1624
|
+
}, _callee6);
|
|
1625
|
+
}));
|
|
1626
|
+
return function lr(_x6, _x7) {
|
|
1627
|
+
return _ref13.apply(this, arguments);
|
|
1628
|
+
};
|
|
1629
|
+
}(),
|
|
1630
|
+
fr = ae && (/*#__PURE__*/function () {
|
|
1631
|
+
var _ref14 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee7(e) {
|
|
1632
|
+
var _gt, t, n, r, s, o, i, c, f, u, l, _gt$withCredentials, d, w, g, p, m, h, O, P, _De, _De2, U, K, E, R, S, _O, _P, _ref15, _ref16, _U, _K, C, _t6, _t7, _t8;
|
|
1633
|
+
return _regenerator().w(function (_context8) {
|
|
1634
|
+
while (1) switch (_context8.p = _context8.n) {
|
|
1635
|
+
case 0:
|
|
1636
|
+
_gt = gt(e), t = _gt.url, n = _gt.method, r = _gt.data, s = _gt.signal, o = _gt.cancelToken, i = _gt.timeout, c = _gt.onDownloadProgress, f = _gt.onUploadProgress, u = _gt.responseType, l = _gt.headers, _gt$withCredentials = _gt.withCredentials, d = _gt$withCredentials === void 0 ? "same-origin" : _gt$withCredentials, w = _gt.fetchOptions;
|
|
1637
|
+
u = u ? (u + "").toLowerCase() : "text";
|
|
1638
|
+
g = rr([s, o && o.toAbortSignal()], i);
|
|
1639
|
+
m = g && g.unsubscribe && function () {
|
|
1640
|
+
g.unsubscribe();
|
|
1641
|
+
};
|
|
1642
|
+
_context8.p = 1;
|
|
1643
|
+
_t6 = f && cr && n !== "get" && n !== "head";
|
|
1644
|
+
if (!_t6) {
|
|
1645
|
+
_context8.n = 3;
|
|
1646
|
+
break;
|
|
1647
|
+
}
|
|
1648
|
+
_context8.n = 2;
|
|
1649
|
+
return lr(l, r);
|
|
1650
|
+
case 2:
|
|
1651
|
+
_t7 = h = _context8.v;
|
|
1652
|
+
_t6 = _t7 !== 0;
|
|
1653
|
+
case 3:
|
|
1654
|
+
if (!_t6) {
|
|
1655
|
+
_context8.n = 4;
|
|
1656
|
+
break;
|
|
1657
|
+
}
|
|
1658
|
+
O = new Request(t, {
|
|
1659
|
+
method: "POST",
|
|
1660
|
+
body: r,
|
|
1661
|
+
duplex: "half"
|
|
1662
|
+
});
|
|
1663
|
+
if (a.isFormData(r) && (P = O.headers.get("content-type")) && l.setContentType(P), O.body) {
|
|
1664
|
+
_De = De(h, ee(ve(f))), _De2 = _slicedToArray(_De, 2), U = _De2[0], K = _De2[1];
|
|
1665
|
+
r = Ie(O.body, je, U, K);
|
|
1666
|
+
}
|
|
1667
|
+
case 4:
|
|
1668
|
+
a.isString(d) || (d = d ? "include" : "omit");
|
|
1669
|
+
E = "credentials" in Request.prototype;
|
|
1670
|
+
p = new Request(t, _objectSpread(_objectSpread({}, w), {}, {
|
|
1671
|
+
signal: g,
|
|
1672
|
+
method: n.toUpperCase(),
|
|
1673
|
+
headers: l.normalize().toJSON(),
|
|
1674
|
+
body: r,
|
|
1675
|
+
duplex: "half",
|
|
1676
|
+
credentials: E ? d : void 0
|
|
1677
|
+
}));
|
|
1678
|
+
_context8.n = 5;
|
|
1679
|
+
return fetch(p, w);
|
|
1680
|
+
case 5:
|
|
1681
|
+
R = _context8.v;
|
|
1682
|
+
S = ye && (u === "stream" || u === "response");
|
|
1683
|
+
if (ye && (c || S && m)) {
|
|
1684
|
+
_O = {};
|
|
1685
|
+
["status", "statusText", "headers"].forEach(function (Ce) {
|
|
1686
|
+
_O[Ce] = R[Ce];
|
|
1687
|
+
});
|
|
1688
|
+
_P = a.toFiniteNumber(R.headers.get("content-length")), _ref15 = c && De(_P, ee(ve(c), !0)) || [], _ref16 = _slicedToArray(_ref15, 2), _U = _ref16[0], _K = _ref16[1];
|
|
1689
|
+
R = new Response(Ie(R.body, je, _U, function () {
|
|
1690
|
+
_K && _K(), m && m();
|
|
1691
|
+
}), _O);
|
|
1692
|
+
}
|
|
1693
|
+
u = u || "text";
|
|
1694
|
+
_context8.n = 6;
|
|
1695
|
+
return te[a.findKey(te, u) || "text"](R, e);
|
|
1696
|
+
case 6:
|
|
1697
|
+
C = _context8.v;
|
|
1698
|
+
!S && m && m();
|
|
1699
|
+
_context8.n = 7;
|
|
1700
|
+
return new Promise(function (O, P) {
|
|
1701
|
+
yt(O, P, {
|
|
1702
|
+
data: C,
|
|
1703
|
+
headers: _.from(R.headers),
|
|
1704
|
+
status: R.status,
|
|
1705
|
+
statusText: R.statusText,
|
|
1706
|
+
config: e,
|
|
1707
|
+
request: p
|
|
1708
|
+
});
|
|
1709
|
+
});
|
|
1710
|
+
case 7:
|
|
1711
|
+
return _context8.a(2, _context8.v);
|
|
1712
|
+
case 8:
|
|
1713
|
+
_context8.p = 8;
|
|
1714
|
+
_t8 = _context8.v;
|
|
1715
|
+
throw m && m(), _t8 && _t8.name === "TypeError" && /Load failed|fetch/i.test(_t8.message) ? Object.assign(new y("Network Error", y.ERR_NETWORK, e, p), {
|
|
1716
|
+
cause: _t8.cause || _t8
|
|
1717
|
+
}) : y.from(_t8, _t8 && _t8.code, e, p);
|
|
1718
|
+
case 9:
|
|
1719
|
+
return _context8.a(2);
|
|
1720
|
+
}
|
|
1721
|
+
}, _callee7, null, [[1, 8]]);
|
|
1722
|
+
}));
|
|
1723
|
+
return function (_x8) {
|
|
1724
|
+
return _ref14.apply(this, arguments);
|
|
1725
|
+
};
|
|
1726
|
+
}()),
|
|
1727
|
+
we = {
|
|
1728
|
+
http: _n,
|
|
1729
|
+
xhr: nr,
|
|
1730
|
+
fetch: fr
|
|
1731
|
+
};
|
|
1732
|
+
a.forEach(we, function (e, t) {
|
|
1733
|
+
if (e) {
|
|
1734
|
+
try {
|
|
1735
|
+
Object.defineProperty(e, "name", {
|
|
1736
|
+
value: t
|
|
1737
|
+
});
|
|
1738
|
+
} catch (_unused2) {}
|
|
1739
|
+
Object.defineProperty(e, "adapterName", {
|
|
1740
|
+
value: t
|
|
1741
|
+
});
|
|
1742
|
+
}
|
|
1743
|
+
});
|
|
1744
|
+
var qe = function qe(e) {
|
|
1745
|
+
return "- ".concat(e);
|
|
1746
|
+
},
|
|
1747
|
+
dr = function dr(e) {
|
|
1748
|
+
return a.isFunction(e) || e === null || e === false;
|
|
1749
|
+
},
|
|
1750
|
+
Rt = {
|
|
1751
|
+
getAdapter: function getAdapter(e) {
|
|
1752
|
+
e = a.isArray(e) ? e : [e];
|
|
1753
|
+
var _e3 = e,
|
|
1754
|
+
t = _e3.length;
|
|
1755
|
+
var n, r;
|
|
1756
|
+
var s = {};
|
|
1757
|
+
for (var o = 0; o < t; o++) {
|
|
1758
|
+
n = e[o];
|
|
1759
|
+
var i = void 0;
|
|
1760
|
+
if (r = n, !dr(n) && (r = we[(i = String(n)).toLowerCase()], r === undefined)) throw new y("Unknown adapter '".concat(i, "'"));
|
|
1761
|
+
if (r) break;
|
|
1762
|
+
s[i || "#" + o] = r;
|
|
1763
|
+
}
|
|
1764
|
+
if (!r) {
|
|
1765
|
+
var _o = Object.entries(s).map(function (_ref17) {
|
|
1766
|
+
var _ref18 = _slicedToArray(_ref17, 2),
|
|
1767
|
+
c = _ref18[0],
|
|
1768
|
+
f = _ref18[1];
|
|
1769
|
+
return "adapter ".concat(c, " ") + (f === false ? "is not supported by the environment" : "is not available in the build");
|
|
1770
|
+
});
|
|
1771
|
+
var _i = t ? _o.length > 1 ? "since :\n" + _o.map(qe).join("\n") : " " + qe(_o[0]) : "as no adapter specified";
|
|
1772
|
+
throw new y("There is no suitable adapter to dispatch the request " + _i, "ERR_NOT_SUPPORT");
|
|
1773
|
+
}
|
|
1774
|
+
return r;
|
|
1775
|
+
},
|
|
1776
|
+
adapters: we
|
|
1777
|
+
};
|
|
1778
|
+
function de(e) {
|
|
1779
|
+
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted) throw new I(null, e);
|
|
1780
|
+
}
|
|
1781
|
+
function Me(e) {
|
|
1782
|
+
return de(e), e.headers = _.from(e.headers), e.data = fe.call(e, e.transformRequest), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", false), Rt.getAdapter(e.adapter || W.adapter)(e).then(function (r) {
|
|
1783
|
+
return de(e), r.data = fe.call(e, e.transformResponse, r), r.headers = _.from(r.headers), r;
|
|
1784
|
+
}, function (r) {
|
|
1785
|
+
return mt(r) || (de(e), r && r.response && (r.response.data = fe.call(e, e.transformResponse, r.response), r.response.headers = _.from(r.response.headers))), Promise.reject(r);
|
|
1786
|
+
});
|
|
1787
|
+
}
|
|
1788
|
+
var St = "1.10.0",
|
|
1789
|
+
ce = {};
|
|
1790
|
+
["object", "boolean", "number", "function", "string", "symbol"].forEach(function (e, t) {
|
|
1791
|
+
ce[e] = function (r) {
|
|
1792
|
+
return _typeof(r) === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
1793
|
+
};
|
|
1794
|
+
});
|
|
1795
|
+
var He = {};
|
|
1796
|
+
ce.transitional = function (t, n, r) {
|
|
1797
|
+
function s(o, i) {
|
|
1798
|
+
return "[Axios v" + St + "] Transitional option '" + o + "'" + i + (r ? ". " + r : "");
|
|
1799
|
+
}
|
|
1800
|
+
return function (o, i, c) {
|
|
1801
|
+
if (t === false) throw new y(s(i, " has been removed" + (n ? " in " + n : "")), y.ERR_DEPRECATED);
|
|
1802
|
+
return n && !He[i] && (He[i] = true), t ? t(o, i, c) : true;
|
|
1803
|
+
};
|
|
1804
|
+
};
|
|
1805
|
+
ce.spelling = function (t) {
|
|
1806
|
+
return function (n, r) {
|
|
1807
|
+
return true;
|
|
1808
|
+
};
|
|
1809
|
+
};
|
|
1810
|
+
function pr(e, t, n) {
|
|
1811
|
+
if (_typeof(e) != "object") throw new y("options must be an object", y.ERR_BAD_OPTION_VALUE);
|
|
1812
|
+
var r = Object.keys(e);
|
|
1813
|
+
var s = r.length;
|
|
1814
|
+
for (; s-- > 0;) {
|
|
1815
|
+
var o = r[s],
|
|
1816
|
+
i = t[o];
|
|
1817
|
+
if (i) {
|
|
1818
|
+
var c = e[o],
|
|
1819
|
+
f = c === undefined || i(c, o, e);
|
|
1820
|
+
if (f !== true) throw new y("option " + o + " must be " + f, y.ERR_BAD_OPTION_VALUE);
|
|
1821
|
+
continue;
|
|
1822
|
+
}
|
|
1823
|
+
if (n !== true) throw new y("Unknown option " + o, y.ERR_BAD_OPTION);
|
|
1824
|
+
}
|
|
1825
|
+
}
|
|
1826
|
+
var Z = {
|
|
1827
|
+
assertOptions: pr,
|
|
1828
|
+
validators: ce
|
|
1829
|
+
},
|
|
1830
|
+
k = Z.validators;
|
|
1831
|
+
var L = /*#__PURE__*/function () {
|
|
1832
|
+
function L(t) {
|
|
1833
|
+
_classCallCheck(this, L);
|
|
1834
|
+
this.defaults = t || {}, this.interceptors = {
|
|
1835
|
+
request: new Le(),
|
|
1836
|
+
response: new Le()
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
/**
|
|
1840
|
+
* Dispatch a request
|
|
1841
|
+
*
|
|
1842
|
+
* @param {String|Object} configOrUrl The config specific for this request (merged with this.defaults)
|
|
1843
|
+
* @param {?Object} config
|
|
1844
|
+
*
|
|
1845
|
+
* @returns {Promise} The Promise to be fulfilled
|
|
1846
|
+
*/
|
|
1847
|
+
return _createClass(L, [{
|
|
1848
|
+
key: "request",
|
|
1849
|
+
value: (function () {
|
|
1850
|
+
var _request2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee8(t, n) {
|
|
1851
|
+
var s, o, _t9;
|
|
1852
|
+
return _regenerator().w(function (_context9) {
|
|
1853
|
+
while (1) switch (_context9.p = _context9.n) {
|
|
1854
|
+
case 0:
|
|
1855
|
+
_context9.p = 0;
|
|
1856
|
+
_context9.n = 1;
|
|
1857
|
+
return this._request(t, n);
|
|
1858
|
+
case 1:
|
|
1859
|
+
return _context9.a(2, _context9.v);
|
|
1860
|
+
case 2:
|
|
1861
|
+
_context9.p = 2;
|
|
1862
|
+
_t9 = _context9.v;
|
|
1863
|
+
if (_t9 instanceof Error) {
|
|
1864
|
+
s = {};
|
|
1865
|
+
Error.captureStackTrace ? Error.captureStackTrace(s) : s = new Error();
|
|
1866
|
+
o = s.stack ? s.stack.replace(/^.+\n/, "") : "";
|
|
1867
|
+
try {
|
|
1868
|
+
_t9.stack ? o && !String(_t9.stack).endsWith(o.replace(/^.+\n.+\n/, "")) && (_t9.stack += "\n" + o) : _t9.stack = o;
|
|
1869
|
+
} catch (_unused3) {}
|
|
1870
|
+
}
|
|
1871
|
+
throw _t9;
|
|
1872
|
+
case 3:
|
|
1873
|
+
return _context9.a(2);
|
|
1874
|
+
}
|
|
1875
|
+
}, _callee8, this, [[0, 2]]);
|
|
1876
|
+
}));
|
|
1877
|
+
function request(_x9, _x0) {
|
|
1878
|
+
return _request2.apply(this, arguments);
|
|
1879
|
+
}
|
|
1880
|
+
return request;
|
|
1881
|
+
}())
|
|
1882
|
+
}, {
|
|
1883
|
+
key: "_request",
|
|
1884
|
+
value: function _request(t, n) {
|
|
1885
|
+
typeof t == "string" ? (n = n || {}, n.url = t) : n = t || {}, n = F(this.defaults, n);
|
|
1886
|
+
var _n3 = n,
|
|
1887
|
+
r = _n3.transitional,
|
|
1888
|
+
s = _n3.paramsSerializer,
|
|
1889
|
+
o = _n3.headers;
|
|
1890
|
+
r !== undefined && Z.assertOptions(r, {
|
|
1891
|
+
silentJSONParsing: k.transitional(k["boolean"]),
|
|
1892
|
+
forcedJSONParsing: k.transitional(k["boolean"]),
|
|
1893
|
+
clarifyTimeoutError: k.transitional(k["boolean"])
|
|
1894
|
+
}, false), s != null && (a.isFunction(s) ? n.paramsSerializer = {
|
|
1895
|
+
serialize: s
|
|
1896
|
+
} : Z.assertOptions(s, {
|
|
1897
|
+
encode: k["function"],
|
|
1898
|
+
serialize: k["function"]
|
|
1899
|
+
}, true)), n.allowAbsoluteUrls !== undefined || (this.defaults.allowAbsoluteUrls !== undefined ? n.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls : n.allowAbsoluteUrls = true), Z.assertOptions(n, {
|
|
1900
|
+
baseUrl: k.spelling("baseURL"),
|
|
1901
|
+
withXsrfToken: k.spelling("withXSRFToken")
|
|
1902
|
+
}, true), n.method = (n.method || this.defaults.method || "get").toLowerCase();
|
|
1903
|
+
var i = o && a.merge(o.common, o[n.method]);
|
|
1904
|
+
o && a.forEach(["delete", "get", "head", "post", "put", "patch", "common"], function (p) {
|
|
1905
|
+
delete o[p];
|
|
1906
|
+
}), n.headers = _.concat(i, o);
|
|
1907
|
+
var c = [];
|
|
1908
|
+
var f = true;
|
|
1909
|
+
this.interceptors.request.forEach(function (m) {
|
|
1910
|
+
typeof m.runWhen == "function" && m.runWhen(n) === false || (f = f && m.synchronous, c.unshift(m.fulfilled, m.rejected));
|
|
1911
|
+
});
|
|
1912
|
+
var u = [];
|
|
1913
|
+
this.interceptors.response.forEach(function (m) {
|
|
1914
|
+
u.push(m.fulfilled, m.rejected);
|
|
1915
|
+
});
|
|
1916
|
+
var l,
|
|
1917
|
+
d = 0,
|
|
1918
|
+
w;
|
|
1919
|
+
if (!f) {
|
|
1920
|
+
var p = [Me.bind(this), undefined];
|
|
1921
|
+
for (p.unshift.apply(p, c), p.push.apply(p, u), w = p.length, l = Promise.resolve(n); d < w;) l = l.then(p[d++], p[d++]);
|
|
1922
|
+
return l;
|
|
1923
|
+
}
|
|
1924
|
+
w = c.length;
|
|
1925
|
+
var g = n;
|
|
1926
|
+
for (d = 0; d < w;) {
|
|
1927
|
+
var _p = c[d++],
|
|
1928
|
+
m = c[d++];
|
|
1929
|
+
try {
|
|
1930
|
+
g = _p(g);
|
|
1931
|
+
} catch (h) {
|
|
1932
|
+
m.call(this, h);
|
|
1933
|
+
break;
|
|
1934
|
+
}
|
|
1935
|
+
}
|
|
1936
|
+
try {
|
|
1937
|
+
l = Me.call(this, g);
|
|
1938
|
+
} catch (p) {
|
|
1939
|
+
return Promise.reject(p);
|
|
1940
|
+
}
|
|
1941
|
+
for (d = 0, w = u.length; d < w;) l = l.then(u[d++], u[d++]);
|
|
1942
|
+
return l;
|
|
1943
|
+
}
|
|
1944
|
+
}, {
|
|
1945
|
+
key: "getUri",
|
|
1946
|
+
value: function getUri(t) {
|
|
1947
|
+
t = F(this.defaults, t);
|
|
1948
|
+
var n = wt(t.baseURL, t.url, t.allowAbsoluteUrls);
|
|
1949
|
+
return dt(n, t.params, t.paramsSerializer);
|
|
1950
|
+
}
|
|
1951
|
+
}]);
|
|
1952
|
+
}();
|
|
1953
|
+
a.forEach(["delete", "get", "head", "options"], function (t) {
|
|
1954
|
+
L.prototype[t] = function (n, r) {
|
|
1955
|
+
return this.request(F(r || {}, {
|
|
1956
|
+
method: t,
|
|
1957
|
+
url: n,
|
|
1958
|
+
data: (r || {}).data
|
|
1959
|
+
}));
|
|
1960
|
+
};
|
|
1961
|
+
});
|
|
1962
|
+
a.forEach(["post", "put", "patch"], function (t) {
|
|
1963
|
+
function n(r) {
|
|
1964
|
+
return function (o, i, c) {
|
|
1965
|
+
return this.request(F(c || {}, {
|
|
1966
|
+
method: t,
|
|
1967
|
+
headers: r ? {
|
|
1968
|
+
"Content-Type": "multipart/form-data"
|
|
1969
|
+
} : {},
|
|
1970
|
+
url: o,
|
|
1971
|
+
data: i
|
|
1972
|
+
}));
|
|
1973
|
+
};
|
|
1974
|
+
}
|
|
1975
|
+
L.prototype[t] = n(), L.prototype[t + "Form"] = n(true);
|
|
1976
|
+
});
|
|
1977
|
+
var xe = /*#__PURE__*/function () {
|
|
1978
|
+
function xe(t) {
|
|
1979
|
+
_classCallCheck(this, xe);
|
|
1980
|
+
if (typeof t != "function") throw new TypeError("executor must be a function.");
|
|
1981
|
+
var n;
|
|
1982
|
+
this.promise = new Promise(function (o) {
|
|
1983
|
+
n = o;
|
|
1984
|
+
});
|
|
1985
|
+
var r = this;
|
|
1986
|
+
this.promise.then(function (s) {
|
|
1987
|
+
if (!r._listeners) return;
|
|
1988
|
+
var o = r._listeners.length;
|
|
1989
|
+
for (; o-- > 0;) r._listeners[o](s);
|
|
1990
|
+
r._listeners = null;
|
|
1991
|
+
}), this.promise.then = function (s) {
|
|
1992
|
+
var o;
|
|
1993
|
+
var i = new Promise(function (c) {
|
|
1994
|
+
r.subscribe(c), o = c;
|
|
1995
|
+
}).then(s);
|
|
1996
|
+
return i.cancel = function () {
|
|
1997
|
+
r.unsubscribe(o);
|
|
1998
|
+
}, i;
|
|
1999
|
+
}, t(function (o, i, c) {
|
|
2000
|
+
r.reason || (r.reason = new I(o, i, c), n(r.reason));
|
|
2001
|
+
});
|
|
2002
|
+
}
|
|
2003
|
+
/**
|
|
2004
|
+
* Throws a `CanceledError` if cancellation has been requested.
|
|
2005
|
+
*/
|
|
2006
|
+
return _createClass(xe, [{
|
|
2007
|
+
key: "throwIfRequested",
|
|
2008
|
+
value: function throwIfRequested() {
|
|
2009
|
+
if (this.reason) throw this.reason;
|
|
2010
|
+
}
|
|
2011
|
+
/**
|
|
2012
|
+
* Subscribe to the cancel signal
|
|
2013
|
+
*/
|
|
2014
|
+
}, {
|
|
2015
|
+
key: "subscribe",
|
|
2016
|
+
value: function subscribe(t) {
|
|
2017
|
+
if (this.reason) {
|
|
2018
|
+
t(this.reason);
|
|
2019
|
+
return;
|
|
2020
|
+
}
|
|
2021
|
+
this._listeners ? this._listeners.push(t) : this._listeners = [t];
|
|
2022
|
+
}
|
|
2023
|
+
/**
|
|
2024
|
+
* Unsubscribe from the cancel signal
|
|
2025
|
+
*/
|
|
2026
|
+
}, {
|
|
2027
|
+
key: "unsubscribe",
|
|
2028
|
+
value: function unsubscribe(t) {
|
|
2029
|
+
if (!this._listeners) return;
|
|
2030
|
+
var n = this._listeners.indexOf(t);
|
|
2031
|
+
n !== -1 && this._listeners.splice(n, 1);
|
|
2032
|
+
}
|
|
2033
|
+
}, {
|
|
2034
|
+
key: "toAbortSignal",
|
|
2035
|
+
value: function toAbortSignal() {
|
|
2036
|
+
var _this = this;
|
|
2037
|
+
var t = new AbortController(),
|
|
2038
|
+
n = function n(r) {
|
|
2039
|
+
t.abort(r);
|
|
2040
|
+
};
|
|
2041
|
+
return this.subscribe(n), t.signal.unsubscribe = function () {
|
|
2042
|
+
return _this.unsubscribe(n);
|
|
2043
|
+
}, t.signal;
|
|
2044
|
+
}
|
|
2045
|
+
/**
|
|
2046
|
+
* Returns an object that contains a new `CancelToken` and a function that, when called,
|
|
2047
|
+
* cancels the `CancelToken`.
|
|
2048
|
+
*/
|
|
2049
|
+
}], [{
|
|
2050
|
+
key: "source",
|
|
2051
|
+
value: function source() {
|
|
2052
|
+
var t;
|
|
2053
|
+
return {
|
|
2054
|
+
token: new xe(function (s) {
|
|
2055
|
+
t = s;
|
|
2056
|
+
}),
|
|
2057
|
+
cancel: t
|
|
2058
|
+
};
|
|
2059
|
+
}
|
|
2060
|
+
}]);
|
|
2061
|
+
}();
|
|
2062
|
+
function hr(e) {
|
|
2063
|
+
return function (n) {
|
|
2064
|
+
return e.apply(null, n);
|
|
2065
|
+
};
|
|
2066
|
+
}
|
|
2067
|
+
function mr(e) {
|
|
2068
|
+
return a.isObject(e) && e.isAxiosError === true;
|
|
2069
|
+
}
|
|
2070
|
+
var ge = {
|
|
2071
|
+
Continue: 100,
|
|
2072
|
+
SwitchingProtocols: 101,
|
|
2073
|
+
Processing: 102,
|
|
2074
|
+
EarlyHints: 103,
|
|
2075
|
+
Ok: 200,
|
|
2076
|
+
Created: 201,
|
|
2077
|
+
Accepted: 202,
|
|
2078
|
+
NonAuthoritativeInformation: 203,
|
|
2079
|
+
NoContent: 204,
|
|
2080
|
+
ResetContent: 205,
|
|
2081
|
+
PartialContent: 206,
|
|
2082
|
+
MultiStatus: 207,
|
|
2083
|
+
AlreadyReported: 208,
|
|
2084
|
+
ImUsed: 226,
|
|
2085
|
+
MultipleChoices: 300,
|
|
2086
|
+
MovedPermanently: 301,
|
|
2087
|
+
Found: 302,
|
|
2088
|
+
SeeOther: 303,
|
|
2089
|
+
NotModified: 304,
|
|
2090
|
+
UseProxy: 305,
|
|
2091
|
+
Unused: 306,
|
|
2092
|
+
TemporaryRedirect: 307,
|
|
2093
|
+
PermanentRedirect: 308,
|
|
2094
|
+
BadRequest: 400,
|
|
2095
|
+
Unauthorized: 401,
|
|
2096
|
+
PaymentRequired: 402,
|
|
2097
|
+
Forbidden: 403,
|
|
2098
|
+
NotFound: 404,
|
|
2099
|
+
MethodNotAllowed: 405,
|
|
2100
|
+
NotAcceptable: 406,
|
|
2101
|
+
ProxyAuthenticationRequired: 407,
|
|
2102
|
+
RequestTimeout: 408,
|
|
2103
|
+
Conflict: 409,
|
|
2104
|
+
Gone: 410,
|
|
2105
|
+
LengthRequired: 411,
|
|
2106
|
+
PreconditionFailed: 412,
|
|
2107
|
+
PayloadTooLarge: 413,
|
|
2108
|
+
UriTooLong: 414,
|
|
2109
|
+
UnsupportedMediaType: 415,
|
|
2110
|
+
RangeNotSatisfiable: 416,
|
|
2111
|
+
ExpectationFailed: 417,
|
|
2112
|
+
ImATeapot: 418,
|
|
2113
|
+
MisdirectedRequest: 421,
|
|
2114
|
+
UnprocessableEntity: 422,
|
|
2115
|
+
Locked: 423,
|
|
2116
|
+
FailedDependency: 424,
|
|
2117
|
+
TooEarly: 425,
|
|
2118
|
+
UpgradeRequired: 426,
|
|
2119
|
+
PreconditionRequired: 428,
|
|
2120
|
+
TooManyRequests: 429,
|
|
2121
|
+
RequestHeaderFieldsTooLarge: 431,
|
|
2122
|
+
UnavailableForLegalReasons: 451,
|
|
2123
|
+
InternalServerError: 500,
|
|
2124
|
+
NotImplemented: 501,
|
|
2125
|
+
BadGateway: 502,
|
|
2126
|
+
ServiceUnavailable: 503,
|
|
2127
|
+
GatewayTimeout: 504,
|
|
2128
|
+
HttpVersionNotSupported: 505,
|
|
2129
|
+
VariantAlsoNegotiates: 506,
|
|
2130
|
+
InsufficientStorage: 507,
|
|
2131
|
+
LoopDetected: 508,
|
|
2132
|
+
NotExtended: 510,
|
|
2133
|
+
NetworkAuthenticationRequired: 511
|
|
2134
|
+
};
|
|
2135
|
+
Object.entries(ge).forEach(function (_ref19) {
|
|
2136
|
+
var _ref20 = _slicedToArray(_ref19, 2),
|
|
2137
|
+
e = _ref20[0],
|
|
2138
|
+
t = _ref20[1];
|
|
2139
|
+
ge[t] = e;
|
|
2140
|
+
});
|
|
2141
|
+
function Tt(e) {
|
|
2142
|
+
var t = new L(e),
|
|
2143
|
+
n = et(L.prototype.request, t);
|
|
2144
|
+
return a.extend(n, L.prototype, t, {
|
|
2145
|
+
allOwnKeys: true
|
|
2146
|
+
}), a.extend(n, t, null, {
|
|
2147
|
+
allOwnKeys: true
|
|
2148
|
+
}), n.create = function (s) {
|
|
2149
|
+
return Tt(F(e, s));
|
|
2150
|
+
}, n;
|
|
2151
|
+
}
|
|
2152
|
+
var b = Tt(W);
|
|
2153
|
+
b.Axios = L;
|
|
2154
|
+
b.CanceledError = I;
|
|
2155
|
+
b.CancelToken = xe;
|
|
2156
|
+
b.isCancel = mt;
|
|
2157
|
+
b.VERSION = St;
|
|
2158
|
+
b.toFormData = ie;
|
|
2159
|
+
b.AxiosError = y;
|
|
2160
|
+
b.Cancel = b.CanceledError;
|
|
2161
|
+
b.all = function (t) {
|
|
2162
|
+
return Promise.all(t);
|
|
2163
|
+
};
|
|
2164
|
+
b.spread = hr;
|
|
2165
|
+
b.isAxiosError = mr;
|
|
2166
|
+
b.mergeConfig = F;
|
|
2167
|
+
b.AxiosHeaders = _;
|
|
2168
|
+
b.formToJSON = function (e) {
|
|
2169
|
+
return ht(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
2170
|
+
};
|
|
2171
|
+
b.getAdapter = Rt.getAdapter;
|
|
2172
|
+
b.HttpStatusCode = ge;
|
|
2173
|
+
b["default"] = b;
|
|
2174
|
+
/*! js-cookie v3.0.5 | MIT */
|
|
2175
|
+
function Q(e) {
|
|
2176
|
+
for (var t = 1; t < arguments.length; t++) {
|
|
2177
|
+
var n = arguments[t];
|
|
2178
|
+
for (var r in n) e[r] = n[r];
|
|
2179
|
+
}
|
|
2180
|
+
return e;
|
|
2181
|
+
}
|
|
2182
|
+
var yr = {
|
|
2183
|
+
read: function read(e) {
|
|
2184
|
+
return e[0] === '"' && (e = e.slice(1, -1)), e.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
|
|
2185
|
+
},
|
|
2186
|
+
write: function write(e) {
|
|
2187
|
+
return encodeURIComponent(e).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, decodeURIComponent);
|
|
2188
|
+
}
|
|
2189
|
+
};
|
|
2190
|
+
function be(e, t) {
|
|
2191
|
+
function n(s, o, i) {
|
|
2192
|
+
if (!((typeof document === "undefined" ? "undefined" : _typeof(document)) > "u")) {
|
|
2193
|
+
i = Q({}, t, i), typeof i.expires == "number" && (i.expires = new Date(Date.now() + i.expires * 864e5)), i.expires && (i.expires = i.expires.toUTCString()), s = encodeURIComponent(s).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
|
|
2194
|
+
var c = "";
|
|
2195
|
+
for (var f in i) i[f] && (c += "; " + f, i[f] !== true && (c += "=" + i[f].split(";")[0]));
|
|
2196
|
+
return document.cookie = s + "=" + e.write(o, s) + c;
|
|
2197
|
+
}
|
|
2198
|
+
}
|
|
2199
|
+
function r(s) {
|
|
2200
|
+
if (!((typeof document === "undefined" ? "undefined" : _typeof(document)) > "u" || arguments.length && !s)) {
|
|
2201
|
+
for (var o = document.cookie ? document.cookie.split("; ") : [], i = {}, c = 0; c < o.length; c++) {
|
|
2202
|
+
var f = o[c].split("="),
|
|
2203
|
+
u = f.slice(1).join("=");
|
|
2204
|
+
try {
|
|
2205
|
+
var l = decodeURIComponent(f[0]);
|
|
2206
|
+
if (i[l] = e.read(u, l), s === l) break;
|
|
2207
|
+
} catch (_unused4) {}
|
|
2208
|
+
}
|
|
2209
|
+
return s ? i[s] : i;
|
|
2210
|
+
}
|
|
2211
|
+
}
|
|
2212
|
+
return Object.create({
|
|
2213
|
+
set: n,
|
|
2214
|
+
get: r,
|
|
2215
|
+
remove: function remove(s, o) {
|
|
2216
|
+
n(s, "", Q({}, o, {
|
|
2217
|
+
expires: -1
|
|
2218
|
+
}));
|
|
2219
|
+
},
|
|
2220
|
+
withAttributes: function withAttributes(s) {
|
|
2221
|
+
return be(this.converter, Q({}, this.attributes, s));
|
|
2222
|
+
},
|
|
2223
|
+
withConverter: function withConverter(s) {
|
|
2224
|
+
return be(Q({}, this.converter, s), this.attributes);
|
|
2225
|
+
}
|
|
2226
|
+
}, {
|
|
2227
|
+
attributes: {
|
|
2228
|
+
value: Object.freeze(t)
|
|
2229
|
+
},
|
|
2230
|
+
converter: {
|
|
2231
|
+
value: Object.freeze(e)
|
|
2232
|
+
}
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
2235
|
+
var wr = be(yr, {
|
|
2236
|
+
path: "/"
|
|
2237
|
+
}),
|
|
2238
|
+
ze;
|
|
2239
|
+
var Ot = (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u",
|
|
2240
|
+
gr = function gr(e) {
|
|
2241
|
+
return typeof e == "string";
|
|
2242
|
+
},
|
|
2243
|
+
$e = function $e() {
|
|
2244
|
+
return +Date.now();
|
|
2245
|
+
},
|
|
2246
|
+
Ee = function Ee() {};
|
|
2247
|
+
Ot && (ze = window == null ? undefined : window.navigator) != null && ze.userAgent && /iP(ad|hone|od)/.test(window.navigator.userAgent);
|
|
2248
|
+
function ke(e) {
|
|
2249
|
+
return typeof e == "function" ? e() : unref(e);
|
|
2250
|
+
}
|
|
2251
|
+
function br(e, t) {
|
|
2252
|
+
function n() {
|
|
2253
|
+
var _this2 = this;
|
|
2254
|
+
for (var _len6 = arguments.length, r = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) {
|
|
2255
|
+
r[_key6] = arguments[_key6];
|
|
2256
|
+
}
|
|
2257
|
+
return new Promise(function (s, o) {
|
|
2258
|
+
Promise.resolve(e(function () {
|
|
2259
|
+
return t.apply(_this2, r);
|
|
2260
|
+
}, {
|
|
2261
|
+
fn: t,
|
|
2262
|
+
thisArg: _this2,
|
|
2263
|
+
args: r
|
|
2264
|
+
})).then(s)["catch"](o);
|
|
2265
|
+
});
|
|
2266
|
+
}
|
|
2267
|
+
return n;
|
|
2268
|
+
}
|
|
2269
|
+
function Er(e) {
|
|
2270
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
2271
|
+
var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
2272
|
+
var r = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
2273
|
+
var s = 0,
|
|
2274
|
+
o,
|
|
2275
|
+
i = true,
|
|
2276
|
+
c = Ee,
|
|
2277
|
+
f;
|
|
2278
|
+
var u = function u() {
|
|
2279
|
+
o && (clearTimeout(o), o = undefined, c(), c = Ee);
|
|
2280
|
+
};
|
|
2281
|
+
return function (d) {
|
|
2282
|
+
var w = ke(e),
|
|
2283
|
+
g = Date.now() - s,
|
|
2284
|
+
p = function p() {
|
|
2285
|
+
return f = d();
|
|
2286
|
+
};
|
|
2287
|
+
return u(), w <= 0 ? (s = Date.now(), p()) : (g > w && (n || !i) ? (s = Date.now(), p()) : t && (f = new Promise(function (m, h) {
|
|
2288
|
+
c = r ? h : m, o = setTimeout(function () {
|
|
2289
|
+
s = Date.now(), i = true, m(p()), u();
|
|
2290
|
+
}, Math.max(0, w - g));
|
|
2291
|
+
})), !n && !o && (o = setTimeout(function () {
|
|
2292
|
+
return i = true;
|
|
2293
|
+
}, w)), i = false, f);
|
|
2294
|
+
};
|
|
2295
|
+
}
|
|
2296
|
+
function Rr(e) {
|
|
2297
|
+
return e;
|
|
2298
|
+
}
|
|
2299
|
+
function Sr(e) {
|
|
2300
|
+
return getCurrentScope() ? (onScopeDispose(e), true) : false;
|
|
2301
|
+
}
|
|
2302
|
+
function Tr(e) {
|
|
2303
|
+
var t;
|
|
2304
|
+
var n = ke(e);
|
|
2305
|
+
return (t = n == null ? undefined : n.$el) != null ? t : n;
|
|
2306
|
+
}
|
|
2307
|
+
var At = Ot ? window : undefined;
|
|
2308
|
+
function Je() {
|
|
2309
|
+
var _e4, _e5;
|
|
2310
|
+
var t, n, r, s;
|
|
2311
|
+
for (var _len7 = arguments.length, e = new Array(_len7), _key7 = 0; _key7 < _len7; _key7++) {
|
|
2312
|
+
e[_key7] = arguments[_key7];
|
|
2313
|
+
}
|
|
2314
|
+
if (gr(e[0]) || Array.isArray(e[0]) ? (n = e[0], r = e[1], s = e[2], t = At) : (_e4 = e, _e5 = _slicedToArray(_e4, 4), t = _e5[0], n = _e5[1], r = _e5[2], s = _e5[3], _e4), !t) return Ee;
|
|
2315
|
+
Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
|
|
2316
|
+
var o = [],
|
|
2317
|
+
i = function i() {
|
|
2318
|
+
o.forEach(function (l) {
|
|
2319
|
+
return l();
|
|
2320
|
+
}), o.length = 0;
|
|
2321
|
+
},
|
|
2322
|
+
c = function c(l, d, w, g) {
|
|
2323
|
+
return l.addEventListener(d, w, g), function () {
|
|
2324
|
+
return l.removeEventListener(d, w, g);
|
|
2325
|
+
};
|
|
2326
|
+
},
|
|
2327
|
+
f = watch(function () {
|
|
2328
|
+
return [Tr(t), ke(s)];
|
|
2329
|
+
}, function (_ref21) {
|
|
2330
|
+
var _ref22 = _slicedToArray(_ref21, 2),
|
|
2331
|
+
l = _ref22[0],
|
|
2332
|
+
d = _ref22[1];
|
|
2333
|
+
i(), l && o.push.apply(o, _toConsumableArray(n.flatMap(function (w) {
|
|
2334
|
+
return r.map(function (g) {
|
|
2335
|
+
return c(l, w, g, d);
|
|
2336
|
+
});
|
|
2337
|
+
})));
|
|
2338
|
+
}, {
|
|
2339
|
+
immediate: true,
|
|
2340
|
+
flush: "post"
|
|
2341
|
+
}),
|
|
2342
|
+
u = function u() {
|
|
2343
|
+
f(), i();
|
|
2344
|
+
};
|
|
2345
|
+
return Sr(u), u;
|
|
2346
|
+
}
|
|
2347
|
+
var Ve = (typeof globalThis === "undefined" ? "undefined" : _typeof(globalThis)) < "u" ? globalThis : (typeof window === "undefined" ? "undefined" : _typeof(window)) < "u" ? window : (typeof global === "undefined" ? "undefined" : _typeof(global)) < "u" ? global : (typeof self === "undefined" ? "undefined" : _typeof(self)) < "u" ? self : {},
|
|
2348
|
+
We = "__vueuse_ssr_handlers__";
|
|
2349
|
+
Ve[We] = Ve[We] || {};
|
|
2350
|
+
var Or = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"],
|
|
2351
|
+
Ar = 6e4;
|
|
2352
|
+
function _r() {
|
|
2353
|
+
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Ar;
|
|
2354
|
+
var t = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
2355
|
+
var _t$initialState = t.initialState,
|
|
2356
|
+
n = _t$initialState === void 0 ? false : _t$initialState,
|
|
2357
|
+
_t$listenForVisibilit = t.listenForVisibilityChange,
|
|
2358
|
+
r = _t$listenForVisibilit === void 0 ? true : _t$listenForVisibilit,
|
|
2359
|
+
_t$events = t.events,
|
|
2360
|
+
s = _t$events === void 0 ? Or : _t$events,
|
|
2361
|
+
_t$window = t.window,
|
|
2362
|
+
o = _t$window === void 0 ? At : _t$window,
|
|
2363
|
+
_t$eventFilter = t.eventFilter,
|
|
2364
|
+
i = _t$eventFilter === void 0 ? Er(50) : _t$eventFilter,
|
|
2365
|
+
c = ref(n),
|
|
2366
|
+
f = ref($e());
|
|
2367
|
+
var u;
|
|
2368
|
+
var l = br(i, function () {
|
|
2369
|
+
c.value = false, f.value = $e(), clearTimeout(u), u = setTimeout(function () {
|
|
2370
|
+
return c.value = true;
|
|
2371
|
+
}, e);
|
|
2372
|
+
});
|
|
2373
|
+
if (o) {
|
|
2374
|
+
var d = o.document;
|
|
2375
|
+
var _iterator3 = _createForOfIteratorHelper(s),
|
|
2376
|
+
_step3;
|
|
2377
|
+
try {
|
|
2378
|
+
for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {
|
|
2379
|
+
var w = _step3.value;
|
|
2380
|
+
Je(o, w, l, {
|
|
2381
|
+
passive: true
|
|
2382
|
+
});
|
|
2383
|
+
}
|
|
2384
|
+
} catch (err) {
|
|
2385
|
+
_iterator3.e(err);
|
|
2386
|
+
} finally {
|
|
2387
|
+
_iterator3.f();
|
|
2388
|
+
}
|
|
2389
|
+
r && Je(d, "visibilitychange", function () {
|
|
2390
|
+
d.hidden || l();
|
|
2391
|
+
});
|
|
2392
|
+
}
|
|
2393
|
+
return u = setTimeout(function () {
|
|
2394
|
+
return c.value = true;
|
|
2395
|
+
}, e), {
|
|
2396
|
+
idle: c,
|
|
2397
|
+
lastActive: f
|
|
2398
|
+
};
|
|
2399
|
+
}
|
|
2400
|
+
var Ke;
|
|
2401
|
+
(function (e) {
|
|
2402
|
+
e.UP = "UP", e.RIGHT = "RIGHT", e.DOWN = "DOWN", e.LEFT = "LEFT", e.NONE = "NONE";
|
|
2403
|
+
})(Ke || (Ke = {}));
|
|
2404
|
+
var xr = Object.defineProperty,
|
|
2405
|
+
Qe = Object.getOwnPropertySymbols,
|
|
2406
|
+
kr = Object.prototype.hasOwnProperty,
|
|
2407
|
+
Cr = Object.prototype.propertyIsEnumerable,
|
|
2408
|
+
Xe = function Xe(e, t, n) {
|
|
2409
|
+
return t in e ? xr(e, t, {
|
|
2410
|
+
enumerable: true,
|
|
2411
|
+
configurable: true,
|
|
2412
|
+
writable: true,
|
|
2413
|
+
value: n
|
|
2414
|
+
}) : e[t] = n;
|
|
2415
|
+
},
|
|
2416
|
+
Pr = function Pr(e, t) {
|
|
2417
|
+
for (var n in t) kr.call(t, n) && Xe(e, n, t[n]);
|
|
2418
|
+
if (Qe) {
|
|
2419
|
+
var _iterator4 = _createForOfIteratorHelper(Qe(t)),
|
|
2420
|
+
_step4;
|
|
2421
|
+
try {
|
|
2422
|
+
for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {
|
|
2423
|
+
var n = _step4.value;
|
|
2424
|
+
Cr.call(t, n) && Xe(e, n, t[n]);
|
|
2425
|
+
}
|
|
2426
|
+
} catch (err) {
|
|
2427
|
+
_iterator4.e(err);
|
|
2428
|
+
} finally {
|
|
2429
|
+
_iterator4.f();
|
|
2430
|
+
}
|
|
2431
|
+
}
|
|
2432
|
+
return e;
|
|
2433
|
+
};
|
|
2434
|
+
var Ur = {
|
|
2435
|
+
easeInSine: [0.12, 0, 0.39, 0],
|
|
2436
|
+
easeOutSine: [0.61, 1, 0.88, 1],
|
|
2437
|
+
easeInOutSine: [0.37, 0, 0.63, 1],
|
|
2438
|
+
easeInQuad: [0.11, 0, 0.5, 0],
|
|
2439
|
+
easeOutQuad: [0.5, 1, 0.89, 1],
|
|
2440
|
+
easeInOutQuad: [0.45, 0, 0.55, 1],
|
|
2441
|
+
easeInCubic: [0.32, 0, 0.67, 0],
|
|
2442
|
+
easeOutCubic: [0.33, 1, 0.68, 1],
|
|
2443
|
+
easeInOutCubic: [0.65, 0, 0.35, 1],
|
|
2444
|
+
easeInQuart: [0.5, 0, 0.75, 0],
|
|
2445
|
+
easeOutQuart: [0.25, 1, 0.5, 1],
|
|
2446
|
+
easeInOutQuart: [0.76, 0, 0.24, 1],
|
|
2447
|
+
easeInQuint: [0.64, 0, 0.78, 0],
|
|
2448
|
+
easeOutQuint: [0.22, 1, 0.36, 1],
|
|
2449
|
+
easeInOutQuint: [0.83, 0, 0.17, 1],
|
|
2450
|
+
easeInExpo: [0.7, 0, 0.84, 0],
|
|
2451
|
+
easeOutExpo: [0.16, 1, 0.3, 1],
|
|
2452
|
+
easeInOutExpo: [0.87, 0, 0.13, 1],
|
|
2453
|
+
easeInCirc: [0.55, 0, 1, 0.45],
|
|
2454
|
+
easeOutCirc: [0, 0.55, 0.45, 1],
|
|
2455
|
+
easeInOutCirc: [0.85, 0, 0.15, 1],
|
|
2456
|
+
easeInBack: [0.36, 0, 0.66, -0.56],
|
|
2457
|
+
easeOutBack: [0.34, 1.56, 0.64, 1],
|
|
2458
|
+
easeInOutBack: [0.68, -0.6, 0.32, 1.6]
|
|
2459
|
+
};
|
|
2460
|
+
Pr({
|
|
2461
|
+
linear: Rr
|
|
2462
|
+
}, Ur);
|
|
2463
|
+
var Re;
|
|
2464
|
+
var _t = {
|
|
2465
|
+
triggerProxySso: "triggerProxySso"
|
|
2466
|
+
},
|
|
2467
|
+
Nr = function Nr() {
|
|
2468
|
+
Re = function Re(e) {
|
|
2469
|
+
var n;
|
|
2470
|
+
var _URL = new URL(location.href),
|
|
2471
|
+
t = _URL.origin;
|
|
2472
|
+
(n = window.top) == null || n.postMessage({
|
|
2473
|
+
type: _t.triggerProxySso,
|
|
2474
|
+
data: _objectSpread(_objectSpread({}, e || {}), {}, {
|
|
2475
|
+
redirect_uri: "".concat(t, "/")
|
|
2476
|
+
})
|
|
2477
|
+
}, t);
|
|
2478
|
+
};
|
|
2479
|
+
},
|
|
2480
|
+
Lr = function Lr(e) {
|
|
2481
|
+
window.top === window.self && window.addEventListener("message", function (t) {
|
|
2482
|
+
var _t$data = t.data,
|
|
2483
|
+
n = _t$data.type,
|
|
2484
|
+
r = _t$data.data;
|
|
2485
|
+
n === _t.triggerProxySso && (e == null || e(r));
|
|
2486
|
+
});
|
|
2487
|
+
};
|
|
2488
|
+
window.top !== window.self && Nr();
|
|
2489
|
+
var xt = function xt() {
|
|
2490
|
+
var e = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
|
|
2491
|
+
var t = "",
|
|
2492
|
+
n = crypto.getRandomValues(new Uint8Array(e));
|
|
2493
|
+
for (; e--;) {
|
|
2494
|
+
var r = n[e] & 63;
|
|
2495
|
+
r < 36 ? t += r.toString(36) : r < 62 ? t += (r - 26).toString(36).toUpperCase() : r < 63 ? t += "_" : t += "-";
|
|
2496
|
+
}
|
|
2497
|
+
return t;
|
|
2498
|
+
};
|
|
2499
|
+
var kt = function kt(e) {
|
|
2500
|
+
return new URL(location.href).searchParams.get(e);
|
|
2501
|
+
},
|
|
2502
|
+
v = {
|
|
2503
|
+
oauth: "/api/justauth/oauth-server/v1/visitor/oauth/authorize",
|
|
2504
|
+
// 重定向到登录页
|
|
2505
|
+
logoutCurpage: "/api/justauth/oauth-server/v1/visitor/logout-curpage",
|
|
2506
|
+
// 清除登录信息
|
|
2507
|
+
token: "/api/justauth/oauth-server/v1/visitor/oauth/token"
|
|
2508
|
+
// 通过code获取token
|
|
2509
|
+
},
|
|
2510
|
+
_getConfig = getConfig(),
|
|
2511
|
+
Ge = _getConfig.baseURL,
|
|
2512
|
+
_getConfig$noRedireLo = _getConfig.noRedireLogin,
|
|
2513
|
+
Fr = _getConfig$noRedireLo === void 0 ? false : _getConfig$noRedireLo,
|
|
2514
|
+
z = location.origin + "/home",
|
|
2515
|
+
D = {
|
|
2516
|
+
response_type: "code",
|
|
2517
|
+
scope: "sever",
|
|
2518
|
+
client_id: "sys",
|
|
2519
|
+
client_secret: encryption("das123"),
|
|
2520
|
+
state: + /* @__PURE__ */new Date()
|
|
2521
|
+
},
|
|
2522
|
+
Dr = function Dr() {
|
|
2523
|
+
var e = getUrlParams(location.href, "redirect_url") || "";
|
|
2524
|
+
if (e) window.__isAutoCloseApp = false, window.location.replace(decodeURIComponent(e));else {
|
|
2525
|
+
var t = ["code", "state", "kingdee_token", "redirect_url"];
|
|
2526
|
+
window.history.replaceState({}, "", funcUrlDel(t));
|
|
2527
|
+
}
|
|
2528
|
+
},
|
|
2529
|
+
Ct = ref(false),
|
|
2530
|
+
Pt = function Pt(e) {
|
|
2531
|
+
if (e <= 0) return;
|
|
2532
|
+
var _r2 = _r(e),
|
|
2533
|
+
t = _r2.idle;
|
|
2534
|
+
watch(function () {
|
|
2535
|
+
return t.value;
|
|
2536
|
+
}, function (n) {
|
|
2537
|
+
n === true && (Ct.value = true);
|
|
2538
|
+
});
|
|
2539
|
+
};
|
|
2540
|
+
localStorage.getItem("idelTime") && Pt(Number(localStorage.getItem("idelTime")));
|
|
2541
|
+
var vr = /*#__PURE__*/function () {
|
|
2542
|
+
var _ref23 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee9() {
|
|
2543
|
+
var e, t, n, r, _n$data, _n$data$access_token, s, _n$data$expires_in, o, _n$data$refresh_token, i, _n$data$refresh_exp, c, f, u, _t0, _t1;
|
|
2544
|
+
return _regenerator().w(function (_context0) {
|
|
2545
|
+
while (1) switch (_context0.p = _context0.n) {
|
|
2546
|
+
case 0:
|
|
2547
|
+
e = kt("code") || "";
|
|
2548
|
+
if (e) {
|
|
2549
|
+
_context0.n = 1;
|
|
2550
|
+
break;
|
|
2551
|
+
}
|
|
2552
|
+
return _context0.a(2, getAccessToken());
|
|
2553
|
+
case 1:
|
|
2554
|
+
t = getUrlParams(location.href, "kingdee_token") || "";
|
|
2555
|
+
n = {};
|
|
2556
|
+
r = {
|
|
2557
|
+
grant_type: "authorization_code",
|
|
2558
|
+
code: e,
|
|
2559
|
+
client_id: D.client_id,
|
|
2560
|
+
client_secret: D.client_secret,
|
|
2561
|
+
redirect_uri: z,
|
|
2562
|
+
timestamp: (/* @__PURE__ */new Date()).getTime(),
|
|
2563
|
+
nonce: xt()
|
|
2564
|
+
};
|
|
2565
|
+
t && (sessionStorage.setItem("kingdee_token", t), r.redirect_uri = "".concat(r.redirect_uri, "?kingdee_token=").concat(t));
|
|
2566
|
+
_context0.p = 2;
|
|
2567
|
+
_context0.n = 3;
|
|
2568
|
+
return b.create().get(v.token, {
|
|
2569
|
+
baseURL: Ge
|
|
2570
|
+
});
|
|
2571
|
+
case 3:
|
|
2572
|
+
_context0.n = 5;
|
|
2573
|
+
break;
|
|
2574
|
+
case 4:
|
|
2575
|
+
_context0.p = 4;
|
|
2576
|
+
_t0 = _context0.v;
|
|
2577
|
+
case 5:
|
|
2578
|
+
_context0.p = 5;
|
|
2579
|
+
_context0.n = 6;
|
|
2580
|
+
return b.create().post(v.token, {}, {
|
|
2581
|
+
baseURL: Ge,
|
|
2582
|
+
params: r,
|
|
2583
|
+
headers: {
|
|
2584
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
2585
|
+
"csrf-token": wr.get("csrf-token")
|
|
2586
|
+
}
|
|
2587
|
+
});
|
|
2588
|
+
case 6:
|
|
2589
|
+
n = _context0.v;
|
|
2590
|
+
_n$data = n.data, _n$data$access_token = _n$data.access_token, s = _n$data$access_token === void 0 ? "" : _n$data$access_token, _n$data$expires_in = _n$data.expires_in, o = _n$data$expires_in === void 0 ? 0 : _n$data$expires_in, _n$data$refresh_token = _n$data.refresh_token, i = _n$data$refresh_token === void 0 ? "" : _n$data$refresh_token, _n$data$refresh_exp = _n$data.refresh_exp, c = _n$data$refresh_exp === void 0 ? 0 : _n$data$refresh_exp, f = {
|
|
2591
|
+
accessToken: s,
|
|
2592
|
+
accessTokenExpiredAt: + /* @__PURE__ */new Date() + Number(o) * 1e3,
|
|
2593
|
+
refreshToken: i,
|
|
2594
|
+
info: n.data
|
|
2595
|
+
};
|
|
2596
|
+
J().save(f);
|
|
2597
|
+
_context0.n = 7;
|
|
2598
|
+
return setPersonalInfo(s);
|
|
2599
|
+
case 7:
|
|
2600
|
+
u = Number(c) - (/* @__PURE__ */new Date()).getTime();
|
|
2601
|
+
return _context0.a(2, (u && u > 0 && (Pt(u), u && localStorage.setItem("idelTime", u.toString())), Dr(), s));
|
|
2602
|
+
case 8:
|
|
2603
|
+
_context0.p = 8;
|
|
2604
|
+
_t1 = _context0.v;
|
|
2605
|
+
return _context0.a(2, $(_objectSpread(_objectSpread({}, D), {}, {
|
|
2606
|
+
redirect_uri: z
|
|
2607
|
+
})));
|
|
2608
|
+
}
|
|
2609
|
+
}, _callee9, null, [[5, 8], [2, 4]]);
|
|
2610
|
+
}));
|
|
2611
|
+
return function vr() {
|
|
2612
|
+
return _ref23.apply(this, arguments);
|
|
2613
|
+
};
|
|
2614
|
+
}(),
|
|
2615
|
+
q = ref(false),
|
|
2616
|
+
Jr = /*#__PURE__*/function () {
|
|
2617
|
+
var _ref24 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee1(e) {
|
|
2618
|
+
var _J$getData, t, n, r, _t10, _t11;
|
|
2619
|
+
return _regenerator().w(function (_context10) {
|
|
2620
|
+
while (1) switch (_context10.p = _context10.n) {
|
|
2621
|
+
case 0:
|
|
2622
|
+
if (!e["public"]) {
|
|
2623
|
+
_context10.n = 1;
|
|
2624
|
+
break;
|
|
2625
|
+
}
|
|
2626
|
+
return _context10.a(2, "");
|
|
2627
|
+
case 1:
|
|
2628
|
+
if (!Ct.value) {
|
|
2629
|
+
_context10.n = 2;
|
|
2630
|
+
break;
|
|
2631
|
+
}
|
|
2632
|
+
return _context10.a(2, $(_objectSpread(_objectSpread({}, D), {}, {
|
|
2633
|
+
redirect_uri: z
|
|
2634
|
+
})));
|
|
2635
|
+
case 2:
|
|
2636
|
+
if (!q.value) {
|
|
2637
|
+
_context10.n = 4;
|
|
2638
|
+
break;
|
|
2639
|
+
}
|
|
2640
|
+
_context10.n = 3;
|
|
2641
|
+
return new Promise(/*#__PURE__*/function () {
|
|
2642
|
+
var _ref25 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee0(s) {
|
|
2643
|
+
return _regenerator().w(function (_context1) {
|
|
2644
|
+
while (1) switch (_context1.n) {
|
|
2645
|
+
case 0:
|
|
2646
|
+
watch(function () {
|
|
2647
|
+
return q.value;
|
|
2648
|
+
}, function (o) {
|
|
2649
|
+
if (!o) {
|
|
2650
|
+
var i = getAccessToken();
|
|
2651
|
+
s(i);
|
|
2652
|
+
}
|
|
2653
|
+
});
|
|
2654
|
+
case 1:
|
|
2655
|
+
return _context1.a(2);
|
|
2656
|
+
}
|
|
2657
|
+
}, _callee0);
|
|
2658
|
+
}));
|
|
2659
|
+
return function (_x10) {
|
|
2660
|
+
return _ref25.apply(this, arguments);
|
|
2661
|
+
};
|
|
2662
|
+
}());
|
|
2663
|
+
case 3:
|
|
2664
|
+
return _context10.a(2, _context10.v);
|
|
2665
|
+
case 4:
|
|
2666
|
+
_J$getData = J().getData(), t = _J$getData.accessTokenExpiredAt, n = kt("code") || "";
|
|
2667
|
+
if (!((!getAccessToken() || t === 0) && !n)) {
|
|
2668
|
+
_context10.n = 5;
|
|
2669
|
+
break;
|
|
2670
|
+
}
|
|
2671
|
+
return _context10.a(2, $(_objectSpread(_objectSpread({}, D), {}, {
|
|
2672
|
+
redirect_uri: z
|
|
2673
|
+
})));
|
|
2674
|
+
case 5:
|
|
2675
|
+
r = getAccessToken();
|
|
2676
|
+
q.value = true;
|
|
2677
|
+
_context10.p = 6;
|
|
2678
|
+
_t10 = typeof t == "number" && t > 0 && + /* @__PURE__ */new Date() + 6e4 > t;
|
|
2679
|
+
if (!_t10) {
|
|
2680
|
+
_context10.n = 8;
|
|
2681
|
+
break;
|
|
2682
|
+
}
|
|
2683
|
+
_context10.n = 7;
|
|
2684
|
+
return Br(D);
|
|
2685
|
+
case 7:
|
|
2686
|
+
r = _context10.v;
|
|
2687
|
+
case 8:
|
|
2688
|
+
_context10.n = 9;
|
|
2689
|
+
return vr();
|
|
2690
|
+
case 9:
|
|
2691
|
+
r = _context10.v;
|
|
2692
|
+
q.value = !1;
|
|
2693
|
+
_context10.n = 11;
|
|
2694
|
+
break;
|
|
2695
|
+
case 10:
|
|
2696
|
+
_context10.p = 10;
|
|
2697
|
+
_t11 = _context10.v;
|
|
2698
|
+
q.value = false;
|
|
2699
|
+
case 11:
|
|
2700
|
+
return _context10.a(2, r);
|
|
2701
|
+
}
|
|
2702
|
+
}, _callee1, null, [[6, 10]]);
|
|
2703
|
+
}));
|
|
2704
|
+
return function Jr(_x1) {
|
|
2705
|
+
return _ref24.apply(this, arguments);
|
|
2706
|
+
};
|
|
2707
|
+
}(),
|
|
2708
|
+
$ = function $(e) {
|
|
2709
|
+
if (Fr) return;
|
|
2710
|
+
var _getConfig2 = getConfig(),
|
|
2711
|
+
t = _getConfig2.baseURL,
|
|
2712
|
+
n = _getConfig2.ssoLocale;
|
|
2713
|
+
if (Re) return Re(e);
|
|
2714
|
+
e.logout = "true", n && (e.locale = "locale");
|
|
2715
|
+
var r = Object.keys(e).filter(function (o) {
|
|
2716
|
+
return o !== "client_secret";
|
|
2717
|
+
}).map(function (o) {
|
|
2718
|
+
return "".concat(o, "=").concat(e[o]);
|
|
2719
|
+
}).join("&"),
|
|
2720
|
+
s = "".concat(t).concat(v.oauth, "?").concat(r);
|
|
2721
|
+
localStorage.removeItem("idelTime"), sessionStorage.clear(), J().remove();
|
|
2722
|
+
try {
|
|
2723
|
+
b.create().get(v.logoutCurpage, {
|
|
2724
|
+
baseURL: t
|
|
2725
|
+
});
|
|
2726
|
+
} catch (_unused8) {}
|
|
2727
|
+
window.__isAutoCloseApp = false, location.replace(s);
|
|
2728
|
+
};
|
|
2729
|
+
Lr($);
|
|
2730
|
+
var Br = /*#__PURE__*/function () {
|
|
2731
|
+
var _ref26 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee10(e) {
|
|
2732
|
+
var _getConfig3, t, _J$getData2, n, r, _r$data, _r$data$access_token, s, _r$data$expires_in, o, _r$data$refresh_token, i, c, _t12, _t13;
|
|
2733
|
+
return _regenerator().w(function (_context11) {
|
|
2734
|
+
while (1) switch (_context11.p = _context11.n) {
|
|
2735
|
+
case 0:
|
|
2736
|
+
_getConfig3 = getConfig(), t = _getConfig3.baseURL, _J$getData2 = J().getData(), n = _J$getData2.refreshToken;
|
|
2737
|
+
_context11.p = 1;
|
|
2738
|
+
_context11.n = 2;
|
|
2739
|
+
return b.create().get(v.token, {
|
|
2740
|
+
baseURL: t
|
|
2741
|
+
});
|
|
2742
|
+
case 2:
|
|
2743
|
+
_context11.n = 4;
|
|
2744
|
+
break;
|
|
2745
|
+
case 3:
|
|
2746
|
+
_context11.p = 3;
|
|
2747
|
+
_t12 = _context11.v;
|
|
2748
|
+
case 4:
|
|
2749
|
+
_context11.p = 4;
|
|
2750
|
+
_context11.n = 5;
|
|
2751
|
+
return b.create().post(v.token, {}, {
|
|
2752
|
+
baseURL: t,
|
|
2753
|
+
params: {
|
|
2754
|
+
refresh_token: n,
|
|
2755
|
+
grant_type: "refresh_token",
|
|
2756
|
+
client_id: e.client_id,
|
|
2757
|
+
client_secret: e.client_secret,
|
|
2758
|
+
timestamp: (/* @__PURE__ */new Date()).getTime(),
|
|
2759
|
+
nonce: xt()
|
|
2760
|
+
}
|
|
2761
|
+
});
|
|
2762
|
+
case 5:
|
|
2763
|
+
r = _context11.v;
|
|
2764
|
+
_r$data = r.data;
|
|
2765
|
+
_r$data$access_token = _r$data.access_token;
|
|
2766
|
+
s = _r$data$access_token === void 0 ? "" : _r$data$access_token;
|
|
2767
|
+
_r$data$expires_in = _r$data.expires_in;
|
|
2768
|
+
o = _r$data$expires_in === void 0 ? 0 : _r$data$expires_in;
|
|
2769
|
+
_r$data$refresh_token = _r$data.refresh_token;
|
|
2770
|
+
i = _r$data$refresh_token === void 0 ? "" : _r$data$refresh_token;
|
|
2771
|
+
c = {
|
|
2772
|
+
accessToken: s,
|
|
2773
|
+
accessTokenExpiredAt: + /* @__PURE__ */new Date() + Number(o) * 1e3,
|
|
2774
|
+
refreshToken: i,
|
|
2775
|
+
info: r.data
|
|
2776
|
+
};
|
|
2777
|
+
J().save(c);
|
|
2778
|
+
_context11.n = 6;
|
|
2779
|
+
return setPersonalInfo(s);
|
|
2780
|
+
case 6:
|
|
2781
|
+
return _context11.a(2, s);
|
|
2782
|
+
case 7:
|
|
2783
|
+
_context11.p = 7;
|
|
2784
|
+
_t13 = _context11.v;
|
|
2785
|
+
return _context11.a(2, $(_objectSpread(_objectSpread({}, e), {}, {
|
|
2786
|
+
redirect_uri: z
|
|
2787
|
+
})));
|
|
2788
|
+
}
|
|
2789
|
+
}, _callee10, null, [[4, 7], [1, 3]]);
|
|
2790
|
+
}));
|
|
2791
|
+
return function Br(_x11) {
|
|
2792
|
+
return _ref26.apply(this, arguments);
|
|
2793
|
+
};
|
|
2794
|
+
}(),
|
|
2795
|
+
J = function J() {
|
|
2796
|
+
return {
|
|
2797
|
+
getData: function getData() {
|
|
2798
|
+
return {
|
|
2799
|
+
accessToken: getAccessToken(),
|
|
2800
|
+
accessTokenExpiredAt: getAccessTokenInfo("accessTokenExpiredAt") ? Number(getAccessTokenInfo("accessTokenExpiredAt")) : "",
|
|
2801
|
+
refreshToken: getAccessTokenInfo("refreshToken")
|
|
2802
|
+
};
|
|
2803
|
+
},
|
|
2804
|
+
save: function save(e) {
|
|
2805
|
+
setAccessToken(e.accessToken || "", {
|
|
2806
|
+
accessTokenExpiredAt: e.accessTokenExpiredAt,
|
|
2807
|
+
refreshToken: e.refreshToken
|
|
2808
|
+
}), setProcessEngineToken(e);
|
|
2809
|
+
},
|
|
2810
|
+
remove: function remove() {
|
|
2811
|
+
removeAccessToken(), removeProcessEngineToken();
|
|
2812
|
+
}
|
|
2813
|
+
};
|
|
2814
|
+
};
|
|
2815
|
+
export { kt as getQuery, Jr as getToken, vr as getTokenFromCode, D as getTokenParams, $ as login, z as real_uri, J as tokenStorage };
|