@das-fed/upf-utils 6.4.0-dev.210 → 6.4.0-dev.212
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 +1450 -1438
- package/api-services/index.js +1185 -1172
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +955 -967
- package/api-services/modules/app-manage/index.js +770 -793
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +955 -967
- package/api-services/modules/authentication/index.js +770 -793
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +2 -2
- package/api-services/modules/bems/index.js +2 -7
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +967 -955
- package/api-services/modules/contract/index.js +788 -775
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +2 -2
- package/api-services/modules/duty-manage/index.js +2 -7
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +2 -2
- package/api-services/modules/enterpriseright/index.js +2 -7
- package/api-services/modules/enterpriseright/index.js.gz +0 -0
- package/api-services/modules/es5.js +2 -2
- package/api-services/modules/file/es5.js +1243 -1255
- package/api-services/modules/file/index.js +1036 -1059
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +955 -967
- package/api-services/modules/gateway-edge/index.js +770 -793
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +2 -7
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +850 -847
- package/api-services/modules/iot/index.js +661 -662
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +803 -801
- package/api-services/modules/justauth/index.js +624 -625
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +955 -967
- package/api-services/modules/knowledge/index.js +770 -793
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +940 -931
- package/api-services/modules/link/index.js +764 -755
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +955 -967
- package/api-services/modules/permission/index.js +770 -793
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +2 -2
- package/api-services/modules/platformManage/index.js +2 -7
- package/api-services/modules/platformManage/index.js.gz +0 -0
- package/api-services/modules/portal/es5.js +2 -2
- package/api-services/modules/portal/index.js +2 -7
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +955 -967
- package/api-services/modules/space-manage/index.js +770 -793
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +982 -970
- package/api-services/modules/super-admin/index.js +800 -787
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +976 -988
- package/api-services/modules/supplier/index.js +787 -810
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +835 -832
- package/api-services/modules/supplychain-manage/index.js +648 -649
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +955 -967
- package/api-services/modules/systemConfiguration/index.js +770 -793
- package/api-services/modules/systemConfiguration/index.js.gz +0 -0
- package/api-services/modules/tool/es5.js +2 -2
- package/api-services/modules/tool/index.js +2 -7
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +938 -929
- package/api-services/src/create-service/index.js +763 -754
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +22 -24
- package/common-info/getInfoFromUrl/es5.js +40 -40
- package/common-info/getInfoFromUrl/index.js +36 -36
- package/common-info/getInfoFromUrl/index.js.gz +0 -0
- package/common-info/index.js +17 -21
- package/common-info/index.js.gz +0 -0
- package/common-info/set-personal-info/es5.js +22 -22
- package/common-info/set-personal-info/index.js +20 -25
- package/common-info/set-personal-info/index.js.gz +0 -0
- package/common-tools/extract-file-name/es5.js +2 -2
- package/common-tools/extract-file-name/index.js +2 -7
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/handle-data/es5.js +111 -118
- package/common-tools/handle-data/index.js +86 -89
- package/common-tools/handle-data/index.js.gz +0 -0
- package/create-api-service/check-token/es5.js +125 -127
- package/create-api-service/check-token/index.js +118 -123
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/es5.js +2 -2
- package/create-api-service/index.js +2 -7
- package/create-api-service/index.js.gz +0 -0
- package/create-api-service/sso/es5.js +3 -3
- package/create-api-service/sso/index.js +3 -8
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/es5.js +2 -2
- package/curring-http/index.js +2 -7
- package/curring-http/index.js.gz +0 -0
- package/front-end/i18n/front-end-page/dasutils_en-US.js +20 -1
- package/front-end/i18n/front-end-page/dasutils_zh-CN.js +19 -1
- package/front-end/i18n/front-end-page/dasutils_zh-MO.js +19 -1
- package/package.json +4 -4
- package/pinyin-first-character/es5.js +1 -1
- package/pinyin-first-character/index.js +1 -1
- package/pinyin-first-character/index.js.gz +0 -0
- package/webSocket-service/es5.js +41 -53
- package/webSocket-service/index.js +40 -50
- package/webSocket-service/index.js.gz +0 -0
|
@@ -6,10 +6,10 @@ function Ce(e, t) {
|
|
|
6
6
|
return e.apply(t, arguments);
|
|
7
7
|
};
|
|
8
8
|
}
|
|
9
|
-
const { toString: et } = Object.prototype, { getPrototypeOf: le } = Object, { iterator:
|
|
9
|
+
const { toString: et } = Object.prototype, { getPrototypeOf: le } = Object, { iterator: v, toStringTag: Ne } = Symbol, K = /* @__PURE__ */ ((e) => (t) => {
|
|
10
10
|
const n = et.call(t);
|
|
11
11
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
12
|
-
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) =>
|
|
12
|
+
})(/* @__PURE__ */ Object.create(null)), C = (e) => (e = e.toLowerCase(), (t) => K(t) === e), X = (e) => (t) => typeof t === e, { isArray: D } = Array, q = X("undefined");
|
|
13
13
|
function tt(e) {
|
|
14
14
|
return e !== null && !q(e) && e.constructor !== null && !q(e.constructor) && A(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
15
15
|
}
|
|
@@ -19,13 +19,13 @@ function nt(e) {
|
|
|
19
19
|
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Pe(e.buffer), t;
|
|
20
20
|
}
|
|
21
21
|
const rt = X("string"), A = X("function"), _e = X("number"), G = (e) => e !== null && typeof e == "object", st = (e) => e === !0 || e === !1, z = (e) => {
|
|
22
|
-
if (
|
|
22
|
+
if (K(e) !== "object")
|
|
23
23
|
return !1;
|
|
24
24
|
const t = le(e);
|
|
25
|
-
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ne in e) && !(
|
|
25
|
+
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Ne in e) && !(v in e);
|
|
26
26
|
}, ot = C("Date"), it = C("File"), at = C("Blob"), ct = C("FileList"), lt = (e) => G(e) && A(e.pipe), ut = (e) => {
|
|
27
27
|
let t;
|
|
28
|
-
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t =
|
|
28
|
+
return e && (typeof FormData == "function" && e instanceof FormData || A(e.append) && ((t = K(e)) === "formdata" || // detect form-data instance
|
|
29
29
|
t === "object" && A(e.toString) && e.toString() === "[object FormData]"));
|
|
30
30
|
}, ft = C("URLSearchParams"), [dt, pt, ht, mt] = ["ReadableStream", "Request", "Response", "Headers"].map(C), yt = (e) => e.trim ? e.trim() : e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g, "");
|
|
31
31
|
function I(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
@@ -91,7 +91,7 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
|
91
91
|
n[t] = e[t];
|
|
92
92
|
return n;
|
|
93
93
|
}, Ot = /* @__PURE__ */ ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && le(Uint8Array)), Tt = (e, t) => {
|
|
94
|
-
const r = (e && e[
|
|
94
|
+
const r = (e && e[v]).call(e);
|
|
95
95
|
let s;
|
|
96
96
|
for (; (s = r.next()) && !s.done; ) {
|
|
97
97
|
const o = s.value;
|
|
@@ -139,7 +139,7 @@ const bt = (e, t, n, { allOwnKeys: r } = {}) => (I(t, (s, o) => {
|
|
|
139
139
|
}, Ft = () => {
|
|
140
140
|
}, Ut = (e, t) => e != null && Number.isFinite(e = +e) ? e : t;
|
|
141
141
|
function Lt(e) {
|
|
142
|
-
return !!(e && A(e.append) && e[Ne] === "FormData" && e[
|
|
142
|
+
return !!(e && A(e.append) && e[Ne] === "FormData" && e[v]);
|
|
143
143
|
}
|
|
144
144
|
const Bt = (e) => {
|
|
145
145
|
const t = new Array(10), n = (r, s) => {
|
|
@@ -165,7 +165,7 @@ const Bt = (e) => {
|
|
|
165
165
|
}))(`axios@${Math.random()}`, []) : (n) => setTimeout(n))(
|
|
166
166
|
typeof setImmediate == "function",
|
|
167
167
|
A(U.postMessage)
|
|
168
|
-
), jt = typeof queueMicrotask < "u" ? queueMicrotask.bind(U) : typeof process < "u" && process.nextTick || Be, qt = (e) => e != null && A(e[
|
|
168
|
+
), jt = typeof queueMicrotask < "u" ? queueMicrotask.bind(U) : typeof process < "u" && process.nextTick || Be, qt = (e) => e != null && A(e[v]), a = {
|
|
169
169
|
isArray: D,
|
|
170
170
|
isArrayBuffer: Pe,
|
|
171
171
|
isBuffer: tt,
|
|
@@ -197,7 +197,7 @@ const Bt = (e) => {
|
|
|
197
197
|
stripBOM: wt,
|
|
198
198
|
inherits: Et,
|
|
199
199
|
toFlatObject: Rt,
|
|
200
|
-
kindOf:
|
|
200
|
+
kindOf: K,
|
|
201
201
|
kindOfTest: C,
|
|
202
202
|
endsWith: gt,
|
|
203
203
|
toArray: St,
|
|
@@ -468,12 +468,12 @@ const Me = {
|
|
|
468
468
|
Blob: $t
|
|
469
469
|
},
|
|
470
470
|
protocols: ["http", "https", "file", "blob", "url", "data"]
|
|
471
|
-
}, fe = typeof window < "u" && typeof document < "u", oe = typeof navigator == "object" && navigator || void 0,
|
|
471
|
+
}, fe = typeof window < "u" && typeof document < "u", oe = typeof navigator == "object" && navigator || void 0, vt = fe && (!oe || ["ReactNative", "NativeScript", "NS"].indexOf(oe.product) < 0), Kt = typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
472
472
|
self instanceof WorkerGlobalScope && typeof self.importScripts == "function", Xt = fe && window.location.href || "http://localhost", Gt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
473
473
|
__proto__: null,
|
|
474
474
|
hasBrowserEnv: fe,
|
|
475
|
-
hasStandardBrowserEnv:
|
|
476
|
-
hasStandardBrowserWebWorkerEnv:
|
|
475
|
+
hasStandardBrowserEnv: vt,
|
|
476
|
+
hasStandardBrowserWebWorkerEnv: Kt,
|
|
477
477
|
navigator: oe,
|
|
478
478
|
origin: Xt
|
|
479
479
|
}, Symbol.toStringTag, { value: "Module" })), O = {
|
|
@@ -1141,13 +1141,13 @@ const $e = (e) => {
|
|
|
1141
1141
|
}, {
|
|
1142
1142
|
highWaterMark: 2
|
|
1143
1143
|
});
|
|
1144
|
-
}, Z = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", We = Z && typeof ReadableStream == "function", gn = Z && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())),
|
|
1144
|
+
}, Z = typeof fetch == "function" && typeof Request == "function" && typeof Response == "function", We = Z && typeof ReadableStream == "function", gn = Z && (typeof TextEncoder == "function" ? /* @__PURE__ */ ((e) => (t) => e.encode(t))(new TextEncoder()) : async (e) => new Uint8Array(await new Response(e).arrayBuffer())), ve = (e, ...t) => {
|
|
1145
1145
|
try {
|
|
1146
1146
|
return !!e(...t);
|
|
1147
1147
|
} catch {
|
|
1148
1148
|
return !1;
|
|
1149
1149
|
}
|
|
1150
|
-
}, Sn = We &&
|
|
1150
|
+
}, Sn = We && ve(() => {
|
|
1151
1151
|
let e = !1;
|
|
1152
1152
|
const t = new Request(O.origin, {
|
|
1153
1153
|
body: new ReadableStream(),
|
|
@@ -1157,7 +1157,7 @@ const $e = (e) => {
|
|
|
1157
1157
|
}
|
|
1158
1158
|
}).headers.has("Content-Type");
|
|
1159
1159
|
return e && !t;
|
|
1160
|
-
}), Oe = 64 * 1024, ie = We &&
|
|
1160
|
+
}), Oe = 64 * 1024, ie = We && ve(() => a.isReadableStream(new Response("").body)), W = {
|
|
1161
1161
|
stream: ie && ((e) => e.body)
|
|
1162
1162
|
};
|
|
1163
1163
|
Z && ((e) => {
|
|
@@ -1283,7 +1283,7 @@ a.forEach(ae, (e, t) => {
|
|
|
1283
1283
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
1284
1284
|
}
|
|
1285
1285
|
});
|
|
1286
|
-
const Te = (e) => `- ${e}`, xn = (e) => a.isFunction(e) || e === null || e === !1,
|
|
1286
|
+
const Te = (e) => `- ${e}`, xn = (e) => a.isFunction(e) || e === null || e === !1, Ke = {
|
|
1287
1287
|
getAdapter: (e) => {
|
|
1288
1288
|
e = a.isArray(e) ? e : [e];
|
|
1289
1289
|
const { length: t } = e;
|
|
@@ -1322,7 +1322,7 @@ function Ae(e) {
|
|
|
1322
1322
|
return ne(e), e.headers = x.from(e.headers), e.data = te.call(
|
|
1323
1323
|
e,
|
|
1324
1324
|
e.transformRequest
|
|
1325
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
1325
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Ke.getAdapter(e.adapter || M.adapter)(e).then(function(r) {
|
|
1326
1326
|
return ne(e), r.data = te.call(
|
|
1327
1327
|
e,
|
|
1328
1328
|
e.transformResponse,
|
|
@@ -1353,16 +1353,11 @@ Y.transitional = function(t, n, r) {
|
|
|
1353
1353
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1354
1354
|
m.ERR_DEPRECATED
|
|
1355
1355
|
);
|
|
1356
|
-
return n && !xe[i] && (xe[i] = !0,
|
|
1357
|
-
s(
|
|
1358
|
-
i,
|
|
1359
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1360
|
-
)
|
|
1361
|
-
)), t ? t(o, i, c) : !0;
|
|
1356
|
+
return n && !xe[i] && (xe[i] = !0), t ? t(o, i, c) : !0;
|
|
1362
1357
|
};
|
|
1363
1358
|
};
|
|
1364
1359
|
Y.spelling = function(t) {
|
|
1365
|
-
return (n, r) =>
|
|
1360
|
+
return (n, r) => !0;
|
|
1366
1361
|
};
|
|
1367
1362
|
function Cn(e, t, n) {
|
|
1368
1363
|
if (typeof e != "object")
|
|
@@ -1681,7 +1676,7 @@ E.isAxiosError = Pn;
|
|
|
1681
1676
|
E.mergeConfig = B;
|
|
1682
1677
|
E.AxiosHeaders = x;
|
|
1683
1678
|
E.formToJSON = (e) => He(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1684
|
-
E.getAdapter =
|
|
1679
|
+
E.getAdapter = Ke.getAdapter;
|
|
1685
1680
|
E.HttpStatusCode = ce;
|
|
1686
1681
|
E.default = E;
|
|
1687
1682
|
const Ln = async (e) => {
|
|
Binary file
|
|
@@ -1795,12 +1795,12 @@ Y.transitional = function (t, n, r) {
|
|
|
1795
1795
|
}
|
|
1796
1796
|
return function (o, i, c) {
|
|
1797
1797
|
if (t === false) throw new m(s(i, " has been removed" + (n ? " in " + n : "")), m.ERR_DEPRECATED);
|
|
1798
|
-
return n && !xe[i] && (xe[i] = true
|
|
1798
|
+
return n && !xe[i] && (xe[i] = true), t ? t(o, i, c) : true;
|
|
1799
1799
|
};
|
|
1800
1800
|
};
|
|
1801
1801
|
Y.spelling = function (t) {
|
|
1802
1802
|
return function (n, r) {
|
|
1803
|
-
return
|
|
1803
|
+
return true;
|
|
1804
1804
|
};
|
|
1805
1805
|
};
|
|
1806
1806
|
function An(e, t, n) {
|
|
@@ -1351,16 +1351,11 @@ Y.transitional = function(t, n, r) {
|
|
|
1351
1351
|
s(i, " has been removed" + (n ? " in " + n : "")),
|
|
1352
1352
|
m.ERR_DEPRECATED
|
|
1353
1353
|
);
|
|
1354
|
-
return n && !xe[i] && (xe[i] = !0,
|
|
1355
|
-
s(
|
|
1356
|
-
i,
|
|
1357
|
-
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
1358
|
-
)
|
|
1359
|
-
)), t ? t(o, i, c) : !0;
|
|
1354
|
+
return n && !xe[i] && (xe[i] = !0), t ? t(o, i, c) : !0;
|
|
1360
1355
|
};
|
|
1361
1356
|
};
|
|
1362
1357
|
Y.spelling = function(t) {
|
|
1363
|
-
return (n, r) =>
|
|
1358
|
+
return (n, r) => !0;
|
|
1364
1359
|
};
|
|
1365
1360
|
function An(e, t, n) {
|
|
1366
1361
|
if (typeof e != "object")
|
|
Binary file
|
|
@@ -9,52 +9,51 @@ function asyncGeneratorStep(n, t, e, r, o, a, c) { try { var i = n[a](c), u = i.
|
|
|
9
9
|
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); }); }; }
|
|
10
10
|
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); }
|
|
11
11
|
var config = require('@das-fed/upf-utils/config/es5');
|
|
12
|
-
var
|
|
13
|
-
return
|
|
12
|
+
var M = function M(f) {
|
|
13
|
+
return f === null || _typeof(f) > "u" || f === "";
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
return (((
|
|
15
|
+
z = function z(f) {
|
|
16
|
+
var n;
|
|
17
|
+
return (((n = config.getConfig()) == null ? undefined : n.systemLangList) || ["zh-CN", "en-US", "zh-MO"]).includes(f);
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(
|
|
21
|
-
var
|
|
19
|
+
A = /*#__PURE__*/function () {
|
|
20
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(f) {
|
|
21
|
+
var x, _x$currentLang, n, _x$baseUrl, c, _x$appName, h, _x$isPullFrontEnd, L, _x$isPullBack, N, _x$isDasUI, O, _x$fallbackBaseUrl, a, l, y, j, r, _iterator, _step, s, $, w, u, _r, _iterator2, _step2, _s, _$, _w, _u, _r2, _s2, _t3, _t4;
|
|
22
22
|
return _regenerator().w(function (_context4) {
|
|
23
23
|
while (1) switch (_context4.p = _context4.n) {
|
|
24
24
|
case 0:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
(typeof
|
|
28
|
-
|
|
29
|
-
Array.isArray(
|
|
30
|
-
return typeof
|
|
31
|
-
}),
|
|
32
|
-
|
|
25
|
+
x = f || {};
|
|
26
|
+
_x$currentLang = x.currentLang, n = _x$currentLang === void 0 ? "zh-CN" : _x$currentLang, _x$baseUrl = x.baseUrl, c = _x$baseUrl === void 0 ? "/" : _x$baseUrl, _x$appName = x.appName, h = _x$appName === void 0 ? "jc" : _x$appName, _x$isPullFrontEnd = x.isPullFrontEnd, L = _x$isPullFrontEnd === void 0 ? true : _x$isPullFrontEnd, _x$isPullBack = x.isPullBack, N = _x$isPullBack === void 0 ? false : _x$isPullBack, _x$isDasUI = x.isDasUI, O = _x$isDasUI === void 0 ? false : _x$isDasUI, _x$fallbackBaseUrl = x.fallbackBaseUrl, a = _x$fallbackBaseUrl === void 0 ? "" : _x$fallbackBaseUrl;
|
|
27
|
+
(typeof n != "string" || !n) && (n = "zh-CN");
|
|
28
|
+
l = [];
|
|
29
|
+
Array.isArray(h) ? (l = h.filter(function (r) {
|
|
30
|
+
return typeof r == "string" && r;
|
|
31
|
+
}), l.length === 0 && (l = ["jc"])) : typeof h == "string" && h ? l = [h] : l = ["jc"], typeof c != "string" && (c = "/"), c || (c = "/"), c.endsWith("/") || (c = c + "/"), typeof a != "string" && (a = ""), a && !a.endsWith("/") && (a = a + "/");
|
|
32
|
+
y = {
|
|
33
33
|
frontEnd: null,
|
|
34
34
|
// 统一格式:{ appName1: data1, appName2: data2, ... }
|
|
35
35
|
dasUiEnd: null,
|
|
36
36
|
backMsg: null
|
|
37
37
|
// 统一格式:{ appName1: data1, appName2: data2, ... }
|
|
38
38
|
};
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
O,
|
|
46
|
-
b,
|
|
39
|
+
j = /*#__PURE__*/function () {
|
|
40
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(r, s) {
|
|
41
|
+
var $,
|
|
42
|
+
w,
|
|
43
|
+
u,
|
|
44
|
+
F,
|
|
47
45
|
U,
|
|
48
|
-
|
|
46
|
+
k,
|
|
47
|
+
i,
|
|
49
48
|
_args3 = arguments;
|
|
50
49
|
return _regenerator().w(function (_context3) {
|
|
51
50
|
while (1) switch (_context3.n) {
|
|
52
51
|
case 0:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(
|
|
57
|
-
var
|
|
52
|
+
$ = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : "zh-CN";
|
|
53
|
+
w = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : "资源";
|
|
54
|
+
u = /*#__PURE__*/function () {
|
|
55
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(i) {
|
|
56
|
+
var o, _t, _t2;
|
|
58
57
|
return _regenerator().w(function (_context) {
|
|
59
58
|
while (1) switch (_context.p = _context.n) {
|
|
60
59
|
case 0:
|
|
@@ -64,37 +63,37 @@ var _ = function _(u) {
|
|
|
64
63
|
break;
|
|
65
64
|
}
|
|
66
65
|
_context.n = 1;
|
|
67
|
-
return window.fetch(
|
|
66
|
+
return window.fetch(i, {
|
|
68
67
|
cache: "no-cache"
|
|
69
68
|
});
|
|
70
69
|
case 1:
|
|
71
|
-
|
|
72
|
-
if (!(!
|
|
70
|
+
o = _context.v;
|
|
71
|
+
if (!(!o || !o.ok)) {
|
|
73
72
|
_context.n = 2;
|
|
74
73
|
break;
|
|
75
74
|
}
|
|
76
|
-
_t =
|
|
75
|
+
_t = null;
|
|
77
76
|
_context.n = 4;
|
|
78
77
|
break;
|
|
79
78
|
case 2:
|
|
80
79
|
_context.n = 3;
|
|
81
|
-
return
|
|
80
|
+
return o.text();
|
|
82
81
|
case 3:
|
|
83
82
|
_t = _context.v;
|
|
84
83
|
case 4:
|
|
85
84
|
return _context.a(2, _t);
|
|
86
85
|
case 5:
|
|
87
86
|
_context.n = 6;
|
|
88
|
-
return new Promise(function (
|
|
87
|
+
return new Promise(function (o) {
|
|
89
88
|
try {
|
|
90
89
|
var t = new XMLHttpRequest();
|
|
91
|
-
t.open("GET",
|
|
92
|
-
t.readyState === 4 &&
|
|
90
|
+
t.open("GET", i, !0), t.onreadystatechange = function () {
|
|
91
|
+
t.readyState === 4 && o(t.status >= 200 && t.status < 300 ? t.responseText : null);
|
|
93
92
|
}, t.onerror = function () {
|
|
94
|
-
|
|
93
|
+
o(null);
|
|
95
94
|
}, t.send();
|
|
96
95
|
} catch (_unused) {
|
|
97
|
-
|
|
96
|
+
o(null);
|
|
98
97
|
}
|
|
99
98
|
});
|
|
100
99
|
case 6:
|
|
@@ -111,106 +110,100 @@ var _ = function _(u) {
|
|
|
111
110
|
}
|
|
112
111
|
}, _callee, null, [[0, 8]]);
|
|
113
112
|
}));
|
|
114
|
-
return function
|
|
113
|
+
return function u(_x4) {
|
|
115
114
|
return _ref3.apply(this, arguments);
|
|
116
115
|
};
|
|
117
116
|
}();
|
|
118
|
-
|
|
119
|
-
if (!
|
|
120
|
-
var t =
|
|
117
|
+
F = function F(i) {
|
|
118
|
+
if (!i || typeof i != "string") return null;
|
|
119
|
+
var t = i.replace(/^\uFEFF/, "").trim();
|
|
121
120
|
if (t.startsWith("{")) try {
|
|
122
121
|
var e = JSON.parse(t);
|
|
123
122
|
if (e && _typeof(e) == "object") return e;
|
|
124
|
-
} catch (
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
var j = t.match(/export\s+default\s*/);
|
|
128
|
-
if (!j || j.index === undefined) return console.warn("[parseEsmDefault] 未找到 export default,且非纯 JSON 格式"), null;
|
|
123
|
+
} catch (_unused3) {}
|
|
124
|
+
var b = t.match(/export\s+default\s*/);
|
|
125
|
+
if (!b || b.index === undefined) return null;
|
|
129
126
|
try {
|
|
130
|
-
var _e = t.substring(
|
|
131
|
-
if (_e = _e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|\n)\s*\/\/.*(?=\n|$)/g, "$1").trim(), _e = _e.replace(/^\s*export\s+default\s*/, "").replace(/;?\s*$/, "").trim(), !_e) return
|
|
127
|
+
var _e = t.substring(b.index);
|
|
128
|
+
if (_e = _e.replace(/\/\*[\s\S]*?\*\//g, "").replace(/(^|\n)\s*\/\/.*(?=\n|$)/g, "$1").trim(), _e = _e.replace(/^\s*export\s+default\s*/, "").replace(/;?\s*$/, "").trim(), !_e) return null;
|
|
132
129
|
try {
|
|
133
|
-
var
|
|
134
|
-
if (
|
|
135
|
-
} catch (
|
|
136
|
-
console.warn("[parseEsmDefault] Function 构造器失败:", f);
|
|
137
|
-
}
|
|
130
|
+
var d = new Function("return ".concat(_e))();
|
|
131
|
+
if (d && _typeof(d) == "object") return d;
|
|
132
|
+
} catch (_unused4) {}
|
|
138
133
|
try {
|
|
139
|
-
var
|
|
140
|
-
|
|
141
|
-
if (
|
|
142
|
-
var
|
|
143
|
-
|
|
144
|
-
var
|
|
145
|
-
if (
|
|
146
|
-
} catch (
|
|
147
|
-
|
|
148
|
-
|
|
134
|
+
var g = _e.indexOf("{"),
|
|
135
|
+
_d = _e.lastIndexOf("}");
|
|
136
|
+
if (g === -1 || _d === -1 || _d <= g) return null;
|
|
137
|
+
var p = _e.slice(g, _d + 1);
|
|
138
|
+
p = p.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g, '$1"$2":'), p = p.replace(/'([^'\\]*(\\.[^'\\]*)*)'/g, '"$1"'), p = p.replace(/,\s*([}\]])/g, "$1");
|
|
139
|
+
var E = JSON.parse(p);
|
|
140
|
+
if (E && _typeof(E) == "object") return E;
|
|
141
|
+
} catch (_unused5) {}
|
|
142
|
+
return null;
|
|
143
|
+
} catch (_unused6) {
|
|
149
144
|
return null;
|
|
150
|
-
} catch (e) {
|
|
151
|
-
return console.error("[parseEsmDefault] 异常:", e), null;
|
|
152
145
|
}
|
|
153
146
|
};
|
|
154
|
-
|
|
155
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(
|
|
156
|
-
var
|
|
147
|
+
U = /*#__PURE__*/function () {
|
|
148
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(i) {
|
|
149
|
+
var o, t;
|
|
157
150
|
return _regenerator().w(function (_context2) {
|
|
158
151
|
while (1) switch (_context2.n) {
|
|
159
152
|
case 0:
|
|
160
|
-
if (
|
|
153
|
+
if (i) {
|
|
161
154
|
_context2.n = 1;
|
|
162
155
|
break;
|
|
163
156
|
}
|
|
164
157
|
return _context2.a(2, null);
|
|
165
158
|
case 1:
|
|
166
159
|
_context2.n = 2;
|
|
167
|
-
return
|
|
160
|
+
return u(i);
|
|
168
161
|
case 2:
|
|
169
|
-
|
|
170
|
-
if (
|
|
162
|
+
o = _context2.v;
|
|
163
|
+
if (o) {
|
|
171
164
|
_context2.n = 3;
|
|
172
165
|
break;
|
|
173
166
|
}
|
|
174
|
-
return _context2.a(2,
|
|
167
|
+
return _context2.a(2, null);
|
|
175
168
|
case 3:
|
|
176
|
-
t =
|
|
177
|
-
return _context2.a(2, t !== null && _typeof(t) == "object" ? t :
|
|
169
|
+
t = F(o);
|
|
170
|
+
return _context2.a(2, t !== null && _typeof(t) == "object" ? t : null);
|
|
178
171
|
}
|
|
179
172
|
}, _callee2);
|
|
180
173
|
}));
|
|
181
|
-
return function
|
|
174
|
+
return function U(_x5) {
|
|
182
175
|
return _ref4.apply(this, arguments);
|
|
183
176
|
};
|
|
184
177
|
}();
|
|
185
178
|
_context3.n = 1;
|
|
186
|
-
return
|
|
179
|
+
return U(r);
|
|
187
180
|
case 1:
|
|
188
|
-
|
|
189
|
-
if (!
|
|
181
|
+
k = _context3.v;
|
|
182
|
+
if (!k) {
|
|
190
183
|
_context3.n = 2;
|
|
191
184
|
break;
|
|
192
185
|
}
|
|
193
|
-
return _context3.a(2,
|
|
186
|
+
return _context3.a(2, k);
|
|
194
187
|
case 2:
|
|
195
|
-
if (!(
|
|
188
|
+
if (!(s && z($))) {
|
|
196
189
|
_context3.n = 4;
|
|
197
190
|
break;
|
|
198
191
|
}
|
|
199
192
|
_context3.n = 3;
|
|
200
|
-
return
|
|
193
|
+
return U(s);
|
|
201
194
|
case 3:
|
|
202
|
-
|
|
203
|
-
if (!
|
|
195
|
+
i = _context3.v;
|
|
196
|
+
if (!i) {
|
|
204
197
|
_context3.n = 4;
|
|
205
198
|
break;
|
|
206
199
|
}
|
|
207
|
-
return _context3.a(2,
|
|
200
|
+
return _context3.a(2, i);
|
|
208
201
|
case 4:
|
|
209
|
-
return _context3.a(2,
|
|
202
|
+
return _context3.a(2, null);
|
|
210
203
|
}
|
|
211
204
|
}, _callee3);
|
|
212
205
|
}));
|
|
213
|
-
return function
|
|
206
|
+
return function j(_x2, _x3) {
|
|
214
207
|
return _ref2.apply(this, arguments);
|
|
215
208
|
};
|
|
216
209
|
}();
|
|
@@ -218,8 +211,8 @@ var _ = function _(u) {
|
|
|
218
211
|
_context4.n = 9;
|
|
219
212
|
break;
|
|
220
213
|
}
|
|
221
|
-
|
|
222
|
-
_iterator = _createForOfIteratorHelper(
|
|
214
|
+
r = {};
|
|
215
|
+
_iterator = _createForOfIteratorHelper(l);
|
|
223
216
|
_context4.p = 1;
|
|
224
217
|
_iterator.s();
|
|
225
218
|
case 2:
|
|
@@ -227,14 +220,14 @@ var _ = function _(u) {
|
|
|
227
220
|
_context4.n = 5;
|
|
228
221
|
break;
|
|
229
222
|
}
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
223
|
+
s = _step.value;
|
|
224
|
+
$ = "".concat(c, "front-end/i18n/front-end-page/").concat(s, "_").concat(n, ".js");
|
|
225
|
+
w = a ? "".concat(a, "front-end/i18n/front-end-page/").concat(s, "_").concat(n, ".js") : undefined;
|
|
233
226
|
_context4.n = 3;
|
|
234
|
-
return
|
|
227
|
+
return j($, w, n, "\u524D\u7AEF\u4E1A\u52A1\u8BED\u8A00\u8D44\u6E90(".concat(s, ")"));
|
|
235
228
|
case 3:
|
|
236
|
-
|
|
237
|
-
|
|
229
|
+
u = _context4.v;
|
|
230
|
+
u && (r[s] = u, true);
|
|
238
231
|
case 4:
|
|
239
232
|
_context4.n = 2;
|
|
240
233
|
break;
|
|
@@ -250,14 +243,14 @@ var _ = function _(u) {
|
|
|
250
243
|
_iterator.f();
|
|
251
244
|
return _context4.f(7);
|
|
252
245
|
case 8:
|
|
253
|
-
Object.keys(
|
|
246
|
+
Object.keys(r).length > 0 && (y.frontEnd = r);
|
|
254
247
|
case 9:
|
|
255
248
|
if (!N) {
|
|
256
249
|
_context4.n = 18;
|
|
257
250
|
break;
|
|
258
251
|
}
|
|
259
|
-
|
|
260
|
-
_iterator2 = _createForOfIteratorHelper(
|
|
252
|
+
_r = {};
|
|
253
|
+
_iterator2 = _createForOfIteratorHelper(l);
|
|
261
254
|
_context4.p = 10;
|
|
262
255
|
_iterator2.s();
|
|
263
256
|
case 11:
|
|
@@ -265,14 +258,14 @@ var _ = function _(u) {
|
|
|
265
258
|
_context4.n = 14;
|
|
266
259
|
break;
|
|
267
260
|
}
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
261
|
+
_s = _step2.value;
|
|
262
|
+
_$ = "".concat(c, "front-end/i18n/return-msg/").concat(_s, "_").concat(n, ".js");
|
|
263
|
+
_w = a ? "".concat(a, "front-end/i18n/return-msg/").concat(_s, "_").concat(n, ".js") : undefined;
|
|
271
264
|
_context4.n = 12;
|
|
272
|
-
return
|
|
265
|
+
return j(_$, _w, n, "\u540E\u7AEF\u8BED\u8A00\u8D44\u6E90(".concat(_s, ")"));
|
|
273
266
|
case 12:
|
|
274
|
-
|
|
275
|
-
|
|
267
|
+
_u = _context4.v;
|
|
268
|
+
_u && (_r[_s] = _u, true);
|
|
276
269
|
case 13:
|
|
277
270
|
_context4.n = 11;
|
|
278
271
|
break;
|
|
@@ -288,27 +281,27 @@ var _ = function _(u) {
|
|
|
288
281
|
_iterator2.f();
|
|
289
282
|
return _context4.f(16);
|
|
290
283
|
case 17:
|
|
291
|
-
Object.keys(
|
|
284
|
+
Object.keys(_r).length > 0 && (y.backMsg = _r);
|
|
292
285
|
case 18:
|
|
293
|
-
if (!
|
|
286
|
+
if (!O) {
|
|
294
287
|
_context4.n = 20;
|
|
295
288
|
break;
|
|
296
289
|
}
|
|
297
|
-
|
|
290
|
+
_r2 = "".concat(c, "front-end/i18n/front-end-page/dasui_").concat(n, ".js"), _s2 = a ? "".concat(a, "front-end/i18n/front-end-page/dasui_").concat(n, ".js") : undefined;
|
|
298
291
|
_context4.n = 19;
|
|
299
|
-
return
|
|
292
|
+
return j(_r2, _s2, n, "UI组件库语言资源");
|
|
300
293
|
case 19:
|
|
301
|
-
|
|
302
|
-
|
|
294
|
+
y.dasUiEnd = _context4.v;
|
|
295
|
+
y.dasUiEnd && true;
|
|
303
296
|
case 20:
|
|
304
|
-
return _context4.a(2,
|
|
297
|
+
return _context4.a(2, y);
|
|
305
298
|
}
|
|
306
299
|
}, _callee4, null, [[10, 15, 16, 17], [1, 6, 7, 8]]);
|
|
307
300
|
}));
|
|
308
|
-
return function
|
|
301
|
+
return function A(_x) {
|
|
309
302
|
return _ref.apply(this, arguments);
|
|
310
303
|
};
|
|
311
304
|
}();
|
|
312
|
-
exports.handleI18nData =
|
|
313
|
-
exports.isCurrentLangInSysLang =
|
|
314
|
-
exports.isEmpty =
|
|
305
|
+
exports.handleI18nData = A;
|
|
306
|
+
exports.isCurrentLangInSysLang = z;
|
|
307
|
+
exports.isEmpty = M;
|