@das-fed/upf-utils 6.4.0-dev.208 → 6.4.0-dev.210
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 +1438 -1450
- package/api-services/index.js +1172 -1185
- package/api-services/index.js.gz +0 -0
- package/api-services/modules/app-manage/es5.js +967 -955
- package/api-services/modules/app-manage/index.js +793 -770
- package/api-services/modules/app-manage/index.js.gz +0 -0
- package/api-services/modules/authentication/es5.js +940 -931
- package/api-services/modules/authentication/index.js +769 -750
- package/api-services/modules/authentication/index.js.gz +0 -0
- package/api-services/modules/bems/es5.js +970 -982
- package/api-services/modules/bems/index.js +788 -801
- package/api-services/modules/bems/index.js.gz +0 -0
- package/api-services/modules/contract/es5.js +955 -967
- package/api-services/modules/contract/index.js +775 -788
- package/api-services/modules/contract/index.js.gz +0 -0
- package/api-services/modules/duty-manage/es5.js +965 -977
- package/api-services/modules/duty-manage/index.js +784 -797
- package/api-services/modules/duty-manage/index.js.gz +0 -0
- package/api-services/modules/enterpriseright/es5.js +1237 -1249
- package/api-services/modules/enterpriseright/index.js +1050 -1063
- 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 +2 -2
- package/api-services/modules/file/index.js +7 -2
- package/api-services/modules/file/index.js.gz +0 -0
- package/api-services/modules/gateway-edge/es5.js +2 -2
- package/api-services/modules/gateway-edge/index.js +7 -2
- package/api-services/modules/gateway-edge/index.js.gz +0 -0
- package/api-services/modules/index.js +7 -2
- package/api-services/modules/index.js.gz +0 -0
- package/api-services/modules/iot/es5.js +960 -972
- package/api-services/modules/iot/index.js +775 -788
- package/api-services/modules/iot/index.js.gz +0 -0
- package/api-services/modules/justauth/es5.js +942 -935
- package/api-services/modules/justauth/index.js +773 -758
- package/api-services/modules/justauth/index.js.gz +0 -0
- package/api-services/modules/knowledge/es5.js +967 -955
- package/api-services/modules/knowledge/index.js +793 -770
- package/api-services/modules/knowledge/index.js.gz +0 -0
- package/api-services/modules/link/es5.js +931 -940
- package/api-services/modules/link/index.js +755 -764
- package/api-services/modules/link/index.js.gz +0 -0
- package/api-services/modules/permission/es5.js +2 -2
- package/api-services/modules/permission/index.js +7 -2
- package/api-services/modules/permission/index.js.gz +0 -0
- package/api-services/modules/platformManage/es5.js +953 -941
- package/api-services/modules/platformManage/index.js +777 -754
- 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 +7 -2
- package/api-services/modules/portal/index.js.gz +0 -0
- package/api-services/modules/space-manage/es5.js +2 -2
- package/api-services/modules/space-manage/index.js +7 -2
- package/api-services/modules/space-manage/index.js.gz +0 -0
- package/api-services/modules/super-admin/es5.js +970 -982
- package/api-services/modules/super-admin/index.js +787 -800
- package/api-services/modules/super-admin/index.js.gz +0 -0
- package/api-services/modules/supplier/es5.js +552 -552
- package/api-services/modules/supplier/index.js +501 -496
- package/api-services/modules/supplier/index.js.gz +0 -0
- package/api-services/modules/supplychain-manage/es5.js +832 -835
- package/api-services/modules/supplychain-manage/index.js +649 -648
- package/api-services/modules/supplychain-manage/index.js.gz +0 -0
- package/api-services/modules/systemConfiguration/es5.js +967 -955
- package/api-services/modules/systemConfiguration/index.js +793 -770
- 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 +7 -2
- package/api-services/modules/tool/index.js.gz +0 -0
- package/api-services/src/create-service/es5.js +929 -938
- package/api-services/src/create-service/index.js +754 -763
- package/api-services/src/create-service/index.js.gz +0 -0
- package/common-info/es5.js +24 -22
- 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 +21 -17
- 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 +25 -20
- 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 +7 -2
- package/common-tools/extract-file-name/index.js.gz +0 -0
- package/common-tools/handle-data/es5.js +118 -111
- package/common-tools/handle-data/index.js +89 -86
- package/common-tools/handle-data/index.js.gz +0 -0
- package/create-api-service/check-token/es5.js +127 -125
- package/create-api-service/check-token/index.js +123 -118
- package/create-api-service/check-token/index.js.gz +0 -0
- package/create-api-service/es5.js +953 -965
- package/create-api-service/index.js +774 -787
- 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 +8 -3
- package/create-api-service/sso/index.js.gz +0 -0
- package/curring-http/es5.js +2 -2
- package/curring-http/index.js +7 -2
- package/curring-http/index.js.gz +0 -0
- 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 +53 -41
- package/webSocket-service/index.js +50 -40
- 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: K, toStringTag: Ne } = Symbol, v = /* @__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) => v(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 (v(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) && !(K 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 = v(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[K]).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[K]);
|
|
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[K]), 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: v,
|
|
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, Kt = fe && (!oe || ["ReactNative", "NativeScript", "NS"].indexOf(oe.product) < 0), vt = 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: Kt,
|
|
476
|
+
hasStandardBrowserWebWorkerEnv: vt,
|
|
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())), Ke = (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 && Ke(() => {
|
|
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 && Ke(() => 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, ve = {
|
|
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), ve.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,11 +1353,16 @@ 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
|
|
1356
|
+
return n && !xe[i] && (xe[i] = !0, console.warn(
|
|
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;
|
|
1357
1362
|
};
|
|
1358
1363
|
};
|
|
1359
1364
|
Y.spelling = function(t) {
|
|
1360
|
-
return (n, r) => !0;
|
|
1365
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1361
1366
|
};
|
|
1362
1367
|
function Cn(e, t, n) {
|
|
1363
1368
|
if (typeof e != "object")
|
|
@@ -1676,7 +1681,7 @@ E.isAxiosError = Pn;
|
|
|
1676
1681
|
E.mergeConfig = B;
|
|
1677
1682
|
E.AxiosHeaders = x;
|
|
1678
1683
|
E.formToJSON = (e) => He(a.isHTMLForm(e) ? new FormData(e) : e);
|
|
1679
|
-
E.getAdapter =
|
|
1684
|
+
E.getAdapter = ve.getAdapter;
|
|
1680
1685
|
E.HttpStatusCode = ce;
|
|
1681
1686
|
E.default = E;
|
|
1682
1687
|
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), t ? t(o, i, c) : true;
|
|
1798
|
+
return n && !xe[i] && (xe[i] = true, console.warn(s(i, " has been deprecated since v" + n + " and will be removed in the near future"))), t ? t(o, i, c) : true;
|
|
1799
1799
|
};
|
|
1800
1800
|
};
|
|
1801
1801
|
Y.spelling = function (t) {
|
|
1802
1802
|
return function (n, r) {
|
|
1803
|
-
return true;
|
|
1803
|
+
return console.warn("".concat(r, " is likely a misspelling of ").concat(t)), true;
|
|
1804
1804
|
};
|
|
1805
1805
|
};
|
|
1806
1806
|
function An(e, t, n) {
|
|
@@ -1351,11 +1351,16 @@ 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
|
|
1354
|
+
return n && !xe[i] && (xe[i] = !0, console.warn(
|
|
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;
|
|
1355
1360
|
};
|
|
1356
1361
|
};
|
|
1357
1362
|
Y.spelling = function(t) {
|
|
1358
|
-
return (n, r) => !0;
|
|
1363
|
+
return (n, r) => (console.warn(`${r} is likely a misspelling of ${t}`), !0);
|
|
1359
1364
|
};
|
|
1360
1365
|
function An(e, t, n) {
|
|
1361
1366
|
if (typeof e != "object")
|
|
Binary file
|
|
@@ -9,51 +9,52 @@ 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 _ = function _(u) {
|
|
13
|
+
return u === null || _typeof(u) > "u" || u === "";
|
|
14
14
|
},
|
|
15
|
-
|
|
16
|
-
var
|
|
17
|
-
return (((
|
|
15
|
+
S = function S(u) {
|
|
16
|
+
var r;
|
|
17
|
+
return (((r = config.getConfig()) == null ? undefined : r.systemLangList) || ["zh-CN", "en-US", "zh-MO"]).includes(u);
|
|
18
18
|
},
|
|
19
|
-
|
|
20
|
-
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(
|
|
21
|
-
var
|
|
19
|
+
z = /*#__PURE__*/function () {
|
|
20
|
+
var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4(u) {
|
|
21
|
+
var k, _k$currentLang, r, _k$baseUrl, l, _k$appName, g, _k$isPullFrontEnd, L, _k$isPullBack, N, _k$isDasUI, D, _k$fallbackBaseUrl, c, d, w, m, E, a, _iterator, _step, o, h, i, p, _a, _iterator2, _step2, _o, _h, _i, _p, _a2, _o2, _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
|
+
k = u || {};
|
|
26
|
+
_k$currentLang = k.currentLang, r = _k$currentLang === void 0 ? "zh-CN" : _k$currentLang, _k$baseUrl = k.baseUrl, l = _k$baseUrl === void 0 ? "/" : _k$baseUrl, _k$appName = k.appName, g = _k$appName === void 0 ? "jc" : _k$appName, _k$isPullFrontEnd = k.isPullFrontEnd, L = _k$isPullFrontEnd === void 0 ? true : _k$isPullFrontEnd, _k$isPullBack = k.isPullBack, N = _k$isPullBack === void 0 ? false : _k$isPullBack, _k$isDasUI = k.isDasUI, D = _k$isDasUI === void 0 ? false : _k$isDasUI, _k$fallbackBaseUrl = k.fallbackBaseUrl, c = _k$fallbackBaseUrl === void 0 ? "" : _k$fallbackBaseUrl;
|
|
27
|
+
(typeof r != "string" || !r) && (r = "zh-CN");
|
|
28
|
+
d = [];
|
|
29
|
+
Array.isArray(g) ? (d = g.filter(function (a) {
|
|
30
|
+
return typeof a == "string" && a;
|
|
31
|
+
}), d.length === 0 && (d = ["jc"])) : typeof g == "string" && g ? d = [g] : d = ["jc"], typeof l != "string" && (l = "/"), l || (l = "/"), l.endsWith("/") || (l = l + "/"), typeof c != "string" && (c = ""), c && !c.endsWith("/") && (c = c + "/");
|
|
32
|
+
w = {
|
|
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
|
-
u,
|
|
44
|
-
F,
|
|
45
|
-
U,
|
|
46
|
-
k,
|
|
39
|
+
m = false;
|
|
40
|
+
E = /*#__PURE__*/function () {
|
|
41
|
+
var _ref2 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3(a, o) {
|
|
42
|
+
var h,
|
|
47
43
|
i,
|
|
44
|
+
p,
|
|
45
|
+
O,
|
|
46
|
+
b,
|
|
47
|
+
U,
|
|
48
|
+
s,
|
|
48
49
|
_args3 = arguments;
|
|
49
50
|
return _regenerator().w(function (_context3) {
|
|
50
51
|
while (1) switch (_context3.n) {
|
|
51
52
|
case 0:
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(
|
|
56
|
-
var
|
|
53
|
+
h = _args3.length > 2 && _args3[2] !== undefined ? _args3[2] : "zh-CN";
|
|
54
|
+
i = _args3.length > 3 && _args3[3] !== undefined ? _args3[3] : "资源";
|
|
55
|
+
p = /*#__PURE__*/function () {
|
|
56
|
+
var _ref3 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(s) {
|
|
57
|
+
var n, _t, _t2;
|
|
57
58
|
return _regenerator().w(function (_context) {
|
|
58
59
|
while (1) switch (_context.p = _context.n) {
|
|
59
60
|
case 0:
|
|
@@ -63,37 +64,37 @@ var M = function M(f) {
|
|
|
63
64
|
break;
|
|
64
65
|
}
|
|
65
66
|
_context.n = 1;
|
|
66
|
-
return window.fetch(
|
|
67
|
+
return window.fetch(s, {
|
|
67
68
|
cache: "no-cache"
|
|
68
69
|
});
|
|
69
70
|
case 1:
|
|
70
|
-
|
|
71
|
-
if (!(!
|
|
71
|
+
n = _context.v;
|
|
72
|
+
if (!(!n || !n.ok)) {
|
|
72
73
|
_context.n = 2;
|
|
73
74
|
break;
|
|
74
75
|
}
|
|
75
|
-
_t = null;
|
|
76
|
+
_t = (console.warn("[fetchText] ".concat(i, " HTTP \u9519\u8BEF:"), n == null ? void 0 : n.status, n == null ? void 0 : n.statusText), null);
|
|
76
77
|
_context.n = 4;
|
|
77
78
|
break;
|
|
78
79
|
case 2:
|
|
79
80
|
_context.n = 3;
|
|
80
|
-
return
|
|
81
|
+
return n.text();
|
|
81
82
|
case 3:
|
|
82
83
|
_t = _context.v;
|
|
83
84
|
case 4:
|
|
84
85
|
return _context.a(2, _t);
|
|
85
86
|
case 5:
|
|
86
87
|
_context.n = 6;
|
|
87
|
-
return new Promise(function (
|
|
88
|
+
return new Promise(function (n) {
|
|
88
89
|
try {
|
|
89
90
|
var t = new XMLHttpRequest();
|
|
90
|
-
t.open("GET",
|
|
91
|
-
t.readyState === 4 &&
|
|
91
|
+
t.open("GET", s, !0), t.onreadystatechange = function () {
|
|
92
|
+
t.readyState === 4 && n(t.status >= 200 && t.status < 300 ? t.responseText : null);
|
|
92
93
|
}, t.onerror = function () {
|
|
93
|
-
|
|
94
|
+
n(null);
|
|
94
95
|
}, t.send();
|
|
95
96
|
} catch (_unused) {
|
|
96
|
-
|
|
97
|
+
n(null);
|
|
97
98
|
}
|
|
98
99
|
});
|
|
99
100
|
case 6:
|
|
@@ -110,100 +111,106 @@ var M = function M(f) {
|
|
|
110
111
|
}
|
|
111
112
|
}, _callee, null, [[0, 8]]);
|
|
112
113
|
}));
|
|
113
|
-
return function
|
|
114
|
+
return function p(_x4) {
|
|
114
115
|
return _ref3.apply(this, arguments);
|
|
115
116
|
};
|
|
116
117
|
}();
|
|
117
|
-
|
|
118
|
-
if (!
|
|
119
|
-
var t =
|
|
118
|
+
O = function O(s) {
|
|
119
|
+
if (!s || typeof s != "string") return console.warn("[parseEsmDefault] 输入无效:", _typeof(s)), null;
|
|
120
|
+
var t = s.replace(/^\uFEFF/, "").trim();
|
|
120
121
|
if (t.startsWith("{")) try {
|
|
121
122
|
var e = JSON.parse(t);
|
|
122
123
|
if (e && _typeof(e) == "object") return e;
|
|
123
|
-
} catch (
|
|
124
|
-
|
|
125
|
-
|
|
124
|
+
} catch (e) {
|
|
125
|
+
console.warn("[parseEsmDefault] 纯 JSON 解析失败:", e);
|
|
126
|
+
}
|
|
127
|
+
var j = t.match(/export\s+default\s*/);
|
|
128
|
+
if (!j || j.index === undefined) return console.warn("[parseEsmDefault] 未找到 export default,且非纯 JSON 格式"), null;
|
|
126
129
|
try {
|
|
127
|
-
var _e = t.substring(
|
|
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;
|
|
130
|
+
var _e = t.substring(j.index);
|
|
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 console.warn("[parseEsmDefault] 清理后内容为空"), null;
|
|
129
132
|
try {
|
|
130
|
-
var
|
|
131
|
-
if (
|
|
132
|
-
} catch (
|
|
133
|
+
var y = new Function("return ".concat(_e))();
|
|
134
|
+
if (y && _typeof(y) == "object") return y;
|
|
135
|
+
} catch (f) {
|
|
136
|
+
console.warn("[parseEsmDefault] Function 构造器失败:", f);
|
|
137
|
+
}
|
|
133
138
|
try {
|
|
134
|
-
var
|
|
135
|
-
|
|
136
|
-
if (
|
|
137
|
-
var
|
|
138
|
-
|
|
139
|
-
var
|
|
140
|
-
if (
|
|
141
|
-
} catch (
|
|
142
|
-
|
|
143
|
-
|
|
139
|
+
var f = _e.indexOf("{"),
|
|
140
|
+
_y = _e.lastIndexOf("}");
|
|
141
|
+
if (f === -1 || _y === -1 || _y <= f) return console.warn("[parseEsmDefault] JSON 解析:未找到对象结构"), null;
|
|
142
|
+
var $ = _e.slice(f, _y + 1);
|
|
143
|
+
$ = $.replace(/([{,]\s*)([a-zA-Z_$][a-zA-Z0-9_$]*)\s*:/g, '$1"$2":'), $ = $.replace(/'([^'\\]*(\\.[^'\\]*)*)'/g, '"$1"'), $ = $.replace(/,\s*([}\]])/g, "$1");
|
|
144
|
+
var x = JSON.parse($);
|
|
145
|
+
if (x && _typeof(x) == "object") return x;
|
|
146
|
+
} catch (f) {
|
|
147
|
+
console.warn("[parseEsmDefault] JSON 解析失败:", f);
|
|
148
|
+
}
|
|
144
149
|
return null;
|
|
150
|
+
} catch (e) {
|
|
151
|
+
return console.error("[parseEsmDefault] 异常:", e), null;
|
|
145
152
|
}
|
|
146
153
|
};
|
|
147
|
-
|
|
148
|
-
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(
|
|
149
|
-
var
|
|
154
|
+
b = /*#__PURE__*/function () {
|
|
155
|
+
var _ref4 = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2(s) {
|
|
156
|
+
var n, t;
|
|
150
157
|
return _regenerator().w(function (_context2) {
|
|
151
158
|
while (1) switch (_context2.n) {
|
|
152
159
|
case 0:
|
|
153
|
-
if (
|
|
160
|
+
if (s) {
|
|
154
161
|
_context2.n = 1;
|
|
155
162
|
break;
|
|
156
163
|
}
|
|
157
164
|
return _context2.a(2, null);
|
|
158
165
|
case 1:
|
|
159
166
|
_context2.n = 2;
|
|
160
|
-
return
|
|
167
|
+
return p(s);
|
|
161
168
|
case 2:
|
|
162
|
-
|
|
163
|
-
if (
|
|
169
|
+
n = _context2.v;
|
|
170
|
+
if (n) {
|
|
164
171
|
_context2.n = 3;
|
|
165
172
|
break;
|
|
166
173
|
}
|
|
167
|
-
return _context2.a(2, null);
|
|
174
|
+
return _context2.a(2, (console.warn("[tryLoad] ".concat(i, " HTTP \u8BF7\u6C42\u5931\u8D25:"), s), null));
|
|
168
175
|
case 3:
|
|
169
|
-
t =
|
|
170
|
-
return _context2.a(2, t !== null && _typeof(t) == "object" ? t : null);
|
|
176
|
+
t = O(n);
|
|
177
|
+
return _context2.a(2, t !== null && _typeof(t) == "object" ? t : (console.warn("[tryLoad] ".concat(i, " \u89E3\u6790\u5931\u8D25:"), s), null));
|
|
171
178
|
}
|
|
172
179
|
}, _callee2);
|
|
173
180
|
}));
|
|
174
|
-
return function
|
|
181
|
+
return function b(_x5) {
|
|
175
182
|
return _ref4.apply(this, arguments);
|
|
176
183
|
};
|
|
177
184
|
}();
|
|
178
185
|
_context3.n = 1;
|
|
179
|
-
return
|
|
186
|
+
return b(a);
|
|
180
187
|
case 1:
|
|
181
|
-
|
|
182
|
-
if (!
|
|
188
|
+
U = _context3.v;
|
|
189
|
+
if (!U) {
|
|
183
190
|
_context3.n = 2;
|
|
184
191
|
break;
|
|
185
192
|
}
|
|
186
|
-
return _context3.a(2,
|
|
193
|
+
return _context3.a(2, U);
|
|
187
194
|
case 2:
|
|
188
|
-
if (!(
|
|
195
|
+
if (!(console.warn("[loadWithFallback] ".concat(i, " - \u4E3B\u5730\u5740\u5931\u8D25\uFF0C\u5C1D\u8BD5\u56DE\u9000\u5730\u5740")), o && S(h))) {
|
|
189
196
|
_context3.n = 4;
|
|
190
197
|
break;
|
|
191
198
|
}
|
|
192
199
|
_context3.n = 3;
|
|
193
|
-
return
|
|
200
|
+
return b(o);
|
|
194
201
|
case 3:
|
|
195
|
-
|
|
196
|
-
if (!
|
|
202
|
+
s = _context3.v;
|
|
203
|
+
if (!s) {
|
|
197
204
|
_context3.n = 4;
|
|
198
205
|
break;
|
|
199
206
|
}
|
|
200
|
-
return _context3.a(2, i);
|
|
207
|
+
return _context3.a(2, (console.warn("[loadWithFallback] ".concat(i, " - \u56DE\u9000\u5730\u5740\u6210\u529F")), s));
|
|
201
208
|
case 4:
|
|
202
|
-
return _context3.a(2, null);
|
|
209
|
+
return _context3.a(2, (console.error("[loadWithFallback] ".concat(i, " - \u6240\u6709\u5730\u5740\u90FD\u5931\u8D25")), null));
|
|
203
210
|
}
|
|
204
211
|
}, _callee3);
|
|
205
212
|
}));
|
|
206
|
-
return function
|
|
213
|
+
return function E(_x2, _x3) {
|
|
207
214
|
return _ref2.apply(this, arguments);
|
|
208
215
|
};
|
|
209
216
|
}();
|
|
@@ -211,8 +218,8 @@ var M = function M(f) {
|
|
|
211
218
|
_context4.n = 9;
|
|
212
219
|
break;
|
|
213
220
|
}
|
|
214
|
-
|
|
215
|
-
_iterator = _createForOfIteratorHelper(
|
|
221
|
+
a = {};
|
|
222
|
+
_iterator = _createForOfIteratorHelper(d);
|
|
216
223
|
_context4.p = 1;
|
|
217
224
|
_iterator.s();
|
|
218
225
|
case 2:
|
|
@@ -220,14 +227,14 @@ var M = function M(f) {
|
|
|
220
227
|
_context4.n = 5;
|
|
221
228
|
break;
|
|
222
229
|
}
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
230
|
+
o = _step.value;
|
|
231
|
+
h = "".concat(l, "front-end/i18n/front-end-page/").concat(o, "_").concat(r, ".js");
|
|
232
|
+
i = c ? "".concat(c, "front-end/i18n/front-end-page/").concat(o, "_").concat(r, ".js") : undefined;
|
|
226
233
|
_context4.n = 3;
|
|
227
|
-
return
|
|
234
|
+
return E(h, i, r, "\u524D\u7AEF\u4E1A\u52A1\u8BED\u8A00\u8D44\u6E90(".concat(o, ")"));
|
|
228
235
|
case 3:
|
|
229
|
-
|
|
230
|
-
|
|
236
|
+
p = _context4.v;
|
|
237
|
+
p && (a[o] = p, m = true);
|
|
231
238
|
case 4:
|
|
232
239
|
_context4.n = 2;
|
|
233
240
|
break;
|
|
@@ -243,14 +250,14 @@ var M = function M(f) {
|
|
|
243
250
|
_iterator.f();
|
|
244
251
|
return _context4.f(7);
|
|
245
252
|
case 8:
|
|
246
|
-
Object.keys(
|
|
253
|
+
Object.keys(a).length > 0 && (w.frontEnd = a);
|
|
247
254
|
case 9:
|
|
248
255
|
if (!N) {
|
|
249
256
|
_context4.n = 18;
|
|
250
257
|
break;
|
|
251
258
|
}
|
|
252
|
-
|
|
253
|
-
_iterator2 = _createForOfIteratorHelper(
|
|
259
|
+
_a = {};
|
|
260
|
+
_iterator2 = _createForOfIteratorHelper(d);
|
|
254
261
|
_context4.p = 10;
|
|
255
262
|
_iterator2.s();
|
|
256
263
|
case 11:
|
|
@@ -258,14 +265,14 @@ var M = function M(f) {
|
|
|
258
265
|
_context4.n = 14;
|
|
259
266
|
break;
|
|
260
267
|
}
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
268
|
+
_o = _step2.value;
|
|
269
|
+
_h = "".concat(l, "front-end/i18n/return-msg/").concat(_o, "_").concat(r, ".js");
|
|
270
|
+
_i = c ? "".concat(c, "front-end/i18n/return-msg/").concat(_o, "_").concat(r, ".js") : undefined;
|
|
264
271
|
_context4.n = 12;
|
|
265
|
-
return
|
|
272
|
+
return E(_h, _i, r, "\u540E\u7AEF\u8BED\u8A00\u8D44\u6E90(".concat(_o, ")"));
|
|
266
273
|
case 12:
|
|
267
|
-
|
|
268
|
-
|
|
274
|
+
_p = _context4.v;
|
|
275
|
+
_p && (_a[_o] = _p, m = true);
|
|
269
276
|
case 13:
|
|
270
277
|
_context4.n = 11;
|
|
271
278
|
break;
|
|
@@ -281,27 +288,27 @@ var M = function M(f) {
|
|
|
281
288
|
_iterator2.f();
|
|
282
289
|
return _context4.f(16);
|
|
283
290
|
case 17:
|
|
284
|
-
Object.keys(
|
|
291
|
+
Object.keys(_a).length > 0 && (w.backMsg = _a);
|
|
285
292
|
case 18:
|
|
286
|
-
if (!
|
|
293
|
+
if (!D) {
|
|
287
294
|
_context4.n = 20;
|
|
288
295
|
break;
|
|
289
296
|
}
|
|
290
|
-
|
|
297
|
+
_a2 = "".concat(l, "front-end/i18n/front-end-page/dasui_").concat(r, ".js"), _o2 = c ? "".concat(c, "front-end/i18n/front-end-page/dasui_").concat(r, ".js") : undefined;
|
|
291
298
|
_context4.n = 19;
|
|
292
|
-
return
|
|
299
|
+
return E(_a2, _o2, r, "UI组件库语言资源");
|
|
293
300
|
case 19:
|
|
294
|
-
|
|
295
|
-
|
|
301
|
+
w.dasUiEnd = _context4.v;
|
|
302
|
+
w.dasUiEnd && (m = true);
|
|
296
303
|
case 20:
|
|
297
|
-
return _context4.a(2,
|
|
304
|
+
return _context4.a(2, (m || console.warn("语言包加载失败"), w));
|
|
298
305
|
}
|
|
299
306
|
}, _callee4, null, [[10, 15, 16, 17], [1, 6, 7, 8]]);
|
|
300
307
|
}));
|
|
301
|
-
return function
|
|
308
|
+
return function z(_x) {
|
|
302
309
|
return _ref.apply(this, arguments);
|
|
303
310
|
};
|
|
304
311
|
}();
|
|
305
|
-
exports.handleI18nData =
|
|
306
|
-
exports.isCurrentLangInSysLang =
|
|
307
|
-
exports.isEmpty =
|
|
312
|
+
exports.handleI18nData = z;
|
|
313
|
+
exports.isCurrentLangInSysLang = S;
|
|
314
|
+
exports.isEmpty = _;
|