halo-fe 1.0.1 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/main.js +1518 -984
- package/dist/style.css +1 -0
- package/esm/coms/Code.vue.d.ts +41 -0
- package/esm/coms/Col.vue.d.ts +11 -0
- package/esm/coms/Compare.vue.d.ts +40 -0
- package/esm/coms/Container.vue.d.ts +23 -0
- package/esm/coms/Empty.vue.d.ts +26 -0
- package/esm/coms/Progress.vue.d.ts +8 -0
- package/esm/coms/Row.vue.d.ts +21 -0
- package/esm/coms/index.d.ts +8 -0
- package/esm/coms/types/CodeEmit.d.ts +23 -0
- package/esm/coms/types/CodeProps.d.ts +18 -0
- package/esm/coms/types/RowProps.d.ts +14 -0
- package/esm/coms/types/index.d.ts +4 -0
- package/esm/drivers/cdns/CdnFactory.d.ts +1 -1
- package/esm/drivers/cdns/index.d.ts +2 -0
- package/esm/drivers/encoders/EncoderFactory.d.ts +2 -2
- package/esm/drivers/encoders/index.d.ts +2 -0
- package/esm/drivers/excels/ExcelFactory.d.ts +1 -1
- package/esm/drivers/excels/index.d.ts +2 -1
- package/esm/drivers/explainers/index.d.ts +2 -0
- package/esm/drivers/factories/DriverFactory.d.ts +13 -12
- package/esm/drivers/factories/Factory.d.ts +1 -1
- package/esm/drivers/factories/IFactory.d.ts +1 -1
- package/esm/drivers/factories/index.d.ts +13 -1
- package/esm/drivers/features/FeatureFactory.d.ts +1 -1
- package/esm/drivers/features/index.d.ts +2 -1
- package/esm/drivers/hashers/HasherFactory.d.ts +2 -2
- package/esm/drivers/hashers/index.d.ts +2 -1
- package/esm/drivers/https/Http.d.ts +24 -0
- package/esm/drivers/https/HttpFactory.d.ts +20 -0
- package/esm/drivers/https/IHttp.d.ts +49 -0
- package/esm/drivers/https/entities/HttpMessage.d.ts +32 -0
- package/esm/drivers/https/entities/HttpRequest.d.ts +19 -0
- package/esm/drivers/{requesters → https}/entities/HttpResponse.d.ts +2 -5
- package/esm/drivers/{requesters/implements/DefaultRequester.d.ts → https/implements/DefaultHttp.d.ts} +4 -4
- package/esm/drivers/https/implements/HaloHttp.d.ts +37 -0
- package/esm/drivers/{requesters/implements/MkRequester.d.ts → https/implements/MkHttp.d.ts} +7 -7
- package/esm/drivers/https/index.d.ts +6 -0
- package/esm/drivers/index.d.ts +8 -10
- package/esm/drivers/providers/Provider.d.ts +17 -0
- package/esm/drivers/providers/ProviderFactory.d.ts +3 -3
- package/esm/drivers/providers/implements/IndexedDbProvider.d.ts +2 -2
- package/esm/drivers/providers/implements/StorageProvider.d.ts +4 -0
- package/esm/drivers/providers/index.d.ts +2 -1
- package/esm/drivers/signers/ISigner.d.ts +2 -2
- package/esm/drivers/signers/Signer.d.ts +13 -0
- package/esm/drivers/signers/SignerFactory.d.ts +1 -1
- package/esm/drivers/signers/implements/DefaultSigner.d.ts +4 -4
- package/esm/drivers/signers/index.d.ts +2 -1
- package/esm/drivers/ssos/ISso.d.ts +1 -1
- package/esm/drivers/ssos/SsoFactory.d.ts +1 -1
- package/esm/drivers/ssos/implements/AnonymousSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/BearerSso.d.ts +1 -3
- package/esm/drivers/ssos/implements/NioSso.d.ts +1 -1
- package/esm/drivers/ssos/implements/SecretSso.d.ts +3 -3
- package/esm/drivers/ssos/implements/WeiXinSso.d.ts +1 -1
- package/esm/drivers/ssos/index.d.ts +2 -1
- package/esm/helpers/json-helper.d.ts +12 -4
- package/esm/helpers/object-helper.d.ts +4 -0
- package/esm/helpers/types/index.d.ts +0 -0
- package/esm/helpers/url-helper.d.ts +2 -2
- package/esm/main.d.ts +14 -3
- package/esm/services/index.d.ts +6 -12
- package/esm/services/types/IMessage.d.ts +14 -0
- package/esm/services/types/IMessager.d.ts +14 -0
- package/esm/services/types/index.d.ts +2 -0
- package/esm/stores/config.d.ts +10 -6
- package/esm/stores/driver.d.ts +2 -6
- package/esm/stores/index.d.ts +3 -2
- package/esm/stores/setting.d.ts +0 -4
- package/esm/stores/user.d.ts +3 -7
- package/esm/utilities/AffixUtility.d.ts +10 -0
- package/esm/utilities/EventUtility.d.ts +30 -0
- package/esm/utilities/KeyboardUtility.d.ts +73 -0
- package/esm/utilities/MouseUtility.d.ts +24 -0
- package/esm/utilities/index.d.ts +4 -0
- package/package.json +7 -7
- package/dist/vendor-axios-ud9O0vdJ.js +0 -1670
- package/esm/drivers/driver-helper.d.ts +0 -46
- package/esm/drivers/requesters/IRequester.d.ts +0 -25
- package/esm/drivers/requesters/Requester.d.ts +0 -13
- package/esm/drivers/requesters/RequesterFactory.d.ts +0 -21
- package/esm/drivers/requesters/entities/HttpRequest.d.ts +0 -34
- package/esm/drivers/requesters/implements/LocalRequester.d.ts +0 -43
- package/esm/drivers/requesters/index.d.ts +0 -5
- /package/esm/{thirds → plugins}/index.d.ts +0 -0
package/dist/main.js
CHANGED
@@ -1,27 +1,97 @@
|
|
1
|
-
import {
|
2
|
-
import { _ as
|
3
|
-
import { _ as
|
4
|
-
import {
|
5
|
-
import {
|
6
|
-
import {
|
7
|
-
import {
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
|
12
|
-
|
1
|
+
import { utils as Ut, writeFile as ge } from "xlsx-js-style";
|
2
|
+
import { defineAsyncComponent as fe, defineComponent as _, toRefs as tt, ref as at, onMounted as le, onUnmounted as ie, watch as P, openBlock as z, createElementBlock as M, normalizeClass as Rt, unref as T, renderSlot as It, normalizeStyle as Vt, createElementVNode as me, toDisplayString as pe, createCommentVNode as ae, computed as ye } from "vue";
|
3
|
+
import { _ as be } from "./vendor-underscore.string-vrHhfBaT.js";
|
4
|
+
import { _ as Dt } from "./vendor-underscore-DVTek3G4.js";
|
5
|
+
import { F as we } from "./vendor-file-saver-DKXzEV2Q.js";
|
6
|
+
import { b as ve } from "./vendor-clone-NGbTzSwJ.js";
|
7
|
+
import { l as bt } from "./vendor-@monaco-editor-DKC4UNw_.js";
|
8
|
+
import { h as N } from "./vendor-moment-h96o7c8I.js";
|
9
|
+
import { d as G } from "./vendor-pinia-DVLspbiC.js";
|
10
|
+
import { C as st } from "./vendor-crypto-js-B6Qe-gIg.js";
|
11
|
+
let $t;
|
12
|
+
window._setting ? $t = window._setting : $t = window.setting;
|
13
|
+
const mt = $t;
|
14
|
+
let pt = {}, Se = (a) => {
|
15
|
+
pt = a;
|
13
16
|
};
|
14
|
-
|
17
|
+
class xe {
|
18
|
+
constructor() {
|
19
|
+
this.type = "xlsx";
|
20
|
+
}
|
21
|
+
open(t) {
|
22
|
+
}
|
23
|
+
export(t, e) {
|
24
|
+
if (!e)
|
25
|
+
throw new Error("Excel名称不能为空");
|
26
|
+
t || (t = []);
|
27
|
+
let s;
|
28
|
+
t.length > 0 ? s = Object.keys(t[0]) : s = [];
|
29
|
+
let r = [], n = [];
|
30
|
+
if (s.forEach((c) => {
|
31
|
+
n.push(c);
|
32
|
+
}), r.push(n), t.length > 0)
|
33
|
+
for (let c = 0; c < t.length; c++) {
|
34
|
+
let h = t[c], g = [];
|
35
|
+
Object.keys(h).forEach((v) => {
|
36
|
+
g.push(h[v]);
|
37
|
+
}), r.push(g);
|
38
|
+
}
|
39
|
+
let l = Ut.book_new(), i = Ut.json_to_sheet(r, { skipHeader: !0 });
|
40
|
+
Ut.book_append_sheet(l, i, "abc");
|
41
|
+
let o = 65;
|
42
|
+
for (let c = 0; c < s.length; c++) {
|
43
|
+
let g = `${String.fromCharCode(o + c)}1`;
|
44
|
+
i[g].s = {
|
45
|
+
alignment: { horizontal: "center" },
|
46
|
+
font: { bold: !0, color: { rgb: "000000" } },
|
47
|
+
fill: { fgColor: { rgb: "409eff" } }
|
48
|
+
};
|
49
|
+
}
|
50
|
+
let u = [];
|
51
|
+
s.forEach((c) => {
|
52
|
+
let h = t[0][c], g = { wpx: 50 };
|
53
|
+
typeof h == "string" && (g.wpx = 100), u.push(g);
|
54
|
+
}), i["!cols"] = u, ge(l, e);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
class L {
|
58
|
+
/**
|
59
|
+
* 创建指定类型驱动
|
60
|
+
*/
|
61
|
+
async create(t, e) {
|
62
|
+
if (!t)
|
63
|
+
throw new Error("驱动类型不能为空");
|
64
|
+
let r = this.getInstances().find((n) => n.type.toLowerCase() == t.toLowerCase());
|
65
|
+
if (r == null)
|
66
|
+
throw new Error(`未实现的驱动类型:${t}`);
|
67
|
+
return r;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
class ke extends L {
|
71
|
+
getInstances() {
|
72
|
+
return [new xe()];
|
73
|
+
}
|
74
|
+
/**
|
75
|
+
* 获取Excel实例
|
76
|
+
*/
|
77
|
+
async create(t, e) {
|
78
|
+
let s = await super.create(t);
|
79
|
+
return s.open(e), s;
|
80
|
+
}
|
81
|
+
}
|
82
|
+
const J = class J {
|
83
|
+
};
|
84
|
+
J.isString = (t) => Object.prototype.toString.call(t) == "[object String]", J.isObject = (t) => Object.prototype.toString.call(t) == "[object Object]", J.isArray = (t) => Object.prototype.toString.call(t) == "[object Array]", J.isNumber = (t) => {
|
15
85
|
let e = Object.prototype.toString.call(t);
|
16
86
|
return e == "[object Number]" || e == "[object BigInt]";
|
17
|
-
},
|
18
|
-
let
|
19
|
-
const
|
87
|
+
}, J.isBoolean = (t) => Object.prototype.toString.call(t) == "[object Boolean]";
|
88
|
+
let x = J;
|
89
|
+
const f = class f {
|
20
90
|
/**
|
21
91
|
* 根据字符串或数组,自动返回数组
|
22
92
|
*/
|
23
93
|
static getArray(t) {
|
24
|
-
return
|
94
|
+
return x.isString(t) ? [t.toString()] : t instanceof Array ? t : [];
|
25
95
|
}
|
26
96
|
/**
|
27
97
|
* 忽略大小写比较
|
@@ -31,23 +101,23 @@ const h = class h {
|
|
31
101
|
return s == r;
|
32
102
|
}
|
33
103
|
};
|
34
|
-
|
104
|
+
f.getUniqueId = () => {
|
35
105
|
let t = Date.now().toString(36);
|
36
106
|
return t += Math.random().toString(36).substring(2), t;
|
37
|
-
},
|
107
|
+
}, f.padLeft = (t, e, s) => be.pad(t, e, s), f.trimStart = (t, e) => {
|
38
108
|
if (e == null)
|
39
109
|
return t;
|
40
110
|
let s = t.indexOf(e);
|
41
111
|
return t.substring(s + e.length);
|
42
|
-
},
|
112
|
+
}, f.trimEnd = (t, e) => {
|
43
113
|
if (e == null)
|
44
114
|
return t;
|
45
115
|
let s = t.lastIndexOf(e);
|
46
116
|
return t.substring(0, s);
|
47
|
-
},
|
48
|
-
let r =
|
49
|
-
return
|
50
|
-
},
|
117
|
+
}, f.trim = (t, e, s) => {
|
118
|
+
let r = f.trimStart(t, e);
|
119
|
+
return f.trimEnd(r, s);
|
120
|
+
}, f.getDashName = (t) => {
|
51
121
|
if (!t)
|
52
122
|
return null;
|
53
123
|
let e = "";
|
@@ -56,7 +126,7 @@ h.getUniqueId = () => {
|
|
56
126
|
r == "/" ? e += "-" : r >= "A" && r <= "Z" ? (s > 0 && t[s - 1] != "/" && (e += "-"), e += r.toLowerCase()) : e += r;
|
57
127
|
}
|
58
128
|
return e;
|
59
|
-
},
|
129
|
+
}, f.containsIgnoreCase = (t, e) => {
|
60
130
|
if (!t)
|
61
131
|
return !0;
|
62
132
|
let s = e instanceof Array ? e : [e];
|
@@ -68,26 +138,26 @@ h.getUniqueId = () => {
|
|
68
138
|
return !0;
|
69
139
|
}
|
70
140
|
return !1;
|
71
|
-
},
|
141
|
+
}, f.getTextFromHtml = (t) => {
|
72
142
|
if (!t)
|
73
143
|
return null;
|
74
144
|
let e = new RegExp("<.+?>", "g");
|
75
145
|
return t.replace(e, "");
|
76
|
-
},
|
146
|
+
}, f.isNumber = (t) => t != null && !isNaN(t), f.isEmail = (t) => /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t), f.isJson = (t) => {
|
77
147
|
try {
|
78
148
|
if (!t)
|
79
149
|
return !1;
|
80
150
|
let e = JSON.parse(t);
|
81
|
-
return
|
151
|
+
return x.isObject(e);
|
82
152
|
} catch {
|
83
153
|
return !1;
|
84
154
|
}
|
85
|
-
},
|
155
|
+
}, f.isJsonp = (t) => {
|
86
156
|
if (!t)
|
87
157
|
return !1;
|
88
158
|
let e = t.indexOf("("), s = t.lastIndexOf(")"), r = t.substring(e + 1, s);
|
89
|
-
return !!
|
90
|
-
},
|
159
|
+
return !!f.isJson(r);
|
160
|
+
}, f.isHtml = (t) => {
|
91
161
|
if (!t)
|
92
162
|
return !1;
|
93
163
|
let e = document.createElement("div");
|
@@ -96,18 +166,18 @@ h.getUniqueId = () => {
|
|
96
166
|
if (s[r].nodeType == 1)
|
97
167
|
return !0;
|
98
168
|
return !1;
|
99
|
-
},
|
169
|
+
}, f.getContentType = (t) => f.isJson(t) || f.isJsonp(t) ? "json" : f.isHtml(t) ? "html" : "text", f.isNullOrEmpty = (t) => t == null || f.isEmpty(t), f.isEmpty = (t) => t == "", f.isPassword = (t) => !0, f.getNumberOrNull = (t) => t == null || isNaN(t) ? 0 : parseFloat(t), f.format = (t, e) => {
|
100
170
|
let s = parseFloat(t), r;
|
101
171
|
return e ? r = s.toFixed(e).replace(/(\d)(?=(\d{3})+\.)/g, "$1,") : r = s.toLocaleString(), r;
|
102
|
-
},
|
172
|
+
}, f.getBetween = (t, e, s) => {
|
103
173
|
let r = t.indexOf(e);
|
104
174
|
if (r == -1)
|
105
175
|
return null;
|
106
176
|
let n = r + e.length, l = t.substring(n), i = l.indexOf(s);
|
107
177
|
return i == -1 ? null : l.substring(0, i);
|
108
178
|
};
|
109
|
-
let
|
110
|
-
class
|
179
|
+
let B = f;
|
180
|
+
class Os {
|
111
181
|
/**
|
112
182
|
* 根据动态加载的组件对象,得到组件集合
|
113
183
|
*/
|
@@ -117,37 +187,37 @@ class $e {
|
|
117
187
|
return r;
|
118
188
|
for (let l = 0; l < n.length; l++) {
|
119
189
|
const i = n[l];
|
120
|
-
let
|
121
|
-
if (
|
122
|
-
r[c] =
|
190
|
+
let o = B.trim(i, e, ".vue"), c = (s ? s + "-" : "") + B.getDashName(o), h = t[i];
|
191
|
+
if (h.default)
|
192
|
+
r[c] = h.default;
|
123
193
|
else {
|
124
|
-
let
|
125
|
-
r[c] =
|
194
|
+
let g = fe(h);
|
195
|
+
r[c] = g;
|
126
196
|
}
|
127
197
|
}
|
128
198
|
return r;
|
129
199
|
}
|
130
200
|
}
|
131
|
-
const
|
201
|
+
const p = class p {
|
132
202
|
};
|
133
|
-
|
203
|
+
p.getChunks = (t, e) => {
|
134
204
|
let s = [];
|
135
205
|
for (let r = 0; r < t.length; r += e) {
|
136
206
|
let n = t.slice(r, r + e);
|
137
207
|
s.push(n);
|
138
208
|
}
|
139
209
|
return s;
|
140
|
-
},
|
210
|
+
}, p.intersect = (t, e) => t.filter((r) => e.indexOf(r) > -1), p.except = (t, e, s = null) => {
|
141
211
|
let r = e instanceof Array ? e : [e], n = [];
|
142
212
|
if (s == null)
|
143
213
|
n = t.filter((l) => r.indexOf(l) == -1);
|
144
214
|
else
|
145
215
|
for (let l = 0; l < t.length; l++) {
|
146
216
|
let i = t[l];
|
147
|
-
r.find((
|
217
|
+
r.find((u) => s(i, u)) || n.push(i);
|
148
218
|
}
|
149
219
|
return n;
|
150
|
-
},
|
220
|
+
}, p.contains = (t, e) => t.indexOf(e) > -1, p.filterContains = (t, e, s) => {
|
151
221
|
let r = [];
|
152
222
|
if (!s)
|
153
223
|
return t;
|
@@ -155,12 +225,12 @@ d.getChunks = (t, e) => {
|
|
155
225
|
let l = t[n];
|
156
226
|
if (l)
|
157
227
|
for (let i = 0; i < e.length; i++) {
|
158
|
-
let
|
159
|
-
l[
|
228
|
+
let o = e[i];
|
229
|
+
l[o].toString().toUpperCase().includes(s.toUpperCase()) && r.push(l);
|
160
230
|
}
|
161
231
|
}
|
162
232
|
return r;
|
163
|
-
},
|
233
|
+
}, p.same = (t, e) => {
|
164
234
|
if (t.length != e.length)
|
165
235
|
return !1;
|
166
236
|
let s = t.length >= e.length ? t : e, r = t.length < e.length ? t : e;
|
@@ -168,77 +238,77 @@ d.getChunks = (t, e) => {
|
|
168
238
|
if (s[n] != r[n])
|
169
239
|
return !1;
|
170
240
|
return !0;
|
171
|
-
},
|
241
|
+
}, p.max = (t, e) => Dt.max(t, e), p.min = (t, e) => Dt.min(t, e), p.sum = (t, e, s = null) => {
|
172
242
|
let r = 0;
|
173
243
|
for (let l = 0; l < t.length; l++)
|
174
244
|
r += e(t[l]);
|
175
245
|
return s == null ? r : parseFloat(r.toFixed(s));
|
176
|
-
},
|
177
|
-
let n =
|
246
|
+
}, p.avg = (t, e, s = null) => {
|
247
|
+
let n = p.sum(t, e) / t.length;
|
178
248
|
return s == null ? n : parseFloat(n.toFixed(s));
|
179
|
-
},
|
249
|
+
}, p.distinct = (t, e) => {
|
180
250
|
let s = new Set(t.map((n) => e(n)));
|
181
251
|
return Array.from(s);
|
182
|
-
},
|
252
|
+
}, p.pushIfNotExist = (t, e) => {
|
183
253
|
t.indexOf(e) == -1 && t.push(e);
|
184
|
-
},
|
254
|
+
}, p.fromValues = (t, e, s, r) => {
|
185
255
|
if (!t || t.length == 0 || !e || e.length == 0)
|
186
256
|
return [];
|
187
257
|
let n = [];
|
188
258
|
return t.forEach((l) => {
|
189
|
-
let i = e.find((
|
259
|
+
let i = e.find((o) => o[s] == l);
|
190
260
|
i || (i = { [s]: l, [r]: l }), n.push(i);
|
191
261
|
}), n;
|
192
|
-
},
|
262
|
+
}, p.removeIndex = (t, e, s) => {
|
193
263
|
let r = t.split(s);
|
194
264
|
return r.splice(e, 1), r.join(s);
|
195
|
-
},
|
265
|
+
}, p.split = (t, e, s = null) => {
|
196
266
|
let r = [];
|
197
267
|
return t && (r = t.split(e)), s != null && r.push(s), r;
|
198
|
-
},
|
199
|
-
let e = [], s =
|
268
|
+
}, p.combine = (...t) => {
|
269
|
+
let e = [], s = Dt.max(t, (r) => r.length);
|
200
270
|
for (let r = 0; r < s.length; r++) {
|
201
271
|
let n = [], l;
|
202
272
|
for (let i = 0; i < t.length; i++) {
|
203
|
-
let
|
204
|
-
|
273
|
+
let o = t[i][r];
|
274
|
+
o != null && (l = o);
|
205
275
|
break;
|
206
276
|
}
|
207
277
|
for (let i = 0; i < t.length; i++) {
|
208
|
-
let
|
209
|
-
|
278
|
+
let o = t[i][r];
|
279
|
+
o != null ? n.push(o) : n.push(l);
|
210
280
|
}
|
211
281
|
e.push(n);
|
212
282
|
}
|
213
283
|
return e;
|
214
|
-
},
|
284
|
+
}, p.insert = (t, e, s) => {
|
215
285
|
let r = t.indexOf(e);
|
216
286
|
return t.splice(r, 0, s), r;
|
217
|
-
},
|
287
|
+
}, p.append = (t, e, s) => {
|
218
288
|
let r = t.indexOf(e) + 1;
|
219
289
|
return t.splice(r, 0, s), r;
|
220
|
-
},
|
221
|
-
if (
|
290
|
+
}, p.remove = (t, e) => {
|
291
|
+
if (x.isNumber(e))
|
222
292
|
t.splice(e, 1);
|
223
|
-
else if (
|
293
|
+
else if (x.isArray(e))
|
224
294
|
for (let s = 0; s < e.length; s++)
|
225
|
-
|
295
|
+
p.remove(t, e[s]);
|
226
296
|
else
|
227
297
|
t.splice(t.indexOf(e), 1);
|
228
|
-
},
|
229
|
-
|
298
|
+
}, p.orderBy = (t, e, s = !0) => {
|
299
|
+
x.isArray(e) || (e = [e]);
|
230
300
|
let r = t.sort((n, l) => {
|
231
301
|
let i = e[0](n) - e[0](l);
|
232
302
|
return i == 0 && e[1] ? e[1](n) - e[1](l) : i;
|
233
303
|
});
|
234
304
|
return s ? r.reverse() : r;
|
235
|
-
},
|
305
|
+
}, p.groupByArray = (t, e) => {
|
236
306
|
let s = [];
|
237
307
|
return t.forEach((r) => {
|
238
308
|
let n = e(r), l = s.find((i) => i.key == n);
|
239
309
|
l == null && (l = { key: n, value: [] }, s.push(l)), l.value.push(r);
|
240
310
|
}), s;
|
241
|
-
},
|
311
|
+
}, p.groupBy = (t, e, s = null) => {
|
242
312
|
let r = {};
|
243
313
|
return t.forEach((n) => {
|
244
314
|
let l = e(n);
|
@@ -247,10 +317,10 @@ d.getChunks = (t, e) => {
|
|
247
317
|
r[n] = s(r[n]);
|
248
318
|
}), r;
|
249
319
|
};
|
250
|
-
let
|
251
|
-
class
|
320
|
+
let rt = p;
|
321
|
+
class Is {
|
252
322
|
}
|
253
|
-
const
|
323
|
+
const nt = class nt {
|
254
324
|
/**
|
255
325
|
* 根据字符串Ascii码得到固定颜色字典
|
256
326
|
*/
|
@@ -264,10 +334,10 @@ const T = class T {
|
|
264
334
|
}
|
265
335
|
for (let r = 0; r < t.length; r++) {
|
266
336
|
let n = t[r], l = 0;
|
267
|
-
for (let
|
268
|
-
l += n.charCodeAt(
|
269
|
-
let i = l / s,
|
270
|
-
e[n] = `rgb(${
|
337
|
+
for (let h = 0; h < n.length; h++)
|
338
|
+
l += n.charCodeAt(h);
|
339
|
+
let i = l / s, o = 255 * i, u = 255 * (1 - i), c = 255 * (1 - i);
|
340
|
+
e[n] = `rgb(${o}, ${u}, ${c})`;
|
271
341
|
}
|
272
342
|
return e;
|
273
343
|
}
|
@@ -281,7 +351,7 @@ const T = class T {
|
|
281
351
|
let e = "";
|
282
352
|
for (let s = 0; s < t.length; s++) {
|
283
353
|
let r = t[s];
|
284
|
-
|
354
|
+
B.isNullOrEmpty(r) || (e += r, s != t.length - 1 && (e += " "));
|
285
355
|
}
|
286
356
|
return e;
|
287
357
|
}
|
@@ -390,13 +460,13 @@ const T = class T {
|
|
390
460
|
let l = t.querySelector(s);
|
391
461
|
if (!l)
|
392
462
|
return null;
|
393
|
-
let i = {},
|
463
|
+
let i = {}, o = t.getBoundingClientRect(), u = r.getBoundingClientRect(), h = t.querySelector(e).getBoundingClientRect(), g = l.getBoundingClientRect(), v = u.height - h.top;
|
394
464
|
if (n == "right") {
|
395
|
-
i.left = `${
|
396
|
-
let
|
397
|
-
|
465
|
+
i.left = `${o.left + o.width}px`;
|
466
|
+
let k;
|
467
|
+
g.height > u.height ? k = u.height : k = g.height, i.height = `${k}px`, k + h.top > u.height ? (i.top = "initial", i.bottom = "0px") : i.top = `${o.top}px`;
|
398
468
|
} else if (n == "bottom")
|
399
|
-
v -=
|
469
|
+
v -= h.height, i.left = `${o.left}px`, i.top = `${o.top + o.height}px`, v < g.height ? i.height = `${v}px` : i.height = `${g.height}px`;
|
400
470
|
else
|
401
471
|
throw new Error(`暂未支持的position:${n}`);
|
402
472
|
return i;
|
@@ -410,8 +480,8 @@ const T = class T {
|
|
410
480
|
return 0;
|
411
481
|
let s = [];
|
412
482
|
for (let n = 0; n < e.length; n++) {
|
413
|
-
let l = e[n], i = getComputedStyle(l),
|
414
|
-
s.push(
|
483
|
+
let l = e[n], i = getComputedStyle(l), o = i.zIndex == "auto" ? 0 : i.zIndex;
|
484
|
+
s.push(o);
|
415
485
|
}
|
416
486
|
return Math.max(...s);
|
417
487
|
}
|
@@ -457,7 +527,7 @@ const T = class T {
|
|
457
527
|
}
|
458
528
|
//#endregion
|
459
529
|
};
|
460
|
-
|
530
|
+
nt.addClass = (t, e, s = null) => {
|
461
531
|
let r;
|
462
532
|
if (e == null || e == "") {
|
463
533
|
if (s == null || s == "")
|
@@ -466,7 +536,7 @@ T.addClass = (t, e, s = null) => {
|
|
466
536
|
} else
|
467
537
|
r = e;
|
468
538
|
t.classList.add(r);
|
469
|
-
},
|
539
|
+
}, nt.removeClass = (t, e, s = null) => {
|
470
540
|
if (e == null || e == "")
|
471
541
|
return;
|
472
542
|
let r = [];
|
@@ -479,20 +549,20 @@ T.addClass = (t, e, s = null) => {
|
|
479
549
|
let l = r[n];
|
480
550
|
s != l && l.classList.remove(e);
|
481
551
|
}
|
482
|
-
},
|
552
|
+
}, nt.getWidthOrHeight = (t, e, s = null) => {
|
483
553
|
let r = 0, n = [];
|
484
|
-
|
554
|
+
x.isArray(t) ? n.push(...t) : n.push(t);
|
485
555
|
for (let l = 0; l < n.length; l++) {
|
486
556
|
let i = n[l];
|
487
557
|
if (!i || !i.getBoundingClientRect)
|
488
558
|
continue;
|
489
|
-
let
|
490
|
-
r +=
|
559
|
+
let o = i.getBoundingClientRect();
|
560
|
+
r += o[e], s && (r += s(i));
|
491
561
|
}
|
492
562
|
return r;
|
493
563
|
};
|
494
|
-
let
|
495
|
-
class
|
564
|
+
let V = nt;
|
565
|
+
class wt {
|
496
566
|
/**
|
497
567
|
* 从指定字典中提取忽略大小写的key的值
|
498
568
|
*/
|
@@ -524,61 +594,61 @@ class X {
|
|
524
594
|
return n;
|
525
595
|
let l = Object.keys(t);
|
526
596
|
for (let i = 0; i < l.length; i++) {
|
527
|
-
let
|
528
|
-
n = n.concat(
|
597
|
+
let o = l[i], u = e == null ? t[o] : e(t[o]);
|
598
|
+
n = n.concat(o).concat(s).concat(u), i != l.length - 1 && (n += r);
|
529
599
|
}
|
530
600
|
return n;
|
531
601
|
}
|
532
602
|
// #endregion
|
533
603
|
}
|
534
|
-
const
|
604
|
+
const F = class F {
|
535
605
|
};
|
536
|
-
|
606
|
+
F.bind = (t, e, s) => {
|
537
607
|
e && t.forEach((r) => {
|
538
608
|
e.addEventListener(r, s, !0);
|
539
609
|
});
|
540
|
-
},
|
610
|
+
}, F.unbind = (t, e, s) => {
|
541
611
|
e && t.forEach((r) => {
|
542
612
|
e.removeEventListener(r, s, !0);
|
543
613
|
});
|
544
|
-
},
|
614
|
+
}, F.click = (t, e) => {
|
545
615
|
t && t.addEventListener("click", e, !0);
|
546
|
-
},
|
616
|
+
}, F.unclick = (t, e) => {
|
547
617
|
t && t.removeEventListener("click", e, !0);
|
548
|
-
},
|
618
|
+
}, F.scroll = (t, e) => {
|
549
619
|
t && t.addEventListener("scroll", e, !0);
|
550
|
-
},
|
620
|
+
}, F.unscroll = (t, e) => {
|
551
621
|
t && t.removeEventListener("scroll", e, !0);
|
552
622
|
};
|
553
|
-
let
|
554
|
-
const
|
623
|
+
let vt = F;
|
624
|
+
const R = class R {
|
555
625
|
};
|
556
|
-
|
626
|
+
R.save = (t, e) => {
|
557
627
|
let s = window.atob(t), r = s.length, n = new Uint8Array(r);
|
558
628
|
for (; r--; )
|
559
629
|
n[r] = s.charCodeAt(r);
|
560
630
|
let l = new Blob([n]);
|
561
|
-
|
562
|
-
},
|
631
|
+
we.saveAs(l, e);
|
632
|
+
}, R.getExtension = (t) => {
|
563
633
|
let e = t.lastIndexOf(".");
|
564
634
|
return e == -1 ? "" : t.substring(e).split("?")[0];
|
565
|
-
},
|
566
|
-
let e =
|
635
|
+
}, R.isExcel = (t) => {
|
636
|
+
let e = R.getExtension(t);
|
567
637
|
return [".xls", ".xlsx"].indexOf(e) > -1;
|
568
|
-
},
|
569
|
-
let e =
|
638
|
+
}, R.isImage = (t) => {
|
639
|
+
let e = R.getExtension(t);
|
570
640
|
return [".png", ".jpg", ".jpeg", ".bmp", ".gif"].indexOf(e) > -1;
|
571
641
|
};
|
572
|
-
let
|
573
|
-
const
|
642
|
+
let St = R;
|
643
|
+
const zt = class zt {
|
574
644
|
};
|
575
|
-
|
576
|
-
let
|
577
|
-
const
|
645
|
+
zt.getHtml = (t) => x.isNumber(t) ? t : t && t.replace(/\n/g, "<br/>");
|
646
|
+
let Gt = zt;
|
647
|
+
const Mt = class Mt {
|
578
648
|
};
|
579
|
-
|
580
|
-
let
|
581
|
-
const
|
649
|
+
Mt.base64 = (t) => "data:image/png;base64," + t;
|
650
|
+
let Zt = Mt;
|
651
|
+
const S = class S {
|
582
652
|
/**
|
583
653
|
* 生成指定范围内的随机数
|
584
654
|
*/
|
@@ -594,50 +664,50 @@ const b = class b {
|
|
594
664
|
return Math.max(...t);
|
595
665
|
}
|
596
666
|
};
|
597
|
-
|
667
|
+
S.filterPage = (t, e, s) => {
|
598
668
|
let r = (e - 1) * s, n = e * s;
|
599
|
-
return t.filter((i,
|
600
|
-
},
|
669
|
+
return t.filter((i, o) => o >= r && o < n);
|
670
|
+
}, S.pageCount = (t, e) => Math.ceil(t / e), S.round = (t, e) => t.toFixed(e), S.ceil = (t) => Math.ceil(t), S.getPercentage = (t, e) => {
|
601
671
|
if (!t || !e)
|
602
672
|
return 0;
|
603
|
-
let s = t / e * 100, r =
|
673
|
+
let s = t / e * 100, r = S.round(s, 2);
|
604
674
|
return parseFloat(r);
|
605
|
-
},
|
675
|
+
}, S.getPercentageText = (t, e) => S.getPercentage(t, e).toFixed(2), S.getProgressText = (t, e) => `${t ?? "-"}/${e ?? "-"}`, S.size = (t) => {
|
606
676
|
if (!t)
|
607
677
|
return "OKB";
|
608
678
|
let e = 1024, s = e * 1024;
|
609
679
|
if (t < s)
|
610
|
-
return
|
680
|
+
return S.round(t / e, 2) + "KB";
|
611
681
|
let r = s * 1024;
|
612
682
|
if (t < r)
|
613
|
-
return
|
683
|
+
return S.round(t / s, 2) + "MB";
|
614
684
|
let n = r * 1024;
|
615
685
|
if (t < n)
|
616
|
-
return
|
686
|
+
return S.round(t / r, 2) + "GB";
|
617
687
|
let l = n * 1024;
|
618
688
|
if (t < l)
|
619
|
-
return
|
689
|
+
return S.round(t / n, 2) + "TB";
|
620
690
|
throw new Error("暂未支持比TB更大的大小");
|
621
691
|
};
|
622
|
-
let
|
623
|
-
const
|
692
|
+
let Ht = S;
|
693
|
+
const qt = class qt {
|
624
694
|
};
|
625
|
-
|
695
|
+
qt.load = function(t, e, s, r) {
|
626
696
|
};
|
627
|
-
let
|
628
|
-
const
|
697
|
+
let _t = qt;
|
698
|
+
const lt = class lt {
|
629
699
|
};
|
630
|
-
|
631
|
-
|
632
|
-
},
|
700
|
+
lt.emit = (t, e) => {
|
701
|
+
lt.emits({ [t]: e });
|
702
|
+
}, lt.emits = (t) => {
|
633
703
|
var s, r;
|
634
704
|
let e = (r = (s = window.parent) == null ? void 0 : s.window) == null ? void 0 : r.emit;
|
635
705
|
e && Object.keys(t).forEach((n) => {
|
636
706
|
e(n, t[n]);
|
637
707
|
});
|
638
708
|
};
|
639
|
-
let
|
640
|
-
const
|
709
|
+
let xt = lt;
|
710
|
+
const Y = class Y {
|
641
711
|
/**
|
642
712
|
* 净化对象,返回不带默认属性的对象
|
643
713
|
*/
|
@@ -645,7 +715,7 @@ const q = class q {
|
|
645
715
|
let e = {}, s = Object.keys(t);
|
646
716
|
for (let r = 0; r < s.length; r++) {
|
647
717
|
let n = s[r], l = t[n];
|
648
|
-
l != null && (
|
718
|
+
l != null && (x.isObject(l) ? e[n] = this.pure(l) : e[n] = t[n]);
|
649
719
|
}
|
650
720
|
return e;
|
651
721
|
}
|
@@ -670,71 +740,85 @@ const q = class q {
|
|
670
740
|
}
|
671
741
|
return r;
|
672
742
|
}
|
743
|
+
/**
|
744
|
+
* 获取对象不区分大小写的key
|
745
|
+
*/
|
746
|
+
static getKey(t, e) {
|
747
|
+
if (t == null)
|
748
|
+
return null;
|
749
|
+
let s = Object.keys(t);
|
750
|
+
for (let r = 0; r < s.length; r++) {
|
751
|
+
let n = s[r];
|
752
|
+
if (n.toLowerCase() == e.toLowerCase())
|
753
|
+
return n;
|
754
|
+
}
|
755
|
+
return null;
|
756
|
+
}
|
673
757
|
};
|
674
|
-
|
758
|
+
Y.copy = (t, e = null) => {
|
675
759
|
let s = [];
|
676
|
-
|
760
|
+
x.isObject(t) && s.push(t);
|
677
761
|
let r = [];
|
678
762
|
for (let n = 0; n < s.length; n++) {
|
679
763
|
let l = s[n], i = {};
|
680
|
-
Object.keys(l).forEach((
|
681
|
-
let
|
682
|
-
e && e[
|
764
|
+
Object.keys(l).forEach((o) => {
|
765
|
+
let u = l[o];
|
766
|
+
e && e[o] ? i[o] = e[o]() : i[o] = u;
|
683
767
|
}), r.push(i);
|
684
768
|
}
|
685
|
-
return
|
686
|
-
},
|
687
|
-
let s =
|
769
|
+
return x.isObject(t) ? r[0] : r;
|
770
|
+
}, Y.clone = (t, e = null) => {
|
771
|
+
let s = ve(t, !0);
|
688
772
|
if (e == null)
|
689
773
|
return s;
|
690
|
-
if (
|
774
|
+
if (x.isArray(t))
|
691
775
|
for (let r = 0; r < s.length; r++)
|
692
776
|
e(s[r]);
|
693
|
-
else
|
777
|
+
else x.isObject(t) && e(s);
|
694
778
|
return s;
|
695
|
-
},
|
779
|
+
}, Y.mergeTo = (t, e) => t == null ? e : e == null ? t : x.isArray(e) ? e.slice() : (Object.keys(e).forEach((r) => {
|
696
780
|
let n = e[r];
|
697
|
-
typeof n == "object" ? t[r] =
|
698
|
-
}), t),
|
781
|
+
typeof n == "object" ? t[r] = Y.mergeTo(t[r], n) : t[r] = n;
|
782
|
+
}), t), Y.addProperties = (t, e, s) => {
|
699
783
|
let r = t;
|
700
784
|
for (let n = 0; n < e.length; n++) {
|
701
785
|
let l = e[n];
|
702
786
|
n == e.length - 1 ? r[l] = s : (r[l] || (r[l] = {}), r = r[l]);
|
703
787
|
}
|
704
788
|
};
|
705
|
-
let
|
706
|
-
const
|
789
|
+
let K = Y;
|
790
|
+
const U = class U {
|
707
791
|
};
|
708
|
-
|
792
|
+
U.loadContentAsync = async (t) => {
|
709
793
|
let e = t instanceof Array ? t : [t], s = [];
|
710
794
|
for (let r = 0; r < e.length; r++) {
|
711
|
-
let n = e[r], l = new Promise((i,
|
712
|
-
let
|
713
|
-
|
714
|
-
if (
|
715
|
-
let c =
|
716
|
-
c.appendChild(document.createTextNode(
|
795
|
+
let n = e[r], l = new Promise((i, o) => {
|
796
|
+
let u = new XMLHttpRequest();
|
797
|
+
u.open("GET", n, !1), u.onreadystatechange = () => {
|
798
|
+
if (u.readyState == 4) {
|
799
|
+
let c = U.getInnerTagByUrl(n);
|
800
|
+
c.appendChild(document.createTextNode(u.responseText)), document.head.appendChild(c), i();
|
717
801
|
}
|
718
|
-
},
|
719
|
-
|
720
|
-
},
|
802
|
+
}, u.onerror = () => {
|
803
|
+
o();
|
804
|
+
}, u.send(null);
|
721
805
|
});
|
722
806
|
s.push(l);
|
723
807
|
}
|
724
808
|
return Promise.all(s);
|
725
|
-
},
|
809
|
+
}, U.loadPathAsync = async (t, e) => {
|
726
810
|
let s = [];
|
727
811
|
for (let r = 0; r < e.length; r++)
|
728
812
|
s.push(t + e[r]);
|
729
|
-
await
|
730
|
-
},
|
731
|
-
let e =
|
813
|
+
await U.loadAsync(s);
|
814
|
+
}, U.loadAsync = async (t) => {
|
815
|
+
let e = B.getArray(t), s = [];
|
732
816
|
for (let r = 0; r < e.length; r++) {
|
733
817
|
let n = new Promise((l, i) => {
|
734
|
-
let
|
735
|
-
document.head.appendChild(
|
818
|
+
let o = e[r], u = U.getOuterTagByUrl(o);
|
819
|
+
document.head.appendChild(u), u.onload = (c) => {
|
736
820
|
l(c);
|
737
|
-
},
|
821
|
+
}, u.onerror = (c) => {
|
738
822
|
i(c);
|
739
823
|
};
|
740
824
|
});
|
@@ -747,18 +831,18 @@ C.loadContentAsync = async (t) => {
|
|
747
831
|
n();
|
748
832
|
});
|
749
833
|
});
|
750
|
-
},
|
751
|
-
if (
|
834
|
+
}, U.loadAll = (...t) => Promise.all(t), U.getInnerTagByUrl = (t) => St.getExtension(t).substring(1) == "css" ? document.createElement("style") : document.createElement("script"), U.getOuterTagByUrl = (t) => {
|
835
|
+
if (St.getExtension(t).substring(1) == "css") {
|
752
836
|
let r = document.createElement("link");
|
753
837
|
return r.rel = "stylesheet", r.href = t, r;
|
754
838
|
}
|
755
839
|
let s = document.createElement("script");
|
756
840
|
return s.src = t, s;
|
757
841
|
};
|
758
|
-
let
|
759
|
-
const
|
842
|
+
let kt = U;
|
843
|
+
const Q = class Q {
|
760
844
|
};
|
761
|
-
|
845
|
+
Q.delay = (t, e) => setTimeout(t, e), Q.execute = (t, e, s) => {
|
762
846
|
if (!s) {
|
763
847
|
let r = setInterval(t, e);
|
764
848
|
return Promise.resolve(r);
|
@@ -769,14 +853,14 @@ A.delay = (t, e) => setTimeout(t, e), A.execute = (t, e, s) => {
|
|
769
853
|
r(n);
|
770
854
|
}, s);
|
771
855
|
});
|
772
|
-
},
|
856
|
+
}, Q.clearInterval = (t) => {
|
773
857
|
clearInterval(t);
|
774
|
-
},
|
858
|
+
}, Q.debounce = (t, e) => {
|
775
859
|
let s = null;
|
776
860
|
return (r) => {
|
777
861
|
s && clearTimeout(s), s = setTimeout(t, e, r);
|
778
862
|
};
|
779
|
-
},
|
863
|
+
}, Q.throttle = (t, e) => {
|
780
864
|
let s = !0;
|
781
865
|
return (r) => {
|
782
866
|
if (!s)
|
@@ -786,185 +870,192 @@ A.delay = (t, e) => setTimeout(t, e), A.execute = (t, e, s) => {
|
|
786
870
|
}, e, r);
|
787
871
|
};
|
788
872
|
};
|
789
|
-
let
|
790
|
-
|
873
|
+
let te = Q;
|
874
|
+
function js() {
|
875
|
+
return new Promise((a, t) => {
|
876
|
+
import("echarts").then((e) => {
|
877
|
+
a(e);
|
878
|
+
});
|
879
|
+
});
|
880
|
+
}
|
881
|
+
const w = class w {
|
791
882
|
};
|
792
|
-
|
883
|
+
w.getTimestamp = (t = null) => (t ? new Date(t) : /* @__PURE__ */ new Date()).getTime(), w.getTime = (t = null) => t ? new Date(t) : /* @__PURE__ */ new Date(), w.format = (t, e) => N(t).format(e), w.getDateTimeString = () => w.formatSecondTime(/* @__PURE__ */ new Date()), w.getDateString = () => w.formatDate(/* @__PURE__ */ new Date()), w.getTimeString = () => w.formatTime(/* @__PURE__ */ new Date()), w.formatSecondTime = (t) => N(t).format("YYYY-MM-DD HH:mm:ss"), w.formatMillisecondTime = (t) => t ? N(t).format("YYYY-MM-DD HH:mm:ss SSS") : null, w.formatTime = (t) => t ? N(t).format("HH:mm:ss SSS") : null, w.formatDate = (t) => t ? N(t).format("YYYY-MM-DD") : null, w.addDays = (t, e) => t ? N(t).add(e, "days").format() : null, w.addMonths = (t, e) => t ? N(t).add(e, "months").format() : null, w.isWeekend = (t) => {
|
793
884
|
if (!t)
|
794
885
|
return !1;
|
795
|
-
let e =
|
886
|
+
let e = N(t).format("d");
|
796
887
|
return e == "6" || e == "0";
|
797
|
-
},
|
888
|
+
}, w.localeTime = (t) => {
|
798
889
|
if (!t)
|
799
890
|
return null;
|
800
891
|
let s = (/* @__PURE__ */ new Date()).getTimezoneOffset() + 480;
|
801
|
-
return
|
892
|
+
return N(t).add(s, "minutes").format();
|
802
893
|
};
|
803
|
-
let
|
804
|
-
const
|
894
|
+
let q = w;
|
895
|
+
const m = class m {
|
805
896
|
};
|
806
|
-
|
897
|
+
m.getById = (t, e, s, r) => {
|
807
898
|
if (!s)
|
808
899
|
return null;
|
809
900
|
let n = s.find((l) => l[e] == t) || null;
|
810
901
|
if (n != null)
|
811
902
|
return n;
|
812
903
|
for (let l = 0; l < s.length; l++) {
|
813
|
-
let i =
|
904
|
+
let i = m.getById(t, e, s[l][r], r);
|
814
905
|
if (i != null) {
|
815
906
|
n = i;
|
816
907
|
break;
|
817
908
|
}
|
818
909
|
}
|
819
910
|
return n;
|
820
|
-
},
|
821
|
-
let n =
|
911
|
+
}, m.getByIds = (t, e, s, r) => {
|
912
|
+
let n = rt.distinct(t, (i) => i), l = [];
|
822
913
|
return n.forEach((i) => {
|
823
|
-
let
|
824
|
-
l.push(
|
914
|
+
let o = m.getById(i, e, s, r);
|
915
|
+
l.push(o);
|
825
916
|
}), l;
|
826
|
-
},
|
827
|
-
let n =
|
917
|
+
}, m.getNextById = (t, e, s, r) => {
|
918
|
+
let n = m.getById(t, e, s, r), l = m.getParentsById(t, e, s, r);
|
828
919
|
if (l.length == 0) {
|
829
920
|
if (s.length == 1)
|
830
921
|
return null;
|
831
922
|
let c = s.indexOf(n);
|
832
923
|
return c == s.length - 1 ? s[c - 1] : s[c + 1];
|
833
924
|
}
|
834
|
-
let i = l[l.length - 1],
|
835
|
-
if (
|
925
|
+
let i = l[l.length - 1], o = i[r];
|
926
|
+
if (o.length == 1)
|
836
927
|
return i;
|
837
|
-
let
|
838
|
-
return
|
839
|
-
},
|
840
|
-
let n =
|
928
|
+
let u = o.indexOf(n);
|
929
|
+
return u == o.length - 1 ? o[u - 1] : o[u + 1];
|
930
|
+
}, m.getSiblingsById = (t, e, s, r) => {
|
931
|
+
let n = m.getParentById(t, e, s, r);
|
841
932
|
return n == null ? s : n[r];
|
842
|
-
},
|
843
|
-
let n =
|
933
|
+
}, m.getParentById = (t, e, s, r) => {
|
934
|
+
let n = m.getParentsById(t, e, s, r, !1);
|
844
935
|
return n[n.length - 1];
|
845
|
-
},
|
936
|
+
}, m.getParentsById = (t, e, s, r, n = !1) => {
|
846
937
|
let l = [];
|
847
|
-
return
|
848
|
-
},
|
849
|
-
let l =
|
850
|
-
return n && i.push(l),
|
851
|
-
},
|
938
|
+
return oe(t, e, s, r, l, n), l;
|
939
|
+
}, m.getChildrenById = (t, e, s, r, n = !1) => {
|
940
|
+
let l = m.getById(t, e, s, r), i = [];
|
941
|
+
return n && i.push(l), Nt(l, r, i), i;
|
942
|
+
}, m.getChildren = (t, e, s = !1) => {
|
852
943
|
let r = [];
|
853
|
-
return s && r.push(t),
|
854
|
-
},
|
944
|
+
return s && r.push(t), Nt(t, e, r), r;
|
945
|
+
}, m.searchTree = (t, e, s, r) => {
|
855
946
|
let n = [];
|
856
947
|
if (!e)
|
857
948
|
return n;
|
858
|
-
let l = t ? t.toUpperCase() : "", i =
|
859
|
-
for (let
|
860
|
-
let
|
861
|
-
for (let
|
862
|
-
for (let
|
863
|
-
let v = g
|
949
|
+
let l = t ? t.toUpperCase() : "", i = x.isString(r) ? [r] : r;
|
950
|
+
for (let o of e) {
|
951
|
+
let u = !1, c = m.getChildren(o, s, !0);
|
952
|
+
for (let h of c) {
|
953
|
+
for (let g of i) {
|
954
|
+
let v = h[g];
|
864
955
|
if ((v ? v.toUpperCase() : "").indexOf(l) > -1) {
|
865
|
-
|
956
|
+
u = !0;
|
866
957
|
break;
|
867
958
|
}
|
868
959
|
}
|
869
|
-
if (
|
960
|
+
if (u)
|
870
961
|
break;
|
871
962
|
}
|
872
|
-
if (
|
873
|
-
let
|
874
|
-
n.push(
|
963
|
+
if (u) {
|
964
|
+
let h = m.searchTree(t, o[s], s, r), g = { ...o, [s]: h };
|
965
|
+
n.push(g);
|
875
966
|
}
|
876
967
|
}
|
877
968
|
return n;
|
878
|
-
},
|
879
|
-
let n =
|
969
|
+
}, m.removeById = (t, e, s, r) => {
|
970
|
+
let n = m.getById(t, e, s, r), l = m.getParentsById(t, e, s, r);
|
880
971
|
if (l.length == 0) {
|
881
|
-
|
972
|
+
rt.remove(s, n);
|
882
973
|
return;
|
883
974
|
}
|
884
975
|
let i = l[l.length - 1];
|
885
|
-
|
886
|
-
},
|
976
|
+
rt.remove(i[r], n);
|
977
|
+
}, m.getFlat = (t, e) => {
|
887
978
|
let s = [...t];
|
888
979
|
for (let r = 0; r < t.length; r++) {
|
889
980
|
let l = t[r][e];
|
890
981
|
if (l.length > 0) {
|
891
|
-
let i =
|
982
|
+
let i = m.getFlat(l, e);
|
892
983
|
s.push(...i);
|
893
984
|
}
|
894
985
|
}
|
895
986
|
return s;
|
896
|
-
},
|
987
|
+
}, m.map = (t, e, s, r) => {
|
897
988
|
let n = [];
|
898
989
|
for (let l = 0; l < t.length; l++) {
|
899
|
-
let i = t[l],
|
900
|
-
n.push(
|
901
|
-
let
|
902
|
-
if (
|
903
|
-
let c =
|
904
|
-
|
990
|
+
let i = t[l], o = r(i);
|
991
|
+
n.push(o);
|
992
|
+
let u = i[e];
|
993
|
+
if (u && u.length > 0) {
|
994
|
+
let c = m.map(u, e, s, r);
|
995
|
+
o[s] = c;
|
905
996
|
}
|
906
997
|
}
|
907
998
|
return n;
|
908
999
|
};
|
909
|
-
let
|
910
|
-
function
|
1000
|
+
let Ct = m;
|
1001
|
+
function oe(a, t, e, s, r, n) {
|
911
1002
|
for (let l = 0; l < e.length; l++) {
|
912
1003
|
let i = e[l];
|
913
1004
|
if (i[t] == a) {
|
914
1005
|
n && r.push(i);
|
915
1006
|
break;
|
916
1007
|
} else
|
917
|
-
|
1008
|
+
Ct.getById(a, t, i[s], s) != null && (r.push(i), oe(a, t, i[s], s, r, n));
|
918
1009
|
}
|
919
1010
|
return r;
|
920
1011
|
}
|
921
|
-
function
|
1012
|
+
function Nt(a, t, e) {
|
922
1013
|
let s = a[t];
|
923
1014
|
if (!s || s.length == 0)
|
924
1015
|
return e;
|
925
1016
|
for (let r = 0; r < s.length; r++) {
|
926
1017
|
let n = s[r];
|
927
|
-
e.push(n),
|
1018
|
+
e.push(n), Nt(n, t, e);
|
928
1019
|
}
|
929
1020
|
return e;
|
930
1021
|
}
|
931
|
-
const
|
1022
|
+
const D = class D {
|
932
1023
|
};
|
933
|
-
|
1024
|
+
D.get = (t, e = null) => localStorage.getItem(t) ?? e, D.set = (t, e) => localStorage.setItem(t, e), D.getObject = (t) => JSON.parse(localStorage.getItem(t)), D.setObject = (t, e) => localStorage.setItem(t, JSON.stringify(e)), D.remove = (t) => localStorage.removeItem(t), D.getLeftStorage = () => {
|
934
1025
|
let t = 0;
|
935
1026
|
return Object.keys(localStorage).forEach((s) => {
|
936
1027
|
t += localStorage.getItem(s).length;
|
937
1028
|
}), 1e-4 * 1024 - t / 1024;
|
938
|
-
},
|
1029
|
+
}, D.canStorage = (t) => {
|
939
1030
|
let e = JSON.stringify(t).length / 1024;
|
940
|
-
return
|
1031
|
+
return D.getLeftStorage() > e;
|
941
1032
|
};
|
942
|
-
let
|
943
|
-
const
|
1033
|
+
let E = D;
|
1034
|
+
const Et = class Et {
|
944
1035
|
};
|
945
|
-
|
1036
|
+
Et.isBottom = (t) => {
|
946
1037
|
let e = document.querySelector(t);
|
947
1038
|
return e ? e.scrollTop + e.clientHeight == e.scrollHeight : !1;
|
948
|
-
},
|
1039
|
+
}, Et.scrollToBottom = (t) => {
|
949
1040
|
let e = document.querySelector(t);
|
950
1041
|
if (!e)
|
951
1042
|
return;
|
952
1043
|
let s = e.scrollHeight - e.clientHeight;
|
953
1044
|
e.scrollTop = s;
|
954
1045
|
};
|
955
|
-
let
|
956
|
-
class
|
1046
|
+
let ee = Et;
|
1047
|
+
class ut {
|
957
1048
|
/**
|
958
|
-
*
|
1049
|
+
* 把字符串格式化为Json字符串
|
959
1050
|
*/
|
960
|
-
static
|
961
|
-
return
|
1051
|
+
static stringify(t) {
|
1052
|
+
return t == null ? null : JSON.stringify(t, null, 2);
|
962
1053
|
}
|
963
1054
|
/**
|
964
|
-
*
|
1055
|
+
* 对非字符串进行序列化
|
965
1056
|
*/
|
966
|
-
static
|
967
|
-
return
|
1057
|
+
static stringifyWithString(t) {
|
1058
|
+
return typeof t == "string" ? t : ut.stringify(t);
|
968
1059
|
}
|
969
1060
|
/**
|
970
1061
|
* 把字符串格式化为Json字符串
|
@@ -980,6 +1071,12 @@ class Ft {
|
|
980
1071
|
}
|
981
1072
|
return JSON.stringify(e, null, 2);
|
982
1073
|
}
|
1074
|
+
/**
|
1075
|
+
* 反序列化成json对象
|
1076
|
+
*/
|
1077
|
+
static parse(t) {
|
1078
|
+
return JSON.parse(t);
|
1079
|
+
}
|
983
1080
|
/**
|
984
1081
|
* 根据props中的.自动分割得到属性值
|
985
1082
|
*/
|
@@ -999,7 +1096,7 @@ class Ft {
|
|
999
1096
|
* 把json字符串合并到目标对象上
|
1000
1097
|
*/
|
1001
1098
|
static mergeTo(t, e) {
|
1002
|
-
if (
|
1099
|
+
if (B.isNullOrEmpty(e))
|
1003
1100
|
return;
|
1004
1101
|
let s = JSON.parse(e);
|
1005
1102
|
Object.keys(s).forEach((n) => {
|
@@ -1007,247 +1104,38 @@ class Ft {
|
|
1007
1104
|
t[n] = l;
|
1008
1105
|
});
|
1009
1106
|
}
|
1107
|
+
/**
|
1108
|
+
* 从树集合构建出Json对象
|
1109
|
+
*/
|
1110
|
+
static buildObject(t, e, s) {
|
1111
|
+
return Pt(t, e, 1, s);
|
1112
|
+
}
|
1010
1113
|
}
|
1011
|
-
function
|
1114
|
+
function Pt(a, t, e, s) {
|
1012
1115
|
if (!a || a.length == 0)
|
1013
1116
|
return "{}";
|
1014
1117
|
let r = `{
|
1015
1118
|
`;
|
1016
1119
|
for (let n = 0; n < a.length; n++) {
|
1017
1120
|
let l = a[n], i = s(l);
|
1018
|
-
i.type == "array" ? (i.remark && (r +=
|
1019
|
-
`), r +=
|
1020
|
-
`), r +=
|
1121
|
+
i.type == "array" ? (i.remark && (r += yt(2 * e) + "//" + i.remark + `
|
1122
|
+
`), r += Lt(2 * e, i.key) + "[", r += Pt(l[t], t, e + 1, s), r += "]", n != a.length - 1 && (r += ",")) : i.type == "object" ? (i.remark && (r += yt(2 * e) + "//" + i.remark + `
|
1123
|
+
`), r += Lt(2 * e, i.key), r += Pt(l[t], t, e + 1, s), n != a.length - 1 && (r += ",")) : (r += Lt(2 * e, i.key), i.type == "string" ? r += '""' : i.type == "date" ? r += `"${q.getDateTimeString()}"` : i.type == "int" || i.type == "number" ? r += "0" : i.type == "boolean" ? r += "false" : r += null, n != a.length - 1 && (r += ","), i.remark && (r += " //" + i.remark)), r += `
|
1021
1124
|
`;
|
1022
1125
|
}
|
1023
|
-
return r +=
|
1126
|
+
return r += yt(2 * (e - 1)), r += "}", r;
|
1024
1127
|
}
|
1025
|
-
function
|
1128
|
+
function yt(a) {
|
1026
1129
|
let t = "";
|
1027
1130
|
for (let e = 0; e < a; e++)
|
1028
1131
|
t += " ";
|
1029
1132
|
return t;
|
1030
1133
|
}
|
1031
|
-
function
|
1032
|
-
let e =
|
1134
|
+
function Lt(a, t) {
|
1135
|
+
let e = yt(a);
|
1033
1136
|
return e += '"' + t + '": ', e;
|
1034
1137
|
}
|
1035
|
-
|
1036
|
-
}
|
1037
|
-
class Pt extends dt {
|
1038
|
-
constructor() {
|
1039
|
-
super(...arguments), this.type = "Default";
|
1040
|
-
}
|
1041
|
-
open(t) {
|
1042
|
-
}
|
1043
|
-
send(t) {
|
1044
|
-
return new Promise((e, s) => {
|
1045
|
-
let r = (/* @__PURE__ */ new Date()).getTime(), n = new XMLHttpRequest();
|
1046
|
-
if (n.open(t.method, t.url), t.headers != null)
|
1047
|
-
for (let l of t.headers)
|
1048
|
-
n.setRequestHeader(l, t.headers[l]);
|
1049
|
-
t.contentType != null && n.setRequestHeader("content-type", t.contentType), n.onreadystatechange = () => {
|
1050
|
-
if (n.readyState == 4) {
|
1051
|
-
let i = { elapsed: (/* @__PURE__ */ new Date()).getTime() - r, body: n.responseText, request: t };
|
1052
|
-
e(i);
|
1053
|
-
}
|
1054
|
-
}, n.onerror = (l) => {
|
1055
|
-
let u = { elapsed: (/* @__PURE__ */ new Date()).getTime() - r, body: n.responseText, request: t };
|
1056
|
-
e(u);
|
1057
|
-
}, n.send(t.body);
|
1058
|
-
});
|
1059
|
-
}
|
1060
|
-
}
|
1061
|
-
class jt {
|
1062
|
-
}
|
1063
|
-
class zt extends jt {
|
1064
|
-
constructor() {
|
1065
|
-
super(...arguments), this.type = "Sha256";
|
1066
|
-
}
|
1067
|
-
open(t) {
|
1068
|
-
}
|
1069
|
-
async compute(t) {
|
1070
|
-
let s = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", s);
|
1071
|
-
return Array.from(new Uint8Array(r)).map((i) => i.toString(16).padStart(2, "0")).join("");
|
1072
|
-
}
|
1073
|
-
}
|
1074
|
-
class Tt extends jt {
|
1075
|
-
constructor() {
|
1076
|
-
super(...arguments), this.type = "Md5";
|
1077
|
-
}
|
1078
|
-
open(t) {
|
1079
|
-
}
|
1080
|
-
compute(t) {
|
1081
|
-
let e = P.MD5(t).toString();
|
1082
|
-
return Promise.resolve(e);
|
1083
|
-
}
|
1084
|
-
}
|
1085
|
-
class tt {
|
1086
|
-
/**
|
1087
|
-
* 创建执行类型的Hash实例
|
1088
|
-
*/
|
1089
|
-
static create(t) {
|
1090
|
-
let s = [new zt(), new Tt()].find((r) => S.equalsIgnoreCase(r.type, t));
|
1091
|
-
if (s == null)
|
1092
|
-
throw new Error(`未实现IHasher: ${t}`);
|
1093
|
-
return s;
|
1094
|
-
}
|
1095
|
-
/**
|
1096
|
-
* 获取MD5 Hash对象
|
1097
|
-
*/
|
1098
|
-
static getMd5() {
|
1099
|
-
return this.md5 != null ? this.md5 : (this.md5 = this.create("Md5"), this.md5);
|
1100
|
-
}
|
1101
|
-
}
|
1102
|
-
class Mt extends dt {
|
1103
|
-
constructor() {
|
1104
|
-
super(...arguments), this.type = "Mk";
|
1105
|
-
}
|
1106
|
-
/**
|
1107
|
-
* 危险操作,会暴露敏感信息
|
1108
|
-
*/
|
1109
|
-
open(t) {
|
1110
|
-
Ft.mergeTo(this, t), this.requester = N.getRequester().getDefault(), this.hasher = tt.create("Sha256");
|
1111
|
-
}
|
1112
|
-
/**
|
1113
|
-
* 危险操作,会暴露敏感信息
|
1114
|
-
*/
|
1115
|
-
async send(t) {
|
1116
|
-
let e = D.getTimestamp(), s = {
|
1117
|
-
app_id: this.appId,
|
1118
|
-
hash_type: "sha256",
|
1119
|
-
timestamp: parseInt((e / 1e3).toString())
|
1120
|
-
};
|
1121
|
-
S.isNullOrEmpty(t.body) || (s.jsonBody = t.body);
|
1122
|
-
let r = k.deserialize(t.path);
|
1123
|
-
for (let g in r)
|
1124
|
-
s[g] = r[g];
|
1125
|
-
let n = k.getPath(t.path);
|
1126
|
-
s = X.sort(s);
|
1127
|
-
let l = te.signDictionary(s, !1), i = `POST${n}?${l}${this.appSecret}`, u = await this.hasher.compute(i);
|
1128
|
-
s.sign = u.toLowerCase(), delete s.jsonBody, s = X.sort(s);
|
1129
|
-
let o = k.serialize(s);
|
1130
|
-
return t.url = k.concatUrl(this.baseUrl, n + "?" + o), await this.requester.send(t);
|
1131
|
-
}
|
1132
|
-
}
|
1133
|
-
class Jt {
|
1134
|
-
}
|
1135
|
-
let ct;
|
1136
|
-
window._setting ? ct = window._setting : ct = window.setting;
|
1137
|
-
const K = ct;
|
1138
|
-
class Wt extends dt {
|
1139
|
-
constructor() {
|
1140
|
-
super(...arguments), this.type = "Local";
|
1141
|
-
}
|
1142
|
-
open(t) {
|
1143
|
-
this.request = Nt.create({
|
1144
|
-
baseURL: K.api.url
|
1145
|
-
// withCredentials: true, // send cookies when cross-domain requests
|
1146
|
-
// timeout: 15000
|
1147
|
-
}), this.request.interceptors.request.use(
|
1148
|
-
async (e) => {
|
1149
|
-
if (k.httpOrHttps(e.url))
|
1150
|
-
return e;
|
1151
|
-
let s = Bt(), r = k.getUrl(e.baseURL + e.url, e.params);
|
1152
|
-
if (e.headers.Authorization = await s.getAuthorization(r, e.data), !e.headers["Accept-Language"]) {
|
1153
|
-
let n = et();
|
1154
|
-
e.headers["Accept-Language"] = n.language;
|
1155
|
-
}
|
1156
|
-
return e;
|
1157
|
-
},
|
1158
|
-
(e) => (console.log(e), Promise.reject(e))
|
1159
|
-
);
|
1160
|
-
}
|
1161
|
-
send(t) {
|
1162
|
-
return Promise.resolve(void 0);
|
1163
|
-
}
|
1164
|
-
/**
|
1165
|
-
* GET请求
|
1166
|
-
*/
|
1167
|
-
async get(t, e = null, s = null) {
|
1168
|
-
let r = { method: "get", url: t, params: e, headers: s };
|
1169
|
-
return this.request(r).then((n) => this.handleResponse(n)).catch((n) => this.handleError(n));
|
1170
|
-
}
|
1171
|
-
/**
|
1172
|
-
* POST请求
|
1173
|
-
*/
|
1174
|
-
async post(t, e = null, s = null) {
|
1175
|
-
return this.request.post(t, e, s).then((r) => this.handleResponse(r)).catch((r) => this.handleError(r));
|
1176
|
-
}
|
1177
|
-
/**
|
1178
|
-
* PATCH请求
|
1179
|
-
*/
|
1180
|
-
async patch(t, e = null, s = null) {
|
1181
|
-
return this.request.patch(t, e, s).then((r) => this.handleResponse(r)).catch((r) => this.handleError(r));
|
1182
|
-
}
|
1183
|
-
/**
|
1184
|
-
* 处理响应信息 或 响应体信息
|
1185
|
-
*/
|
1186
|
-
handleResponse(t) {
|
1187
|
-
if (k.httpOrHttps(t.config.url))
|
1188
|
-
return Promise.resolve(t.data);
|
1189
|
-
let e = t.config.tip;
|
1190
|
-
return this.handleResponseBody(t.data, e);
|
1191
|
-
}
|
1192
|
-
/**
|
1193
|
-
* 处理响应体信息,并自动添加响应通知
|
1194
|
-
*/
|
1195
|
-
handleResponseBody(t, e = !1) {
|
1196
|
-
return Et().add(t.code, t.message, t.stack, t.elapsed), e && t.code == "Ok" && this.messageService.success(t.message), t.code != "Ok" ? Promise.reject(t) : Promise.resolve(t);
|
1197
|
-
}
|
1198
|
-
/**
|
1199
|
-
* 处理网络错误和响应错误场景
|
1200
|
-
*/
|
1201
|
-
handleError(t) {
|
1202
|
-
if (t instanceof Rt) {
|
1203
|
-
Et().add("error", t.message, t.stack);
|
1204
|
-
let s = t.message;
|
1205
|
-
t.message == "Network Error" && (k.httpOrHttps(t.config.url) ? s = "接口网络错误: " + t.config.url : s = "接口网络错误: " + t.config.baseURL + t.config.url), this.messageService.error(s);
|
1206
|
-
} else
|
1207
|
-
this.messageService.error(t.message);
|
1208
|
-
return Promise.reject(t);
|
1209
|
-
}
|
1210
|
-
}
|
1211
|
-
class Vt extends Jt {
|
1212
|
-
create(t) {
|
1213
|
-
let s = [new Pt(), new Mt(), new Wt()].find((r) => S.equalsIgnoreCase(r.type, t));
|
1214
|
-
if (s == null)
|
1215
|
-
throw Error(`不存在请求器: ${t}`);
|
1216
|
-
return s;
|
1217
|
-
}
|
1218
|
-
/**
|
1219
|
-
* 获取默认请求器
|
1220
|
-
*/
|
1221
|
-
getDefault() {
|
1222
|
-
return this._default != null ? this._default : (this._default = this.create("Default"), this._default);
|
1223
|
-
}
|
1224
|
-
/**
|
1225
|
-
* 获取本地请求实例
|
1226
|
-
* 获取完毕后,下游第一行代码就要配置消息服务
|
1227
|
-
*/
|
1228
|
-
getLocal() {
|
1229
|
-
return this.local == null && (this.local = this.create("Local")), this.local;
|
1230
|
-
}
|
1231
|
-
}
|
1232
|
-
const J = class J {
|
1233
|
-
/**
|
1234
|
-
* 获取并缓存工厂实例
|
1235
|
-
*/
|
1236
|
-
static create(t, e) {
|
1237
|
-
let s = J.mappings[t];
|
1238
|
-
return s || (s = new e(), J.mappings[t] = s), s;
|
1239
|
-
}
|
1240
|
-
/**
|
1241
|
-
*获取请求器工厂
|
1242
|
-
*/
|
1243
|
-
static getRequester() {
|
1244
|
-
return this.create("RequesterFactory", Vt);
|
1245
|
-
}
|
1246
|
-
};
|
1247
|
-
J.mappings = {};
|
1248
|
-
let ht = J;
|
1249
|
-
const N = ht;
|
1250
|
-
let It = L("setting", {
|
1138
|
+
let ue = G("setting", {
|
1251
1139
|
state() {
|
1252
1140
|
return {
|
1253
1141
|
loaded: !1,
|
@@ -1285,11 +1173,7 @@ let It = L("setting", {
|
|
1285
1173
|
*/
|
1286
1174
|
business: null,
|
1287
1175
|
upload: null,
|
1288
|
-
version: null
|
1289
|
-
/**
|
1290
|
-
* 请求器
|
1291
|
-
*/
|
1292
|
-
requester: N.getRequester().getLocal()
|
1176
|
+
version: null
|
1293
1177
|
};
|
1294
1178
|
},
|
1295
1179
|
actions: {
|
@@ -1303,13 +1187,13 @@ let It = L("setting", {
|
|
1303
1187
|
* 加载设置
|
1304
1188
|
*/
|
1305
1189
|
async loadSetting() {
|
1306
|
-
return
|
1190
|
+
return j.get("/app/setting").then(({ data: a }) => (Object.keys(a).forEach((t) => {
|
1307
1191
|
let e = a[t];
|
1308
1192
|
e && (this[t] = e);
|
1309
|
-
}),
|
1193
|
+
}), V.addClass(document.documentElement, this.theme, window.setting.web.theme), xt.emits({ theme: this.theme }), Promise.resolve(a))).catch((a) => Promise.reject(a));
|
1310
1194
|
}
|
1311
1195
|
}
|
1312
|
-
}),
|
1196
|
+
}), H = G("config", {
|
1313
1197
|
state() {
|
1314
1198
|
return {
|
1315
1199
|
/**
|
@@ -1336,10 +1220,13 @@ let It = L("setting", {
|
|
1336
1220
|
* 文件布局方式
|
1337
1221
|
*/
|
1338
1222
|
fileLayout: null,
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1223
|
+
//编辑器架构配置
|
1224
|
+
editor: {
|
1225
|
+
schemas: [],
|
1226
|
+
//编辑器架构集合
|
1227
|
+
completions: {}
|
1228
|
+
//智能提示是否注册信息,防止重复注册
|
1229
|
+
}
|
1343
1230
|
};
|
1344
1231
|
},
|
1345
1232
|
actions: {
|
@@ -1347,17 +1234,34 @@ let It = L("setting", {
|
|
1347
1234
|
* 初始化配置值(不一定跟登录用户相关,这也是单独分离的好处)
|
1348
1235
|
*/
|
1349
1236
|
init(a) {
|
1350
|
-
let t =
|
1237
|
+
let t = ue();
|
1351
1238
|
this.background = t.background, this.theme = t.theme, this.layout = t.layout, this.language = t.language, this.font = t.font, a.forEach((e) => {
|
1352
1239
|
let s = this.getLocalConfig(e.type);
|
1353
1240
|
this[e.type] = s ?? e.content;
|
1354
|
-
}),
|
1241
|
+
}), V.removeClass(document.documentElement, t.theme), V.addClass(document.documentElement, this.theme), xt.emit("theme", this.theme), V.addClass(document.documentElement, this.layout), this.setBackground(this.background), V.addStyle(document.documentElement, "font-family", this.font);
|
1242
|
+
},
|
1243
|
+
/**
|
1244
|
+
* 尝试添加架构
|
1245
|
+
*/
|
1246
|
+
tryAddSchema(a, t, e) {
|
1247
|
+
let s = this.editor.schemas.find((r) => r.fileMatch == t);
|
1248
|
+
if (s != null) {
|
1249
|
+
s.schema = e;
|
1250
|
+
return;
|
1251
|
+
}
|
1252
|
+
s = {
|
1253
|
+
uri: a,
|
1254
|
+
//必须。也用于防止 重复创建或者覆盖 架构对象
|
1255
|
+
fileMatch: [t],
|
1256
|
+
//VIP:匹配到的路径,将会自动使用该schema
|
1257
|
+
schema: e
|
1258
|
+
}, this.editor.schemas.push(s);
|
1355
1259
|
},
|
1356
1260
|
/**
|
1357
1261
|
* 获取本地配置
|
1358
1262
|
*/
|
1359
1263
|
getLocalConfig(a) {
|
1360
|
-
return
|
1264
|
+
return E.getObject(a);
|
1361
1265
|
},
|
1362
1266
|
/**
|
1363
1267
|
* 设置背景
|
@@ -1375,7 +1279,7 @@ let It = L("setting", {
|
|
1375
1279
|
if (e)
|
1376
1280
|
return Promise.resolve(e);
|
1377
1281
|
}
|
1378
|
-
return
|
1282
|
+
return j.get(`/user/config?type=${a}`).then((e) => {
|
1379
1283
|
let s = e.data ? JSON.parse(e.data) : null;
|
1380
1284
|
return Promise.resolve(s);
|
1381
1285
|
});
|
@@ -1384,47 +1288,67 @@ let It = L("setting", {
|
|
1384
1288
|
* 全量保存用户配置
|
1385
1289
|
*/
|
1386
1290
|
async saveConfig(a, t, e = !0) {
|
1387
|
-
return e &&
|
1291
|
+
return e && E.setObject(a, t), j.post(`/user/config?type=${a}`, t).then((s) => Promise.resolve(!0));
|
1388
1292
|
},
|
1389
1293
|
/**
|
1390
1294
|
* 部分保存用户配置
|
1391
1295
|
*/
|
1392
1296
|
async patchConfig(a, t) {
|
1393
|
-
return
|
1297
|
+
return j.patch(`/user/config?type=${a}`, t).then((e) => Promise.resolve(!0));
|
1394
1298
|
}
|
1395
1299
|
}
|
1396
|
-
})
|
1397
|
-
const et = Yt;
|
1398
|
-
let Qt = L("log", {
|
1300
|
+
}), Bs = G("driver", {
|
1399
1301
|
state() {
|
1400
1302
|
return {
|
1401
|
-
|
1303
|
+
/**
|
1304
|
+
* 加载完毕状态记录
|
1305
|
+
*/
|
1306
|
+
loaded: {
|
1307
|
+
apps: !1,
|
1308
|
+
envs: !1
|
1309
|
+
},
|
1310
|
+
/**
|
1311
|
+
* 是否加载中状态,用于并发场景 防止重复拉取接口
|
1312
|
+
*/
|
1313
|
+
loading: {
|
1314
|
+
apps: !1,
|
1315
|
+
envs: !1
|
1316
|
+
},
|
1317
|
+
/**
|
1318
|
+
* 应用集合,存储到Store中,防止每一个Driver实例重复加载
|
1319
|
+
*/
|
1320
|
+
apps: [],
|
1321
|
+
/**
|
1322
|
+
* 环境集合,存储到Store中,防止每一个Driver实例重复加载
|
1323
|
+
*/
|
1324
|
+
envs: []
|
1402
1325
|
};
|
1403
1326
|
},
|
1404
1327
|
actions: {
|
1405
1328
|
/**
|
1406
|
-
*
|
1407
|
-
*/
|
1408
|
-
add(a, t, e, s = null) {
|
1409
|
-
let r = D.getTimeString();
|
1410
|
-
this.logs.unshift({ time: r, code: a, message: t, stack: e, elapsed: s });
|
1411
|
-
},
|
1412
|
-
/**
|
1413
|
-
* 删除日志
|
1329
|
+
* 加载应用选项
|
1414
1330
|
*/
|
1415
|
-
|
1416
|
-
this.
|
1331
|
+
async loadApps(a = !1) {
|
1332
|
+
if (!this.loading.apps && !(!a && this.loaded.apps))
|
1333
|
+
return this.loading.apps = !0, j.post("/app/options").then((t) => {
|
1334
|
+
this.apps = t.data, this.loaded.apps = !0;
|
1335
|
+
}).finally(() => {
|
1336
|
+
this.loading.apps = !1;
|
1337
|
+
});
|
1417
1338
|
},
|
1418
1339
|
/**
|
1419
|
-
*
|
1340
|
+
* 加载环境选项
|
1420
1341
|
*/
|
1421
|
-
|
1422
|
-
this.
|
1342
|
+
async loadEnvs(a = !1) {
|
1343
|
+
if (!this.loading.envs && (this.loading.envs = !0, !(!a && this.loaded.envs)))
|
1344
|
+
return j.post("/env/options").then((t) => {
|
1345
|
+
this.envs = t.data, this.loaded.envs = !0;
|
1346
|
+
}).finally(() => {
|
1347
|
+
this.loading.envs = !1;
|
1348
|
+
});
|
1423
1349
|
}
|
1424
1350
|
}
|
1425
|
-
})
|
1426
|
-
const Et = Qt;
|
1427
|
-
let Kt = L("env", {
|
1351
|
+
}), Ce = G("env", {
|
1428
1352
|
state() {
|
1429
1353
|
return {
|
1430
1354
|
//环境变量
|
@@ -1436,14 +1360,41 @@ let Kt = L("env", {
|
|
1436
1360
|
* 使用环境变量
|
1437
1361
|
*/
|
1438
1362
|
useEnv(a) {
|
1439
|
-
this.env = a, this.env.base =
|
1363
|
+
this.env = a, this.env.base = B.trimEnd(a.VITE_ROOT, "/");
|
1440
1364
|
}
|
1441
1365
|
}
|
1442
|
-
}),
|
1366
|
+
}), se = G("log", {
|
1443
1367
|
state() {
|
1444
1368
|
return {
|
1445
|
-
|
1446
|
-
|
1369
|
+
logs: []
|
1370
|
+
};
|
1371
|
+
},
|
1372
|
+
actions: {
|
1373
|
+
/**
|
1374
|
+
* 手动添加日志
|
1375
|
+
*/
|
1376
|
+
add(a, t, e, s = null) {
|
1377
|
+
let r = q.getTimeString();
|
1378
|
+
this.logs.unshift({ time: r, code: a, message: t, stack: e, elapsed: s });
|
1379
|
+
},
|
1380
|
+
/**
|
1381
|
+
* 删除日志
|
1382
|
+
*/
|
1383
|
+
remove(a) {
|
1384
|
+
this.logs.splice(a, 1);
|
1385
|
+
},
|
1386
|
+
/**
|
1387
|
+
* 清空日志
|
1388
|
+
*/
|
1389
|
+
clear() {
|
1390
|
+
this.logs = [];
|
1391
|
+
}
|
1392
|
+
}
|
1393
|
+
}), Ee = G("socket", {
|
1394
|
+
state() {
|
1395
|
+
return {
|
1396
|
+
socket: null,
|
1397
|
+
//socket连接对象
|
1447
1398
|
connected: null,
|
1448
1399
|
//是否已连接(空表示不需连接)
|
1449
1400
|
reconnect: !1,
|
@@ -1457,10 +1408,10 @@ let Kt = L("env", {
|
|
1457
1408
|
* 登录后,连接Socket
|
1458
1409
|
*/
|
1459
1410
|
async connect() {
|
1460
|
-
if (!
|
1411
|
+
if (!mt.api.ws)
|
1461
1412
|
return;
|
1462
1413
|
if (this.socket == null || this.reconnect) {
|
1463
|
-
let t =
|
1414
|
+
let t = mt.api.ws, s = await ce().getAuth(t), r = O.encode(s), n = `${t}?authorization=${r}`;
|
1464
1415
|
this.socket = new WebSocket(n);
|
1465
1416
|
}
|
1466
1417
|
let a;
|
@@ -1469,7 +1420,7 @@ let Kt = L("env", {
|
|
1469
1420
|
}, this.socket.onmessage = (t) => {
|
1470
1421
|
this.handler && this.handler(t);
|
1471
1422
|
}, this.socket.onerror = (t) => {
|
1472
|
-
this.reconnect = !0, console.warn(`Socket连接失败:${
|
1423
|
+
this.reconnect = !0, console.warn(`Socket连接失败:${mt.api.ws}`);
|
1473
1424
|
}, this.socket.onclose = (t) => {
|
1474
1425
|
this.connected = !1, this.reconnect && (a = setTimeout(async () => await this.connect(), 1e3));
|
1475
1426
|
};
|
@@ -1494,7 +1445,7 @@ let Kt = L("env", {
|
|
1494
1445
|
}
|
1495
1446
|
}
|
1496
1447
|
});
|
1497
|
-
const
|
1448
|
+
const ce = G("user", {
|
1498
1449
|
state: () => ({
|
1499
1450
|
user: null,
|
1500
1451
|
//用户信息
|
@@ -1503,28 +1454,24 @@ const Zt = L("user", {
|
|
1503
1454
|
menusFlat: null,
|
1504
1455
|
debugger: null,
|
1505
1456
|
//是否调试人
|
1506
|
-
env: null
|
1457
|
+
env: null
|
1507
1458
|
//当前访问环境
|
1508
|
-
/**
|
1509
|
-
* 请求器
|
1510
|
-
*/
|
1511
|
-
requester: N.getRequester().getLocal()
|
1512
1459
|
}),
|
1513
1460
|
actions: {
|
1514
1461
|
/**
|
1515
1462
|
* 获取本地缓存中的用户信息;好处:即使手动更改storage数据,也可以里面获取到
|
1516
1463
|
*/
|
1517
|
-
getSso() {
|
1518
|
-
return
|
1464
|
+
async getSso() {
|
1465
|
+
return await (await I.getProvider().getDefault("user")).getAsync("sso");
|
1519
1466
|
},
|
1520
1467
|
/**
|
1521
1468
|
* 登录后,获取用户信息
|
1522
1469
|
*/
|
1523
1470
|
async loadInfo() {
|
1524
|
-
return
|
1525
|
-
let t =
|
1471
|
+
return j.get("/user/info").then(async ({ data: a }) => {
|
1472
|
+
let t = Ce(), e = H();
|
1526
1473
|
e.init(a.configs);
|
1527
|
-
let s = t.env.VITE_CDN == "true" ? "StaticFile" : "Local", r = t.env.VITE_BASE, n =
|
1474
|
+
let s = t.env.VITE_CDN == "true" ? "StaticFile" : "Local", r = t.env.VITE_BASE, n = await I.getCdn().create(s, r);
|
1528
1475
|
this.user = a, this.debugger = a.debugger;
|
1529
1476
|
let l = e.language == "en" ? null : e.language, i = {
|
1530
1477
|
paths: { vs: n.getPath("monaco-editor") },
|
@@ -1532,103 +1479,47 @@ const Zt = L("user", {
|
|
1532
1479
|
"vs/nls": { availableLanguages: { "*": l } }
|
1533
1480
|
//设置编辑器默认语言
|
1534
1481
|
};
|
1535
|
-
return
|
1482
|
+
return bt.config(i), Promise.resolve(a);
|
1536
1483
|
});
|
1537
1484
|
},
|
1538
1485
|
/**
|
1539
1486
|
* 通过完整url和请求体,获取授权头
|
1540
1487
|
*/
|
1541
|
-
async
|
1542
|
-
let e = this.getSso();
|
1488
|
+
async getAuth(a, t = null) {
|
1489
|
+
let e = await this.getSso();
|
1543
1490
|
if (e == null)
|
1544
1491
|
return "pc";
|
1545
|
-
let s =
|
1546
|
-
return
|
1492
|
+
let s = q.getTimestamp(), n = await (await I.getSigner().create("default")).getSign(e.userId, a, t, s, e.secret);
|
1493
|
+
return (await I.getSso().create(e.type)).getAuth(e.identity.token, s, n, this.env);
|
1547
1494
|
},
|
1548
1495
|
/**
|
1549
1496
|
* 未登录,获取匿名登录信息
|
1550
1497
|
*/
|
1551
1498
|
getAnonymous() {
|
1552
|
-
|
1499
|
+
H().init([]);
|
1553
1500
|
},
|
1554
1501
|
/**
|
1555
1502
|
* 根据路径获取路由
|
1556
1503
|
*/
|
1557
1504
|
getMenuByUrl(a) {
|
1558
|
-
let t =
|
1505
|
+
let t = O.getPath(a);
|
1559
1506
|
return this.menusFlat.find((s) => s.url.split("?")[0] == t);
|
1560
1507
|
},
|
1561
1508
|
/**
|
1562
1509
|
* 加载服务端路由
|
1563
1510
|
*/
|
1564
1511
|
async loadMenus() {
|
1565
|
-
return
|
1512
|
+
return j.get("/user/menu").then(({ data: a }) => (this.menus = a, this.menusFlat = Ct.getFlat(a, "children"), Promise.resolve(a)));
|
1566
1513
|
},
|
1567
1514
|
/**
|
1568
1515
|
* 退出登录
|
1569
1516
|
*/
|
1570
1517
|
async logout() {
|
1571
|
-
return
|
1572
|
-
}
|
1573
|
-
}
|
1574
|
-
}), Bt = Zt;
|
1575
|
-
L("driver", {
|
1576
|
-
state() {
|
1577
|
-
return {
|
1578
|
-
/**
|
1579
|
-
* 加载完毕状态记录
|
1580
|
-
*/
|
1581
|
-
loaded: {
|
1582
|
-
apps: !1,
|
1583
|
-
envs: !1
|
1584
|
-
},
|
1585
|
-
/**
|
1586
|
-
* 是否加载中状态,用于并发场景 防止重复拉取接口
|
1587
|
-
*/
|
1588
|
-
loading: {
|
1589
|
-
apps: !1,
|
1590
|
-
envs: !1
|
1591
|
-
},
|
1592
|
-
/**
|
1593
|
-
* 应用集合,存储到Store中,防止每一个Driver实例重复加载
|
1594
|
-
*/
|
1595
|
-
apps: [],
|
1596
|
-
/**
|
1597
|
-
* 环境集合,存储到Store中,防止每一个Driver实例重复加载
|
1598
|
-
*/
|
1599
|
-
envs: [],
|
1600
|
-
/**
|
1601
|
-
* 请求器
|
1602
|
-
*/
|
1603
|
-
requester: N.getRequester().getLocal()
|
1604
|
-
};
|
1605
|
-
},
|
1606
|
-
actions: {
|
1607
|
-
/**
|
1608
|
-
* 加载应用选项
|
1609
|
-
*/
|
1610
|
-
async loadApps(a = !1) {
|
1611
|
-
if (!this.loading.apps && !(!a && this.loaded.apps))
|
1612
|
-
return this.loading.apps = !0, this.requester.post("/app/options").then((t) => {
|
1613
|
-
this.apps = t.data, this.loaded.apps = !0;
|
1614
|
-
}).finally(() => {
|
1615
|
-
this.loading.apps = !1;
|
1616
|
-
});
|
1617
|
-
},
|
1618
|
-
/**
|
1619
|
-
* 加载环境选项
|
1620
|
-
*/
|
1621
|
-
async loadEnvs(a = !1) {
|
1622
|
-
if (!this.loading.envs && (this.loading.envs = !0, !(!a && this.loaded.envs)))
|
1623
|
-
return this.requester.post("/env/options").then((t) => {
|
1624
|
-
this.envs = t.data, this.loaded.envs = !0;
|
1625
|
-
}).finally(() => {
|
1626
|
-
this.loading.envs = !1;
|
1627
|
-
});
|
1518
|
+
return j.post("/user/logout").then(async () => (this.user = null, this.menus = null, (await I.getSso().create(this.getSso().type)).logout(), Ee().disconnect(), Promise.resolve()));
|
1628
1519
|
}
|
1629
1520
|
}
|
1630
1521
|
});
|
1631
|
-
class
|
1522
|
+
class As {
|
1632
1523
|
/**
|
1633
1524
|
* 获取浏览器默认语言
|
1634
1525
|
*/
|
@@ -1639,45 +1530,11 @@ class Le {
|
|
1639
1530
|
* 获取当前语言
|
1640
1531
|
*/
|
1641
1532
|
static getCurrentLanguage() {
|
1642
|
-
let t =
|
1533
|
+
let t = H(), e = this.getBrowserLanguage();
|
1643
1534
|
return t.language || e || "zh-cn";
|
1644
1535
|
}
|
1645
1536
|
}
|
1646
|
-
class
|
1647
|
-
}
|
1648
|
-
class Ht extends Gt {
|
1649
|
-
constructor() {
|
1650
|
-
super(...arguments), this.type = "Base64";
|
1651
|
-
}
|
1652
|
-
open(t) {
|
1653
|
-
}
|
1654
|
-
encode(t) {
|
1655
|
-
let e = P.enc.Utf8.parse(t);
|
1656
|
-
return P.enc.Base64.stringify(e);
|
1657
|
-
}
|
1658
|
-
decode(t) {
|
1659
|
-
let e = P.enc.Base64.parse(t);
|
1660
|
-
return P.enc.Utf8.stringify(e);
|
1661
|
-
}
|
1662
|
-
}
|
1663
|
-
class st {
|
1664
|
-
/**
|
1665
|
-
* 创建执行类型的Hash实例
|
1666
|
-
*/
|
1667
|
-
static create(t) {
|
1668
|
-
let s = [new Ht()].find((r) => S.equalsIgnoreCase(r.type, t));
|
1669
|
-
if (s == null)
|
1670
|
-
throw new Error(`未实现 IHasher: ${t}`);
|
1671
|
-
return s;
|
1672
|
-
}
|
1673
|
-
/**
|
1674
|
-
* 获取Base64 编码器对象
|
1675
|
-
*/
|
1676
|
-
static getBase64() {
|
1677
|
-
return this.base64 != null ? this.base64 : (this.base64 = this.create("Base64"), this.base64);
|
1678
|
-
}
|
1679
|
-
}
|
1680
|
-
const x = class x {
|
1537
|
+
const C = class C {
|
1681
1538
|
/**
|
1682
1539
|
* 获取指定地址路由对象
|
1683
1540
|
*/
|
@@ -1794,8 +1651,8 @@ const x = class x {
|
|
1794
1651
|
static deserializeQs(t, e = !0) {
|
1795
1652
|
let s = {}, r = t.split("&");
|
1796
1653
|
for (let n = 0; n < r.length; n++) {
|
1797
|
-
let l = r[n], i = l.indexOf("="),
|
1798
|
-
s[
|
1654
|
+
let l = r[n], i = l.indexOf("="), o = l.substring(0, i), u = l.substring(i + 1);
|
1655
|
+
s[o] = e ? decodeURIComponent(u) : u;
|
1799
1656
|
}
|
1800
1657
|
return s;
|
1801
1658
|
}
|
@@ -1804,7 +1661,7 @@ const x = class x {
|
|
1804
1661
|
*/
|
1805
1662
|
static serialize(t, e = !0) {
|
1806
1663
|
let s = (n) => e ? encodeURIComponent(n) : n;
|
1807
|
-
return
|
1664
|
+
return wt.join(t, s, "=", "&");
|
1808
1665
|
}
|
1809
1666
|
//endregion
|
1810
1667
|
//region 编码和解码
|
@@ -1817,16 +1674,16 @@ const x = class x {
|
|
1817
1674
|
/**
|
1818
1675
|
* 把指定对象转换成base64字符串
|
1819
1676
|
*/
|
1820
|
-
static base64(t) {
|
1677
|
+
static async base64(t) {
|
1821
1678
|
let e = JSON.stringify(t);
|
1822
|
-
return
|
1679
|
+
return (await ne.getBase64()).encode(e);
|
1823
1680
|
}
|
1824
1681
|
/**
|
1825
1682
|
* 把指定base64字符串解析为原对象
|
1826
1683
|
*/
|
1827
|
-
static base64Decode(t) {
|
1828
|
-
let
|
1829
|
-
return JSON.parse(
|
1684
|
+
static async base64Decode(t) {
|
1685
|
+
let s = (await ne.getBase64()).decode(t);
|
1686
|
+
return JSON.parse(s);
|
1830
1687
|
}
|
1831
1688
|
//endregion
|
1832
1689
|
/**
|
@@ -1836,21 +1693,21 @@ const x = class x {
|
|
1836
1693
|
return t ? t.indexOf("http://") > -1 || t.indexOf("https://") > -1 : !1;
|
1837
1694
|
}
|
1838
1695
|
};
|
1839
|
-
|
1696
|
+
C.handleQueryValue = (t, e) => {
|
1840
1697
|
let s = "";
|
1841
1698
|
if (t == null)
|
1842
1699
|
return s;
|
1843
1700
|
if (t instanceof Array) {
|
1844
1701
|
if (t.length > 0)
|
1845
1702
|
for (let r = 0; r < t.length; r++) {
|
1846
|
-
let n =
|
1847
|
-
n.push(""), s +=
|
1703
|
+
let n = K.clone(e);
|
1704
|
+
n.push(""), s += C.handleQueryValue(t[r], n);
|
1848
1705
|
}
|
1849
1706
|
} else if (t instanceof Object) {
|
1850
1707
|
let r = Object.keys(t);
|
1851
1708
|
for (let n of r) {
|
1852
|
-
let l =
|
1853
|
-
l.push(n), s +=
|
1709
|
+
let l = K.clone(e);
|
1710
|
+
l.push(n), s += C.handleQueryValue(t[n], l);
|
1854
1711
|
}
|
1855
1712
|
} else {
|
1856
1713
|
let r = "";
|
@@ -1860,20 +1717,19 @@ x.handleQueryValue = (t, e) => {
|
|
1860
1717
|
n = n.replace(/'/g, "%27"), n = n.replace(/%20/g, "+"), n = n.replace(/%5B/g, "["), n = n.replace(/%5D/g, "]"), n = n.replace(/%2C/g, ","), n = n.replace(/%3A/g, ":"), n = n.replace(/%24/g, "$"), s += `&${r}=${n}`;
|
1861
1718
|
}
|
1862
1719
|
return s;
|
1863
|
-
},
|
1720
|
+
}, C.concatUrl = (t, e) => C.httpOrHttps(e) ? e : t + e, C.getUrl = (t, e = null) => {
|
1864
1721
|
if (t == null)
|
1865
1722
|
return null;
|
1866
1723
|
if (e == null)
|
1867
1724
|
return t;
|
1868
|
-
let s =
|
1869
|
-
return
|
1870
|
-
},
|
1725
|
+
let s = C.deserialize(t), r = K.mergeTo(s, e);
|
1726
|
+
return C.getPath(t) + "?" + C.getQuery(r);
|
1727
|
+
}, C.getAnchor = (t, e = null) => {
|
1871
1728
|
let s = { href: null, target: null };
|
1872
|
-
return
|
1729
|
+
return C.httpOrHttps(t) ? (s.href = t, s.target = "_blank", s) : (s.href = C.getUrl(t, e), s);
|
1873
1730
|
};
|
1874
|
-
let
|
1875
|
-
|
1876
|
-
class _t {
|
1731
|
+
let O = C;
|
1732
|
+
class Oe {
|
1877
1733
|
/**
|
1878
1734
|
* 清空对象中的空值
|
1879
1735
|
*/
|
@@ -1886,40 +1742,304 @@ class _t {
|
|
1886
1742
|
* 签名字典
|
1887
1743
|
*/
|
1888
1744
|
static signDictionary(t, e = !0) {
|
1889
|
-
return this.clean(t),
|
1745
|
+
return this.clean(t), O.serialize(t, e);
|
1746
|
+
}
|
1747
|
+
}
|
1748
|
+
class he {
|
1749
|
+
constructor() {
|
1750
|
+
this.headers = {};
|
1751
|
+
}
|
1752
|
+
/**
|
1753
|
+
* 获取指定Key的值
|
1754
|
+
*/
|
1755
|
+
getHeader(t) {
|
1756
|
+
if (this.headers == null)
|
1757
|
+
return null;
|
1758
|
+
let e = K.getKey(this.headers, t);
|
1759
|
+
return e ? this.headers[e] : null;
|
1760
|
+
}
|
1761
|
+
/**
|
1762
|
+
* 添加请求头
|
1763
|
+
*/
|
1764
|
+
addHeaders(t) {
|
1765
|
+
if (t != null)
|
1766
|
+
for (let e in t)
|
1767
|
+
this.headers[e] = t[e];
|
1768
|
+
}
|
1769
|
+
}
|
1770
|
+
class Ie extends he {
|
1771
|
+
}
|
1772
|
+
class Kt {
|
1773
|
+
//#endregion
|
1774
|
+
async get(t) {
|
1775
|
+
return (await this.sendGet(t)).data;
|
1776
|
+
}
|
1777
|
+
async sendGet(t) {
|
1778
|
+
let e = this.getRequest("GET", t);
|
1779
|
+
return await this.send(e);
|
1780
|
+
}
|
1781
|
+
async post(t, e) {
|
1782
|
+
return (await this.sendPost(t, e)).data;
|
1783
|
+
}
|
1784
|
+
async sendPost(t, e) {
|
1785
|
+
let s = this.getRequest("POST", t, e);
|
1786
|
+
return await this.send(s);
|
1787
|
+
}
|
1788
|
+
async patch(t) {
|
1789
|
+
return (await this.sendPatch(t, null)).data;
|
1790
|
+
}
|
1791
|
+
async sendPatch(t, e) {
|
1792
|
+
let s = this.getRequest("PATCH", t);
|
1793
|
+
return await this.send(s);
|
1794
|
+
}
|
1795
|
+
/**
|
1796
|
+
* 获取请求消息
|
1797
|
+
*/
|
1798
|
+
getRequest(t, e, s = null) {
|
1799
|
+
let r = new Ie();
|
1800
|
+
return r.path = e, r.method = t, r.body = ut.stringifyWithString(s), r;
|
1801
|
+
}
|
1802
|
+
}
|
1803
|
+
class re extends he {
|
1804
|
+
}
|
1805
|
+
class je extends Kt {
|
1806
|
+
constructor() {
|
1807
|
+
super(...arguments), this.type = "Default";
|
1808
|
+
}
|
1809
|
+
async open(t) {
|
1810
|
+
}
|
1811
|
+
send(t) {
|
1812
|
+
return new Promise((e, s) => {
|
1813
|
+
var l;
|
1814
|
+
(l = this.onRequest) == null || l.call(this, t);
|
1815
|
+
let r = (/* @__PURE__ */ new Date()).getTime(), n = new XMLHttpRequest();
|
1816
|
+
if (n.open(t.method, t.url), t.headers != null)
|
1817
|
+
for (let i in t.headers)
|
1818
|
+
n.setRequestHeader(i, t.headers[i]);
|
1819
|
+
t.contentType != null && n.setRequestHeader("content-type", t.contentType), n.onreadystatechange = () => {
|
1820
|
+
var i;
|
1821
|
+
if (n.readyState == 4) {
|
1822
|
+
let o = new re();
|
1823
|
+
o.elapsed = (/* @__PURE__ */ new Date()).getTime() - r, o.body = n.responseText, o.request = t;
|
1824
|
+
let u = n.getAllResponseHeaders().split(`\r
|
1825
|
+
`), c = {};
|
1826
|
+
for (let g = 0; g < u.length; g++) {
|
1827
|
+
let v = u[g].split(": "), k = v.shift();
|
1828
|
+
k == null || k == "" || (c[k] = v.join(": "));
|
1829
|
+
}
|
1830
|
+
o.headers = c;
|
1831
|
+
let h = o.getHeader("content-type");
|
1832
|
+
h != null && (o.contentType = h, h.indexOf("application/json") > -1 && (o.data = ut.parse(o.body))), (i = this.onResponse) == null || i.call(this, o), e(o);
|
1833
|
+
}
|
1834
|
+
}, n.onerror = (i) => {
|
1835
|
+
var u;
|
1836
|
+
let o = new re();
|
1837
|
+
o.elapsed = (/* @__PURE__ */ new Date()).getTime() - r, o.body = n.responseText, o.request = t, (u = this.onResponse) == null || u.call(this, o), e(o);
|
1838
|
+
}, n.send(t.body);
|
1839
|
+
});
|
1840
|
+
}
|
1841
|
+
}
|
1842
|
+
class Be extends Kt {
|
1843
|
+
constructor() {
|
1844
|
+
super(...arguments), this.type = "Mk";
|
1845
|
+
}
|
1846
|
+
/**
|
1847
|
+
* 危险操作,会暴露敏感信息
|
1848
|
+
*/
|
1849
|
+
async open(t) {
|
1850
|
+
ut.mergeTo(this, t), this.requester = await I.getHttp().getDefault(), this.hasher = await I.getHasher().create("Sha256");
|
1851
|
+
}
|
1852
|
+
//#endregion
|
1853
|
+
/**
|
1854
|
+
* 危险操作,会暴露敏感信息
|
1855
|
+
*/
|
1856
|
+
async send(t) {
|
1857
|
+
let e = q.getTimestamp(), s = {
|
1858
|
+
app_id: this.appId,
|
1859
|
+
hash_type: "sha256",
|
1860
|
+
timestamp: parseInt((e / 1e3).toString())
|
1861
|
+
};
|
1862
|
+
B.isNullOrEmpty(t.body) || (s.jsonBody = t.body);
|
1863
|
+
let r = O.deserialize(t.path);
|
1864
|
+
for (let h in r)
|
1865
|
+
s[h] = r[h];
|
1866
|
+
let n = O.getPath(t.path);
|
1867
|
+
s = wt.sort(s);
|
1868
|
+
let l = Oe.signDictionary(s, !1), i = `POST${n}?${l}${this.appSecret}`, o = await this.hasher.compute(i);
|
1869
|
+
s.sign = o.toLowerCase(), delete s.jsonBody, s = wt.sort(s);
|
1870
|
+
let u = O.serialize(s);
|
1871
|
+
return t.url = O.concatUrl(this.baseUrl, n + "?" + u), await this.requester.send(t);
|
1872
|
+
}
|
1873
|
+
}
|
1874
|
+
class Ae extends Kt {
|
1875
|
+
constructor() {
|
1876
|
+
super(...arguments), this.type = "Halo", this.baseUrl = null;
|
1877
|
+
}
|
1878
|
+
/**
|
1879
|
+
* 开启
|
1880
|
+
*/
|
1881
|
+
async open(t) {
|
1882
|
+
this.baseUrl = t, this.http = await I.getHttp().getDefault(), this.http.onResponse = (e) => {
|
1883
|
+
let s = e.data;
|
1884
|
+
se().add(s.code, s.message, s.stack, s.elapsed);
|
1885
|
+
};
|
1886
|
+
}
|
1887
|
+
//#endregion
|
1888
|
+
/**
|
1889
|
+
* 发送请求
|
1890
|
+
*/
|
1891
|
+
async send(t) {
|
1892
|
+
t.url = O.concatUrl(this.baseUrl, t.path);
|
1893
|
+
let e = await this.getHeaders(t);
|
1894
|
+
t.addHeaders(e);
|
1895
|
+
let s = await this.http.send(t), r = s.data;
|
1896
|
+
return r.code == "Ok" ? s : (pt.error(r.message), Promise.reject(r));
|
1897
|
+
}
|
1898
|
+
/**
|
1899
|
+
* 获取请求头
|
1900
|
+
*/
|
1901
|
+
async getHeaders(t) {
|
1902
|
+
let e = {};
|
1903
|
+
if (O.httpOrHttps(t.path))
|
1904
|
+
return e;
|
1905
|
+
let s = ce();
|
1906
|
+
if (e.Authorization = await s.getAuth(t.url, t.body), !t.getHeader("Accept-Language")) {
|
1907
|
+
let r = H();
|
1908
|
+
e["Accept-Language"] = r.language;
|
1909
|
+
}
|
1910
|
+
return e;
|
1911
|
+
}
|
1912
|
+
/**
|
1913
|
+
* 处理网络错误和响应错误场景
|
1914
|
+
*/
|
1915
|
+
handleError(t) {
|
1916
|
+
if (t instanceof Object) {
|
1917
|
+
se().add("error", t.message, t.stack);
|
1918
|
+
let s = t.message;
|
1919
|
+
t.message == "Network Error" && (O.httpOrHttps(t.config.url) ? s = "接口网络错误: " + t.config.url : s = "接口网络错误: " + t.config.baseURL + t.config.url), pt.error(s);
|
1920
|
+
} else
|
1921
|
+
pt.error(t.message);
|
1922
|
+
return Promise.reject(t);
|
1923
|
+
}
|
1924
|
+
}
|
1925
|
+
class Ue extends L {
|
1926
|
+
getInstances() {
|
1927
|
+
return [new je(), new Be(), new Ae()];
|
1928
|
+
}
|
1929
|
+
/**
|
1930
|
+
* 获取默认请求器
|
1931
|
+
*/
|
1932
|
+
async getDefault() {
|
1933
|
+
return this._default != null ? this._default : (this._default = await this.create("Default"), this._default);
|
1934
|
+
}
|
1935
|
+
/**
|
1936
|
+
* 获取本地请求实例
|
1937
|
+
* 获取完毕后,下游第一行代码就要配置消息服务
|
1938
|
+
*/
|
1939
|
+
async getHalo() {
|
1940
|
+
if (this.halo == null) {
|
1941
|
+
let t = await this.create("Halo");
|
1942
|
+
await t.open(mt.api.url), this.halo = t;
|
1943
|
+
}
|
1944
|
+
return this.halo;
|
1890
1945
|
}
|
1891
1946
|
}
|
1892
|
-
|
1947
|
+
class De {
|
1948
|
+
}
|
1949
|
+
class Le extends De {
|
1950
|
+
constructor() {
|
1951
|
+
super(...arguments), this.type = "Base64";
|
1952
|
+
}
|
1953
|
+
open(t) {
|
1954
|
+
}
|
1955
|
+
encode(t) {
|
1956
|
+
let e = st.enc.Utf8.parse(t);
|
1957
|
+
return st.enc.Base64.stringify(e);
|
1958
|
+
}
|
1959
|
+
decode(t) {
|
1960
|
+
let e = st.enc.Base64.parse(t);
|
1961
|
+
return st.enc.Utf8.stringify(e);
|
1962
|
+
}
|
1963
|
+
}
|
1964
|
+
class $e extends L {
|
1965
|
+
getInstances() {
|
1966
|
+
return [new Le()];
|
1967
|
+
}
|
1968
|
+
/**
|
1969
|
+
* 创建执行类型的Hash实例
|
1970
|
+
*/
|
1971
|
+
async create(t, e) {
|
1972
|
+
let s = await super.create(t);
|
1973
|
+
return s.open(null), s;
|
1974
|
+
}
|
1975
|
+
/**
|
1976
|
+
* 获取Base64 编码器对象
|
1977
|
+
*/
|
1978
|
+
async getBase64() {
|
1979
|
+
return this.base64 != null ? this.base64 : (this.base64 = await this.create("Base64"), this.base64);
|
1980
|
+
}
|
1981
|
+
}
|
1982
|
+
class Ne {
|
1983
|
+
}
|
1984
|
+
class Pe extends Ne {
|
1985
|
+
constructor() {
|
1986
|
+
super(...arguments), this.type = "Default";
|
1987
|
+
}
|
1988
|
+
async open(t) {
|
1989
|
+
this.hasher = await I.getHasher().getMd5();
|
1990
|
+
}
|
1991
|
+
callback(t) {
|
1992
|
+
}
|
1993
|
+
async getSign(t, e, s, r, n) {
|
1994
|
+
let i = `${t}.${e}.${s ?? ""}.${r}.${n}`;
|
1995
|
+
return (await this.hasher.compute(i)).toUpperCase();
|
1996
|
+
}
|
1997
|
+
loginUrl(t) {
|
1998
|
+
return "";
|
1999
|
+
}
|
2000
|
+
dispose() {
|
2001
|
+
}
|
2002
|
+
}
|
2003
|
+
class Te extends L {
|
2004
|
+
getInstances() {
|
2005
|
+
return [new Pe()];
|
2006
|
+
}
|
2007
|
+
/**
|
2008
|
+
* 获取指定签名实例
|
2009
|
+
*/
|
2010
|
+
async create(t, e) {
|
2011
|
+
let s = await super.create(t);
|
2012
|
+
return await s.open(null), s;
|
2013
|
+
}
|
2014
|
+
}
|
2015
|
+
const Ot = class Ot {
|
1893
2016
|
constructor() {
|
1894
2017
|
this.type = "Bearer";
|
1895
2018
|
}
|
1896
2019
|
open(t) {
|
1897
|
-
this.requester = N.getRequester().getLocal();
|
1898
2020
|
}
|
2021
|
+
//#endregion
|
1899
2022
|
async login(t) {
|
1900
|
-
return
|
1901
|
-
let s = e.data;
|
1902
|
-
return w.setObject("sso", s), Promise.resolve(e);
|
1903
|
-
});
|
2023
|
+
return j.post(`/user/login?type=${this.type}`, t).then(async (e) => (await (await I.getProvider().getDefault("user")).saveAsync("sso", e.data), Promise.resolve(e)));
|
1904
2024
|
}
|
1905
2025
|
loginUrl(t) {
|
1906
2026
|
return "";
|
1907
2027
|
}
|
1908
2028
|
getUser() {
|
1909
|
-
let t =
|
2029
|
+
let t = E.getObject("sso");
|
1910
2030
|
return { userId: t.userId, token: t.token, secret: t.userSecret };
|
1911
2031
|
}
|
1912
|
-
|
2032
|
+
getAuth(t, e, s, r = "") {
|
1913
2033
|
let n = `${this.type} ${t} ${e} ${s} pc`;
|
1914
2034
|
return r && (n += " " + r), n;
|
1915
2035
|
}
|
1916
2036
|
logout() {
|
1917
|
-
|
2037
|
+
E.remove(Ot.loginKey), E.remove("sso");
|
1918
2038
|
}
|
1919
2039
|
};
|
1920
|
-
|
1921
|
-
let
|
1922
|
-
class
|
2040
|
+
Ot.loginKey = "user";
|
2041
|
+
let ot = Ot;
|
2042
|
+
class Fe {
|
1923
2043
|
constructor() {
|
1924
2044
|
this.type = "Nio";
|
1925
2045
|
}
|
@@ -1927,23 +2047,23 @@ class ee {
|
|
1927
2047
|
this.url = t.url, this.app_id = t.app_id;
|
1928
2048
|
}
|
1929
2049
|
async login(t) {
|
1930
|
-
|
2050
|
+
E.setObject("sso", t);
|
1931
2051
|
}
|
1932
2052
|
loginUrl(t) {
|
1933
2053
|
let e = encodeURIComponent(t);
|
1934
2054
|
return `${this.url}/oauth2/authorize?client_id=${this.app_id}&redirect_uri=${e}&response_type=code`;
|
1935
2055
|
}
|
1936
2056
|
getUser() {
|
1937
|
-
return
|
2057
|
+
return E.getObject(ot.loginKey);
|
1938
2058
|
}
|
1939
|
-
|
2059
|
+
getAuth(t, e, s, r) {
|
1940
2060
|
return `${this.type} ${t} ${e} ${s} pc`;
|
1941
2061
|
}
|
1942
2062
|
logout() {
|
1943
|
-
|
2063
|
+
E.remove("sso");
|
1944
2064
|
}
|
1945
2065
|
}
|
1946
|
-
class
|
2066
|
+
class Re {
|
1947
2067
|
constructor() {
|
1948
2068
|
this.type = "WeiXin";
|
1949
2069
|
}
|
@@ -1957,13 +2077,13 @@ class se {
|
|
1957
2077
|
getUser() {
|
1958
2078
|
return { userId: "", token: "", secret: "" };
|
1959
2079
|
}
|
1960
|
-
|
2080
|
+
getAuth(t, e, s, r) {
|
1961
2081
|
return "";
|
1962
2082
|
}
|
1963
2083
|
logout() {
|
1964
2084
|
}
|
1965
2085
|
}
|
1966
|
-
class
|
2086
|
+
class Ve {
|
1967
2087
|
constructor() {
|
1968
2088
|
this.type = "Anonymous";
|
1969
2089
|
}
|
@@ -1975,89 +2095,171 @@ class re {
|
|
1975
2095
|
return "";
|
1976
2096
|
}
|
1977
2097
|
getUser() {
|
1978
|
-
let t =
|
2098
|
+
let t = E.get("anonymous");
|
1979
2099
|
if (!t) {
|
1980
|
-
let e =
|
1981
|
-
|
2100
|
+
let e = B.getUniqueId();
|
2101
|
+
E.set("anonymous", e), t = e;
|
1982
2102
|
}
|
1983
2103
|
return { userId: "", token: t, secret: "" };
|
1984
2104
|
}
|
1985
|
-
|
2105
|
+
getAuth(t, e, s, r) {
|
1986
2106
|
return `Anonymous ${t} pc`;
|
1987
2107
|
}
|
1988
2108
|
logout() {
|
1989
2109
|
}
|
1990
2110
|
}
|
1991
|
-
class
|
2111
|
+
class Ke {
|
1992
2112
|
constructor() {
|
1993
2113
|
this.type = "Secret";
|
1994
2114
|
}
|
1995
2115
|
open(t) {
|
1996
|
-
this.requester = N.getRequester().getLocal();
|
1997
2116
|
}
|
1998
2117
|
async login(t) {
|
1999
|
-
return
|
2118
|
+
return j.post(`/user/login?type=${this.type}`, t).then((e) => {
|
2000
2119
|
let s = e.data;
|
2001
|
-
return
|
2120
|
+
return E.setObject("sso", s), Promise.resolve(e);
|
2002
2121
|
});
|
2003
2122
|
}
|
2004
2123
|
loginUrl(t) {
|
2005
2124
|
return "";
|
2006
2125
|
}
|
2007
2126
|
getUser() {
|
2008
|
-
let t =
|
2127
|
+
let t = E.getObject(ot.loginKey);
|
2009
2128
|
return { userId: t.userId, token: t.token, secret: t.userSecret };
|
2010
2129
|
}
|
2011
|
-
|
2130
|
+
getAuth(t, e, s, r) {
|
2012
2131
|
return `${this.type} ${t} ${e} ${s} pc`;
|
2013
2132
|
}
|
2014
2133
|
logout() {
|
2015
2134
|
}
|
2016
2135
|
}
|
2017
|
-
class
|
2136
|
+
class ze extends L {
|
2137
|
+
/**
|
2138
|
+
* @extends {getInstances}
|
2139
|
+
*/
|
2140
|
+
getInstances() {
|
2141
|
+
return [new Ke(), new Fe(), new Re(), new ot(), new Ve()];
|
2142
|
+
}
|
2018
2143
|
/**
|
2019
2144
|
* 获取指定SSO实例
|
2020
2145
|
*/
|
2021
|
-
|
2022
|
-
let
|
2023
|
-
|
2024
|
-
throw new Error(`未支持的SSO类型:${t}`);
|
2025
|
-
return s;
|
2146
|
+
async create(t, e) {
|
2147
|
+
let r = ue().ssos.find((i) => i.type.toUpperCase() == t.toUpperCase()), n = { url: r == null ? void 0 : r.url, app_id: r == null ? void 0 : r.appId }, l = await super.create(t);
|
2148
|
+
return l.open(n), l;
|
2026
2149
|
}
|
2027
2150
|
}
|
2028
|
-
class
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
open(t) {
|
2033
|
-
this.hasher = tt.getMd5();
|
2151
|
+
class ct {
|
2152
|
+
getPath(t) {
|
2153
|
+
let e = wt.getValueIgnoreCase(t, this.mappings);
|
2154
|
+
return O.httpOrHttps(e) ? e : this.baseUrl + e;
|
2034
2155
|
}
|
2035
|
-
|
2156
|
+
async loadPathAsync(t, e) {
|
2157
|
+
let s = this.baseUrl + t;
|
2158
|
+
await kt.loadPathAsync(s, e);
|
2036
2159
|
}
|
2037
|
-
async
|
2038
|
-
let
|
2039
|
-
|
2040
|
-
|
2041
|
-
|
2160
|
+
async loadAsync(t) {
|
2161
|
+
let e = B.getArray(t), s = [];
|
2162
|
+
for (let r = 0; r < e.length; r++) {
|
2163
|
+
let n = this.getPath(e[r]);
|
2164
|
+
s.push(n);
|
2165
|
+
}
|
2166
|
+
return await kt.loadAsync(s);
|
2042
2167
|
}
|
2043
|
-
|
2044
|
-
|
2168
|
+
}
|
2169
|
+
class Me extends ct {
|
2170
|
+
constructor() {
|
2171
|
+
super(...arguments), this.type = "Jsdelivr", this.mappings = {
|
2172
|
+
"monaco-editor": "/npm/monaco-editor@0.49.0/min/vs"
|
2173
|
+
};
|
2045
2174
|
}
|
2046
|
-
|
2175
|
+
open(t) {
|
2176
|
+
this.baseUrl = "https://cdn.jsdelivr.net";
|
2177
|
+
}
|
2178
|
+
}
|
2179
|
+
class qe extends ct {
|
2180
|
+
constructor() {
|
2181
|
+
super(...arguments), this.type = "StaticFile", this.mappings = {
|
2182
|
+
//通过cdn引入样式文件,并且打包文件中不会包括样式文件
|
2183
|
+
"element-plus": "/element-plus/2.7.5/index.css",
|
2184
|
+
// 加载monaco cdn压缩资源包,可以大幅减少本地请求数量
|
2185
|
+
//首次加载4.11s
|
2186
|
+
//不能使用,偶发404:https://cdn.staticfile.net/monaco-editor/0.45.0/min/vs
|
2187
|
+
"monaco-editor": "https://cdn.jsdelivr.net/npm/monaco-editor@0.50.0/min/vs",
|
2188
|
+
quill: "/quill/2.0.2/quill.snow.min.css",
|
2189
|
+
"fort-awesome": "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"
|
2190
|
+
};
|
2191
|
+
}
|
2192
|
+
open(t) {
|
2193
|
+
this.baseUrl = "https://cdn.staticfile.net";
|
2047
2194
|
}
|
2048
2195
|
}
|
2049
|
-
class
|
2196
|
+
class We extends ct {
|
2197
|
+
constructor() {
|
2198
|
+
super(...arguments), this.type = "BootCdn", this.mappings = {
|
2199
|
+
"element-plus": "/ajax/libs/element-plus/2.4.4/index.css",
|
2200
|
+
"monaco-editor": "/ajax/libs/monaco-editor/0.45.0/min/vs",
|
2201
|
+
quill: "/ajax/libs/quill/1.3.7/quill.snow.min.css"
|
2202
|
+
};
|
2203
|
+
}
|
2204
|
+
open(t) {
|
2205
|
+
this.baseUrl = "https://cdn.bootcdn.net";
|
2206
|
+
}
|
2207
|
+
}
|
2208
|
+
class Je extends ct {
|
2209
|
+
constructor() {
|
2210
|
+
super(...arguments), this.type = "Local", this.mappings = {
|
2211
|
+
//引入本地样式文件,会导致始终打包进打包文件
|
2212
|
+
//后续可以改进为:发包后,单独存放静态样式文件,框架加载时,自动通过异步方式加载样式文件
|
2213
|
+
//为了同时让下游同时支持CDN引入和本地引入样式表文件,所以需要把element-plus的样式文件,独立打包到一个文件中,让下游:
|
2214
|
+
//1. 启用CDN时,能够使用CDN加载,而不加载本地element-plus的样式文件
|
2215
|
+
//2. 不启用CDN时,采用本地打包方式,支持载入本地element-plus样式表文件
|
2216
|
+
//所以,上游包,必须同时包含独立的element-plus样式表文件
|
2217
|
+
//复制包内的样式表文件,方便cdn方式不加载样式表 和 未启用cdn方式加载 样式表
|
2218
|
+
"element-plus": "element-plus/dist/index.css",
|
2219
|
+
quill: "quill/dist/quill.snow.css",
|
2220
|
+
"fort-awesome": "@fortawesome/fontawesome-free/css/all.min.css"
|
2221
|
+
};
|
2222
|
+
}
|
2223
|
+
open(t) {
|
2224
|
+
this.baseUrl = t;
|
2225
|
+
}
|
2226
|
+
}
|
2227
|
+
class Ye extends ct {
|
2228
|
+
constructor() {
|
2229
|
+
super(...arguments), this.type = "Unpkg", this.mappings = {
|
2230
|
+
//首次加载很不稳定: 30s+, 稳定后: 首次加载2.5s(使用https加载,可以防止本地http访问外部http资源时的请求警告)
|
2231
|
+
"monaco-editor": ["/monaco-editor@0.49.0/min/vs"]
|
2232
|
+
};
|
2233
|
+
}
|
2234
|
+
open(t) {
|
2235
|
+
this.baseUrl = "https://unpkg.com";
|
2236
|
+
}
|
2237
|
+
}
|
2238
|
+
class Qe extends L {
|
2239
|
+
getInstances() {
|
2240
|
+
return [new Me(), new qe(), new We(), new Je(), new Ye()];
|
2241
|
+
}
|
2050
2242
|
/**
|
2051
|
-
*
|
2243
|
+
* 获取指定CDN实例
|
2052
2244
|
*/
|
2053
|
-
|
2054
|
-
let s =
|
2055
|
-
|
2056
|
-
|
2057
|
-
|
2245
|
+
async create(t, e) {
|
2246
|
+
let s = await super.create(t);
|
2247
|
+
return s.open(e), s;
|
2248
|
+
}
|
2249
|
+
}
|
2250
|
+
class Xe {
|
2251
|
+
constructor() {
|
2252
|
+
this.type = "Json";
|
2253
|
+
}
|
2254
|
+
}
|
2255
|
+
class Ge extends Xe {
|
2256
|
+
}
|
2257
|
+
class Ze extends L {
|
2258
|
+
getInstances() {
|
2259
|
+
return [new Ge()];
|
2058
2260
|
}
|
2059
2261
|
}
|
2060
|
-
class
|
2262
|
+
class He {
|
2061
2263
|
constructor() {
|
2062
2264
|
this.type = "Sort";
|
2063
2265
|
}
|
@@ -2082,7 +2284,7 @@ class ue {
|
|
2082
2284
|
}
|
2083
2285
|
}
|
2084
2286
|
}
|
2085
|
-
class
|
2287
|
+
class _e {
|
2086
2288
|
constructor() {
|
2087
2289
|
this.type = "I18N";
|
2088
2290
|
}
|
@@ -2095,7 +2297,7 @@ class oe {
|
|
2095
2297
|
copy(t, e, s) {
|
2096
2298
|
}
|
2097
2299
|
}
|
2098
|
-
class
|
2300
|
+
class ts {
|
2099
2301
|
constructor() {
|
2100
2302
|
this.type = "Expression";
|
2101
2303
|
}
|
@@ -2108,20 +2310,87 @@ class ce {
|
|
2108
2310
|
copy(t, e, s) {
|
2109
2311
|
}
|
2110
2312
|
}
|
2111
|
-
class
|
2313
|
+
class es extends L {
|
2314
|
+
getInstances() {
|
2315
|
+
return [new He(), new _e(), new ts()];
|
2316
|
+
}
|
2112
2317
|
/**
|
2113
2318
|
* 获取指定特征实例
|
2114
2319
|
*/
|
2115
|
-
|
2116
|
-
let s =
|
2117
|
-
|
2118
|
-
|
2119
|
-
|
2320
|
+
async create(t, e) {
|
2321
|
+
let s = await super.create(t);
|
2322
|
+
return s.open(null), s;
|
2323
|
+
}
|
2324
|
+
}
|
2325
|
+
class de {
|
2326
|
+
}
|
2327
|
+
class ss extends de {
|
2328
|
+
constructor() {
|
2329
|
+
super(...arguments), this.type = "Sha256";
|
2330
|
+
}
|
2331
|
+
open(t) {
|
2332
|
+
}
|
2333
|
+
async compute(t) {
|
2334
|
+
let s = new TextEncoder().encode(t), r = await crypto.subtle.digest("SHA-256", s);
|
2335
|
+
return Array.from(new Uint8Array(r)).map((i) => i.toString(16).padStart(2, "0")).join("");
|
2336
|
+
}
|
2337
|
+
}
|
2338
|
+
class rs extends de {
|
2339
|
+
constructor() {
|
2340
|
+
super(...arguments), this.type = "Md5";
|
2341
|
+
}
|
2342
|
+
open(t) {
|
2343
|
+
}
|
2344
|
+
compute(t) {
|
2345
|
+
let e = st.MD5(t).toString();
|
2346
|
+
return Promise.resolve(e);
|
2347
|
+
}
|
2348
|
+
}
|
2349
|
+
class ns extends L {
|
2350
|
+
getInstances() {
|
2351
|
+
return [new ss(), new rs()];
|
2352
|
+
}
|
2353
|
+
async create(t, e) {
|
2354
|
+
let s = await super.create(t);
|
2355
|
+
return s.open(null), s;
|
2356
|
+
}
|
2357
|
+
/**
|
2358
|
+
* 获取MD5 Hash对象
|
2359
|
+
*/
|
2360
|
+
async getMd5() {
|
2361
|
+
return this.md5 != null ? this.md5 : (this.md5 = await this.create("Md5"), this.md5);
|
2362
|
+
}
|
2363
|
+
}
|
2364
|
+
class ls {
|
2365
|
+
createAsync(t) {
|
2366
|
+
return Promise.resolve(void 0);
|
2367
|
+
}
|
2368
|
+
deleteAsync(t) {
|
2369
|
+
return Promise.resolve(void 0);
|
2370
|
+
}
|
2371
|
+
getAsync(t) {
|
2372
|
+
return Promise.resolve(void 0);
|
2373
|
+
}
|
2374
|
+
insertAsync(t, e) {
|
2375
|
+
return Promise.resolve(void 0);
|
2376
|
+
}
|
2377
|
+
openAsync(t) {
|
2378
|
+
return Promise.resolve(0);
|
2379
|
+
}
|
2380
|
+
saveAsync(t, e) {
|
2381
|
+
return Promise.resolve(void 0);
|
2382
|
+
}
|
2383
|
+
updateAsync(t, e) {
|
2384
|
+
return Promise.resolve(void 0);
|
2385
|
+
}
|
2386
|
+
commit() {
|
2387
|
+
}
|
2388
|
+
dispose() {
|
2120
2389
|
}
|
2121
2390
|
}
|
2122
|
-
const
|
2391
|
+
const X = class X extends ls {
|
2123
2392
|
constructor() {
|
2124
|
-
this.type = "IndexedDb", this.database = null, this.store = null, this.objectStoreNames = null;
|
2393
|
+
super(...arguments), this.type = "IndexedDb", this.database = null, this.store = null, this.objectStoreNames = null;
|
2125
2394
|
}
|
2126
2395
|
/**
|
2127
2396
|
* 进行数据库初始化 或 从现有数据库中得到最新版本号(数据库首次初始化和open是版本号升级时,会触发升级事件)
|
@@ -2131,7 +2400,7 @@ const $ = class $ {
|
|
2131
2400
|
let r = indexedDB.open(t);
|
2132
2401
|
r.onsuccess = (n) => {
|
2133
2402
|
let l = n.target.result;
|
2134
|
-
|
2403
|
+
X.version = l.version, this.objectStoreNames = l.objectStoreNames, e(X.version);
|
2135
2404
|
}, r.onerror = (n) => {
|
2136
2405
|
s(n.target);
|
2137
2406
|
};
|
@@ -2142,7 +2411,7 @@ const $ = class $ {
|
|
2142
2411
|
*/
|
2143
2412
|
async createAsync(t) {
|
2144
2413
|
return this.store = t, this.objectStoreNames.contains(t) ? Promise.resolve(!0) : new Promise((e, s) => {
|
2145
|
-
let r = indexedDB.open(this.database,
|
2414
|
+
let r = indexedDB.open(this.database, ++X.version);
|
2146
2415
|
r.onupgradeneeded = (n) => {
|
2147
2416
|
let l = n.target.result;
|
2148
2417
|
l.objectStoreNames.contains(this.store) || l.createObjectStore(this.store);
|
@@ -2158,7 +2427,7 @@ const $ = class $ {
|
|
2158
2427
|
*/
|
2159
2428
|
async openDbAsync() {
|
2160
2429
|
return new Promise((t, e) => {
|
2161
|
-
let s = indexedDB.open(this.database,
|
2430
|
+
let s = indexedDB.open(this.database, X.version);
|
2162
2431
|
s.onsuccess = (r) => {
|
2163
2432
|
let n = r.target.result;
|
2164
2433
|
t(n);
|
@@ -2178,17 +2447,17 @@ const $ = class $ {
|
|
2178
2447
|
return;
|
2179
2448
|
}
|
2180
2449
|
let n = e.transaction(this.store, "readonly");
|
2181
|
-
n.oncomplete = (
|
2450
|
+
n.oncomplete = (o) => {
|
2182
2451
|
e.close();
|
2183
|
-
}, n.onerror = (
|
2184
|
-
r(
|
2452
|
+
}, n.onerror = (o) => {
|
2453
|
+
r(o);
|
2185
2454
|
};
|
2186
2455
|
let i = n.objectStore(this.store).get(t);
|
2187
|
-
i.onsuccess = (
|
2188
|
-
let
|
2189
|
-
s(
|
2190
|
-
}, i.onerror = (
|
2191
|
-
r(
|
2456
|
+
i.onsuccess = (o) => {
|
2457
|
+
let u = o.target.result;
|
2458
|
+
s(u);
|
2459
|
+
}, i.onerror = (o) => {
|
2460
|
+
r(o.target);
|
2192
2461
|
};
|
2193
2462
|
});
|
2194
2463
|
}
|
@@ -2201,17 +2470,17 @@ const $ = class $ {
|
|
2201
2470
|
let s = await this.openDbAsync();
|
2202
2471
|
return new Promise((r, n) => {
|
2203
2472
|
let l = s.transaction(this.store, "readwrite");
|
2204
|
-
l.oncomplete = (
|
2473
|
+
l.oncomplete = (u) => {
|
2205
2474
|
s.close();
|
2206
|
-
}, l.onerror = (
|
2207
|
-
n(
|
2475
|
+
}, l.onerror = (u) => {
|
2476
|
+
n(u);
|
2208
2477
|
};
|
2209
|
-
let
|
2210
|
-
|
2211
|
-
let c =
|
2478
|
+
let o = l.objectStore(this.store).add(e, t);
|
2479
|
+
o.onsuccess = (u) => {
|
2480
|
+
let c = u.target.result;
|
2212
2481
|
r(c);
|
2213
|
-
},
|
2214
|
-
let c =
|
2482
|
+
}, o.onerror = (u) => {
|
2483
|
+
let c = u.target.error;
|
2215
2484
|
n(c.message);
|
2216
2485
|
};
|
2217
2486
|
});
|
@@ -2235,13 +2504,13 @@ const $ = class $ {
|
|
2235
2504
|
}, l.onerror = (c) => {
|
2236
2505
|
n(c);
|
2237
2506
|
};
|
2238
|
-
let i =
|
2239
|
-
|
2240
|
-
let
|
2241
|
-
r(
|
2242
|
-
},
|
2243
|
-
let
|
2244
|
-
n(
|
2507
|
+
let i = K.clone(e), u = l.objectStore(this.store).put(i, t);
|
2508
|
+
u.onsuccess = (c) => {
|
2509
|
+
let h = c.target.result;
|
2510
|
+
r(h);
|
2511
|
+
}, u.onerror = (c) => {
|
2512
|
+
let h = c.target.error;
|
2513
|
+
n(h.message);
|
2245
2514
|
};
|
2246
2515
|
});
|
2247
2516
|
}
|
@@ -2254,18 +2523,18 @@ const $ = class $ {
|
|
2254
2523
|
let e = await this.openDbAsync();
|
2255
2524
|
return new Promise((s, r) => {
|
2256
2525
|
let n = e.transaction(this.store, "readwrite");
|
2257
|
-
n.oncomplete = (
|
2526
|
+
n.oncomplete = (o) => {
|
2258
2527
|
e.close();
|
2259
|
-
}, n.onerror = (
|
2260
|
-
r(
|
2528
|
+
}, n.onerror = (o) => {
|
2529
|
+
r(o);
|
2261
2530
|
};
|
2262
2531
|
let i = n.objectStore(this.store).delete(t);
|
2263
|
-
i.onsuccess = (
|
2264
|
-
let
|
2265
|
-
s(
|
2266
|
-
}, i.onerror = (
|
2267
|
-
let
|
2268
|
-
r(
|
2532
|
+
i.onsuccess = (o) => {
|
2533
|
+
let u = o.target.result;
|
2534
|
+
s(u);
|
2535
|
+
}, i.onerror = (o) => {
|
2536
|
+
let u = o.target.error.message;
|
2537
|
+
r(u);
|
2269
2538
|
};
|
2270
2539
|
});
|
2271
2540
|
}
|
@@ -2280,260 +2549,525 @@ const $ = class $ {
|
|
2280
2549
|
dispose() {
|
2281
2550
|
}
|
2282
2551
|
};
|
2283
|
-
|
2284
|
-
let
|
2285
|
-
class
|
2552
|
+
X.version = null;
|
2553
|
+
let Tt = X;
|
2554
|
+
class is extends L {
|
2555
|
+
getInstances() {
|
2556
|
+
return [new Tt()];
|
2557
|
+
}
|
2286
2558
|
/**
|
2287
2559
|
* 获取指定类型的提供程序
|
2288
2560
|
*/
|
2289
|
-
|
2290
|
-
let s =
|
2291
|
-
|
2292
|
-
throw new Error(`未实现数据库提供程序:${t}`);
|
2293
|
-
return s;
|
2294
|
-
}
|
2295
|
-
}
|
2296
|
-
class fe {
|
2297
|
-
constructor() {
|
2298
|
-
this.type = "xlsx";
|
2561
|
+
async create(t, e) {
|
2562
|
+
let s = await super.create(t);
|
2563
|
+
return await s.openAsync(e), s;
|
2299
2564
|
}
|
2300
|
-
open(t) {
|
2301
|
-
}
|
2302
|
-
export(t, e) {
|
2303
|
-
if (!e)
|
2304
|
-
throw new Error("Excel名称不能为空");
|
2305
|
-
t || (t = []);
|
2306
|
-
let s;
|
2307
|
-
t.length > 0 ? s = Object.keys(t[0]) : s = [];
|
2308
|
-
let r = [], n = [];
|
2309
|
-
if (s.forEach((c) => {
|
2310
|
-
n.push(c);
|
2311
|
-
}), r.push(n), t.length > 0)
|
2312
|
-
for (let c = 0; c < t.length; c++) {
|
2313
|
-
let g = t[c], p = [];
|
2314
|
-
Object.keys(g).forEach((v) => {
|
2315
|
-
p.push(g[v]);
|
2316
|
-
}), r.push(p);
|
2317
|
-
}
|
2318
|
-
let l = it.book_new(), i = it.json_to_sheet(r, { skipHeader: !0 });
|
2319
|
-
it.book_append_sheet(l, i, "abc");
|
2320
|
-
let u = 65;
|
2321
|
-
for (let c = 0; c < s.length; c++) {
|
2322
|
-
let p = `${String.fromCharCode(u + c)}1`;
|
2323
|
-
i[p].s = {
|
2324
|
-
alignment: { horizontal: "center" },
|
2325
|
-
font: { bold: !0, color: { rgb: "000000" } },
|
2326
|
-
fill: { fgColor: { rgb: "409eff" } }
|
2327
|
-
};
|
2328
|
-
}
|
2329
|
-
let o = [];
|
2330
|
-
s.forEach((c) => {
|
2331
|
-
let g = t[0][c], p = { wpx: 50 };
|
2332
|
-
typeof g == "string" && (p.wpx = 100), o.push(p);
|
2333
|
-
}), i["!cols"] = o, Dt(l, e);
|
2334
|
-
}
|
2335
|
-
}
|
2336
|
-
class de {
|
2337
2565
|
/**
|
2338
|
-
*
|
2566
|
+
* 获取并开启默认驱动程序
|
2339
2567
|
*/
|
2340
|
-
|
2341
|
-
|
2342
|
-
if (s == null)
|
2343
|
-
throw new Error(`未支持的 Excel 类型:${t}`);
|
2344
|
-
return s;
|
2345
|
-
}
|
2346
|
-
}
|
2347
|
-
class V {
|
2348
|
-
getPath(t) {
|
2349
|
-
let e = X.getValueIgnoreCase(t, this.mappings);
|
2350
|
-
return k.httpOrHttps(e) ? e : this.baseUrl + e;
|
2351
|
-
}
|
2352
|
-
async loadPathAsync(t, e) {
|
2353
|
-
let s = this.baseUrl + t;
|
2354
|
-
await H.loadPathAsync(s, e);
|
2355
|
-
}
|
2356
|
-
async loadAsync(t) {
|
2357
|
-
let e = S.getArray(t), s = [];
|
2358
|
-
for (let r = 0; r < e.length; r++) {
|
2359
|
-
let n = this.getPath(e[r]);
|
2360
|
-
s.push(n);
|
2361
|
-
}
|
2362
|
-
return await H.loadAsync(s);
|
2363
|
-
}
|
2364
|
-
}
|
2365
|
-
class me extends V {
|
2366
|
-
constructor() {
|
2367
|
-
super(...arguments), this.type = "Jsdelivr", this.mappings = {
|
2368
|
-
"monaco-editor": "/npm/monaco-editor@0.49.0/min/vs"
|
2369
|
-
};
|
2370
|
-
}
|
2371
|
-
open(t) {
|
2372
|
-
this.baseUrl = "https://cdn.jsdelivr.net";
|
2373
|
-
}
|
2374
|
-
}
|
2375
|
-
class pe extends V {
|
2376
|
-
constructor() {
|
2377
|
-
super(...arguments), this.type = "StaticFile", this.mappings = {
|
2378
|
-
//通过cdn引入样式文件,并且打包文件中不会包括样式文件
|
2379
|
-
"element-plus": "/element-plus/2.7.5/index.css",
|
2380
|
-
// 加载monaco cdn压缩资源包,可以大幅减少本地请求数量
|
2381
|
-
//首次加载4.11s
|
2382
|
-
//不能使用,偶发404:https://cdn.staticfile.net/monaco-editor/0.45.0/min/vs
|
2383
|
-
"monaco-editor": "https://cdn.jsdelivr.net/npm/monaco-editor@0.49.0/min/vs",
|
2384
|
-
quill: "/quill/2.0.2/quill.snow.min.css",
|
2385
|
-
"fort-awesome": "https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.5.2/css/all.min.css"
|
2386
|
-
};
|
2387
|
-
}
|
2388
|
-
open(t) {
|
2389
|
-
this.baseUrl = "https://cdn.staticfile.net";
|
2390
|
-
}
|
2391
|
-
}
|
2392
|
-
class ye extends V {
|
2393
|
-
constructor() {
|
2394
|
-
super(...arguments), this.type = "BootCdn", this.mappings = {
|
2395
|
-
"element-plus": "/ajax/libs/element-plus/2.4.4/index.css",
|
2396
|
-
"monaco-editor": "/ajax/libs/monaco-editor/0.45.0/min/vs",
|
2397
|
-
quill: "/ajax/libs/quill/1.3.7/quill.snow.min.css"
|
2398
|
-
};
|
2399
|
-
}
|
2400
|
-
open(t) {
|
2401
|
-
this.baseUrl = "https://cdn.bootcdn.net";
|
2402
|
-
}
|
2403
|
-
}
|
2404
|
-
class be extends V {
|
2405
|
-
constructor() {
|
2406
|
-
super(...arguments), this.type = "Local", this.mappings = {
|
2407
|
-
//引入本地样式文件,会导致始终打包进打包文件
|
2408
|
-
//后续可以改进为:发包后,单独存放静态样式文件,框架加载时,自动通过异步方式加载样式文件
|
2409
|
-
//为了同时让下游同时支持CDN引入和本地引入样式表文件,所以需要把element-plus的样式文件,独立打包到一个文件中,让下游:
|
2410
|
-
//1. 启用CDN时,能够使用CDN加载,而不加载本地element-plus的样式文件
|
2411
|
-
//2. 不启用CDN时,采用本地打包方式,支持载入本地element-plus样式表文件
|
2412
|
-
//所以,上游包,必须同时包含独立的element-plus样式表文件
|
2413
|
-
//复制包内的样式表文件,方便cdn方式不加载样式表 和 未启用cdn方式加载 样式表
|
2414
|
-
"element-plus": "element-plus/dist/index.css",
|
2415
|
-
quill: "quill/dist/quill.snow.css",
|
2416
|
-
"fort-awesome": "@fortawesome/fontawesome-free/css/all.min.css"
|
2417
|
-
};
|
2418
|
-
}
|
2419
|
-
open(t) {
|
2420
|
-
this.baseUrl = t;
|
2568
|
+
async getDefault(t) {
|
2569
|
+
return this._default != null ? this._default : (this._default = await this.create("IndexedDb", "halo"), t != null && await this._default.createAsync(t), this._default);
|
2421
2570
|
}
|
2422
2571
|
}
|
2423
|
-
|
2424
|
-
|
2425
|
-
|
2426
|
-
|
2427
|
-
|
2428
|
-
|
2572
|
+
const it = class it {
|
2573
|
+
/**
|
2574
|
+
* 获取并缓存工厂实例
|
2575
|
+
*/
|
2576
|
+
static create(t, e) {
|
2577
|
+
let s = it.mappings[t];
|
2578
|
+
return s || (s = new e(), it.mappings[t] = s), s;
|
2429
2579
|
}
|
2430
|
-
|
2431
|
-
|
2580
|
+
//#endregion
|
2581
|
+
//#region 工厂实例
|
2582
|
+
/**
|
2583
|
+
*获取CDN工厂
|
2584
|
+
*/
|
2585
|
+
static getCdn() {
|
2586
|
+
return this.create("CdnFactory", Qe);
|
2432
2587
|
}
|
2433
|
-
}
|
2434
|
-
class Se {
|
2435
2588
|
/**
|
2436
|
-
|
2589
|
+
*获取编码器工厂
|
2437
2590
|
*/
|
2438
|
-
static
|
2439
|
-
|
2440
|
-
if (s == null)
|
2441
|
-
throw new Error(`未支持的Cdn类型:${t}`);
|
2442
|
-
return s;
|
2591
|
+
static getEncoder() {
|
2592
|
+
return this.create("EncoderFactory", $e);
|
2443
2593
|
}
|
2444
|
-
}
|
2445
|
-
class Y {
|
2446
2594
|
/**
|
2447
|
-
|
2595
|
+
*获取Excel工厂
|
2448
2596
|
*/
|
2449
|
-
static
|
2450
|
-
|
2451
|
-
throw new Error("SSO 配置类型不能为空");
|
2452
|
-
let s = It().ssos.find((l) => l.type.toUpperCase() == t.toUpperCase()), r = { url: s == null ? void 0 : s.url, app_id: s == null ? void 0 : s.appId }, n = le.getSso(t);
|
2453
|
-
return n.open(r), n;
|
2597
|
+
static getExcel() {
|
2598
|
+
return this.create("ExcelFactory", ke);
|
2454
2599
|
}
|
2455
2600
|
/**
|
2456
|
-
|
2601
|
+
*获取Explainer工厂
|
2457
2602
|
*/
|
2458
|
-
static
|
2459
|
-
|
2460
|
-
throw new Error("Signer 配置类型不能为空");
|
2461
|
-
let e = ae.create(t);
|
2462
|
-
return e.open(null), e;
|
2603
|
+
static getExplainer() {
|
2604
|
+
return this.create("ExplainerFactory", Ze);
|
2463
2605
|
}
|
2464
2606
|
/**
|
2465
|
-
|
2607
|
+
*获取特征工厂
|
2466
2608
|
*/
|
2467
|
-
static getFeature(
|
2468
|
-
|
2469
|
-
throw new Error("Feature 配置类型不能为空");
|
2470
|
-
let e = he.create(t);
|
2471
|
-
return e.open(null), e;
|
2609
|
+
static getFeature() {
|
2610
|
+
return this.create("FeatureFactory", es);
|
2472
2611
|
}
|
2473
2612
|
/**
|
2474
|
-
|
2613
|
+
*获取哈希工厂
|
2475
2614
|
*/
|
2476
|
-
static
|
2477
|
-
|
2478
|
-
return await s.openAsync("halo"), e != null && await s.createAsync(e), s;
|
2615
|
+
static getHasher() {
|
2616
|
+
return this.create("HasherFactory", ns);
|
2479
2617
|
}
|
2480
2618
|
/**
|
2481
|
-
|
2619
|
+
*获取提供程序工厂
|
2482
2620
|
*/
|
2483
|
-
static
|
2484
|
-
|
2485
|
-
return e.open(null), e;
|
2621
|
+
static getProvider() {
|
2622
|
+
return this.create("ProviderFactory", is);
|
2486
2623
|
}
|
2487
2624
|
/**
|
2488
|
-
|
2625
|
+
*获取Http请求工厂
|
2489
2626
|
*/
|
2490
|
-
static
|
2491
|
-
|
2492
|
-
return s.open(e), s;
|
2627
|
+
static getHttp() {
|
2628
|
+
return this.create("HttpFactory", Ue);
|
2493
2629
|
}
|
2494
2630
|
/**
|
2495
|
-
|
2631
|
+
*获取签名工厂
|
2496
2632
|
*/
|
2497
|
-
static
|
2498
|
-
|
2499
|
-
return S.equalsIgnoreCase(t, "base64") ? e = st.getBase64() : e = st.create(t), e.open(null), e;
|
2633
|
+
static getSigner() {
|
2634
|
+
return this.create("SignerFactory", Te);
|
2500
2635
|
}
|
2501
2636
|
/**
|
2502
|
-
|
2637
|
+
*获取SSO工厂
|
2503
2638
|
*/
|
2504
|
-
static
|
2505
|
-
|
2506
|
-
|
2639
|
+
static getSso() {
|
2640
|
+
return this.create("SsoFactory", ze);
|
2641
|
+
}
|
2642
|
+
//#endregion
|
2643
|
+
};
|
2644
|
+
it.mappings = {};
|
2645
|
+
let Ft = it;
|
2646
|
+
const I = Ft;
|
2647
|
+
let as = I.getHttp(), ne = I.getEncoder(), j = {}, os = async () => {
|
2648
|
+
j = await as.getHalo();
|
2649
|
+
};
|
2650
|
+
const Us = /* @__PURE__ */ _({
|
2651
|
+
__name: "Code",
|
2652
|
+
props: {
|
2653
|
+
config: { default: {} },
|
2654
|
+
border: { type: Boolean },
|
2655
|
+
modelValue: {}
|
2656
|
+
},
|
2657
|
+
emits: ["mounted", "change", "scroll", "update:modelValue"],
|
2658
|
+
setup(a, { expose: t, emit: e }) {
|
2659
|
+
let s = e, r = a, { config: n, border: l, modelValue: i } = tt(r), o = null, u = null, c = null, h = H(), g = at(), v = (d) => d == "en" ? null : d, k = (d) => d == "default" ? null : "vs-dark", ht = (d) => {
|
2660
|
+
if (h.editor.completions[d])
|
2661
|
+
return;
|
2662
|
+
let y = o.languages.getLanguages().find((W) => W.id == d);
|
2663
|
+
if (!y)
|
2664
|
+
return;
|
2665
|
+
let A = y.loader;
|
2666
|
+
A && A().then((W) => {
|
2667
|
+
h.editor.completions[d] || (dt(W, d), h.editor.completions[d] = !0);
|
2668
|
+
});
|
2669
|
+
}, dt = (d, y) => o.languages.registerCompletionItemProvider(y, {
|
2670
|
+
provideCompletionItems: (W, Z) => {
|
2671
|
+
let et = W.getWordUntilPosition(Z), ft = {
|
2672
|
+
startLineNumber: Z.lineNumber,
|
2673
|
+
endLineNumber: Z.lineNumber,
|
2674
|
+
startColumn: et.startColumn,
|
2675
|
+
endColumn: et.endColumn
|
2676
|
+
}, Wt = [];
|
2677
|
+
const Jt = ["builtinFunctions", "keywords", "operators"];
|
2678
|
+
for (let Bt = 0; Bt < Jt.length; Bt++) {
|
2679
|
+
const At = Jt[Bt];
|
2680
|
+
let Yt = d.language[At];
|
2681
|
+
Yt && Yt.forEach((Qt) => {
|
2682
|
+
let Xt = Qt.toLowerCase(), $ = {
|
2683
|
+
label: Xt,
|
2684
|
+
kind: null,
|
2685
|
+
insertText: Xt,
|
2686
|
+
range: ft,
|
2687
|
+
documentation: Qt
|
2688
|
+
};
|
2689
|
+
At == "keywords" ? ($.kind = o.languages.CompletionItemKind.Keyword, $.detail = "关键词") : At == "operators" ? ($.kind = o.languages.CompletionItemKind.Operator, $.insertText += " ", $.detail = "操作符") : ($.kind = o.languages.CompletionItemKind.Function, $.insertText += "()", $.detail = "函数"), Wt.push($);
|
2690
|
+
});
|
2691
|
+
}
|
2692
|
+
return { suggestions: Wt };
|
2693
|
+
}
|
2694
|
+
}), jt = () => {
|
2695
|
+
var Z;
|
2696
|
+
let d = null;
|
2697
|
+
n.value.schema && (d = n.value.category + "/" + B.getUniqueId(), h.tryAddSchema(d, n.value.category, n.value.schema));
|
2698
|
+
let y = {
|
2699
|
+
validate: !0,
|
2700
|
+
allowComments: !0,
|
2701
|
+
//允许配置注释
|
2702
|
+
//保证架构配置在当前控件生效,所以需要绑定匹配哪个文件时使用架构
|
2703
|
+
schemas: K.clone(h.editor.schemas),
|
2704
|
+
trailingCommas: "ignore"
|
2705
|
+
//允许末尾逗号
|
2706
|
+
};
|
2707
|
+
o.languages.json.jsonDefaults.setDiagnosticsOptions(y), ht(n.value.language);
|
2708
|
+
let A = d ? o.Uri.parse(d) : null;
|
2709
|
+
c = o.editor.createModel(i.value, n.value.language, A);
|
2710
|
+
let W = {
|
2711
|
+
tabSize: 2,
|
2712
|
+
//Tab缩进大小
|
2713
|
+
detectIndentation: !1,
|
2714
|
+
//根据初始化的内容,自动检测缩进大小
|
2715
|
+
readOnly: n.value.readonly,
|
2716
|
+
lineNumbers: n.value.lineNumbers,
|
2717
|
+
minimap: { enabled: n.value.minimap, showSlider: "always" },
|
2718
|
+
//默认已启用代码图
|
2719
|
+
scrollbar: { verticalScrollbarSize: 0 },
|
2720
|
+
//关闭最右侧垂直滚动条
|
2721
|
+
theme: k(h.theme),
|
2722
|
+
automaticLayout: !0,
|
2723
|
+
//根据父元素自动布局
|
2724
|
+
model: c
|
2725
|
+
};
|
2726
|
+
u = o.editor.create(g.value, W), (Z = n.value.scrollTop) != null && Z.value && u.setScrollTop(n.value.scrollTop.value), u.onDidScrollChange((et) => {
|
2727
|
+
s("scroll", et.scrollTop);
|
2728
|
+
}), u.onDidChangeModelContent((et) => {
|
2729
|
+
let ft = u.getValue();
|
2730
|
+
s("update:modelValue", ft), s("change", ft);
|
2731
|
+
});
|
2732
|
+
};
|
2733
|
+
le(async () => {
|
2734
|
+
o = await bt.init(), g.value && (jt(), s("mounted", o, u));
|
2735
|
+
});
|
2736
|
+
let gt = () => {
|
2737
|
+
u == null || u.layout();
|
2738
|
+
}, b = () => u;
|
2739
|
+
return ie(() => {
|
2740
|
+
c == null || c.dispose(), u == null || u.dispose();
|
2741
|
+
}), P(() => h.theme, (d, y) => {
|
2742
|
+
let A = k(d);
|
2743
|
+
o.editor.setTheme(A);
|
2744
|
+
}), P(() => h.language, (d, y) => {
|
2745
|
+
bt.config({ "vs/nls": { availableLanguages: { "*": v(d) } } });
|
2746
|
+
}), P(() => i.value, (d, y) => {
|
2747
|
+
if (!u)
|
2748
|
+
return;
|
2749
|
+
let A = u.getValue();
|
2750
|
+
d != A && u.setValue(d ?? "");
|
2751
|
+
}), P(() => n.value.language, (d, y) => {
|
2752
|
+
if (!u)
|
2753
|
+
return;
|
2754
|
+
let A = u.getModel();
|
2755
|
+
o.editor.setModelLanguage(A, d), ht(d);
|
2756
|
+
}), t({ layout: gt, getEditor: b }), (d, y) => (z(), M("div", {
|
2757
|
+
ref_key: "monacoEditorRef",
|
2758
|
+
ref: g,
|
2759
|
+
class: Rt(["ha-code", { border: T(l) }])
|
2760
|
+
}, null, 2));
|
2761
|
+
}
|
2762
|
+
}), us = (a, t) => {
|
2763
|
+
const e = a.__vccOpts || a;
|
2764
|
+
for (const [s, r] of t)
|
2765
|
+
e[s] = r;
|
2766
|
+
return e;
|
2767
|
+
}, cs = {}, hs = { class: "ha-col" };
|
2768
|
+
function ds(a, t) {
|
2769
|
+
return z(), M("div", hs, [
|
2770
|
+
It(a.$slots, "default")
|
2771
|
+
]);
|
2772
|
+
}
|
2773
|
+
const Ds = /* @__PURE__ */ us(cs, [["render", ds]]), Ls = /* @__PURE__ */ _({
|
2774
|
+
__name: "Compare",
|
2775
|
+
props: {
|
2776
|
+
inline: { type: Boolean, default: !1 },
|
2777
|
+
language: { type: String },
|
2778
|
+
original: { type: String },
|
2779
|
+
modelValue: { type: String }
|
2780
|
+
},
|
2781
|
+
emits: ["update:modelValue", "update:original", "change"],
|
2782
|
+
setup(a, { emit: t }) {
|
2783
|
+
let e = t, s = a, { inline: r, language: n, original: l, modelValue: i } = tt(s), o = null, u = null, c = null, h = null, g = null, v = null, k = at(), ht = at(), dt = H(), jt = (b) => {
|
2784
|
+
u = b.editor.createModel(l.value, n.value), c = b.editor.createModel(i.value, n.value), o = b.editor.createDiffEditor(k.value, {
|
2785
|
+
originalEditable: !0,
|
2786
|
+
automaticLayout: !0,
|
2787
|
+
renderSideBySide: !r.value,
|
2788
|
+
//是否启用行内模式
|
2789
|
+
theme: gt(dt.theme)
|
2790
|
+
}), o.setModel({ original: u, modified: c }), h = o.getOriginalEditor(), h.onDidChangeModelContent((d) => {
|
2791
|
+
let y = h.getValue();
|
2792
|
+
e("update:original", y), e("change", y);
|
2793
|
+
}), g = o.getModifiedEditor(), g.onDidChangeModelContent((d) => {
|
2794
|
+
let y = g.getValue();
|
2795
|
+
e("update:modelValue", y);
|
2796
|
+
});
|
2797
|
+
}, gt = (b) => b == "default" ? null : "vs-dark";
|
2798
|
+
return bt.init().then((b) => {
|
2799
|
+
v = b, jt(b);
|
2800
|
+
}), P(() => dt.theme, (b, d) => {
|
2801
|
+
let y = gt(b);
|
2802
|
+
v.editor.setTheme(y);
|
2803
|
+
}), P(() => n.value, (b, d) => {
|
2804
|
+
u && v.editor.setModelLanguage(u, b), c && v.editor.setModelLanguage(c, b);
|
2805
|
+
}), P(() => l.value, (b, d) => {
|
2806
|
+
if (!u)
|
2807
|
+
return;
|
2808
|
+
let y = u.getValue();
|
2809
|
+
b != y && u.setValue(b ?? "");
|
2810
|
+
}), P(() => i.value, (b, d) => {
|
2811
|
+
if (!c)
|
2812
|
+
return;
|
2813
|
+
let y = c.getValue();
|
2814
|
+
b != y && c.setValue(b ?? "");
|
2815
|
+
}), (b, d) => (z(), M("div", {
|
2816
|
+
ref_key: "compareRef",
|
2817
|
+
ref: k,
|
2818
|
+
class: "ha-compare",
|
2819
|
+
style: Vt(T(ht))
|
2820
|
+
}, null, 4));
|
2821
|
+
}
|
2822
|
+
}), $s = /* @__PURE__ */ _({
|
2823
|
+
__name: "Container",
|
2824
|
+
props: {
|
2825
|
+
container: { type: Boolean, default: !0 }
|
2826
|
+
},
|
2827
|
+
setup(a) {
|
2828
|
+
let t = a, { container: e } = tt(t);
|
2829
|
+
return (s, r) => (z(), M("div", {
|
2830
|
+
class: Rt({ "ha-container": T(e) })
|
2831
|
+
}, [
|
2832
|
+
It(s.$slots, "default")
|
2833
|
+
], 2));
|
2834
|
+
}
|
2835
|
+
}), gs = { class: "ha-empty" }, fs = { class: "empty-message" }, ms = {
|
2836
|
+
key: 0,
|
2837
|
+
class: "empty-content"
|
2838
|
+
}, Ns = /* @__PURE__ */ _({
|
2839
|
+
__name: "Empty",
|
2840
|
+
props: {
|
2841
|
+
message: { type: String, default: "暂无数据" },
|
2842
|
+
hasData: Boolean
|
2843
|
+
},
|
2844
|
+
setup(a) {
|
2845
|
+
let t = a, { message: e, hasData: s } = tt(t);
|
2846
|
+
return (r, n) => (z(), M("div", gs, [
|
2847
|
+
me("div", fs, pe(T(e)), 1),
|
2848
|
+
T(s) ? (z(), M("div", ms, [
|
2849
|
+
It(r.$slots, "default")
|
2850
|
+
])) : ae("", !0)
|
2851
|
+
]));
|
2852
|
+
}
|
2853
|
+
}), Ps = /* @__PURE__ */ _({
|
2854
|
+
__name: "Progress",
|
2855
|
+
props: {
|
2856
|
+
modelValue: Boolean
|
2857
|
+
},
|
2858
|
+
setup(a) {
|
2859
|
+
let t = a, { modelValue: e } = tt(t), s = at(!0), r = at(0), n = null, l = () => {
|
2860
|
+
r.value = 0, s.value = !0, n = setInterval(() => {
|
2861
|
+
if (r.value < 100) {
|
2862
|
+
r.value++;
|
2863
|
+
return;
|
2864
|
+
}
|
2865
|
+
clearInterval(n);
|
2866
|
+
}, 50);
|
2867
|
+
}, i = () => {
|
2868
|
+
clearInterval(n);
|
2869
|
+
let o = 100 - r.value, u = 200, c = 20, h = o / (u / c), g = setInterval(() => {
|
2870
|
+
r.value += h, !(r.value < 100) && (r.value = 100, clearInterval(g), setTimeout(() => {
|
2871
|
+
s.value = !1;
|
2872
|
+
}, 200));
|
2873
|
+
}, c);
|
2874
|
+
};
|
2875
|
+
return le(() => {
|
2876
|
+
e.value && l();
|
2877
|
+
}), ie(() => {
|
2878
|
+
clearInterval(n);
|
2879
|
+
}), P(() => e.value, (o, u) => {
|
2880
|
+
o ? l() : i();
|
2881
|
+
}), (o, u) => T(s) ? (z(), M("div", {
|
2882
|
+
key: 0,
|
2883
|
+
class: "ha-progress",
|
2884
|
+
style: Vt({ width: T(r) + "%" })
|
2885
|
+
}, null, 4)) : ae("", !0);
|
2886
|
+
}
|
2887
|
+
}), Ts = /* @__PURE__ */ _({
|
2888
|
+
__name: "Row",
|
2889
|
+
props: {
|
2890
|
+
gap: {},
|
2891
|
+
direction: {}
|
2892
|
+
},
|
2893
|
+
setup(a) {
|
2894
|
+
let t = a, { gap: e, direction: s } = tt(t), r = ye(() => {
|
2895
|
+
let n = { gap: null };
|
2896
|
+
return e.value && (n.gap = e.value + "px"), n;
|
2897
|
+
});
|
2898
|
+
return (n, l) => (z(), M("div", {
|
2899
|
+
class: Rt(["ha-row", T(s)]),
|
2900
|
+
style: Vt(T(r))
|
2901
|
+
}, [
|
2902
|
+
It(n.$slots, "default")
|
2903
|
+
], 6));
|
2904
|
+
}
|
2905
|
+
});
|
2906
|
+
class Fs {
|
2907
|
+
/**
|
2908
|
+
* 初始化,并绑定自动关闭上下文菜单事件
|
2909
|
+
*/
|
2910
|
+
constructor(t, e = null) {
|
2911
|
+
if (this.closeTriggers = [], this.close = () => {
|
2912
|
+
this.container && (this.container.style.display = "none");
|
2913
|
+
}, this.show = (s) => {
|
2914
|
+
let n = V.parentAbsolute(this.container).getBoundingClientRect(), l = s.clientX - n.left, i = s.clientY - n.top - 2;
|
2915
|
+
this.container.style.display = "block", this.container.style.left = l + "px", this.container.style.top = i + "px";
|
2916
|
+
}, this.dispose = () => {
|
2917
|
+
for (let s = 0; s < this.closeTriggers.length; s++) {
|
2918
|
+
let r = this.closeTriggers[s];
|
2919
|
+
vt.unbind(["click", "scroll"], r, this.close);
|
2920
|
+
}
|
2921
|
+
this.container != null && this.container.removeEventListener("click", this.close), this.container = null, this.closeTriggers = [];
|
2922
|
+
}, t != null && (this.container = t, this.container.addEventListener("click", this.close), e)) {
|
2923
|
+
this.closeTriggers.push(...e);
|
2924
|
+
for (let s = 0; s < this.closeTriggers.length; s++) {
|
2925
|
+
let r = this.closeTriggers[s];
|
2926
|
+
vt.bind(["click", "scroll"], r, this.close);
|
2927
|
+
}
|
2928
|
+
}
|
2929
|
+
}
|
2930
|
+
}
|
2931
|
+
class Rs {
|
2932
|
+
constructor() {
|
2933
|
+
this.events = {}, this.add = (t, e, s, r, n, l) => {
|
2934
|
+
let i = this.events[r];
|
2935
|
+
i || (i = function(o) {
|
2936
|
+
s(o) && (e && e(o), n && o.preventDefault());
|
2937
|
+
}, this.events[r] = i), t.addEventListener(l, i);
|
2938
|
+
}, this.remove = (t, e, s) => {
|
2939
|
+
t.removeEventListener(s, this.events[e]), this.events[e] = null;
|
2940
|
+
}, this.keydown = (t, e, s, r, n = !1) => {
|
2941
|
+
this.add(t, e, s, r, n, "keydown");
|
2942
|
+
}, this.removeKeydown = (t, e) => {
|
2943
|
+
this.remove(t, e, "keydown");
|
2944
|
+
}, this.ctrlS = (t, e) => {
|
2945
|
+
this.keydown(t, e, (s) => s.ctrlKey && s.key == "s", "ctrlS", !0);
|
2946
|
+
}, this.removeCtrlS = (t) => {
|
2947
|
+
this.removeKeydown(t, "ctrlS");
|
2948
|
+
}, this.ctrlEnter = (t, e) => {
|
2949
|
+
this.keydown(t, e, (s) => s.ctrlKey && s.key == "Enter", "ctrlEnter");
|
2950
|
+
}, this.removeCtrlEnter = (t) => {
|
2951
|
+
this.removeKeydown(t, "ctrlEnter");
|
2952
|
+
}, this.lastKeyTime = null, this.isKeyLastUp = !1, this.doubleKey = (t, e, s, r = !1) => {
|
2953
|
+
this.keydown(t, e, (n) => {
|
2954
|
+
if (n.key != s)
|
2955
|
+
return !1;
|
2956
|
+
let l = (/* @__PURE__ */ new Date()).getTime(), i = l - this.lastKeyTime;
|
2957
|
+
return this.lastKeyTime = l, i < 200 && this.isKeyLastUp;
|
2958
|
+
}, "double" + s, r), this.keyup(t, () => {
|
2959
|
+
this.isKeyLastUp = !0;
|
2960
|
+
}, (n) => n.key == s ? !0 : (this.isKeyLastUp = !1, !1), "double" + s + ".keyup");
|
2961
|
+
}, this.removeDoubleKey = (t, e) => {
|
2962
|
+
this.removeKeydown(t, "double" + e), this.removeKeyup(t, "double" + e + ".keyup");
|
2963
|
+
}, this.keyup = (t, e, s, r, n = !1) => {
|
2964
|
+
this.add(t, e, s, r, n, "keyup");
|
2965
|
+
}, this.removeKeyup = (t, e) => {
|
2966
|
+
this.remove(t, e, "keyup");
|
2967
|
+
}, this.isCtrl = !1, this.ctrl = (t) => {
|
2968
|
+
this.keydown(t, () => this.isCtrl = !0, (e) => e.ctrlKey, "ctrlDown"), this.keyup(t, () => this.isCtrl = !1, (e) => e.key == "Control", "ctrlUp");
|
2969
|
+
}, this.removeCtrl = (t) => {
|
2970
|
+
this.removeKeydown(t, "ctrlDown"), this.removeKeyup(t, "ctrlUp");
|
2971
|
+
}, this.timer = null, this.touchStart = null, this.touch = (t, e) => {
|
2972
|
+
this.touchStart = function(s) {
|
2973
|
+
debugger;
|
2974
|
+
return this.timer = setTimeout(() => {
|
2975
|
+
s.preventDefault(), e();
|
2976
|
+
}, 800), !0;
|
2977
|
+
}, t.addEventListener("touchstart", this.touchStart), t.addEventListener("touchmove", this.touchEnd), t.addEventListener("touchend", this.touchEnd);
|
2978
|
+
}, this.removeTouch = (t) => {
|
2979
|
+
debugger;
|
2980
|
+
t.removeEventListener("touchstart", this.touchStart), t.removeEventListener("touchmove", this.touchEnd), t.removeEventListener("touchend", this.touchEnd);
|
2981
|
+
};
|
2982
|
+
}
|
2983
|
+
touchEnd() {
|
2984
|
+
clearTimeout(this.timer);
|
2507
2985
|
}
|
2508
2986
|
}
|
2987
|
+
class Vs {
|
2988
|
+
constructor() {
|
2989
|
+
this.resizeObserver = null, this.resizeHandler = null, this.resize = (t, e, s = 100) => {
|
2990
|
+
this.resizeHandler = (r) => {
|
2991
|
+
this.debounce(e, s, r);
|
2992
|
+
}, this.resizeObserver = new ResizeObserver(this.resizeHandler), this.resizeObserver.observe(t);
|
2993
|
+
}, this.unresize = (t) => {
|
2994
|
+
this.resizeObserver && this.resizeObserver.unobserve(t);
|
2995
|
+
}, this.debounce = (t, e, s = null) => {
|
2996
|
+
this.lastDebounceTime == null && (this.lastDebounceTime = q.getTimestamp());
|
2997
|
+
let r = q.getTimestamp();
|
2998
|
+
this.lastDebounceTimeout != null && clearTimeout(this.lastDebounceTimeout), this.lastDebounceTimeout = setTimeout(t, e, s), this.lastDebounceTime = r;
|
2999
|
+
}, this.clearDebounce = () => {
|
3000
|
+
clearTimeout(this.lastDebounceTimeout);
|
3001
|
+
}, this.throttle = () => {
|
3002
|
+
};
|
3003
|
+
}
|
3004
|
+
}
|
3005
|
+
let Ks = async (a) => {
|
3006
|
+
Se(a), await os();
|
3007
|
+
};
|
2509
3008
|
export {
|
2510
|
-
|
2511
|
-
|
2512
|
-
|
2513
|
-
|
2514
|
-
|
2515
|
-
|
2516
|
-
|
2517
|
-
|
2518
|
-
|
2519
|
-
|
2520
|
-
|
2521
|
-
|
2522
|
-
|
2523
|
-
|
2524
|
-
|
2525
|
-
|
2526
|
-
|
2527
|
-
|
2528
|
-
|
2529
|
-
|
2530
|
-
|
2531
|
-
|
2532
|
-
|
2533
|
-
|
2534
|
-
|
2535
|
-
|
2536
|
-
|
2537
|
-
|
2538
|
-
|
3009
|
+
rt as ArrayHelper,
|
3010
|
+
Os as ComponentHelper,
|
3011
|
+
Is as CookieHelper,
|
3012
|
+
wt as DictionaryHelper,
|
3013
|
+
V as DomHelper,
|
3014
|
+
I as DriverFactory,
|
3015
|
+
vt as EventHelper,
|
3016
|
+
Vs as EventUtility,
|
3017
|
+
ke as ExcelFactory,
|
3018
|
+
es as FeatureFactory,
|
3019
|
+
St as FileHelper,
|
3020
|
+
Us as HaCode,
|
3021
|
+
Ds as HaCol,
|
3022
|
+
Ls as HaCompare,
|
3023
|
+
$s as HaContainer,
|
3024
|
+
Ns as HaEmpty,
|
3025
|
+
Ps as HaProgress,
|
3026
|
+
Ts as HaRow,
|
3027
|
+
Ae as HaloHttp,
|
3028
|
+
ns as HasherFactory,
|
3029
|
+
Gt as HtmlHelper,
|
3030
|
+
Ue as HttpFactory,
|
3031
|
+
Ie as HttpRequest,
|
3032
|
+
re as HttpResponse,
|
3033
|
+
As as I18nHelper,
|
3034
|
+
Zt as ImageHelper,
|
3035
|
+
ut as JsonHelper,
|
3036
|
+
Rs as KeyboardUtility,
|
3037
|
+
Ht as MathHelper,
|
3038
|
+
_t as MicroHelper,
|
3039
|
+
xt as MountHelper,
|
3040
|
+
Fs as MouseUtility,
|
3041
|
+
K as ObjectHelper,
|
3042
|
+
is as ProviderFactory,
|
3043
|
+
kt as ScriptHelper,
|
3044
|
+
ee as ScrollHelper,
|
3045
|
+
mt as SettingService,
|
3046
|
+
Oe as SignHelper,
|
3047
|
+
Te as SignerFactory,
|
3048
|
+
ze as SsoFactory,
|
3049
|
+
E as StorageHelper,
|
3050
|
+
B as StringHelper,
|
3051
|
+
te as TaskHelper,
|
3052
|
+
q as TimeHelper,
|
3053
|
+
Ct as TreeHelper,
|
3054
|
+
x as TypeHelper,
|
3055
|
+
O as UrlHelper,
|
3056
|
+
Ks as createHalo,
|
3057
|
+
ne as encoderFactory,
|
3058
|
+
j as http,
|
3059
|
+
as as httpFactory,
|
3060
|
+
js as loadEcharts,
|
3061
|
+
bt as loader,
|
3062
|
+
pt as messager,
|
3063
|
+
N as moment,
|
3064
|
+
os as setHttp,
|
3065
|
+
Se as setMessager,
|
3066
|
+
H as useConfigStore,
|
3067
|
+
Bs as useDriverStore,
|
3068
|
+
Ce as useEnvStore,
|
3069
|
+
se as useLogStore,
|
3070
|
+
ue as useSettingStore,
|
3071
|
+
Ee as useSocketStore,
|
3072
|
+
ce as useUserStore
|
2539
3073
|
};
|