yc-vep-ui 0.3.7 → 0.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Icons/index.d.ts +4 -0
- package/dist/components/Icons/svg/Bell.vue.d.ts +2 -0
- package/dist/components/Icons/svg/Clock.vue.d.ts +2 -0
- package/dist/components/Icons/svg/Info.vue.d.ts +2 -0
- package/dist/components/Icons/svg/Share.vue.d.ts +2 -0
- package/dist/components/Upload/index.vue.d.ts +5 -3
- package/dist/components/YcApproval/History.vue.d.ts +8 -0
- package/dist/components/YcApproval/ReadScope.vue.d.ts +10 -0
- package/dist/components/YcApproval/Remind.vue.d.ts +44 -0
- package/dist/components/YcApproval/api.d.ts +1 -0
- package/dist/components/YcApproval/useBtnActive.d.ts +6 -0
- package/dist/components/YcApproval/useDetail.d.ts +103 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/entry-D-OGEn3a.js +4792 -0
- package/dist/entry.d.ts +14 -17
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.js +2 -2
- package/dist/hooks/useDictionary.d.ts +25 -0
- package/dist/hooks/useRoute.d.ts +20 -0
- package/dist/hooks/useUser.d.ts +4 -0
- package/dist/index.css +16 -7
- package/dist/utils/rsaCrypto.d.ts +10 -0
- package/dist/vep-ui.js +2 -2
- package/package.json +3 -2
- package/dist/entry-C2idE4D3.js +0 -2275
|
@@ -0,0 +1,4792 @@
|
|
|
1
|
+
import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r, createElementBlock as i, createElementVNode as a, createPropsRestProxy as o, createSlots as s, createTextVNode as c, createVNode as l, defineComponent as u, getCurrentInstance as d, h as f, isRef as p, isVNode as m, mergeModels as h, mergeProps as g, nextTick as _, normalizeClass as v, normalizeStyle as y, onMounted as b, onUnmounted as x, openBlock as S, reactive as C, readonly as w, ref as T, renderList as E, renderSlot as D, resolveComponent as O, resolveDirective as ee, resolveDynamicComponent as k, setBlockTracking as te, shallowRef as A, toDisplayString as j, toRaw as M, toValue as N, unref as P, useAttrs as ne, useCssVars as re, useModel as ie, watch as F, watchEffect as ae, withCtx as I, withDirectives as oe, withKeys as se, withModifiers as ce } from "vue";
|
|
2
|
+
import { AiEditor as le } from "aieditor";
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var ue = Object.defineProperty, L = (e, t) => {
|
|
5
|
+
let n = {};
|
|
6
|
+
for (var r in e) ue(n, r, {
|
|
7
|
+
get: e[r],
|
|
8
|
+
enumerable: !0
|
|
9
|
+
});
|
|
10
|
+
return t || ue(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
11
|
+
}, de = { class: /* @__PURE__ */ v({ bodyClass: !0 }) }, fe = /* @__PURE__ */ u({
|
|
12
|
+
__name: "index",
|
|
13
|
+
props: {
|
|
14
|
+
title: {},
|
|
15
|
+
bodyClass: {},
|
|
16
|
+
hideBorder: { type: Boolean },
|
|
17
|
+
icon: {}
|
|
18
|
+
},
|
|
19
|
+
setup(e) {
|
|
20
|
+
let i = t(() => ({
|
|
21
|
+
display: "flex",
|
|
22
|
+
alignItems: "center",
|
|
23
|
+
gap: "4px",
|
|
24
|
+
borderBottom: e.hideBorder ? "1px solid #e5e7eb" : "none"
|
|
25
|
+
}));
|
|
26
|
+
return (t, o) => {
|
|
27
|
+
let l = O("el-icon"), u = O("el-card");
|
|
28
|
+
return S(), n(u, g(t.$attrs, { class: {
|
|
29
|
+
"ui-card": !0,
|
|
30
|
+
hideBorder: e.hideBorder
|
|
31
|
+
} }), s({
|
|
32
|
+
default: I(() => [a("div", de, [D(t.$slots, "default", {}, void 0, !0)])]),
|
|
33
|
+
_: 2
|
|
34
|
+
}, [e.title && e.title?.length > 0 ? {
|
|
35
|
+
name: "header",
|
|
36
|
+
fn: I(() => [a("div", { style: y(i.value) }, [e.icon ? (S(), n(l, { key: 0 }, {
|
|
37
|
+
default: I(() => [(S(), n(k(e.icon), { color: "#2563eb" }))]),
|
|
38
|
+
_: 1
|
|
39
|
+
})) : r("", !0), o[0] || (te(-1, !0), (o[0] = a("h4", null, [c(j(e.title), 1)])).cacheIndex = 0, te(1), o[0])], 4)]),
|
|
40
|
+
key: "0"
|
|
41
|
+
} : void 0]), 1040, ["class"]);
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
}), R = (e, t) => {
|
|
45
|
+
let n = e.__vccOpts || e;
|
|
46
|
+
for (let [e, r] of t) n[e] = r;
|
|
47
|
+
return n;
|
|
48
|
+
}, pe = /* @__PURE__ */ L({ default: () => me }), me = /* @__PURE__ */ R(fe, [["__scopeId", "data-v-6ebb01d7"]]), z = {
|
|
49
|
+
get Button() {
|
|
50
|
+
return $()?.resolveComponent?.("el-button") || "el-button";
|
|
51
|
+
},
|
|
52
|
+
get Link() {
|
|
53
|
+
return $()?.resolveComponent?.("el-link") || "el-link";
|
|
54
|
+
},
|
|
55
|
+
get Tag() {
|
|
56
|
+
return $()?.resolveComponent?.("el-tag") || "el-tag";
|
|
57
|
+
},
|
|
58
|
+
get Select() {
|
|
59
|
+
return $()?.resolveComponent?.("el-select") || "el-select";
|
|
60
|
+
},
|
|
61
|
+
get DatePicker() {
|
|
62
|
+
return $()?.resolveComponent?.("el-date-picker") || "el-date-picker";
|
|
63
|
+
},
|
|
64
|
+
get Input() {
|
|
65
|
+
return $()?.resolveComponent?.("el-input") || "el-input";
|
|
66
|
+
},
|
|
67
|
+
get InputTag() {
|
|
68
|
+
return $()?.resolveComponent?.("el-input-tag") || "el-input-tag";
|
|
69
|
+
},
|
|
70
|
+
get TimeSelect() {
|
|
71
|
+
return $()?.resolveComponent?.("el-time-select") || "el-time-select";
|
|
72
|
+
},
|
|
73
|
+
get InputNumber() {
|
|
74
|
+
return $()?.resolveComponent?.("el-input-number") || "el-input-number";
|
|
75
|
+
},
|
|
76
|
+
get RadioGroup() {
|
|
77
|
+
return $()?.resolveComponent?.("el-radio-group") || "el-radio-group";
|
|
78
|
+
},
|
|
79
|
+
get Text() {
|
|
80
|
+
return $()?.resolveComponent?.("el-text") || "el-text";
|
|
81
|
+
},
|
|
82
|
+
get Card() {
|
|
83
|
+
return $()?.resolveComponent?.("el-card") || "el-card";
|
|
84
|
+
},
|
|
85
|
+
get Table() {
|
|
86
|
+
return $()?.resolveComponent?.("el-table") || "el-table";
|
|
87
|
+
},
|
|
88
|
+
get TableColumn() {
|
|
89
|
+
return $()?.resolveComponent?.("el-table-column") || "el-table-column";
|
|
90
|
+
},
|
|
91
|
+
get Pagination() {
|
|
92
|
+
return $()?.resolveComponent?.("el-pagination") || "el-pagination";
|
|
93
|
+
},
|
|
94
|
+
get Form() {
|
|
95
|
+
return $()?.resolveComponent?.("el-form") || "el-form";
|
|
96
|
+
},
|
|
97
|
+
get FormItem() {
|
|
98
|
+
return $()?.resolveComponent?.("el-form-item") || "el-form-item";
|
|
99
|
+
},
|
|
100
|
+
get Row() {
|
|
101
|
+
return $()?.resolveComponent?.("el-row") || "el-row";
|
|
102
|
+
},
|
|
103
|
+
get Col() {
|
|
104
|
+
return $()?.resolveComponent?.("el-col") || "el-col";
|
|
105
|
+
},
|
|
106
|
+
get Icon() {
|
|
107
|
+
return $()?.resolveComponent?.("el-icon") || "el-icon";
|
|
108
|
+
},
|
|
109
|
+
get TreeV2() {
|
|
110
|
+
return $()?.resolveComponent?.("el-tree-v2") || "el-tree-v2";
|
|
111
|
+
},
|
|
112
|
+
get Dropdown() {
|
|
113
|
+
return $()?.resolveComponent?.("el-dropdown") || "el-dropdown";
|
|
114
|
+
},
|
|
115
|
+
get DropdownMenu() {
|
|
116
|
+
return $()?.resolveComponent?.("el-dropdown-menu") || "el-dropdown-menu";
|
|
117
|
+
},
|
|
118
|
+
get DropdownItem() {
|
|
119
|
+
return $()?.resolveComponent?.("el-dropdown-item") || "el-dropdown-item";
|
|
120
|
+
},
|
|
121
|
+
get Dialog() {
|
|
122
|
+
return $()?.resolveComponent?.("el-dialog") || "el-dialog";
|
|
123
|
+
},
|
|
124
|
+
get ButtonGroup() {
|
|
125
|
+
return $()?.resolveComponent?.("el-button-group") || "el-button-group";
|
|
126
|
+
},
|
|
127
|
+
get Descriptions() {
|
|
128
|
+
return $()?.resolveComponent?.("el-descriptions") || "el-descriptions";
|
|
129
|
+
},
|
|
130
|
+
get DescriptionsItem() {
|
|
131
|
+
return $()?.resolveComponent?.("el-descriptions-item") || "el-descriptions-item";
|
|
132
|
+
},
|
|
133
|
+
get Message() {
|
|
134
|
+
return $()?.config?.globalProperties?.$message || {
|
|
135
|
+
error: (e) => console.error("[Message.error]", e),
|
|
136
|
+
success: (e) => console.log("[Message.success]", e),
|
|
137
|
+
warning: (e) => console.warn("[Message.warning]", e)
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
};
|
|
141
|
+
//#endregion
|
|
142
|
+
//#region src/components/utils/render.ts
|
|
143
|
+
function B() {
|
|
144
|
+
let e = $();
|
|
145
|
+
return e?.h ? e.h : function(e, t, n) {
|
|
146
|
+
return console.warn("[yc-vep-ui] Vue not initialized. Call setHostVue(Vue) before using components."), null;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
function he(e) {
|
|
150
|
+
let t = B();
|
|
151
|
+
return t ? t("div", { style: {
|
|
152
|
+
display: "flex",
|
|
153
|
+
flexDirection: "row",
|
|
154
|
+
flexWrap: "wrap",
|
|
155
|
+
gap: "8px"
|
|
156
|
+
} }, (Array.isArray(e) ? e : [e]).map((e) => {
|
|
157
|
+
let { text: n, ...r } = e;
|
|
158
|
+
return t(z.Button, {
|
|
159
|
+
...r,
|
|
160
|
+
link: !0,
|
|
161
|
+
size: "small",
|
|
162
|
+
type: e.type || "default"
|
|
163
|
+
}, () => n);
|
|
164
|
+
})) : null;
|
|
165
|
+
}
|
|
166
|
+
function ge(e) {
|
|
167
|
+
let t = B();
|
|
168
|
+
return t ? Array.isArray(e) ? t("div", { style: {
|
|
169
|
+
display: "flex",
|
|
170
|
+
gap: "8px",
|
|
171
|
+
flexDirection: "row",
|
|
172
|
+
flexWrap: "wrap"
|
|
173
|
+
} }, e.map((e) => t(z.Link, {
|
|
174
|
+
...e,
|
|
175
|
+
type: e.type || "primary"
|
|
176
|
+
}, () => t(z.Text, {
|
|
177
|
+
lineClamp: e?.lineClamp,
|
|
178
|
+
type: e.type || "primary"
|
|
179
|
+
}, () => e.prop)))) : t(z.Link, {
|
|
180
|
+
...e,
|
|
181
|
+
type: e.type || "primary"
|
|
182
|
+
}, () => t(z.Text, {
|
|
183
|
+
lineClamp: e?.lineClamp,
|
|
184
|
+
type: e.type || "primary"
|
|
185
|
+
}, () => e.prop)) : null;
|
|
186
|
+
}
|
|
187
|
+
function _e(e) {
|
|
188
|
+
let t = B();
|
|
189
|
+
return t ? t("div", { style: {
|
|
190
|
+
display: "flex",
|
|
191
|
+
gap: "4px",
|
|
192
|
+
flexDirection: "row",
|
|
193
|
+
flexWrap: "wrap"
|
|
194
|
+
} }, (Array.isArray(e.prop) ? e.prop : [e.prop]).map((n) => t(z.Tag, e, () => n))) : null;
|
|
195
|
+
}
|
|
196
|
+
function ve(e) {
|
|
197
|
+
let t = B();
|
|
198
|
+
return t ? t(z.Tag, { ...e }) : null;
|
|
199
|
+
}
|
|
200
|
+
function ye(e) {
|
|
201
|
+
let t = B();
|
|
202
|
+
return t ? t(z.Select, {
|
|
203
|
+
style: { minWidth: "160px" },
|
|
204
|
+
...e,
|
|
205
|
+
placeholder: "请选择",
|
|
206
|
+
filterable: !0
|
|
207
|
+
}) : null;
|
|
208
|
+
}
|
|
209
|
+
function be(e) {
|
|
210
|
+
let t = B();
|
|
211
|
+
if (!t) return null;
|
|
212
|
+
let n = e?.type === "datetime" ? "YYYY-MM-DD HH:mm:ss" : "YYYY-MM-DD";
|
|
213
|
+
return t(z.DatePicker, {
|
|
214
|
+
format: n,
|
|
215
|
+
valueFormat: n,
|
|
216
|
+
startPlaceholder: "开始时间",
|
|
217
|
+
endPlaceholder: "结束时间",
|
|
218
|
+
...e,
|
|
219
|
+
placeholder: "请选择",
|
|
220
|
+
"onUpdate:modelValue": (t) => e?.onChange?.(t)
|
|
221
|
+
});
|
|
222
|
+
}
|
|
223
|
+
function xe(e) {
|
|
224
|
+
let t = B();
|
|
225
|
+
if (!t) return null;
|
|
226
|
+
let { start: n = "00:00", end: r = "23:30", ...i } = e;
|
|
227
|
+
return t(z.TimeSelect, {
|
|
228
|
+
start: n,
|
|
229
|
+
end: r,
|
|
230
|
+
...i,
|
|
231
|
+
placeholder: "请选择",
|
|
232
|
+
filterable: !0
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
function Se(e) {
|
|
236
|
+
let t = B();
|
|
237
|
+
return t ? t(z.Input, {
|
|
238
|
+
...e,
|
|
239
|
+
placeholder: "请输入"
|
|
240
|
+
}) : null;
|
|
241
|
+
}
|
|
242
|
+
function Ce(e) {
|
|
243
|
+
let t = B();
|
|
244
|
+
if (!t) return null;
|
|
245
|
+
let { align: n = "left", controlsPosition: r = "right", ...i } = e, a = {
|
|
246
|
+
...e?.style || {},
|
|
247
|
+
width: "100%"
|
|
248
|
+
};
|
|
249
|
+
return t(z.InputNumber, {
|
|
250
|
+
align: n,
|
|
251
|
+
style: a,
|
|
252
|
+
controlsPosition: r,
|
|
253
|
+
placeholder: "请输入",
|
|
254
|
+
...i
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
function we(e) {
|
|
258
|
+
let t = B();
|
|
259
|
+
if (!t) return null;
|
|
260
|
+
let { rows: n = 1, ...r } = e;
|
|
261
|
+
return t(z.Input, {
|
|
262
|
+
placeholder: "请输入",
|
|
263
|
+
rows: n,
|
|
264
|
+
...r,
|
|
265
|
+
type: "textarea"
|
|
266
|
+
});
|
|
267
|
+
}
|
|
268
|
+
function Te(e) {
|
|
269
|
+
let t = B();
|
|
270
|
+
return t ? t(z.InputTag, {
|
|
271
|
+
placeholder: "请输入",
|
|
272
|
+
...e,
|
|
273
|
+
clearable: !1
|
|
274
|
+
}) : null;
|
|
275
|
+
}
|
|
276
|
+
function Ee(e) {
|
|
277
|
+
let t = B();
|
|
278
|
+
return t ? t(Vt || Bt, e) : null;
|
|
279
|
+
}
|
|
280
|
+
function De(e) {
|
|
281
|
+
let t = B();
|
|
282
|
+
return t ? t(z.RadioGroup, e) : null;
|
|
283
|
+
}
|
|
284
|
+
function Oe(e) {
|
|
285
|
+
let t = B();
|
|
286
|
+
return t ? t(z.Text, e, () => typeof e == "string" ? e : e.prop ?? "") : null;
|
|
287
|
+
}
|
|
288
|
+
function ke(e) {
|
|
289
|
+
let t = B();
|
|
290
|
+
return t ? t(kn || On, {
|
|
291
|
+
placeholder: "请选择",
|
|
292
|
+
...e,
|
|
293
|
+
searchable: !0
|
|
294
|
+
}) : null;
|
|
295
|
+
}
|
|
296
|
+
function Ae(e) {
|
|
297
|
+
let t = B();
|
|
298
|
+
return t ? t(Fn || Pn, e) : null;
|
|
299
|
+
}
|
|
300
|
+
var je = {
|
|
301
|
+
button: he,
|
|
302
|
+
link: ge,
|
|
303
|
+
tag: _e,
|
|
304
|
+
switch: ve,
|
|
305
|
+
select: ye,
|
|
306
|
+
datePicker: be,
|
|
307
|
+
timeSelect: xe,
|
|
308
|
+
input: Se,
|
|
309
|
+
inputNumber: Ce,
|
|
310
|
+
textarea: we,
|
|
311
|
+
inputTag: Te,
|
|
312
|
+
editor: Ee,
|
|
313
|
+
radio: De,
|
|
314
|
+
text: Oe,
|
|
315
|
+
staffSelect: ke,
|
|
316
|
+
upload: Ae
|
|
317
|
+
}, Me = /* @__PURE__ */ u({
|
|
318
|
+
name: "UiColumn",
|
|
319
|
+
__name: "UiColumn",
|
|
320
|
+
props: {
|
|
321
|
+
key: {},
|
|
322
|
+
data: {},
|
|
323
|
+
column: {},
|
|
324
|
+
align: {},
|
|
325
|
+
size: {}
|
|
326
|
+
},
|
|
327
|
+
emits: ["update:data"],
|
|
328
|
+
setup(t, { emit: r }) {
|
|
329
|
+
let a = r, o = t;
|
|
330
|
+
function s(e, t, n) {
|
|
331
|
+
let r = {};
|
|
332
|
+
Object.keys(je).forEach((i) => {
|
|
333
|
+
let o = i;
|
|
334
|
+
r[o] = (r) => {
|
|
335
|
+
let i = Array.isArray(r) ? r : {
|
|
336
|
+
placeholder: "请输入",
|
|
337
|
+
filterable: !0,
|
|
338
|
+
...r,
|
|
339
|
+
prop: r?.prop || e[n.prop],
|
|
340
|
+
modelValue: r?.prop || e[n.prop],
|
|
341
|
+
onChange: r?.onChange || ((e) => a("update:data", t, n.prop, e)),
|
|
342
|
+
onInput: r?.onInput || ((e) => a("update:data", t, n.prop, e))
|
|
343
|
+
};
|
|
344
|
+
return je[o](i);
|
|
345
|
+
};
|
|
346
|
+
});
|
|
347
|
+
let i = n.render ? n.render({
|
|
348
|
+
data: e,
|
|
349
|
+
index: t,
|
|
350
|
+
h: r,
|
|
351
|
+
column: n
|
|
352
|
+
}) : null;
|
|
353
|
+
return i ? typeof i == "object" ? i : f("div", { innerHTML: String(i) }) : null;
|
|
354
|
+
}
|
|
355
|
+
return (r, a) => {
|
|
356
|
+
let l = O("UiColumn", !0), u = O("el-table-column"), d = O("el-text");
|
|
357
|
+
return t.column?.children && t.column?.children?.length > 0 ? (S(), n(u, {
|
|
358
|
+
key: 0,
|
|
359
|
+
label: t.column.label,
|
|
360
|
+
align: o.align
|
|
361
|
+
}, {
|
|
362
|
+
default: I(() => [(S(!0), i(e, null, E(t.column.children, (e) => (S(), n(l, g({
|
|
363
|
+
column: e,
|
|
364
|
+
data: o.data
|
|
365
|
+
}, { ref_for: !0 }, r.$attrs, { align: o.align }), null, 16, [
|
|
366
|
+
"column",
|
|
367
|
+
"data",
|
|
368
|
+
"align"
|
|
369
|
+
]))), 256))]),
|
|
370
|
+
_: 1
|
|
371
|
+
}, 8, ["label", "align"])) : (S(), n(u, {
|
|
372
|
+
key: 1,
|
|
373
|
+
prop: String(t.column.prop),
|
|
374
|
+
label: t.column.label,
|
|
375
|
+
"column-key": String(t.column.prop),
|
|
376
|
+
align: o.align,
|
|
377
|
+
width: t.column.width,
|
|
378
|
+
"show-overflow-tooltip": t.column.showOverflowTooltip
|
|
379
|
+
}, {
|
|
380
|
+
default: I(({ row: e, $index: r }) => [t.column.render ? (S(), n(k(s(e, r, t.column)), {
|
|
381
|
+
key: 0,
|
|
382
|
+
align: o.align,
|
|
383
|
+
size: o.size
|
|
384
|
+
}, null, 8, ["align", "size"])) : (S(), n(d, {
|
|
385
|
+
key: 1,
|
|
386
|
+
"line-clamp": t.column?.lineClamp || 2
|
|
387
|
+
}, {
|
|
388
|
+
default: I(() => [c(j(e[t.column.prop]), 1)]),
|
|
389
|
+
_: 2
|
|
390
|
+
}, 1032, ["line-clamp"]))]),
|
|
391
|
+
_: 1
|
|
392
|
+
}, 8, [
|
|
393
|
+
"prop",
|
|
394
|
+
"label",
|
|
395
|
+
"column-key",
|
|
396
|
+
"align",
|
|
397
|
+
"width",
|
|
398
|
+
"show-overflow-tooltip"
|
|
399
|
+
]));
|
|
400
|
+
};
|
|
401
|
+
}
|
|
402
|
+
}), Ne = /* @__PURE__ */ u({
|
|
403
|
+
__name: "index",
|
|
404
|
+
props: {
|
|
405
|
+
loading: {
|
|
406
|
+
type: [Boolean, Object],
|
|
407
|
+
default: !1
|
|
408
|
+
},
|
|
409
|
+
border: {
|
|
410
|
+
type: Boolean,
|
|
411
|
+
default: !1
|
|
412
|
+
},
|
|
413
|
+
size: { default: "default" },
|
|
414
|
+
data: { default: () => C([]) },
|
|
415
|
+
columns: {},
|
|
416
|
+
align: { default: "left" },
|
|
417
|
+
hidePagination: {
|
|
418
|
+
type: Boolean,
|
|
419
|
+
default: !1
|
|
420
|
+
},
|
|
421
|
+
pagination: { default: () => C({
|
|
422
|
+
page: 1,
|
|
423
|
+
pageSize: 10,
|
|
424
|
+
total: 0,
|
|
425
|
+
pageSizes: [
|
|
426
|
+
10,
|
|
427
|
+
20,
|
|
428
|
+
50
|
|
429
|
+
]
|
|
430
|
+
}) },
|
|
431
|
+
currentChange: { type: Function },
|
|
432
|
+
selectionChange: { type: Function },
|
|
433
|
+
selectable: { type: Function },
|
|
434
|
+
defaultCheckedKeys: {},
|
|
435
|
+
rowKey: {}
|
|
436
|
+
},
|
|
437
|
+
emits: ["pagination"],
|
|
438
|
+
setup(a, { emit: s }) {
|
|
439
|
+
let c = s, l = o(a, [
|
|
440
|
+
"loading",
|
|
441
|
+
"border",
|
|
442
|
+
"align",
|
|
443
|
+
"hidePagination",
|
|
444
|
+
"pagination",
|
|
445
|
+
"data",
|
|
446
|
+
"size"
|
|
447
|
+
]), u = T(), d = t(() => N(l.columns)?.some((e) => e.type === "index")), f = t(() => N(l.columns)?.some((e) => e.type === "selection")), p = t(() => !l.columns || !l.columns.length ? [] : l.columns.filter((e) => e.type !== "index" && e.type !== "selection"));
|
|
448
|
+
F(() => [l.defaultCheckedKeys, a.data], ([e, t]) => {
|
|
449
|
+
!e?.length || !t?.length || _(() => {
|
|
450
|
+
if (!u.value) return;
|
|
451
|
+
let n = t.filter((t) => e.includes(t.id));
|
|
452
|
+
u.value.clearSelection(), n.forEach((e) => u.value?.toggleRowSelection(e, !0));
|
|
453
|
+
});
|
|
454
|
+
}, { immediate: !0 });
|
|
455
|
+
function m(e, t) {
|
|
456
|
+
a.pagination.page = e || a.pagination.page, a.pagination.pageSize = t || a.pagination.pageSize, c("pagination", N(a.pagination));
|
|
457
|
+
}
|
|
458
|
+
function h(e, t, n) {
|
|
459
|
+
a.data[e] && (a.data[e] = {
|
|
460
|
+
...a.data[e],
|
|
461
|
+
[t]: n
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
return (t, o) => {
|
|
465
|
+
let s = O("el-table-column"), c = O("el-table"), _ = O("el-pagination"), v = ee("loading");
|
|
466
|
+
return S(), i("div", null, [
|
|
467
|
+
oe((S(), n(c, g({ border: a.border }, t.$attrs, {
|
|
468
|
+
data: a.data,
|
|
469
|
+
lazy: !0,
|
|
470
|
+
class: "ui-table",
|
|
471
|
+
fit: "",
|
|
472
|
+
ref_key: "tableRef",
|
|
473
|
+
ref: u
|
|
474
|
+
}), {
|
|
475
|
+
default: I(() => [
|
|
476
|
+
f.value ? (S(), n(s, {
|
|
477
|
+
key: 0,
|
|
478
|
+
type: "selection",
|
|
479
|
+
selectable: l.selectable,
|
|
480
|
+
"column-key": "selection_0",
|
|
481
|
+
align: a.align,
|
|
482
|
+
fixed: "left"
|
|
483
|
+
}, null, 8, ["selectable", "align"])) : r("", !0),
|
|
484
|
+
d.value ? (S(), n(s, {
|
|
485
|
+
key: 1,
|
|
486
|
+
fixed: "left",
|
|
487
|
+
type: "index",
|
|
488
|
+
label: "序号",
|
|
489
|
+
width: "60",
|
|
490
|
+
"column-key": "index_1",
|
|
491
|
+
align: a.align
|
|
492
|
+
}, null, 8, ["align"])) : r("", !0),
|
|
493
|
+
(S(!0), i(e, null, E(p.value, (e, t) => (S(), n(Me, {
|
|
494
|
+
key: t + "column_" + e?.prop?.toString(),
|
|
495
|
+
column: e,
|
|
496
|
+
data: a.data,
|
|
497
|
+
align: a.align,
|
|
498
|
+
"onUpdate:data": h,
|
|
499
|
+
size: a.size
|
|
500
|
+
}, null, 8, [
|
|
501
|
+
"column",
|
|
502
|
+
"data",
|
|
503
|
+
"align",
|
|
504
|
+
"size"
|
|
505
|
+
]))), 128))
|
|
506
|
+
]),
|
|
507
|
+
_: 1
|
|
508
|
+
}, 16, ["border", "data"])), [[v, a.loading]]),
|
|
509
|
+
a.hidePagination ? r("", !0) : (S(), n(_, {
|
|
510
|
+
key: 0,
|
|
511
|
+
class: "ui-pagination",
|
|
512
|
+
size: "small",
|
|
513
|
+
background: "",
|
|
514
|
+
layout: "total, sizes, prev, pager, next, jumper",
|
|
515
|
+
"page-sizes": a.pagination?.pageSizes || [
|
|
516
|
+
10,
|
|
517
|
+
20,
|
|
518
|
+
50
|
|
519
|
+
],
|
|
520
|
+
"page-size": a.pagination.pageSize,
|
|
521
|
+
"onUpdate:pageSize": o[0] ||= (e) => a.pagination.pageSize = e,
|
|
522
|
+
"current-page": a.pagination.page,
|
|
523
|
+
"onUpdate:currentPage": o[1] ||= (e) => a.pagination.page = e,
|
|
524
|
+
total: a.pagination.total,
|
|
525
|
+
"onUpdate:total": o[2] ||= (e) => a.pagination.total = e,
|
|
526
|
+
onChange: m
|
|
527
|
+
}, null, 8, [
|
|
528
|
+
"page-sizes",
|
|
529
|
+
"page-size",
|
|
530
|
+
"current-page",
|
|
531
|
+
"total"
|
|
532
|
+
])),
|
|
533
|
+
D(t.$slots, "default", {}, void 0, !0)
|
|
534
|
+
]);
|
|
535
|
+
};
|
|
536
|
+
}
|
|
537
|
+
}), Pe = /* @__PURE__ */ L({ default: () => Fe }), Fe = /* @__PURE__ */ R(Ne, [["__scopeId", "data-v-adf869c1"]]), Ie = ["src"], Le = /* @__PURE__ */ u({
|
|
538
|
+
__name: "Icon",
|
|
539
|
+
props: {
|
|
540
|
+
name: {},
|
|
541
|
+
url: {},
|
|
542
|
+
size: {}
|
|
543
|
+
},
|
|
544
|
+
setup(e) {
|
|
545
|
+
return (t, a) => e.name ? (S(), n(k(t.$attrs.component || e.name), g({ key: 0 }, t.$attrs, { style: {
|
|
546
|
+
width: "100%",
|
|
547
|
+
height: "100%"
|
|
548
|
+
} }), null, 16)) : e.url ? (S(), i("img", {
|
|
549
|
+
key: 1,
|
|
550
|
+
src: e.url,
|
|
551
|
+
style: y({
|
|
552
|
+
width: e.size,
|
|
553
|
+
height: e.size
|
|
554
|
+
})
|
|
555
|
+
}, null, 12, Ie)) : r("", !0);
|
|
556
|
+
}
|
|
557
|
+
}), Re = {
|
|
558
|
+
style: {
|
|
559
|
+
width: "100%",
|
|
560
|
+
height: "100%"
|
|
561
|
+
},
|
|
562
|
+
t: "1779702889490",
|
|
563
|
+
class: "icon",
|
|
564
|
+
viewBox: "0 0 1024 1024",
|
|
565
|
+
version: "1.1",
|
|
566
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
567
|
+
"p-id": "8979"
|
|
568
|
+
}, ze = /* @__PURE__ */ u({
|
|
569
|
+
__name: "Search",
|
|
570
|
+
setup(e) {
|
|
571
|
+
return (e, t) => (S(), i("svg", Re, [...t[0] ||= [a("path", {
|
|
572
|
+
d: "M896 870.4l-128-128c55.467-68.267 89.6-149.333 89.6-238.933 0-98.134-38.4-192-110.933-264.534-149.334-149.333-384-149.333-533.334-4.266-145.066 145.066-145.066 384 0 529.066 72.534 72.534 166.4 110.934 264.534 110.934 89.6 0 174.933-29.867 238.933-89.6l128 128c4.267 4.266 12.8 8.533 21.333 8.533s17.067-4.267 21.334-8.533c17.066-8.534 17.066-29.867 8.533-42.667zM260.267 721.067c-119.467-123.734-119.467-320 0-439.467 59.733-59.733 140.8-89.6 217.6-89.6 81.066 0 157.866 29.867 217.6 89.6 59.733 59.733 89.6 136.533 89.6 217.6 0 81.067-34.134 162.133-89.6 217.6-55.467 59.733-132.267 93.867-217.6 93.867-81.067 0-157.867-34.134-217.6-89.6z",
|
|
573
|
+
"p-id": "8980"
|
|
574
|
+
}, null, -1)]]));
|
|
575
|
+
}
|
|
576
|
+
}), Be = {
|
|
577
|
+
style: {
|
|
578
|
+
width: "100%",
|
|
579
|
+
height: "100%"
|
|
580
|
+
},
|
|
581
|
+
viewBox: "0 0 1024 1024",
|
|
582
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
583
|
+
}, Ve = /* @__PURE__ */ u({
|
|
584
|
+
__name: "CloseBold",
|
|
585
|
+
setup(e) {
|
|
586
|
+
return (e, t) => (S(), i("svg", Be, [...t[0] ||= [a("path", {
|
|
587
|
+
d: "M512 476.25l256-256 33.75 33.75-256 256 256 256-33.75 33.75-256-256-256 256-33.75-33.75 256-256-256-256L256 220.25l256 256z",
|
|
588
|
+
fill: "currentColor"
|
|
589
|
+
}, null, -1)]]));
|
|
590
|
+
}
|
|
591
|
+
}), He = {
|
|
592
|
+
style: {
|
|
593
|
+
width: "100%",
|
|
594
|
+
height: "100%"
|
|
595
|
+
},
|
|
596
|
+
t: "1779703362484",
|
|
597
|
+
class: "icon",
|
|
598
|
+
viewBox: "0 0 1024 1024",
|
|
599
|
+
version: "1.1",
|
|
600
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
601
|
+
"p-id": "10092"
|
|
602
|
+
}, Ue = /* @__PURE__ */ u({
|
|
603
|
+
__name: "User",
|
|
604
|
+
setup(e) {
|
|
605
|
+
return (e, t) => (S(), i("svg", He, [...t[0] ||= [a("path", {
|
|
606
|
+
d: "M512 512c141.385 0 256-114.615 256-256S653.385 0 512 0 256 114.615 256 256s114.615 256 256 256zM366.336 110.336C405.244 71.428 456.976 50 512 50s106.756 21.428 145.664 60.336S718 200.976 718 256s-21.428 106.756-60.336 145.664S567.024 462 512 462s-106.756-21.428-145.664-60.336S306 311.024 306 256s21.428-106.756 60.336-145.664z",
|
|
607
|
+
fill: "#999999",
|
|
608
|
+
"p-id": "10093"
|
|
609
|
+
}, null, -1), a("path", {
|
|
610
|
+
d: "M716.903 474C669.947 527.911 590.06 562.11 512 562.11S354.053 527.911 307.097 474C184.731 524.207 112 620.226 112 730.426 112 892.563 291.087 1024 512 1024c220.914 0 400-131.438 400-293.574 0-110.2-72.731-206.22-195.097-256.426z m48.356 423.705c-32.252 23.672-70.063 42.335-112.384 55.473C608.365 966.994 560.969 974 512 974c-48.968 0-96.365-7.006-140.874-20.822-42.321-13.138-80.132-31.801-112.384-55.473C196.357 851.919 162 792.512 162 730.426c0-21.672 3.545-42.928 10.538-63.177 6.961-20.159 17.368-39.432 30.933-57.281 22.865-30.09 54.718-56.024 93.187-76.069C353.356 582.787 432.632 612.11 512 612.11c79.367 0 158.644-29.323 215.342-78.212 38.469 20.044 70.321 45.979 93.188 76.068 13.564 17.851 23.972 37.123 30.933 57.282 6.992 20.25 10.537 41.506 10.537 63.178 0 62.086-34.356 121.493-96.741 167.279z",
|
|
611
|
+
fill: "#999999",
|
|
612
|
+
"p-id": "10094"
|
|
613
|
+
}, null, -1)]]));
|
|
614
|
+
}
|
|
615
|
+
}), We = {
|
|
616
|
+
style: {
|
|
617
|
+
width: "100%",
|
|
618
|
+
height: "100%"
|
|
619
|
+
},
|
|
620
|
+
t: "1779705400881",
|
|
621
|
+
class: "icon",
|
|
622
|
+
viewBox: "0 0 1152 1024",
|
|
623
|
+
version: "1.1",
|
|
624
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
625
|
+
"p-id": "11055"
|
|
626
|
+
}, Ge = /* @__PURE__ */ u({
|
|
627
|
+
__name: "Plus",
|
|
628
|
+
setup(e) {
|
|
629
|
+
return (e, t) => (S(), i("svg", We, [...t[0] ||= [a("path", {
|
|
630
|
+
d: "M489.244444 489.244444v295.822223c0 18.850702-15.282631 34.133333-34.133333 34.133333s-34.133333-15.282631-34.133333-34.133333v-295.822223h-295.822222c-18.850702 0-34.133333-15.282631-34.133334-34.133333s15.282631-34.133333 34.133334-34.133333h295.822222v-295.822222c0-18.850702 15.282631-34.133333 34.133333-34.133334s34.133333 15.282631 34.133333 34.133334v295.822222h295.822223c18.850702 0 34.133333 15.282631 34.133333 34.133333s-15.282631 34.133333-34.133333 34.133333h-295.822223z",
|
|
631
|
+
fill: "#323233",
|
|
632
|
+
"p-id": "11056"
|
|
633
|
+
}, null, -1)]]));
|
|
634
|
+
}
|
|
635
|
+
}), Ke = {}, qe = {
|
|
636
|
+
style: {
|
|
637
|
+
width: "100%",
|
|
638
|
+
height: "100%"
|
|
639
|
+
},
|
|
640
|
+
t: "1779754328342",
|
|
641
|
+
class: "icon",
|
|
642
|
+
viewBox: "0 0 1024 1024",
|
|
643
|
+
version: "1.1",
|
|
644
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
645
|
+
"p-id": "4859"
|
|
646
|
+
};
|
|
647
|
+
function Je(e, t) {
|
|
648
|
+
return S(), i("svg", qe, [...t[0] ||= [a("path", {
|
|
649
|
+
d: "M731.733333 480l-384-341.333333c-17.066667-14.933333-44.8-14.933333-59.733333 4.266666-14.933333 17.066667-14.933333 44.8 4.266667 59.733334L640 512 292.266667 821.333333c-17.066667 14.933333-19.2 42.666667-4.266667 59.733334 8.533333 8.533333 19.2 14.933333 32 14.933333 10.666667 0 19.2-4.266667 27.733333-10.666667l384-341.333333c8.533333-8.533333 14.933333-19.2 14.933334-32s-4.266667-23.466667-14.933334-32z",
|
|
650
|
+
fill: "#666666",
|
|
651
|
+
"p-id": "4860"
|
|
652
|
+
}, null, -1)]]);
|
|
653
|
+
}
|
|
654
|
+
var Ye = /* @__PURE__ */ R(Ke, [["render", Je]]), Xe = {}, Ze = {
|
|
655
|
+
style: {
|
|
656
|
+
width: "100%",
|
|
657
|
+
height: "100%"
|
|
658
|
+
},
|
|
659
|
+
t: "1779754450238",
|
|
660
|
+
class: "icon",
|
|
661
|
+
viewBox: "0 0 1024 1024",
|
|
662
|
+
version: "1.1",
|
|
663
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
664
|
+
"p-id": "6029"
|
|
665
|
+
};
|
|
666
|
+
function Qe(e, t) {
|
|
667
|
+
return S(), i("svg", Ze, [...t[0] ||= [a("path", {
|
|
668
|
+
d: "M897.96 728.3c-18.8 18.8-49.1 18.801-67.901 0l-318-318-318 318c-18.8 18.8-49.2 18.8-67.901 0-18.8-18.8-18.801-49.1 0-67.901l352-352c18.8-18.8 49.2-18.8 67.901 0l352 352c9.4 9.4 14 21.7 14 34-0.1 12.2-4.7 24.501-14.1 33.9z",
|
|
669
|
+
"p-id": "6030"
|
|
670
|
+
}, null, -1)]]);
|
|
671
|
+
}
|
|
672
|
+
var $e = /* @__PURE__ */ R(Xe, [["render", Qe]]), et = {}, tt = {
|
|
673
|
+
style: {
|
|
674
|
+
width: "100%",
|
|
675
|
+
height: "100%"
|
|
676
|
+
},
|
|
677
|
+
t: "1779754522950",
|
|
678
|
+
class: "icon",
|
|
679
|
+
viewBox: "0 0 1024 1024",
|
|
680
|
+
version: "1.1",
|
|
681
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
682
|
+
"p-id": "6997"
|
|
683
|
+
};
|
|
684
|
+
function nt(e, t) {
|
|
685
|
+
return S(), i("svg", tt, [...t[0] ||= [a("path", {
|
|
686
|
+
d: "M512.34133333 931.38488889c-49.94844445 0-98.87288889-8.64711111-145.29422222-25.82755556-44.94222222-16.61155555-86.35733333-40.61866667-123.22133333-71.45244444-74.29688889-61.89511111-125.15555555-148.02488889-143.24622223-242.34666667l71.45244445-13.76711111c31.28888889 162.58844445 174.42133333 280.576 340.30933333 280.576 70.08711111 0 137.55733333-20.82133333 195.12888889-60.07466666 56.32-38.45688889 99.66933333-91.93244445 125.49688889-154.73777778l67.35644444 27.648c-31.28888889 76.00355555-83.74044445 140.74311111-151.77955555 187.16444444-69.85955555 47.67288889-151.43822222 72.81777778-236.20266667 72.81777778zM846.848 421.43288889C827.392 349.29777778 783.92888889 284.33066667 724.65066667 238.13688889c-61.21244445-47.55911111-134.59911111-72.704-212.30933334-72.704-69.97333333 0-137.44355555 20.70755555-194.90133333 59.96088889-56.32 38.57066667-99.78311111 91.93244445-125.61066667 154.624l-67.35644444-27.76177778c31.28888889-75.88977778 83.74044445-140.40177778 151.77955556-186.82311111 69.74577778-47.55911111 151.32444445-72.704 235.9751111-72.704 47.33155555 0 93.86666667 7.85066667 138.12622223 23.32444444 42.89422222 14.90488889 82.83022222 36.75022222 118.784 64.62577778 35.61244445 27.648 66.33244445 60.64355555 91.47733333 98.07644444 25.48622222 38.00177778 44.48711111 79.64444445 56.32 123.67644445l-70.08711111 19.00088889z",
|
|
687
|
+
"p-id": "6998"
|
|
688
|
+
}, null, -1), a("path", {
|
|
689
|
+
d: "M30.26488889 669.35466667l93.52533333-162.58844445 162.58844445 93.52533333M997.71733333 345.20177778l-83.28533333 168.16355555-168.16355555-83.17155555",
|
|
690
|
+
"p-id": "6999"
|
|
691
|
+
}, null, -1)]]);
|
|
692
|
+
}
|
|
693
|
+
var rt = /* @__PURE__ */ R(et, [["render", nt]]), it = {}, at = {
|
|
694
|
+
style: {
|
|
695
|
+
width: "100%",
|
|
696
|
+
height: "100%"
|
|
697
|
+
},
|
|
698
|
+
t: "1779754755766",
|
|
699
|
+
class: "icon",
|
|
700
|
+
viewBox: "0 0 1024 1024",
|
|
701
|
+
version: "1.1",
|
|
702
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
703
|
+
"p-id": "9850"
|
|
704
|
+
};
|
|
705
|
+
function ot(e, t) {
|
|
706
|
+
return S(), i("svg", at, [...t[0] ||= [a("path", {
|
|
707
|
+
d: "M64 448l832-320-128 704-446.016-243.008L832 192 243.008 544.96 64 448z m256 512v-303.04L512 768l-192 192z",
|
|
708
|
+
"p-id": "9851"
|
|
709
|
+
}, null, -1)]]);
|
|
710
|
+
}
|
|
711
|
+
var st = /* @__PURE__ */ R(it, [["render", ot]]), ct = {}, lt = {
|
|
712
|
+
style: {
|
|
713
|
+
width: "100%",
|
|
714
|
+
height: "100%"
|
|
715
|
+
},
|
|
716
|
+
t: "1780036867825",
|
|
717
|
+
class: "icon",
|
|
718
|
+
viewBox: "0 0 1024 1024",
|
|
719
|
+
version: "1.1",
|
|
720
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
721
|
+
"p-id": "2958"
|
|
722
|
+
};
|
|
723
|
+
function ut(e, t) {
|
|
724
|
+
return S(), i("svg", lt, [...t[0] ||= [a("path", {
|
|
725
|
+
d: "M512 97.52381c228.912762 0 414.47619 185.563429 414.47619 414.47619s-185.563429 414.47619-414.47619 414.47619S97.52381 740.912762 97.52381 512 283.087238 97.52381 512 97.52381z m0 73.142857C323.486476 170.666667 170.666667 323.486476 170.666667 512s152.81981 341.333333 341.333333 341.333333 341.333333-152.81981 341.333333-341.333333S700.513524 170.666667 512 170.666667z m36.571429 268.190476v292.571428h-73.142858V438.857143h73.142858z m0-121.904762v73.142857h-73.142858v-73.142857h73.142858z",
|
|
726
|
+
"p-id": "2959"
|
|
727
|
+
}, null, -1)]]);
|
|
728
|
+
}
|
|
729
|
+
var dt = /* @__PURE__ */ R(ct, [["render", ut]]), ft = {}, pt = {
|
|
730
|
+
style: {
|
|
731
|
+
width: "100%",
|
|
732
|
+
height: "100%"
|
|
733
|
+
},
|
|
734
|
+
t: "1780037293881",
|
|
735
|
+
class: "icon",
|
|
736
|
+
viewBox: "0 0 1024 1024",
|
|
737
|
+
version: "1.1",
|
|
738
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
739
|
+
"p-id": "5846"
|
|
740
|
+
};
|
|
741
|
+
function mt(e, t) {
|
|
742
|
+
return S(), i("svg", pt, [...t[0] ||= [a("path", {
|
|
743
|
+
d: "M768.73106 703.537712c-35.606921 0-67.945574 14.793214-91.167479 38.359147l-309.109357-171.670082c9.116748-17.545439 14.621199-37.155048 14.621199-58.312783 0-12.55703-2.408198-24.426004-5.676466-35.950949l304.63699-189.215522c22.705863 20.469679 52.464304 33.198723 85.146985 33.198723 70.525785 0 127.978498-57.452713 127.978498-127.978498S837.708718 63.989249 767.182933 63.989249s-127.978498 57.452713-127.978498 127.978498c0 14.621199 2.92424 28.382328 7.396607 41.455401L344.716278 420.746514c-23.049891-22.705863-54.700487-36.983034-89.791366-36.983034-70.525785 0-127.978498 57.452713-127.978498 127.978498s57.452713 127.978498 127.978498 127.978498c25.630102 0 49.540064-7.740635 69.493701-20.813707l321.150344 178.378633c-3.096254 11.008903-5.160423 22.18982-5.160423 34.058794 0 70.525785 57.452713 127.978498 127.978498 127.978498s127.978498-57.452713 127.978498-127.978498S839.256845 703.537712 768.73106 703.537712zM767.182933 127.978498c35.262893 0 63.989249 28.726356 63.989249 63.989249s-28.726356 63.989249-63.989249 63.989249-63.989249-28.726356-63.989249-63.989249S731.92004 127.978498 767.182933 127.978498zM191.107677 511.913993c0-35.262893 28.726356-63.989249 63.989249-63.989249s63.989249 28.726356 63.989249 63.989249-28.726356 63.989249-63.989249 63.989249S191.107677 547.176886 191.107677 511.913993zM768.73106 895.505459c-35.262893 0-63.989249-28.726356-63.989249-63.989249s28.726356-63.989249 63.989249-63.989249 63.989249 28.726356 63.989249 63.989249C832.720309 866.951117 803.993953 895.505459 768.73106 895.505459z",
|
|
744
|
+
fill: "#575B66",
|
|
745
|
+
"p-id": "5847"
|
|
746
|
+
}, null, -1)]]);
|
|
747
|
+
}
|
|
748
|
+
var ht = /* @__PURE__ */ R(ft, [["render", mt]]), gt = {}, _t = {
|
|
749
|
+
style: {
|
|
750
|
+
width: "100%",
|
|
751
|
+
height: "100%"
|
|
752
|
+
},
|
|
753
|
+
t: "1780037548768",
|
|
754
|
+
class: "icon",
|
|
755
|
+
viewBox: "0 0 1024 1024",
|
|
756
|
+
version: "1.1",
|
|
757
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
758
|
+
"p-id": "7726"
|
|
759
|
+
};
|
|
760
|
+
function vt(e, t) {
|
|
761
|
+
return S(), i("svg", _t, [...t[0] ||= [a("path", {
|
|
762
|
+
d: "M501.84 393.44h16a16 16 0 0 1 16 16v151.584a16 16 0 0 1-6.768 13.072l-84.928 59.952a16 16 0 0 1-22.304-3.84l-9.216-13.072a16 16 0 0 1 3.84-22.304l71.376-50.4V409.44a16 16 0 0 1 16-16z m3.552 458.96C332.304 852.4 192 712.08 192 539.008s140.32-313.392 313.392-313.392c173.088 0 313.392 140.32 313.392 313.392 0 173.088-140.32 313.392-313.392 313.392z m0-48c146.56 0 265.392-118.816 265.392-265.392 0-146.56-118.816-265.392-265.392-265.392-146.56 0-265.392 118.832-265.392 265.392 0 146.576 118.816 265.392 265.392 265.392z m-100.288-617.6l4.752 17.36c4.224 13.632-4.48 17.712-8.784 19.088a333.824 333.824 0 0 0-156.72 106.448c-4.032 4.912-11.408 13.952-26.24 4.528l-11.952-8.688c-11.472-9.088-5.648-17.904-2.176-22.24a381.792 381.792 0 0 1 183.44-126.08c4.608-1.456 13.968-3.344 17.68 9.568z m396.768 137.376l-13.184 9.696c-13.04 8.912-19.84 0.48-23.424-3.904a333.84 333.84 0 0 0-155.12-106.032c-5.44-1.76-15.936-5.376-11.664-23.04l3.728-13.856c5.104-14.64 15.328-11.136 21.008-9.328a381.808 381.808 0 0 1 180.608 123.6c3.616 4.48 11.136 14.288-1.952 22.864z",
|
|
763
|
+
fill: "#000000",
|
|
764
|
+
"p-id": "7727"
|
|
765
|
+
}, null, -1)]]);
|
|
766
|
+
}
|
|
767
|
+
var yt = /* @__PURE__ */ R(gt, [["render", vt]]), bt = {}, xt = {
|
|
768
|
+
style: {
|
|
769
|
+
width: "100%",
|
|
770
|
+
height: "100%"
|
|
771
|
+
},
|
|
772
|
+
t: "1780038539022",
|
|
773
|
+
class: "icon",
|
|
774
|
+
viewBox: "0 0 1024 1024",
|
|
775
|
+
version: "1.1",
|
|
776
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
777
|
+
"p-id": "8719"
|
|
778
|
+
};
|
|
779
|
+
function St(e, t) {
|
|
780
|
+
return S(), i("svg", xt, [...t[0] ||= [a("path", {
|
|
781
|
+
d: "M938.666667 682.666667c-46.933333 0-85.333333-38.4-85.333334-85.333334V384c0-187.733333-153.6-341.333333-341.333333-341.333333S170.666667 196.266667 170.666667 384v213.333333c0 46.933333-38.4 85.333333-85.333334 85.333334-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h853.333334c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666zM234.666667 682.666667c12.8-25.6 21.333333-55.466667 21.333333-85.333334V384c0-140.8 115.2-256 256-256s256 115.2 256 256v213.333333c0 29.866667 8.533333 59.733333 21.333333 85.333334h-554.666666zM605.866667 857.6c-21.333333-12.8-46.933333-4.266667-59.733334 17.066667-4.266667 12.8-17.066667 21.333333-34.133333 21.333333s-29.866667-8.533333-38.4-21.333333c-12.8-21.333333-38.4-25.6-59.733333-17.066667-21.333333 12.8-25.6 38.4-17.066667 59.733333 34.133333 59.733333 115.2 81.066667 174.933333 46.933334 17.066667-12.8 34.133333-25.6 46.933334-46.933334 17.066667-21.333333 8.533333-46.933333-12.8-59.733333z",
|
|
782
|
+
"p-id": "8720"
|
|
783
|
+
}, null, -1)]]);
|
|
784
|
+
}
|
|
785
|
+
var Ct = /* @__PURE__ */ R(bt, [["render", St]]), wt = /* @__PURE__ */ L({
|
|
786
|
+
ArrowRight: () => Ye,
|
|
787
|
+
ArrowUp: () => $e,
|
|
788
|
+
Bell: () => Ct,
|
|
789
|
+
Clock: () => yt,
|
|
790
|
+
CloseBold: () => Ve,
|
|
791
|
+
Info: () => dt,
|
|
792
|
+
Plus: () => Ge,
|
|
793
|
+
Promotion: () => st,
|
|
794
|
+
Refresh: () => rt,
|
|
795
|
+
Search: () => ze,
|
|
796
|
+
Share: () => ht,
|
|
797
|
+
User: () => Ue,
|
|
798
|
+
YcIcon: () => Le
|
|
799
|
+
});
|
|
800
|
+
//#endregion
|
|
801
|
+
//#region src/components/utils/tools.ts
|
|
802
|
+
function Tt(e) {
|
|
803
|
+
return typeof e == "number" ? e + "px" : e || "100px";
|
|
804
|
+
}
|
|
805
|
+
function Et(e) {
|
|
806
|
+
return typeof e == "number" ? e + "px" : e || "180px";
|
|
807
|
+
}
|
|
808
|
+
function Dt(e, t) {
|
|
809
|
+
let n = Object.fromEntries(Object.entries(je).map(([n, r]) => [n, (i = {}) => ({
|
|
810
|
+
props: {
|
|
811
|
+
...i,
|
|
812
|
+
data: t,
|
|
813
|
+
prop: e.prop
|
|
814
|
+
},
|
|
815
|
+
type: n,
|
|
816
|
+
component: r
|
|
817
|
+
})]));
|
|
818
|
+
return typeof e.render == "function" ? e.render({
|
|
819
|
+
h: n,
|
|
820
|
+
data: t
|
|
821
|
+
}) : n.input({ prop: e.prop });
|
|
822
|
+
}
|
|
823
|
+
function V(e, t) {
|
|
824
|
+
let n = e.prop;
|
|
825
|
+
n && typeof t == "object" && t && t[n];
|
|
826
|
+
let r = Dt(e, t);
|
|
827
|
+
return typeof r != "object" || !r ? r ?? "" : (r.component, r);
|
|
828
|
+
}
|
|
829
|
+
//#endregion
|
|
830
|
+
//#region src/components/Filter/index.vue?vue&type=script&setup=true&lang.ts
|
|
831
|
+
var Ot = { style: {
|
|
832
|
+
display: "flex",
|
|
833
|
+
"justify-content": "end",
|
|
834
|
+
"align-items": "center",
|
|
835
|
+
width: "100%"
|
|
836
|
+
} }, kt = /* @__PURE__ */ u({
|
|
837
|
+
name: "UiDefaultFilter",
|
|
838
|
+
__name: "index",
|
|
839
|
+
props: {
|
|
840
|
+
type: {},
|
|
841
|
+
size: { default: "default" },
|
|
842
|
+
fields: {},
|
|
843
|
+
expandNum: {},
|
|
844
|
+
valueWidth: { default: "100%" },
|
|
845
|
+
labelWidth: { default: "100px" },
|
|
846
|
+
omitFields: { default: () => [] },
|
|
847
|
+
rules: {},
|
|
848
|
+
required: { type: Boolean },
|
|
849
|
+
column: { default: 4 },
|
|
850
|
+
filterFixedValues: { default: () => ({ page: 1 }) }
|
|
851
|
+
},
|
|
852
|
+
emits: [
|
|
853
|
+
"submit",
|
|
854
|
+
"reset",
|
|
855
|
+
"search"
|
|
856
|
+
],
|
|
857
|
+
setup(s, { emit: u }) {
|
|
858
|
+
let d = u, f = o(s, [
|
|
859
|
+
"fields",
|
|
860
|
+
"labelWidth",
|
|
861
|
+
"valueWidth",
|
|
862
|
+
"omitFields",
|
|
863
|
+
"column",
|
|
864
|
+
"size",
|
|
865
|
+
"filterFixedValues"
|
|
866
|
+
]), p = C({
|
|
867
|
+
expandNum: 0,
|
|
868
|
+
expand: !1
|
|
869
|
+
}), m = C({}), h = t(() => s.fields.slice(0, p.expand ? s.fields.length : p.expandNum)), _ = t(() => 24 - h.value?.reduce((e, t) => e + (t.span || 24 / s.column), 0) % 24 - 24 / s.column);
|
|
870
|
+
b(() => {
|
|
871
|
+
p.expandNum = f?.expandNum ?? 2 * s.column - 1, s.fields.forEach((e) => {
|
|
872
|
+
let t = Dt(e, m)?.props?.defaultValue;
|
|
873
|
+
t !== void 0 && (m[e.prop] = t);
|
|
874
|
+
});
|
|
875
|
+
});
|
|
876
|
+
function v() {
|
|
877
|
+
let e = {};
|
|
878
|
+
Object.keys(m).forEach((t) => {
|
|
879
|
+
if (m[t] !== void 0) {
|
|
880
|
+
let n = N(m[t]);
|
|
881
|
+
e[t] = typeof n == "string" ? n.trim() : n;
|
|
882
|
+
}
|
|
883
|
+
}), d("submit", {
|
|
884
|
+
...e,
|
|
885
|
+
...s.filterFixedValues
|
|
886
|
+
}), d("search", {
|
|
887
|
+
...e,
|
|
888
|
+
...s.filterFixedValues
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
function x() {
|
|
892
|
+
Object.keys(m).forEach((e) => {
|
|
893
|
+
s.omitFields.includes(e) || (m[e] = void 0);
|
|
894
|
+
}), d("reset", m);
|
|
895
|
+
}
|
|
896
|
+
return (t, o) => {
|
|
897
|
+
let u = O("el-input"), d = O("el-form-item"), f = O("el-col"), b = O("el-button"), C = O("el-row"), w = O("el-form");
|
|
898
|
+
return S(), n(w, g({
|
|
899
|
+
model: m,
|
|
900
|
+
class: "ui-filter",
|
|
901
|
+
size: s.size
|
|
902
|
+
}, t.$attrs), {
|
|
903
|
+
default: I(() => [l(C, {
|
|
904
|
+
gutter: 20,
|
|
905
|
+
style: { "margin-bottom": "-15px" }
|
|
906
|
+
}, {
|
|
907
|
+
default: I(() => [(S(!0), i(e, null, E(h.value, (e) => (S(), n(f, { span: e.span || 24 / s.column }, {
|
|
908
|
+
default: I(() => [(S(), n(d, {
|
|
909
|
+
key: e.prop,
|
|
910
|
+
label: e.label,
|
|
911
|
+
"label-width": P(Tt)(e?.labelWidth || s.labelWidth),
|
|
912
|
+
"value-width": P(Et)(e?.valueWidth || s.valueWidth)
|
|
913
|
+
}, {
|
|
914
|
+
default: I(() => [e.render ? (S(), n(k(P(Dt)(e, m).component), g({
|
|
915
|
+
key: 0,
|
|
916
|
+
modelValue: m[e.prop],
|
|
917
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t
|
|
918
|
+
}, { ref_for: !0 }, P(Dt)(e, m).props, {
|
|
919
|
+
clearable: !0,
|
|
920
|
+
style: { width: P(Et)(e?.valueWidth || s.valueWidth) }
|
|
921
|
+
}), null, 16, [
|
|
922
|
+
"modelValue",
|
|
923
|
+
"onUpdate:modelValue",
|
|
924
|
+
"style"
|
|
925
|
+
])) : (S(), n(u, {
|
|
926
|
+
key: 1,
|
|
927
|
+
modelValue: m[e.prop],
|
|
928
|
+
"onUpdate:modelValue": (t) => m[e.prop] = t,
|
|
929
|
+
placeholder: "请输入",
|
|
930
|
+
clearable: !0,
|
|
931
|
+
style: y({ width: P(Et)(e?.valueWidth || s.valueWidth) })
|
|
932
|
+
}, null, 8, [
|
|
933
|
+
"modelValue",
|
|
934
|
+
"onUpdate:modelValue",
|
|
935
|
+
"style"
|
|
936
|
+
]))]),
|
|
937
|
+
_: 2
|
|
938
|
+
}, 1032, [
|
|
939
|
+
"label",
|
|
940
|
+
"label-width",
|
|
941
|
+
"value-width"
|
|
942
|
+
]))]),
|
|
943
|
+
_: 2
|
|
944
|
+
}, 1032, ["span"]))), 256)), l(f, {
|
|
945
|
+
span: 24 / s.column,
|
|
946
|
+
offset: _.value
|
|
947
|
+
}, {
|
|
948
|
+
default: I(() => [l(d, {
|
|
949
|
+
label: "",
|
|
950
|
+
"label-width": "30px"
|
|
951
|
+
}, {
|
|
952
|
+
default: I(() => [a("div", Ot, [
|
|
953
|
+
D(t.$slots, "left", { form: m }, void 0, !0),
|
|
954
|
+
s.fields.length >= 2 * s.column ? (S(), n(b, {
|
|
955
|
+
key: 0,
|
|
956
|
+
text: "",
|
|
957
|
+
icon: p.expand ? P($e) : P(Ye),
|
|
958
|
+
onClick: o[0] ||= (e) => p.expand = !p.expand
|
|
959
|
+
}, {
|
|
960
|
+
default: I(() => [c(j(p.expand ? "收起" : "展开"), 1)]),
|
|
961
|
+
_: 1
|
|
962
|
+
}, 8, ["icon"])) : r("", !0),
|
|
963
|
+
l(b, {
|
|
964
|
+
icon: P(ze),
|
|
965
|
+
type: "primary",
|
|
966
|
+
onClick: v
|
|
967
|
+
}, {
|
|
968
|
+
default: I(() => [...o[1] ||= [c("查询", -1)]]),
|
|
969
|
+
_: 1
|
|
970
|
+
}, 8, ["icon"]),
|
|
971
|
+
l(b, {
|
|
972
|
+
icon: P(rt),
|
|
973
|
+
onClick: x
|
|
974
|
+
}, {
|
|
975
|
+
default: I(() => [...o[2] ||= [c("重置", -1)]]),
|
|
976
|
+
_: 1
|
|
977
|
+
}, 8, ["icon"]),
|
|
978
|
+
D(t.$slots, "handle", { form: m }, void 0, !0),
|
|
979
|
+
D(t.$slots, "right", { form: m }, void 0, !0)
|
|
980
|
+
])]),
|
|
981
|
+
_: 3
|
|
982
|
+
})]),
|
|
983
|
+
_: 3
|
|
984
|
+
}, 8, ["span", "offset"])]),
|
|
985
|
+
_: 3
|
|
986
|
+
})]),
|
|
987
|
+
_: 3
|
|
988
|
+
}, 16, ["model", "size"]);
|
|
989
|
+
};
|
|
990
|
+
}
|
|
991
|
+
}), At = /* @__PURE__ */ L({ default: () => jt }), jt = /* @__PURE__ */ R(kt, [["__scopeId", "data-v-0e3c7086"]]), Mt = {
|
|
992
|
+
key: 2,
|
|
993
|
+
style: { display: "inline-block" }
|
|
994
|
+
}, Nt = {
|
|
995
|
+
key: 2,
|
|
996
|
+
style: { display: "inline-block" }
|
|
997
|
+
}, Pt = {
|
|
998
|
+
key: 0,
|
|
999
|
+
class: "ui-form-buttons"
|
|
1000
|
+
}, Ft = /* @__PURE__ */ u({
|
|
1001
|
+
__name: "index",
|
|
1002
|
+
props: {
|
|
1003
|
+
fields: {},
|
|
1004
|
+
expandNum: {},
|
|
1005
|
+
valueWidth: {},
|
|
1006
|
+
labelWidth: {},
|
|
1007
|
+
labelPosition: {},
|
|
1008
|
+
omitFields: {},
|
|
1009
|
+
rules: {},
|
|
1010
|
+
required: { type: Boolean },
|
|
1011
|
+
column: {},
|
|
1012
|
+
defaultValues: {},
|
|
1013
|
+
model: {},
|
|
1014
|
+
modelValue: {},
|
|
1015
|
+
valueModel: {},
|
|
1016
|
+
size: {}
|
|
1017
|
+
},
|
|
1018
|
+
emits: [
|
|
1019
|
+
"submit",
|
|
1020
|
+
"reset",
|
|
1021
|
+
"update:model",
|
|
1022
|
+
"update:modelValue"
|
|
1023
|
+
],
|
|
1024
|
+
setup(a, { expose: o, emit: s }) {
|
|
1025
|
+
re((e) => ({ v57cec5bb: P(ee) / 2 }));
|
|
1026
|
+
let u = s, d = a, { fields: f, labelWidth: p = "100px", valueWidth: h = "auto", omitFields: _ = [], rules: b = C({}), labelPosition: x = "top", valueModel: w = "default", column: ee = 24 } = d, te = T(0), A = T(), N = t(() => d.modelValue !== void 0), ne = C({}), ie = t(() => N.value ? d.modelValue : d.model || ne), F = t({
|
|
1027
|
+
get: () => ie.value,
|
|
1028
|
+
set: (e) => {
|
|
1029
|
+
N.value && u("update:modelValue", e);
|
|
1030
|
+
}
|
|
1031
|
+
}), ae = t(() => f.filter((e) => typeof e.prop == "string")), oe = t(() => {
|
|
1032
|
+
if (b && Object.keys(b).length) return b;
|
|
1033
|
+
let e = {};
|
|
1034
|
+
return f.forEach((t) => {
|
|
1035
|
+
t.rules && Object.keys(t.rules).length ? e[t.prop] = t.rules : t.required && (e[t.prop] = [{
|
|
1036
|
+
required: !0,
|
|
1037
|
+
message: "请输入" + t.label,
|
|
1038
|
+
trigger: "change"
|
|
1039
|
+
}]);
|
|
1040
|
+
}), e;
|
|
1041
|
+
});
|
|
1042
|
+
async function se() {
|
|
1043
|
+
await A.value?.validate().catch(() => !1) && u("submit", M(ie.value));
|
|
1044
|
+
}
|
|
1045
|
+
function ce() {
|
|
1046
|
+
let e = {};
|
|
1047
|
+
Object.keys(ie.value).forEach((t) => {
|
|
1048
|
+
_.includes(t) || (e[t] = void 0);
|
|
1049
|
+
}), Object.assign(ie.value, e), te.value += 1, u("reset", M(ie.value));
|
|
1050
|
+
}
|
|
1051
|
+
function le() {
|
|
1052
|
+
return M(ie.value);
|
|
1053
|
+
}
|
|
1054
|
+
function ue(e) {
|
|
1055
|
+
Object.assign(ie.value, e);
|
|
1056
|
+
}
|
|
1057
|
+
function L() {
|
|
1058
|
+
A.value?.clearValidate();
|
|
1059
|
+
}
|
|
1060
|
+
async function de() {
|
|
1061
|
+
return new Promise((e) => {
|
|
1062
|
+
A.value?.validate((t, n) => e(n));
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
return o({
|
|
1066
|
+
getValues: le,
|
|
1067
|
+
setValues: ue,
|
|
1068
|
+
clearValidate: L,
|
|
1069
|
+
onSubmit: se,
|
|
1070
|
+
validate: de
|
|
1071
|
+
}), (t, a) => {
|
|
1072
|
+
let o = O("el-input"), s = O("el-form-item"), u = O("el-form"), d = O("el-button");
|
|
1073
|
+
return S(), i(e, null, [l(u, g({
|
|
1074
|
+
ref_key: "uiFormRef",
|
|
1075
|
+
ref: A,
|
|
1076
|
+
model: F.value
|
|
1077
|
+
}, t.$attrs, {
|
|
1078
|
+
rules: oe.value,
|
|
1079
|
+
inline: P(x) !== "top",
|
|
1080
|
+
"label-position": P(x),
|
|
1081
|
+
class: {
|
|
1082
|
+
"ui-form": !0,
|
|
1083
|
+
horizontal: P(x) !== "top"
|
|
1084
|
+
},
|
|
1085
|
+
"validate-on-rule-change": !1
|
|
1086
|
+
}), {
|
|
1087
|
+
default: I(() => [(S(!0), i(e, null, E(ae.value, (r, a) => (S(), n(s, {
|
|
1088
|
+
key: `${r.prop}-${a}-${te.value}`,
|
|
1089
|
+
label: r.label,
|
|
1090
|
+
"label-width": P(p),
|
|
1091
|
+
"value-width": P(h),
|
|
1092
|
+
prop: r.prop,
|
|
1093
|
+
style: y({
|
|
1094
|
+
width: `${r?.width ? r?.width + "px" : "100%"}`,
|
|
1095
|
+
gridColumn: `span ${(r?.span || P(ee)) / 2 || 1}`
|
|
1096
|
+
})
|
|
1097
|
+
}, {
|
|
1098
|
+
default: I(() => [r.render ? (S(), i(e, { key: 0 }, [m(P(V)(r, F.value)) ? (S(), n(k(P(V)(r, F.value)), {
|
|
1099
|
+
key: 0,
|
|
1100
|
+
style: { display: "inline-block" }
|
|
1101
|
+
})) : P(V)(r, F.value).component ? (S(), n(k(P(V)(r, F.value).component), g({
|
|
1102
|
+
key: 1,
|
|
1103
|
+
modelValue: F.value[r.prop],
|
|
1104
|
+
"onUpdate:modelValue": (e) => F.value[r.prop] = e
|
|
1105
|
+
}, { ref_for: !0 }, P(V)(r, F.value).props, {
|
|
1106
|
+
clearable: !0,
|
|
1107
|
+
key: `${r.prop}-${te.value}`,
|
|
1108
|
+
style: { display: "inline-block" },
|
|
1109
|
+
class: { underline: P(w) === "underline" }
|
|
1110
|
+
}), null, 16, [
|
|
1111
|
+
"modelValue",
|
|
1112
|
+
"onUpdate:modelValue",
|
|
1113
|
+
"class"
|
|
1114
|
+
])) : (S(), i("span", Mt, j(P(V)(r, F.value) || "-"), 1)), (S(!0), i(e, null, E(r.slots, (e) => D(t.$slots, "default", { form: F.value }, () => [m(P(V)(e, F.value)) ? (S(), n(k(P(V)(e, F.value)), {
|
|
1115
|
+
key: 0,
|
|
1116
|
+
style: { display: "inline-block" }
|
|
1117
|
+
})) : P(V)(e, F.value).component ? (S(), n(k(P(V)(e, F.value).component), g({
|
|
1118
|
+
key: 1,
|
|
1119
|
+
modelValue: F.value[e.prop],
|
|
1120
|
+
"onUpdate:modelValue": (t) => F.value[e.prop] = t,
|
|
1121
|
+
"default-value": e.defaultValue,
|
|
1122
|
+
placeholder: e.placeholder
|
|
1123
|
+
}, { ref_for: !0 }, P(V)(e, F.value).props, {
|
|
1124
|
+
style: {
|
|
1125
|
+
display: "inline-block",
|
|
1126
|
+
marginLeft: "10px",
|
|
1127
|
+
width: `${e.width ? e.width + "px" : "100%"}`
|
|
1128
|
+
},
|
|
1129
|
+
class: { underline: P(w) === "underline" },
|
|
1130
|
+
clearable: !0,
|
|
1131
|
+
key: `${e.prop}-${te.value}`
|
|
1132
|
+
}), null, 16, [
|
|
1133
|
+
"modelValue",
|
|
1134
|
+
"onUpdate:modelValue",
|
|
1135
|
+
"default-value",
|
|
1136
|
+
"placeholder",
|
|
1137
|
+
"style",
|
|
1138
|
+
"class"
|
|
1139
|
+
])) : (S(), i("span", Nt, j(P(V)(e, F.value) || "-"), 1))], !0)), 256))], 64)) : (S(), n(o, {
|
|
1140
|
+
key: 1,
|
|
1141
|
+
modelValue: F.value[r.prop],
|
|
1142
|
+
"onUpdate:modelValue": (e) => F.value[r.prop] = e,
|
|
1143
|
+
placeholder: "请输入",
|
|
1144
|
+
clearable: !0,
|
|
1145
|
+
class: v({ underline: P(w) === "underline" })
|
|
1146
|
+
}, null, 8, [
|
|
1147
|
+
"modelValue",
|
|
1148
|
+
"onUpdate:modelValue",
|
|
1149
|
+
"class"
|
|
1150
|
+
]))]),
|
|
1151
|
+
_: 2
|
|
1152
|
+
}, 1032, [
|
|
1153
|
+
"label",
|
|
1154
|
+
"label-width",
|
|
1155
|
+
"value-width",
|
|
1156
|
+
"prop",
|
|
1157
|
+
"style"
|
|
1158
|
+
]))), 128))]),
|
|
1159
|
+
_: 3
|
|
1160
|
+
}, 16, [
|
|
1161
|
+
"model",
|
|
1162
|
+
"rules",
|
|
1163
|
+
"inline",
|
|
1164
|
+
"label-position",
|
|
1165
|
+
"class"
|
|
1166
|
+
]), t.$attrs?.hideHandle ? r("", !0) : (S(), i("div", Pt, [
|
|
1167
|
+
D(t.$slots, "handle", { form: F.value }, void 0, !0),
|
|
1168
|
+
l(d, {
|
|
1169
|
+
icon: P(rt),
|
|
1170
|
+
onClick: ce,
|
|
1171
|
+
size: t.$props.size
|
|
1172
|
+
}, {
|
|
1173
|
+
default: I(() => [...a[0] ||= [c("重置", -1)]]),
|
|
1174
|
+
_: 1
|
|
1175
|
+
}, 8, ["icon", "size"]),
|
|
1176
|
+
l(d, {
|
|
1177
|
+
icon: P(st),
|
|
1178
|
+
type: "primary",
|
|
1179
|
+
onClick: se,
|
|
1180
|
+
size: t.$props.size
|
|
1181
|
+
}, {
|
|
1182
|
+
default: I(() => [...a[1] ||= [c("提交", -1)]]),
|
|
1183
|
+
_: 1
|
|
1184
|
+
}, 8, ["icon", "size"])
|
|
1185
|
+
]))], 64);
|
|
1186
|
+
};
|
|
1187
|
+
}
|
|
1188
|
+
}), It = /* @__PURE__ */ L({ default: () => Lt }), Lt = /* @__PURE__ */ R(Ft, [["__scopeId", "data-v-539b7aeb"]]), Rt = ["disabled"], zt = /* @__PURE__ */ u({
|
|
1189
|
+
__name: "index",
|
|
1190
|
+
props: /* @__PURE__ */ h({
|
|
1191
|
+
defaultValue: { default: "" },
|
|
1192
|
+
disabled: {
|
|
1193
|
+
type: Boolean,
|
|
1194
|
+
default: !1
|
|
1195
|
+
}
|
|
1196
|
+
}, {
|
|
1197
|
+
modelValue: {
|
|
1198
|
+
type: String,
|
|
1199
|
+
default: ""
|
|
1200
|
+
},
|
|
1201
|
+
modelModifiers: {}
|
|
1202
|
+
}),
|
|
1203
|
+
emits: /* @__PURE__ */ h(["change"], ["update:modelValue"]),
|
|
1204
|
+
setup(e, { emit: t }) {
|
|
1205
|
+
let n = T(), r = ie(e, "modelValue"), a = T(r.value || e.defaultValue || ""), o = null, s = t;
|
|
1206
|
+
return b(() => {
|
|
1207
|
+
o = new le({
|
|
1208
|
+
element: n.value,
|
|
1209
|
+
placeholder: "点击输入内容...",
|
|
1210
|
+
content: r.value || e.defaultValue || "",
|
|
1211
|
+
toolbarExcludeKeys: ["ai"],
|
|
1212
|
+
onChange: (e) => {
|
|
1213
|
+
let t = e.getHtml();
|
|
1214
|
+
r.value = t, a.value = t, s("change", t);
|
|
1215
|
+
}
|
|
1216
|
+
}), o.setEditable(!e.disabled);
|
|
1217
|
+
}), F(r, (e) => {
|
|
1218
|
+
o && e !== o.getHtml() && o.setContent(e);
|
|
1219
|
+
}), x(() => {
|
|
1220
|
+
o && o.destroy();
|
|
1221
|
+
}), (t, r) => (S(), i("div", {
|
|
1222
|
+
ref_key: "editorRef",
|
|
1223
|
+
ref: n,
|
|
1224
|
+
style: { height: "500px" },
|
|
1225
|
+
disabled: e.disabled
|
|
1226
|
+
}, null, 8, Rt));
|
|
1227
|
+
}
|
|
1228
|
+
}), Bt = /* @__PURE__ */ L({ default: () => Vt }), Vt = zt, Ht = { class: "ui-tree-wrapper" }, Ut = {
|
|
1229
|
+
key: 0,
|
|
1230
|
+
style: {
|
|
1231
|
+
display: "flex",
|
|
1232
|
+
"flex-direction": "row",
|
|
1233
|
+
"justify-content": "space-between",
|
|
1234
|
+
"align-items": "center",
|
|
1235
|
+
gap: "10px"
|
|
1236
|
+
}
|
|
1237
|
+
}, Wt = {
|
|
1238
|
+
key: 0,
|
|
1239
|
+
class: "custom-tree-node"
|
|
1240
|
+
}, Gt = { class: "node-label" }, Kt = { key: 0 }, qt = ["onClick"], Jt = /* @__PURE__ */ u({
|
|
1241
|
+
__name: "index",
|
|
1242
|
+
props: {
|
|
1243
|
+
id: {},
|
|
1244
|
+
data: { default: () => [] },
|
|
1245
|
+
filterable: { type: Boolean },
|
|
1246
|
+
placeholder: {},
|
|
1247
|
+
hidePlusHandle: { type: Boolean },
|
|
1248
|
+
hideNodeAdd: { type: Boolean },
|
|
1249
|
+
hideNodeEdit: { type: Boolean },
|
|
1250
|
+
hideNodeDel: { type: Boolean },
|
|
1251
|
+
hideNodeHandle: { type: Boolean },
|
|
1252
|
+
onNodeAdd: { type: Function },
|
|
1253
|
+
onNodeEdit: { type: Function },
|
|
1254
|
+
onNodeDel: { type: Function },
|
|
1255
|
+
showTotal: { type: Boolean },
|
|
1256
|
+
"show-total": { type: Boolean },
|
|
1257
|
+
nodeKey: {},
|
|
1258
|
+
props: { default: () => ({ label: "label" }) }
|
|
1259
|
+
},
|
|
1260
|
+
emits: [
|
|
1261
|
+
"add",
|
|
1262
|
+
"edit",
|
|
1263
|
+
"delete"
|
|
1264
|
+
],
|
|
1265
|
+
setup(e, { emit: s }) {
|
|
1266
|
+
let u = s, f = ne(), p = o(e, [
|
|
1267
|
+
"filterable",
|
|
1268
|
+
"placeholder",
|
|
1269
|
+
"data",
|
|
1270
|
+
"props"
|
|
1271
|
+
]), m = T(""), h = T(), _ = T(), v = d()?.appContext.config.globalProperties.$messageBox;
|
|
1272
|
+
F(m, (t) => {
|
|
1273
|
+
e.filterable && _.value?.filter(t);
|
|
1274
|
+
});
|
|
1275
|
+
let y = t(() => f?.["show-total"] ?? p?.showTotal ?? !0);
|
|
1276
|
+
function b(t, n) {
|
|
1277
|
+
return t ? n?.[e.props?.label || "label"]?.includes(t) ?? !1 : !0;
|
|
1278
|
+
}
|
|
1279
|
+
function x(e, t) {
|
|
1280
|
+
e?.stopPropagation(), h.value = t.id;
|
|
1281
|
+
}
|
|
1282
|
+
function C(e) {
|
|
1283
|
+
v?.prompt("请输入新的名称", "添加节点", {
|
|
1284
|
+
confirmButtonText: "确定",
|
|
1285
|
+
cancelButtonText: "取消"
|
|
1286
|
+
}).then(({ value: t }) => {
|
|
1287
|
+
u("add", {
|
|
1288
|
+
node: e,
|
|
1289
|
+
value: t
|
|
1290
|
+
});
|
|
1291
|
+
});
|
|
1292
|
+
}
|
|
1293
|
+
function w(t) {
|
|
1294
|
+
v?.prompt("请输入新的名称", "重命名", {
|
|
1295
|
+
confirmButtonText: "确定",
|
|
1296
|
+
cancelButtonText: "取消",
|
|
1297
|
+
inputValue: e.props?.label ? t[e.props?.label] : ""
|
|
1298
|
+
}).then(({ value: e }) => {
|
|
1299
|
+
u("edit", {
|
|
1300
|
+
node: t,
|
|
1301
|
+
value: e
|
|
1302
|
+
});
|
|
1303
|
+
});
|
|
1304
|
+
}
|
|
1305
|
+
async function E(e) {
|
|
1306
|
+
e.id && u("delete", e);
|
|
1307
|
+
}
|
|
1308
|
+
return (t, o) => {
|
|
1309
|
+
let s = O("el-input"), u = O("el-button"), d = O("el-dropdown-item"), f = O("el-dropdown-menu"), h = O("el-dropdown"), v = O("el-tree-v2");
|
|
1310
|
+
return S(), i("div", Ht, [
|
|
1311
|
+
e.filterable ? (S(), i("div", Ut, [l(s, {
|
|
1312
|
+
modelValue: m.value,
|
|
1313
|
+
"onUpdate:modelValue": o[0] ||= (e) => m.value = e,
|
|
1314
|
+
placeholder: e.placeholder ?? "请输入",
|
|
1315
|
+
clearable: ""
|
|
1316
|
+
}, null, 8, ["modelValue", "placeholder"]), p?.hidePlusHandle ? r("", !0) : (S(), n(u, {
|
|
1317
|
+
key: 0,
|
|
1318
|
+
style: {
|
|
1319
|
+
margin: "0px",
|
|
1320
|
+
padding: "0px"
|
|
1321
|
+
},
|
|
1322
|
+
link: "",
|
|
1323
|
+
onClick: o[1] ||= (e) => C()
|
|
1324
|
+
}, {
|
|
1325
|
+
default: I(() => [...o[2] ||= [a("span", { style: { padding: "4px" } }, "+", -1)]]),
|
|
1326
|
+
_: 1
|
|
1327
|
+
}))])) : r("", !0),
|
|
1328
|
+
D(t.$slots, "handle", { style: "margin-top: 8px" }, void 0, !0),
|
|
1329
|
+
l(v, g({
|
|
1330
|
+
ref_key: "treeRef",
|
|
1331
|
+
ref: _,
|
|
1332
|
+
style: { "margin-top": "8px" }
|
|
1333
|
+
}, {
|
|
1334
|
+
...t.$props,
|
|
1335
|
+
...t.$attrs
|
|
1336
|
+
}, {
|
|
1337
|
+
"node-key": p?.nodeKey || "id",
|
|
1338
|
+
"highlight-current": !0,
|
|
1339
|
+
"filter-method": b
|
|
1340
|
+
}), {
|
|
1341
|
+
default: I((s) => [s?.data ? (S(), i("div", Wt, [a("div", Gt, [s.data?.children?.length ? (S(), i("span", Kt, "📁")) : r("", !0), c(" " + j(s.data?.[e.props?.label || "label"]) + " " + j(y.value && s.data?.children?.length ? `(${s.data.children.length})` : ""), 1)]), p.hideNodeHandle ? r("", !0) : (S(), n(h, {
|
|
1342
|
+
key: 0,
|
|
1343
|
+
trigger: "click"
|
|
1344
|
+
}, {
|
|
1345
|
+
dropdown: I(() => [l(f, null, {
|
|
1346
|
+
default: I(() => [
|
|
1347
|
+
p?.hideNodeAdd ? r("", !0) : (S(), n(d, {
|
|
1348
|
+
key: 0,
|
|
1349
|
+
onClick: (e) => C(s.data)
|
|
1350
|
+
}, {
|
|
1351
|
+
default: I(() => [...o[3] ||= [c(" 添加 ", -1)]]),
|
|
1352
|
+
_: 1
|
|
1353
|
+
}, 8, ["onClick"])),
|
|
1354
|
+
p?.hideNodeEdit ? r("", !0) : (S(), n(d, {
|
|
1355
|
+
key: 1,
|
|
1356
|
+
onClick: (e) => w(s.data)
|
|
1357
|
+
}, {
|
|
1358
|
+
default: I(() => [...o[4] ||= [c(" 编辑 ", -1)]]),
|
|
1359
|
+
_: 1
|
|
1360
|
+
}, 8, ["onClick"])),
|
|
1361
|
+
p?.hideNodeDel ? r("", !0) : (S(), n(d, {
|
|
1362
|
+
key: 2,
|
|
1363
|
+
onClick: (e) => E(s.data)
|
|
1364
|
+
}, {
|
|
1365
|
+
default: I(() => [...o[5] ||= [a("span", { style: { color: "#ef4444" } }, "删除", -1)]]),
|
|
1366
|
+
_: 1
|
|
1367
|
+
}, 8, ["onClick"])),
|
|
1368
|
+
D(t.$slots, "node-handle", { data: s.data }, void 0, !0)
|
|
1369
|
+
]),
|
|
1370
|
+
_: 2
|
|
1371
|
+
}, 1024)]),
|
|
1372
|
+
default: I(() => [a("span", {
|
|
1373
|
+
onClick: (e) => x(e, s.data),
|
|
1374
|
+
style: {
|
|
1375
|
+
padding: "4px",
|
|
1376
|
+
"font-weight": "bold"
|
|
1377
|
+
}
|
|
1378
|
+
}, "⋮", 8, qt)]),
|
|
1379
|
+
_: 2
|
|
1380
|
+
}, 1024))])) : r("", !0)]),
|
|
1381
|
+
_: 3
|
|
1382
|
+
}, 16, ["node-key"])
|
|
1383
|
+
]);
|
|
1384
|
+
};
|
|
1385
|
+
}
|
|
1386
|
+
}), Yt = /* @__PURE__ */ L({ default: () => Xt }), Xt = /* @__PURE__ */ R(Jt, [["__scopeId", "data-v-7858d79e"]]), Zt = { style: { height: "100%" } }, Qt = { style: {
|
|
1387
|
+
display: "flex",
|
|
1388
|
+
"flex-direction": "row",
|
|
1389
|
+
"justify-content": "space-between",
|
|
1390
|
+
"align-items": "center",
|
|
1391
|
+
gap: "10px"
|
|
1392
|
+
} }, $t = { style: { margin: "10px 0px" } }, en = ["onClick"], tn = { key: 0 }, nn = /* @__PURE__ */ u({
|
|
1393
|
+
__name: "index",
|
|
1394
|
+
props: {
|
|
1395
|
+
loading: { default: () => T(!1) },
|
|
1396
|
+
data: {},
|
|
1397
|
+
placeholder: {},
|
|
1398
|
+
props: {},
|
|
1399
|
+
vInfiniteScroll: { type: Function },
|
|
1400
|
+
filterable: { type: Boolean }
|
|
1401
|
+
},
|
|
1402
|
+
emits: ["node-click"],
|
|
1403
|
+
setup(o, { emit: s }) {
|
|
1404
|
+
let c = s, l = T(""), u = T(), d = t(() => l.value ? o.data.filter((e) => e[o.props?.label || "label"]?.includes(l.value)) : o.data);
|
|
1405
|
+
F(() => [u.value, o.data?.[0]], (e) => {
|
|
1406
|
+
!e[0] && e[1] && (u.value = o.data?.[0]);
|
|
1407
|
+
}, { immediate: !0 });
|
|
1408
|
+
function f(e) {
|
|
1409
|
+
u.value = e, c("node-click", e);
|
|
1410
|
+
}
|
|
1411
|
+
return (t, s) => {
|
|
1412
|
+
let c = O("el-input");
|
|
1413
|
+
return S(), i("div", Zt, [
|
|
1414
|
+
a("div", Qt, [o.filterable ? (S(), n(c, {
|
|
1415
|
+
key: 0,
|
|
1416
|
+
modelValue: l.value,
|
|
1417
|
+
"onUpdate:modelValue": s[0] ||= (e) => l.value = e,
|
|
1418
|
+
placeholder: o.placeholder ?? "请输入"
|
|
1419
|
+
}, null, 8, ["modelValue", "placeholder"])) : r("", !0), D(t.$slots, "plus", {}, void 0, !0)]),
|
|
1420
|
+
a("div", $t, [D(t.$slots, "handle", {}, void 0, !0)]),
|
|
1421
|
+
oe((S(), i("ul", g({
|
|
1422
|
+
class: "infinite-list",
|
|
1423
|
+
"infinite-scroll-immediate": !1
|
|
1424
|
+
}, t.$attrs), [(S(!0), i(e, null, E(d.value, (e, n) => (S(), i("li", {
|
|
1425
|
+
key: "infinite-list-" + n,
|
|
1426
|
+
class: v({
|
|
1427
|
+
"infinite-list-item": !0,
|
|
1428
|
+
active: e === u.value
|
|
1429
|
+
}),
|
|
1430
|
+
onClick: (t) => f(e)
|
|
1431
|
+
}, [a("span", null, j(e[o.props?.label || "label"]), 1), D(t.$slots, "itemHandle", { data: e }, void 0, !0)], 10, en))), 128))], 16)), [[P(o.vInfiniteScroll), o.vInfiniteScroll]]),
|
|
1432
|
+
o.loading.value ? (S(), i("p", tn, "loading...")) : r("", !0)
|
|
1433
|
+
]);
|
|
1434
|
+
};
|
|
1435
|
+
}
|
|
1436
|
+
}), rn = /* @__PURE__ */ L({ default: () => an }), an = /* @__PURE__ */ R(nn, [["__scopeId", "data-v-0ab5cd97"]]), on = {
|
|
1437
|
+
key: 0,
|
|
1438
|
+
style: {
|
|
1439
|
+
padding: "10px 0px",
|
|
1440
|
+
"margin-bottom": "10px",
|
|
1441
|
+
"border-bottom": "1px solid #e5e5e5"
|
|
1442
|
+
}
|
|
1443
|
+
}, sn = { key: 1 }, cn = /* @__PURE__ */ u({
|
|
1444
|
+
__name: "index",
|
|
1445
|
+
props: {
|
|
1446
|
+
data: {},
|
|
1447
|
+
fields: { default: () => [] },
|
|
1448
|
+
column: { default: 4 },
|
|
1449
|
+
title: { default: "" }
|
|
1450
|
+
},
|
|
1451
|
+
setup(t) {
|
|
1452
|
+
let a = o(t, [
|
|
1453
|
+
"title",
|
|
1454
|
+
"column",
|
|
1455
|
+
"fields",
|
|
1456
|
+
"data"
|
|
1457
|
+
]);
|
|
1458
|
+
return (o, s) => {
|
|
1459
|
+
let c = O("el-descriptions-item"), u = O("el-descriptions");
|
|
1460
|
+
return S(), i(e, null, [
|
|
1461
|
+
t.title ? (S(), i("h4", on, j(t.title), 1)) : r("", !0),
|
|
1462
|
+
D(o.$slots, "title", {}, void 0, !0),
|
|
1463
|
+
l(u, g({ column: t.column }, a, { class: "ui-descriptions" }), {
|
|
1464
|
+
default: I(() => [(S(!0), i(e, null, E(t.fields, (e) => (S(), n(c, {
|
|
1465
|
+
key: e.prop,
|
|
1466
|
+
label: e.label,
|
|
1467
|
+
span: e.span || 2
|
|
1468
|
+
}, {
|
|
1469
|
+
default: I(() => [e.render ? (S(), n(k(P(Dt)(e, t.data).component), g({
|
|
1470
|
+
key: 0,
|
|
1471
|
+
modelValue: t.data[e.prop],
|
|
1472
|
+
"onUpdate:modelValue": (n) => t.data[e.prop] = n
|
|
1473
|
+
}, { ref_for: !0 }, P(Dt)(e, t.data).props, {
|
|
1474
|
+
clearable: !0,
|
|
1475
|
+
key: e.prop,
|
|
1476
|
+
style: { display: "inline-block" }
|
|
1477
|
+
}), null, 16, ["modelValue", "onUpdate:modelValue"])) : (S(), i("span", sn, j(t.data[e.prop] || "-"), 1))]),
|
|
1478
|
+
_: 2
|
|
1479
|
+
}, 1032, ["label", "span"]))), 128))]),
|
|
1480
|
+
_: 1
|
|
1481
|
+
}, 16, ["column"])
|
|
1482
|
+
], 64);
|
|
1483
|
+
};
|
|
1484
|
+
}
|
|
1485
|
+
}), ln = /* @__PURE__ */ L({ default: () => un }), un = /* @__PURE__ */ R(cn, [["__scopeId", "data-v-f02c30f9"]]), dn = {
|
|
1486
|
+
key: 0,
|
|
1487
|
+
style: {
|
|
1488
|
+
display: "flex",
|
|
1489
|
+
"margin-top": "12px",
|
|
1490
|
+
"justify-content": "end"
|
|
1491
|
+
}
|
|
1492
|
+
}, fn = /* @__PURE__ */ u({
|
|
1493
|
+
__name: "index",
|
|
1494
|
+
props: {
|
|
1495
|
+
visible: { type: Boolean },
|
|
1496
|
+
width: {},
|
|
1497
|
+
disabled: { type: Boolean },
|
|
1498
|
+
component: {},
|
|
1499
|
+
componentProps: {}
|
|
1500
|
+
},
|
|
1501
|
+
emits: [
|
|
1502
|
+
"update:visible",
|
|
1503
|
+
"close",
|
|
1504
|
+
"submit"
|
|
1505
|
+
],
|
|
1506
|
+
setup(e, { emit: t }) {
|
|
1507
|
+
let a = t, o = e, s = T();
|
|
1508
|
+
function u() {
|
|
1509
|
+
a("close"), a("update:visible", !1);
|
|
1510
|
+
}
|
|
1511
|
+
function d() {
|
|
1512
|
+
a("submit", N(s?.value || {})), a("update:visible", !1);
|
|
1513
|
+
}
|
|
1514
|
+
return (e, t) => {
|
|
1515
|
+
let a = O("el-button"), f = O("el-dialog");
|
|
1516
|
+
return S(), n(f, g(e.$attrs, {
|
|
1517
|
+
"model-value": o.visible,
|
|
1518
|
+
"show-close": o.disabled,
|
|
1519
|
+
fullscreen: !o.width,
|
|
1520
|
+
"destroy-on-close": "",
|
|
1521
|
+
"lock-scroll": !1,
|
|
1522
|
+
"close-on-click-modal": !1,
|
|
1523
|
+
"onUpdate:modelValue": t[0] ||= (e) => !e && u(),
|
|
1524
|
+
onClose: u
|
|
1525
|
+
}), {
|
|
1526
|
+
default: I(() => [(S(), n(k(o.component), g({
|
|
1527
|
+
ref_key: "slotRef",
|
|
1528
|
+
ref: s
|
|
1529
|
+
}, o.componentProps, {
|
|
1530
|
+
onClose: u,
|
|
1531
|
+
onSubmit: d
|
|
1532
|
+
}), null, 16)), o.disabled ? r("", !0) : (S(), i("div", dn, [l(a, { onClick: u }, {
|
|
1533
|
+
default: I(() => [...t[1] ||= [c("取消", -1)]]),
|
|
1534
|
+
_: 1
|
|
1535
|
+
}), l(a, {
|
|
1536
|
+
type: "primary",
|
|
1537
|
+
onClick: d
|
|
1538
|
+
}, {
|
|
1539
|
+
default: I(() => [...t[2] ||= [c("确定", -1)]]),
|
|
1540
|
+
_: 1
|
|
1541
|
+
})]))]),
|
|
1542
|
+
_: 1
|
|
1543
|
+
}, 16, [
|
|
1544
|
+
"model-value",
|
|
1545
|
+
"show-close",
|
|
1546
|
+
"fullscreen"
|
|
1547
|
+
]);
|
|
1548
|
+
};
|
|
1549
|
+
}
|
|
1550
|
+
}), pn = /* @__PURE__ */ L({ default: () => mn }), mn = fn, hn = window.origin?.includes("localhost") || window.origin?.includes("127.0.0.1") ? "/api" : "/intellicit-service";
|
|
1551
|
+
function gn(e) {
|
|
1552
|
+
return Array.from(new Set(e));
|
|
1553
|
+
}
|
|
1554
|
+
function _n(e, t) {
|
|
1555
|
+
let n = /* @__PURE__ */ new Set();
|
|
1556
|
+
return e.filter((e) => {
|
|
1557
|
+
let r = typeof t == "function" ? t(e) : e[t];
|
|
1558
|
+
return n.has(r) ? !1 : (n.add(r), !0);
|
|
1559
|
+
});
|
|
1560
|
+
}
|
|
1561
|
+
//#endregion
|
|
1562
|
+
//#region src/components/StaffSelect/default.vue
|
|
1563
|
+
var vn = /* @__PURE__ */ u({
|
|
1564
|
+
__name: "default",
|
|
1565
|
+
props: {
|
|
1566
|
+
multiple: { type: Boolean },
|
|
1567
|
+
type: {},
|
|
1568
|
+
valueAt: {},
|
|
1569
|
+
modelValue: {},
|
|
1570
|
+
token: {}
|
|
1571
|
+
},
|
|
1572
|
+
emits: ["update:modelValue"],
|
|
1573
|
+
setup(r, { emit: a }) {
|
|
1574
|
+
let o = r, s = a, c = o.valueAt ?? "all", u = new Headers({
|
|
1575
|
+
"Content-Type": "application/json",
|
|
1576
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
1577
|
+
token: localStorage.getItem("TOKEN") ?? "",
|
|
1578
|
+
Accept: "application/json"
|
|
1579
|
+
}), d = t({
|
|
1580
|
+
get: () => o.modelValue || "",
|
|
1581
|
+
set: (e) => s("update:modelValue", e)
|
|
1582
|
+
}), f = T([]);
|
|
1583
|
+
b(() => {
|
|
1584
|
+
o.modelValue && p(o.modelValue);
|
|
1585
|
+
});
|
|
1586
|
+
async function p(e = "") {
|
|
1587
|
+
f.value = ((await fetch(hn + "/user/pageQueryUser", {
|
|
1588
|
+
method: "POST",
|
|
1589
|
+
headers: u,
|
|
1590
|
+
body: JSON.stringify({
|
|
1591
|
+
page: 1,
|
|
1592
|
+
pageSize: 999,
|
|
1593
|
+
name: e
|
|
1594
|
+
})
|
|
1595
|
+
}).then((e) => e.json()))?.table || []).map((e) => {
|
|
1596
|
+
let t = c === "all" ? `${e.name}(${e.account})` : e[c];
|
|
1597
|
+
return {
|
|
1598
|
+
...e,
|
|
1599
|
+
label: `${e.name}(${e.account})`,
|
|
1600
|
+
value: t
|
|
1601
|
+
};
|
|
1602
|
+
});
|
|
1603
|
+
}
|
|
1604
|
+
async function m(e) {
|
|
1605
|
+
e.length < 1 || (d.value = e, await p(e));
|
|
1606
|
+
}
|
|
1607
|
+
return (t, r) => {
|
|
1608
|
+
let a = O("el-icon"), o = O("el-option"), s = O("el-select");
|
|
1609
|
+
return S(), n(s, g({
|
|
1610
|
+
remote: "",
|
|
1611
|
+
filterable: "",
|
|
1612
|
+
modelValue: d.value,
|
|
1613
|
+
"onUpdate:modelValue": r[0] ||= (e) => d.value = e,
|
|
1614
|
+
"remote-method": m
|
|
1615
|
+
}, t.$attrs), {
|
|
1616
|
+
prefix: I(() => [l(a, null, {
|
|
1617
|
+
default: I(() => [l(P(Ue))]),
|
|
1618
|
+
_: 1
|
|
1619
|
+
})]),
|
|
1620
|
+
default: I(() => [(S(!0), i(e, null, E(f.value, (e) => (S(), n(o, {
|
|
1621
|
+
key: `${e.employeeCode}-${e.employeeName}`,
|
|
1622
|
+
label: e.label,
|
|
1623
|
+
value: e.value
|
|
1624
|
+
}, null, 8, ["label", "value"]))), 128))]),
|
|
1625
|
+
_: 1
|
|
1626
|
+
}, 16, ["modelValue"]);
|
|
1627
|
+
};
|
|
1628
|
+
}
|
|
1629
|
+
}), yn = { style: {
|
|
1630
|
+
display: "flex",
|
|
1631
|
+
"max-width": "100%",
|
|
1632
|
+
gap: "20px",
|
|
1633
|
+
"overflow-y": "scroll",
|
|
1634
|
+
height: "400px"
|
|
1635
|
+
} }, bn = { style: { flex: "1" } }, xn = { style: { width: "320px" } }, Sn = { style: {
|
|
1636
|
+
display: "flex",
|
|
1637
|
+
"justify-content": "space-between",
|
|
1638
|
+
"align-items": "center",
|
|
1639
|
+
"margin-bottom": "8px",
|
|
1640
|
+
height: "30px"
|
|
1641
|
+
} }, Cn = { key: 0 }, wn = { style: {
|
|
1642
|
+
"overflow-y": "auto",
|
|
1643
|
+
height: "90%"
|
|
1644
|
+
} }, Tn = { style: {
|
|
1645
|
+
display: "flex",
|
|
1646
|
+
"justify-content": "end",
|
|
1647
|
+
"align-items": "center"
|
|
1648
|
+
} }, En = /* @__PURE__ */ R(/* @__PURE__ */ u({
|
|
1649
|
+
__name: "dialog",
|
|
1650
|
+
props: {
|
|
1651
|
+
modelValue: {},
|
|
1652
|
+
disabled: {
|
|
1653
|
+
type: Boolean,
|
|
1654
|
+
default: !1
|
|
1655
|
+
},
|
|
1656
|
+
data: {},
|
|
1657
|
+
required: { type: Boolean },
|
|
1658
|
+
valueAt: { default: "all" }
|
|
1659
|
+
},
|
|
1660
|
+
emits: ["update:modelValue", "change"],
|
|
1661
|
+
setup(n, { expose: o, emit: s }) {
|
|
1662
|
+
let u = s, d = ne(), f = n, p = f.valueAt ?? "all", m = T(), h = T(!1), v = new Headers({
|
|
1663
|
+
"Content-Type": "application/json",
|
|
1664
|
+
"X-Requested-With": "XMLHttpRequest",
|
|
1665
|
+
token: localStorage.getItem("TOKEN") ?? "",
|
|
1666
|
+
Accept: "application/json"
|
|
1667
|
+
}), y = C({
|
|
1668
|
+
searchData: [],
|
|
1669
|
+
staffData: [],
|
|
1670
|
+
loading: !1,
|
|
1671
|
+
filterText: "",
|
|
1672
|
+
requiredVisible: !1
|
|
1673
|
+
}), b = T([]), x = T([]), w = t(() => y.searchData?.length ? y.searchData : y.staffData), D = t(() => f.required ?? d?.required ?? !1);
|
|
1674
|
+
ae(() => {
|
|
1675
|
+
x.value = gn(f.modelValue || []);
|
|
1676
|
+
}), ae(() => {
|
|
1677
|
+
h.value && ee();
|
|
1678
|
+
});
|
|
1679
|
+
async function ee() {
|
|
1680
|
+
let e = await fetch(hn + "/department/queryDepartmentTree", {
|
|
1681
|
+
method: "GET",
|
|
1682
|
+
headers: v
|
|
1683
|
+
}).then((e) => e.json());
|
|
1684
|
+
y.staffData = e.data || [], e.data?.[0] && te(e.data?.[0]);
|
|
1685
|
+
}
|
|
1686
|
+
async function k(e) {
|
|
1687
|
+
return fetch(hn + "/user/pageQueryUser", {
|
|
1688
|
+
method: "POST",
|
|
1689
|
+
headers: v,
|
|
1690
|
+
body: JSON.stringify(e)
|
|
1691
|
+
}).then((e) => e.json());
|
|
1692
|
+
}
|
|
1693
|
+
async function te(e, t) {
|
|
1694
|
+
let n = !!e?.data?.code, r = e?.data?.code || e?.code;
|
|
1695
|
+
return !r || e?.data?.account ? t?.([]) : (y.loading = !0, k({
|
|
1696
|
+
page: 1,
|
|
1697
|
+
pageSize: 9999,
|
|
1698
|
+
departmentCode: r
|
|
1699
|
+
}).then((t) => {
|
|
1700
|
+
if (t.code !== "ok") return;
|
|
1701
|
+
let r = (t?.table || []).map((e) => ({
|
|
1702
|
+
...e,
|
|
1703
|
+
code: e.account
|
|
1704
|
+
}));
|
|
1705
|
+
n ? e.data.children = _n([...r, ...e.data.children || []], "code") : e.children = _n([...r, ...e.children || []], "code"), y.loading = !1;
|
|
1706
|
+
}), t?.(e?.children || []));
|
|
1707
|
+
}
|
|
1708
|
+
function A(e, { data: t }) {
|
|
1709
|
+
let n = y.searchData?.length > 0;
|
|
1710
|
+
return t?.account ? e("div", { style: { display: "flex" } }, [e("el-icon", { style: {
|
|
1711
|
+
width: "14px",
|
|
1712
|
+
height: "14px"
|
|
1713
|
+
} }, e(Ue)), n ? t.fullName : t.name]) : n ? t.fullName : t.name;
|
|
1714
|
+
}
|
|
1715
|
+
function M(e) {
|
|
1716
|
+
if (x.value = x.value.filter((t) => t !== e), m.value) {
|
|
1717
|
+
let t = e.match(/\((.*?)\)/)?.[1];
|
|
1718
|
+
_(() => {
|
|
1719
|
+
m.value?.setChecked(t, !1);
|
|
1720
|
+
});
|
|
1721
|
+
}
|
|
1722
|
+
}
|
|
1723
|
+
async function N() {
|
|
1724
|
+
if (!y.filterText?.trim()) return y.searchData = [];
|
|
1725
|
+
let e = await k({
|
|
1726
|
+
page: 1,
|
|
1727
|
+
pageSize: 9999,
|
|
1728
|
+
name: y.filterText?.trim()
|
|
1729
|
+
});
|
|
1730
|
+
if (e.code !== "ok") return z.Message.error(e.message);
|
|
1731
|
+
y.searchData = (e?.table || []).map((e) => ({
|
|
1732
|
+
...e,
|
|
1733
|
+
code: e.account
|
|
1734
|
+
}));
|
|
1735
|
+
}
|
|
1736
|
+
function re(e, t) {
|
|
1737
|
+
let n = t?.checkedNodes?.map((e) => `${e.name}(${e.account ?? e.code})`);
|
|
1738
|
+
x.value = gn([...x.value, ...n]);
|
|
1739
|
+
}
|
|
1740
|
+
function ie() {
|
|
1741
|
+
let e = p === "all" ? x.value : x.value?.map((e) => {
|
|
1742
|
+
let [t, n] = e.split("(");
|
|
1743
|
+
return {
|
|
1744
|
+
name: t.trim(),
|
|
1745
|
+
account: n?.replace(")", "")
|
|
1746
|
+
}[p] || e.trim();
|
|
1747
|
+
});
|
|
1748
|
+
u("change", e), u("update:modelValue", e), h.value = !1, oe();
|
|
1749
|
+
}
|
|
1750
|
+
function F() {
|
|
1751
|
+
u("update:modelValue", void 0), h.value = !1;
|
|
1752
|
+
}
|
|
1753
|
+
function oe() {
|
|
1754
|
+
return y.requiredVisible = D.value && x.value.length === 0, y.requiredVisible;
|
|
1755
|
+
}
|
|
1756
|
+
return o({ validate: oe }), (t, n) => {
|
|
1757
|
+
let o = O("el-select"), s = O("el-input"), u = O("el-tree"), d = O("el-icon"), p = O("el-button"), _ = O("el-dialog");
|
|
1758
|
+
return S(), i(e, null, [a("div", {
|
|
1759
|
+
class: "staff-select-trigger",
|
|
1760
|
+
onClick: n[1] ||= (e) => !f.disabled && (h.value = !0)
|
|
1761
|
+
}, [l(o, g({
|
|
1762
|
+
...t.$attrs,
|
|
1763
|
+
...t.$props
|
|
1764
|
+
}, {
|
|
1765
|
+
modelValue: x.value,
|
|
1766
|
+
"onUpdate:modelValue": n[0] ||= (e) => x.value = e,
|
|
1767
|
+
class: { "is-required": y.requiredVisible },
|
|
1768
|
+
options: b.value,
|
|
1769
|
+
placeholder: "请选择",
|
|
1770
|
+
multiple: "",
|
|
1771
|
+
disabled: f.disabled,
|
|
1772
|
+
props: {
|
|
1773
|
+
label: "label",
|
|
1774
|
+
value: "account"
|
|
1775
|
+
}
|
|
1776
|
+
}), null, 16, [
|
|
1777
|
+
"modelValue",
|
|
1778
|
+
"class",
|
|
1779
|
+
"options",
|
|
1780
|
+
"disabled"
|
|
1781
|
+
])]), l(_, {
|
|
1782
|
+
modelValue: h.value,
|
|
1783
|
+
"onUpdate:modelValue": n[3] ||= (e) => h.value = e,
|
|
1784
|
+
style: {
|
|
1785
|
+
height: "480px",
|
|
1786
|
+
width: "70%",
|
|
1787
|
+
"z-index": "10000"
|
|
1788
|
+
},
|
|
1789
|
+
"show-close": !1,
|
|
1790
|
+
"append-to-body": "",
|
|
1791
|
+
"close-on-click-modal": !1,
|
|
1792
|
+
"destroy-on-close": ""
|
|
1793
|
+
}, {
|
|
1794
|
+
default: I(() => [a("div", yn, [a("div", bn, [l(s, {
|
|
1795
|
+
placeholder: "请输入",
|
|
1796
|
+
modelValue: y.filterText,
|
|
1797
|
+
"onUpdate:modelValue": n[2] ||= (e) => y.filterText = e,
|
|
1798
|
+
clearable: "",
|
|
1799
|
+
"prefix-icon": P(ze),
|
|
1800
|
+
onKeydown: se(N, ["enter"])
|
|
1801
|
+
}, null, 8, ["modelValue", "prefix-icon"]), l(u, {
|
|
1802
|
+
loading: y.loading,
|
|
1803
|
+
data: w.value,
|
|
1804
|
+
props: { label: "fullName" },
|
|
1805
|
+
"highlight-current": !0,
|
|
1806
|
+
"render-content": A,
|
|
1807
|
+
load: te,
|
|
1808
|
+
onCheck: re,
|
|
1809
|
+
"show-checkbox": "",
|
|
1810
|
+
"check-strictly": "",
|
|
1811
|
+
lazy: "",
|
|
1812
|
+
class: "staff-tree",
|
|
1813
|
+
ref_key: "staffDialogRef",
|
|
1814
|
+
ref: m,
|
|
1815
|
+
"node-key": "code"
|
|
1816
|
+
}, null, 8, ["loading", "data"])]), a("div", xn, [a("div", Sn, [n[4] ||= a("h3", null, "已选择", -1), x.value.length ? (S(), i("span", Cn, "已选择" + j(x.value.length) + "个用户", 1)) : r("", !0)]), a("div", wn, [(S(!0), i(e, null, E(x.value, (e) => (S(), i("li", {
|
|
1817
|
+
key: e,
|
|
1818
|
+
class: "staff-item"
|
|
1819
|
+
}, [a("span", null, j(e), 1), l(d, {
|
|
1820
|
+
color: "red",
|
|
1821
|
+
onClick: ce((t) => M(e), ["stop"])
|
|
1822
|
+
}, {
|
|
1823
|
+
default: I(() => [l(P(Ve))]),
|
|
1824
|
+
_: 1
|
|
1825
|
+
}, 8, ["onClick"])]))), 128))])])]), a("div", Tn, [l(p, { onClick: F }, {
|
|
1826
|
+
default: I(() => [...n[5] ||= [c("取消", -1)]]),
|
|
1827
|
+
_: 1
|
|
1828
|
+
}), l(p, {
|
|
1829
|
+
type: "primary",
|
|
1830
|
+
onClick: ie
|
|
1831
|
+
}, {
|
|
1832
|
+
default: I(() => [...n[6] ||= [c("确定", -1)]]),
|
|
1833
|
+
_: 1
|
|
1834
|
+
})])]),
|
|
1835
|
+
_: 1
|
|
1836
|
+
}, 8, ["modelValue"])], 64);
|
|
1837
|
+
};
|
|
1838
|
+
}
|
|
1839
|
+
}), [["__scopeId", "data-v-6c972882"]]), Dn = /* @__PURE__ */ u({
|
|
1840
|
+
__name: "index",
|
|
1841
|
+
props: {
|
|
1842
|
+
multiple: { type: Boolean },
|
|
1843
|
+
type: {},
|
|
1844
|
+
valueAt: {},
|
|
1845
|
+
modelValue: {},
|
|
1846
|
+
token: {}
|
|
1847
|
+
},
|
|
1848
|
+
setup(e, { expose: t }) {
|
|
1849
|
+
let r = e, i = T();
|
|
1850
|
+
return t({ validate: () => i.value?.validate?.() }), (e, t) => (S(), n(k(r?.type === "dialog" ? En : vn), g({
|
|
1851
|
+
ref_key: "staffSelectRef",
|
|
1852
|
+
ref: i
|
|
1853
|
+
}, {
|
|
1854
|
+
...e.$attrs,
|
|
1855
|
+
...r
|
|
1856
|
+
}), null, 16));
|
|
1857
|
+
}
|
|
1858
|
+
}), On = /* @__PURE__ */ L({ default: () => kn }), kn = Dn, An = /* @__PURE__ */ R(/* @__PURE__ */ u({
|
|
1859
|
+
__name: "file",
|
|
1860
|
+
props: {
|
|
1861
|
+
icon: {},
|
|
1862
|
+
limit: {},
|
|
1863
|
+
size: {},
|
|
1864
|
+
prop: {},
|
|
1865
|
+
text: {},
|
|
1866
|
+
type: {},
|
|
1867
|
+
defaultValue: {},
|
|
1868
|
+
fileList: {},
|
|
1869
|
+
action: {},
|
|
1870
|
+
onChange: { type: Function }
|
|
1871
|
+
},
|
|
1872
|
+
setup(e) {
|
|
1873
|
+
let r = e, { text: i = "选择文件", icon: a = void 0, size: o = "default" } = r, u = ne(), d = u.disabled, f = T(r.fileList || []);
|
|
1874
|
+
F(() => r.fileList, (e) => {
|
|
1875
|
+
f.value = e || [];
|
|
1876
|
+
}, {
|
|
1877
|
+
immediate: !0,
|
|
1878
|
+
deep: !0
|
|
1879
|
+
});
|
|
1880
|
+
let p = t(() => r.limit && u.count < r.limit), m = t(() => r.limit && u.count >= r.limit), h = t(() => r.limit === void 0 ? !1 : !p.value);
|
|
1881
|
+
return (e, t) => {
|
|
1882
|
+
let u = O("el-button"), _ = O("el-upload");
|
|
1883
|
+
return S(), n(_, g(e.$attrs, {
|
|
1884
|
+
style: { width: "100%" },
|
|
1885
|
+
action: r.action,
|
|
1886
|
+
"file-list": f.value,
|
|
1887
|
+
"onUpdate:fileList": t[0] ||= (e) => f.value = e,
|
|
1888
|
+
limit: r.limit,
|
|
1889
|
+
class: {
|
|
1890
|
+
"hide-upload-list": p.value,
|
|
1891
|
+
"hide-upload-text": m.value
|
|
1892
|
+
}
|
|
1893
|
+
}), s({
|
|
1894
|
+
default: I(() => [D(e.$slots, "tip", {}, void 0, !0)]),
|
|
1895
|
+
_: 2
|
|
1896
|
+
}, [h.value ? void 0 : {
|
|
1897
|
+
name: "trigger",
|
|
1898
|
+
fn: I(() => [l(u, {
|
|
1899
|
+
type: "primary",
|
|
1900
|
+
plain: "",
|
|
1901
|
+
icon: P(a),
|
|
1902
|
+
size: P(o),
|
|
1903
|
+
disabled: P(d)
|
|
1904
|
+
}, {
|
|
1905
|
+
default: I(() => [c(j(P(i)), 1)]),
|
|
1906
|
+
_: 1
|
|
1907
|
+
}, 8, [
|
|
1908
|
+
"icon",
|
|
1909
|
+
"size",
|
|
1910
|
+
"disabled"
|
|
1911
|
+
])]),
|
|
1912
|
+
key: "0"
|
|
1913
|
+
}]), 1040, [
|
|
1914
|
+
"action",
|
|
1915
|
+
"file-list",
|
|
1916
|
+
"limit",
|
|
1917
|
+
"class"
|
|
1918
|
+
]);
|
|
1919
|
+
};
|
|
1920
|
+
}
|
|
1921
|
+
}), [["__scopeId", "data-v-43d34dc4"]]), jn = ["src"], Mn = /* @__PURE__ */ u({
|
|
1922
|
+
__name: "image",
|
|
1923
|
+
props: {
|
|
1924
|
+
icon: {},
|
|
1925
|
+
limit: {},
|
|
1926
|
+
size: {},
|
|
1927
|
+
prop: {},
|
|
1928
|
+
text: {},
|
|
1929
|
+
type: {},
|
|
1930
|
+
defaultValue: {},
|
|
1931
|
+
fileList: {},
|
|
1932
|
+
action: {},
|
|
1933
|
+
onChange: { type: Function }
|
|
1934
|
+
},
|
|
1935
|
+
emits: ["update:fileList"],
|
|
1936
|
+
setup(n, { emit: r }) {
|
|
1937
|
+
let o = n, s = T({}), c = T(!1), u = r, d = t({
|
|
1938
|
+
get: () => o.fileList || [],
|
|
1939
|
+
set: (e) => u("update:fileList", e)
|
|
1940
|
+
});
|
|
1941
|
+
function f(e) {
|
|
1942
|
+
s.value = e, c.value = !0;
|
|
1943
|
+
}
|
|
1944
|
+
return (t, n) => {
|
|
1945
|
+
let r = O("el-icon"), u = O("el-upload"), p = O("el-dialog");
|
|
1946
|
+
return S(), i(e, null, [l(u, g({
|
|
1947
|
+
accept: "image/*",
|
|
1948
|
+
action: o.action,
|
|
1949
|
+
"auto-upload": !1
|
|
1950
|
+
}, t.$attrs, {
|
|
1951
|
+
"list-type": "picture-card",
|
|
1952
|
+
"on-preview": f,
|
|
1953
|
+
"file-list": d.value,
|
|
1954
|
+
"onUpdate:fileList": n[0] ||= (e) => d.value = e
|
|
1955
|
+
}), {
|
|
1956
|
+
default: I(() => [l(r, null, {
|
|
1957
|
+
default: I(() => [l(P(Ge))]),
|
|
1958
|
+
_: 1
|
|
1959
|
+
})]),
|
|
1960
|
+
_: 1
|
|
1961
|
+
}, 16, ["action", "file-list"]), l(p, {
|
|
1962
|
+
modelValue: c.value,
|
|
1963
|
+
"onUpdate:modelValue": n[1] ||= (e) => c.value = e
|
|
1964
|
+
}, {
|
|
1965
|
+
default: I(() => [a("img", {
|
|
1966
|
+
"w-full": "",
|
|
1967
|
+
src: s.value.url,
|
|
1968
|
+
alt: "预览"
|
|
1969
|
+
}, null, 8, jn)]),
|
|
1970
|
+
_: 1
|
|
1971
|
+
}, 8, ["modelValue"])], 64);
|
|
1972
|
+
};
|
|
1973
|
+
}
|
|
1974
|
+
}), Nn = /* @__PURE__ */ u({
|
|
1975
|
+
__name: "index",
|
|
1976
|
+
props: {
|
|
1977
|
+
icon: {},
|
|
1978
|
+
limit: {},
|
|
1979
|
+
size: {},
|
|
1980
|
+
prop: {},
|
|
1981
|
+
text: {},
|
|
1982
|
+
type: {},
|
|
1983
|
+
defaultValue: {},
|
|
1984
|
+
fileList: {},
|
|
1985
|
+
action: {},
|
|
1986
|
+
onChange: { type: Function },
|
|
1987
|
+
data: {}
|
|
1988
|
+
},
|
|
1989
|
+
emits: [
|
|
1990
|
+
"update:modelValue",
|
|
1991
|
+
"update:fileList",
|
|
1992
|
+
"change",
|
|
1993
|
+
"success",
|
|
1994
|
+
"error",
|
|
1995
|
+
"exceed",
|
|
1996
|
+
"remove"
|
|
1997
|
+
],
|
|
1998
|
+
setup(e, { emit: r }) {
|
|
1999
|
+
let i = r, a = e, { type: o = "file", onChange: s, limit: c, action: l, data: u, prop: d, fileList: f, ...p } = a, m = l || hn + "/attachment/uploadAttachment", h = { token: localStorage.getItem("TOKEN") || "" }, _ = t(() => u && d && u[d] ? u[d] : a.fileList || []), v = t(() => _.value.length);
|
|
2000
|
+
function y(e) {
|
|
2001
|
+
i("update:fileList", e);
|
|
2002
|
+
}
|
|
2003
|
+
function b(e, t) {
|
|
2004
|
+
let n = Array.isArray(t) ? t : [];
|
|
2005
|
+
s?.(n, e), i("update:fileList", n), i("update:modelValue", n), i("change", n);
|
|
2006
|
+
}
|
|
2007
|
+
function x() {
|
|
2008
|
+
c && z.Message.warning(`最多只能上传 ${c} 个文件`);
|
|
2009
|
+
}
|
|
2010
|
+
function C(e, t) {
|
|
2011
|
+
i("update:fileList", t), i("update:modelValue", t), i("remove", t);
|
|
2012
|
+
}
|
|
2013
|
+
function w(e, t) {
|
|
2014
|
+
let n = [...a.fileList || []];
|
|
2015
|
+
if (e?.code !== "ok") return z.Message.error(e?.message);
|
|
2016
|
+
let r = hn + `/attachment/downloadAttachment?objectKey=${e.data?.objectKey}&fileName=${e.data?.fileName}&token=${h.token}`;
|
|
2017
|
+
n.some((t) => t?.objectKey === e.data?.objectKey) || n.push({
|
|
2018
|
+
name: t.name,
|
|
2019
|
+
uid: t.uid,
|
|
2020
|
+
size: t.size,
|
|
2021
|
+
status: "success",
|
|
2022
|
+
...e.data,
|
|
2023
|
+
url: r
|
|
2024
|
+
}), i("update:fileList", n), i("update:modelValue", n), i("success", n);
|
|
2025
|
+
}
|
|
2026
|
+
function T(e, t, n) {
|
|
2027
|
+
i("update:fileList", n), i("update:modelValue", n);
|
|
2028
|
+
}
|
|
2029
|
+
return (e, t) => (S(), n(k(P(o) === "image" ? Mn : An), g({
|
|
2030
|
+
ref: "uploadInstance",
|
|
2031
|
+
name: "file",
|
|
2032
|
+
action: P(m),
|
|
2033
|
+
headers: h,
|
|
2034
|
+
"on-change": b,
|
|
2035
|
+
"on-exceed": x,
|
|
2036
|
+
"on-remove": C,
|
|
2037
|
+
"on-success": w,
|
|
2038
|
+
"on-error": T,
|
|
2039
|
+
"file-list": _.value,
|
|
2040
|
+
"onUpdate:fileList": y,
|
|
2041
|
+
count: v.value,
|
|
2042
|
+
limit: P(c)
|
|
2043
|
+
}, p), null, 16, [
|
|
2044
|
+
"action",
|
|
2045
|
+
"file-list",
|
|
2046
|
+
"count",
|
|
2047
|
+
"limit"
|
|
2048
|
+
]));
|
|
2049
|
+
}
|
|
2050
|
+
}), Pn = /* @__PURE__ */ L({ default: () => Fn }), Fn = Nn, In = new Headers({
|
|
2051
|
+
"Content-Type": "application/json",
|
|
2052
|
+
token: localStorage.getItem("TOKEN") || ""
|
|
2053
|
+
});
|
|
2054
|
+
async function Ln(e, t) {
|
|
2055
|
+
let n = `${hn}${e}`;
|
|
2056
|
+
if (t) {
|
|
2057
|
+
let e = new URLSearchParams(t).toString();
|
|
2058
|
+
e && (n = `${n}?${e}`);
|
|
2059
|
+
}
|
|
2060
|
+
return (await fetch(n, {
|
|
2061
|
+
headers: In,
|
|
2062
|
+
method: "GET"
|
|
2063
|
+
})).json();
|
|
2064
|
+
}
|
|
2065
|
+
async function Rn(e, t) {
|
|
2066
|
+
return (await fetch(`${hn}${e}`, {
|
|
2067
|
+
headers: In,
|
|
2068
|
+
method: "POST",
|
|
2069
|
+
body: JSON.stringify(t)
|
|
2070
|
+
})).json();
|
|
2071
|
+
}
|
|
2072
|
+
async function zn(e, t) {
|
|
2073
|
+
return (await fetch(`${hn}${e}`, {
|
|
2074
|
+
headers: In,
|
|
2075
|
+
method: "POST",
|
|
2076
|
+
body: JSON.stringify(t)
|
|
2077
|
+
})).blob();
|
|
2078
|
+
}
|
|
2079
|
+
var Bn = {
|
|
2080
|
+
get: Ln,
|
|
2081
|
+
post: Rn,
|
|
2082
|
+
blob: zn
|
|
2083
|
+
};
|
|
2084
|
+
//#endregion
|
|
2085
|
+
//#region src/hooks/useFetch.ts
|
|
2086
|
+
function Vn(e, t = {}) {
|
|
2087
|
+
let { immediate: n = !0, method: r = "GET", onBefore: i, onSuccess: a, onError: o, onFinally: s, ...c } = t, l = localStorage.getItem("TOKEN"), u = {
|
|
2088
|
+
method: r,
|
|
2089
|
+
headers: new Headers({
|
|
2090
|
+
"Content-Type": "application/json",
|
|
2091
|
+
token: l ?? "",
|
|
2092
|
+
...c.headers || {}
|
|
2093
|
+
})
|
|
2094
|
+
}, d = T(!1), f = T(null), m = T(null), h = C({}), g = !1;
|
|
2095
|
+
async function v() {
|
|
2096
|
+
if (g) return Promise.reject(/* @__PURE__ */ Error("请求正在进行中,请勿重复触发"));
|
|
2097
|
+
g = !0, d.value = !0, m.value = null;
|
|
2098
|
+
try {
|
|
2099
|
+
b = JSON.stringify(M(h)), x = p(t.ready) ? t.ready.value : t.ready ?? !0;
|
|
2100
|
+
let n = hn + e;
|
|
2101
|
+
if (i?.(u) === !1) return Promise.reject(/* @__PURE__ */ Error("请求被 onBefore 钩子取消"));
|
|
2102
|
+
if (r === "GET") {
|
|
2103
|
+
let e = new URLSearchParams(M(h)).toString();
|
|
2104
|
+
e && (n = `${n}?${e}`);
|
|
2105
|
+
} else u.body = JSON.stringify(M(h));
|
|
2106
|
+
let o = await (await fetch(n, u)).json();
|
|
2107
|
+
return o.code ? ["return.optSuccess", "ok"].includes(o.code) || z.Message.error(o.message || "未知错误!") : o.data?.success || z.Message.error(o.message || "未知错误!"), f.value = o, a?.(o), o;
|
|
2108
|
+
} catch (e) {
|
|
2109
|
+
let t = e instanceof Error ? e : Error(String(e));
|
|
2110
|
+
throw m.value = t, console.error("请求发生错误:", t), o?.(t), t;
|
|
2111
|
+
} finally {
|
|
2112
|
+
d.value = !1, g = !1, s?.();
|
|
2113
|
+
}
|
|
2114
|
+
}
|
|
2115
|
+
let y = null, b = "", x;
|
|
2116
|
+
ae(() => {
|
|
2117
|
+
let e = N(c.defaultParams);
|
|
2118
|
+
Object.keys(h).forEach((e) => delete h[e]), Object.assign(h, e || {}), y && clearTimeout(y), y = setTimeout(() => {
|
|
2119
|
+
let e = p(t.ready) ? t.ready.value : t.ready ?? !0, r = JSON.stringify(M(h));
|
|
2120
|
+
n && e && !g && (r !== b || e !== x) && (b = r, x = e, _(() => v()));
|
|
2121
|
+
}, 10);
|
|
2122
|
+
});
|
|
2123
|
+
function S(e) {
|
|
2124
|
+
for (let e in h) h[e] = void 0;
|
|
2125
|
+
Object.assign(h, e);
|
|
2126
|
+
}
|
|
2127
|
+
return {
|
|
2128
|
+
execute: v,
|
|
2129
|
+
loading: d,
|
|
2130
|
+
data: f,
|
|
2131
|
+
error: m,
|
|
2132
|
+
params: h,
|
|
2133
|
+
setParams: S
|
|
2134
|
+
};
|
|
2135
|
+
}
|
|
2136
|
+
//#endregion
|
|
2137
|
+
//#region src/hooks/useTable/default.ts
|
|
2138
|
+
function Hn(e, t) {
|
|
2139
|
+
let n = C({
|
|
2140
|
+
ignoreAttrs: [
|
|
2141
|
+
"tableName",
|
|
2142
|
+
"sort",
|
|
2143
|
+
...t?.ignoreAttrs || []
|
|
2144
|
+
],
|
|
2145
|
+
replaceAttrs: t?.replaceAttrs || {
|
|
2146
|
+
table: "table",
|
|
2147
|
+
total: "total"
|
|
2148
|
+
}
|
|
2149
|
+
}), r = A([]), i = C({
|
|
2150
|
+
total: 0,
|
|
2151
|
+
page: 1,
|
|
2152
|
+
pageSize: 10
|
|
2153
|
+
}), a = T([]), o = C({
|
|
2154
|
+
page: 1,
|
|
2155
|
+
pageSize: 10
|
|
2156
|
+
});
|
|
2157
|
+
if (t?.onBefore?.(o) === !1) return {
|
|
2158
|
+
loading: T(!1),
|
|
2159
|
+
data: r,
|
|
2160
|
+
pagination: i
|
|
2161
|
+
};
|
|
2162
|
+
let s = Vn(e, {
|
|
2163
|
+
...t,
|
|
2164
|
+
defaultParams: o,
|
|
2165
|
+
onSuccess: (e) => {
|
|
2166
|
+
t?.onSuccess?.(e), i.total = e[n?.replaceAttrs?.total] || 0, r.value = e[n?.replaceAttrs?.table] || [];
|
|
2167
|
+
}
|
|
2168
|
+
});
|
|
2169
|
+
ae(() => {
|
|
2170
|
+
let e = N(t.defaultParams || {});
|
|
2171
|
+
i.page = 1, i.pageSize = 10;
|
|
2172
|
+
for (let t in e) t !== "page" && t !== "pageSize" && (o[t] = e[t]);
|
|
2173
|
+
});
|
|
2174
|
+
function c(e = {}) {
|
|
2175
|
+
i.page = 1, i.pageSize = 10, e && (Object.keys(o).forEach((t) => {
|
|
2176
|
+
n.ignoreAttrs?.includes(t) || Object.keys(e).includes(t) || delete o[t];
|
|
2177
|
+
}), Object.assign(o, {
|
|
2178
|
+
...e,
|
|
2179
|
+
page: 1,
|
|
2180
|
+
pageSize: 10
|
|
2181
|
+
}));
|
|
2182
|
+
}
|
|
2183
|
+
function l({ page: e, pageSize: t }) {
|
|
2184
|
+
i.page = e, i.pageSize = t, Object.assign(o, {
|
|
2185
|
+
page: e,
|
|
2186
|
+
pageSize: t
|
|
2187
|
+
});
|
|
2188
|
+
}
|
|
2189
|
+
function u(e) {
|
|
2190
|
+
a.value = e;
|
|
2191
|
+
}
|
|
2192
|
+
return C({
|
|
2193
|
+
...s,
|
|
2194
|
+
data: r,
|
|
2195
|
+
pagination: i,
|
|
2196
|
+
selection: a,
|
|
2197
|
+
reset: c,
|
|
2198
|
+
updatePagination: l,
|
|
2199
|
+
selectionChange: u
|
|
2200
|
+
});
|
|
2201
|
+
}
|
|
2202
|
+
//#endregion
|
|
2203
|
+
//#region src/hooks/useTable/common.ts
|
|
2204
|
+
function Un(e, n) {
|
|
2205
|
+
let { defaultParams: r, ...i } = n, a = p(r) ? r : T(r || {}), o = Hn(e, {
|
|
2206
|
+
...i,
|
|
2207
|
+
ready: t(() => {
|
|
2208
|
+
let e = p(n.ready) ? n.ready.value : n.ready, t = !!a.value?.tableId;
|
|
2209
|
+
return (e === void 0 || e) && t;
|
|
2210
|
+
}),
|
|
2211
|
+
defaultParams: t(() => {
|
|
2212
|
+
let { tableId: e, page: t, pageSize: n, sort: r, ...i } = N(a) || {};
|
|
2213
|
+
return {
|
|
2214
|
+
tableId: e,
|
|
2215
|
+
page: t || 1,
|
|
2216
|
+
pageSize: n || 10,
|
|
2217
|
+
params: {
|
|
2218
|
+
...i,
|
|
2219
|
+
sort: r
|
|
2220
|
+
}
|
|
2221
|
+
};
|
|
2222
|
+
}),
|
|
2223
|
+
ignoreAttrs: [
|
|
2224
|
+
"tableName",
|
|
2225
|
+
"sort",
|
|
2226
|
+
...n?.ignoreAttrs || []
|
|
2227
|
+
]
|
|
2228
|
+
});
|
|
2229
|
+
function s(e = {}) {
|
|
2230
|
+
Object.assign(a.value, e, {
|
|
2231
|
+
page: 1,
|
|
2232
|
+
pageSize: 10
|
|
2233
|
+
});
|
|
2234
|
+
}
|
|
2235
|
+
async function c(e) {
|
|
2236
|
+
let t = N(a);
|
|
2237
|
+
return Bn.post("/common/insert", {
|
|
2238
|
+
params: { ...e },
|
|
2239
|
+
tableId: t?.tableId
|
|
2240
|
+
});
|
|
2241
|
+
}
|
|
2242
|
+
async function l(e) {
|
|
2243
|
+
let t = N(a);
|
|
2244
|
+
return Bn.post("/common/update", {
|
|
2245
|
+
params: { ...e },
|
|
2246
|
+
tableId: t?.tableId
|
|
2247
|
+
});
|
|
2248
|
+
}
|
|
2249
|
+
async function u(e) {
|
|
2250
|
+
let t = N(a);
|
|
2251
|
+
return Bn.post("/common/delete", {
|
|
2252
|
+
idList: e,
|
|
2253
|
+
tableId: t?.tableId
|
|
2254
|
+
});
|
|
2255
|
+
}
|
|
2256
|
+
async function d(t) {
|
|
2257
|
+
let { title: n = "export" } = t || {}, r = N(a), i = await Bn.blob(e ?? "/common/exportExcel", {
|
|
2258
|
+
tableId: r?.tableId,
|
|
2259
|
+
type: "all"
|
|
2260
|
+
}), o = new Blob([i]), s = document.createElement("a");
|
|
2261
|
+
s.href = window.URL.createObjectURL(o), s.download = `${n}.xlsx`, s.click(), z.Message.success("导出成功"), window.URL.revokeObjectURL(s.href);
|
|
2262
|
+
}
|
|
2263
|
+
let f = C({
|
|
2264
|
+
loading: !1,
|
|
2265
|
+
data: [],
|
|
2266
|
+
insert: c,
|
|
2267
|
+
update: l,
|
|
2268
|
+
remove: u,
|
|
2269
|
+
delete: u,
|
|
2270
|
+
exportData: d
|
|
2271
|
+
});
|
|
2272
|
+
return ae(() => {
|
|
2273
|
+
Object.assign(f, o, { reset: s });
|
|
2274
|
+
}), f;
|
|
2275
|
+
}
|
|
2276
|
+
//#endregion
|
|
2277
|
+
//#region src/hooks/useTable/index.ts
|
|
2278
|
+
function Wn(e, t) {
|
|
2279
|
+
return e?.includes("/common/pageQuery") ? Un(e, t) : Hn(e, t);
|
|
2280
|
+
}
|
|
2281
|
+
//#endregion
|
|
2282
|
+
//#region src/hooks/useRoute.ts
|
|
2283
|
+
var Gn = T(window.location.pathname), Kn = T(Object.fromEntries(new URLSearchParams(window.location.search))), qn = T(window.location.hash);
|
|
2284
|
+
window.addEventListener("popstate", () => {
|
|
2285
|
+
Gn.value = window.location.pathname, Kn.value = Object.fromEntries(new URLSearchParams(window.location.search)), qn.value = window.location.hash;
|
|
2286
|
+
});
|
|
2287
|
+
function Jn(e) {
|
|
2288
|
+
let t = {}, n = e.match(/\/user\/(\d+)/);
|
|
2289
|
+
return n && (t.id = n[1]), t;
|
|
2290
|
+
}
|
|
2291
|
+
function Yn() {
|
|
2292
|
+
return w({
|
|
2293
|
+
path: t(() => Gn.value),
|
|
2294
|
+
query: t(() => Kn.value),
|
|
2295
|
+
hash: t(() => qn.value),
|
|
2296
|
+
fullPath: t(() => window.location.href),
|
|
2297
|
+
params: t(() => Jn(Gn.value))
|
|
2298
|
+
});
|
|
2299
|
+
}
|
|
2300
|
+
function Xn() {
|
|
2301
|
+
function e(e) {
|
|
2302
|
+
window.history.pushState({}, "", e), Gn.value = window.location.pathname, Kn.value = Object.fromEntries(new URLSearchParams(window.location.search)), qn.value = window.location.hash;
|
|
2303
|
+
}
|
|
2304
|
+
function t(e) {
|
|
2305
|
+
window.history.replaceState({}, "", e), Gn.value = window.location.pathname, Kn.value = Object.fromEntries(new URLSearchParams(window.location.search)), qn.value = window.location.hash;
|
|
2306
|
+
}
|
|
2307
|
+
function n() {
|
|
2308
|
+
window.history.back();
|
|
2309
|
+
}
|
|
2310
|
+
return {
|
|
2311
|
+
push: e,
|
|
2312
|
+
replace: t,
|
|
2313
|
+
back: n
|
|
2314
|
+
};
|
|
2315
|
+
}
|
|
2316
|
+
//#endregion
|
|
2317
|
+
//#region src/hooks/useDictionary.ts
|
|
2318
|
+
function Zn(e) {
|
|
2319
|
+
return Bn.post("/dictionary/mergeDictionaryValue", e);
|
|
2320
|
+
}
|
|
2321
|
+
function Qn(e) {
|
|
2322
|
+
let { page: t = 1, pageSize: n = 10 } = e || {}, r = A([]), i = A([]), { loading: a, execute: o } = Vn("/dictionary/pageQueryDictionaryValue", {
|
|
2323
|
+
method: "POST",
|
|
2324
|
+
defaultParams: {
|
|
2325
|
+
dictionaryCode: e.code,
|
|
2326
|
+
page: t,
|
|
2327
|
+
pageSize: n
|
|
2328
|
+
},
|
|
2329
|
+
onSuccess: (e) => {
|
|
2330
|
+
e.code === "ok" && (r.value = e.table || [], i.value = r.value.map((e) => ({
|
|
2331
|
+
label: e.name,
|
|
2332
|
+
value: e.code,
|
|
2333
|
+
description: e.description
|
|
2334
|
+
})));
|
|
2335
|
+
}
|
|
2336
|
+
});
|
|
2337
|
+
async function s(e) {
|
|
2338
|
+
let t = await Zn(e);
|
|
2339
|
+
return t.code === "ok" ? t : z.Message.error(t.message);
|
|
2340
|
+
}
|
|
2341
|
+
return C({
|
|
2342
|
+
loading: a,
|
|
2343
|
+
data: r,
|
|
2344
|
+
options: i,
|
|
2345
|
+
update: s,
|
|
2346
|
+
execute: o
|
|
2347
|
+
});
|
|
2348
|
+
}
|
|
2349
|
+
//#endregion
|
|
2350
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/util.js
|
|
2351
|
+
var $n = "0123456789abcdefghijklmnopqrstuvwxyz";
|
|
2352
|
+
function H(e) {
|
|
2353
|
+
return $n.charAt(e);
|
|
2354
|
+
}
|
|
2355
|
+
function er(e, t) {
|
|
2356
|
+
return e & t;
|
|
2357
|
+
}
|
|
2358
|
+
function tr(e, t) {
|
|
2359
|
+
return e | t;
|
|
2360
|
+
}
|
|
2361
|
+
function nr(e, t) {
|
|
2362
|
+
return e ^ t;
|
|
2363
|
+
}
|
|
2364
|
+
function rr(e, t) {
|
|
2365
|
+
return e & ~t;
|
|
2366
|
+
}
|
|
2367
|
+
function ir(e) {
|
|
2368
|
+
if (e == 0) return -1;
|
|
2369
|
+
var t = 0;
|
|
2370
|
+
return e & 65535 || (e >>= 16, t += 16), e & 255 || (e >>= 8, t += 8), e & 15 || (e >>= 4, t += 4), e & 3 || (e >>= 2, t += 2), e & 1 || ++t, t;
|
|
2371
|
+
}
|
|
2372
|
+
function ar(e) {
|
|
2373
|
+
for (var t = 0; e != 0;) e &= e - 1, ++t;
|
|
2374
|
+
return t;
|
|
2375
|
+
}
|
|
2376
|
+
//#endregion
|
|
2377
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/base64.js
|
|
2378
|
+
var or = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", sr = "=";
|
|
2379
|
+
function cr(e) {
|
|
2380
|
+
var t, n, r = "";
|
|
2381
|
+
for (t = 0; t + 3 <= e.length; t += 3) n = parseInt(e.substring(t, t + 3), 16), r += or.charAt(n >> 6) + or.charAt(n & 63);
|
|
2382
|
+
for (t + 1 == e.length ? (n = parseInt(e.substring(t, t + 1), 16), r += or.charAt(n << 2)) : t + 2 == e.length && (n = parseInt(e.substring(t, t + 2), 16), r += or.charAt(n >> 2) + or.charAt((n & 3) << 4)); (r.length & 3) > 0;) r += sr;
|
|
2383
|
+
return r;
|
|
2384
|
+
}
|
|
2385
|
+
function lr(e) {
|
|
2386
|
+
var t = "", n, r = 0, i = 0;
|
|
2387
|
+
for (n = 0; n < e.length && e.charAt(n) != sr; ++n) {
|
|
2388
|
+
var a = or.indexOf(e.charAt(n));
|
|
2389
|
+
a < 0 || (r == 0 ? (t += H(a >> 2), i = a & 3, r = 1) : r == 1 ? (t += H(i << 2 | a >> 4), i = a & 15, r = 2) : r == 2 ? (t += H(i), t += H(a >> 2), i = a & 3, r = 3) : (t += H(i << 2 | a >> 4), t += H(a & 15), r = 0));
|
|
2390
|
+
}
|
|
2391
|
+
return r == 1 && (t += H(i << 2)), t;
|
|
2392
|
+
}
|
|
2393
|
+
//#endregion
|
|
2394
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/asn1js/hex.js
|
|
2395
|
+
var ur, dr = { decode: function(e) {
|
|
2396
|
+
var t;
|
|
2397
|
+
if (ur === void 0) {
|
|
2398
|
+
var n = "0123456789ABCDEF", r = " \f\n\r \xA0\u2028\u2029";
|
|
2399
|
+
for (ur = {}, t = 0; t < 16; ++t) ur[n.charAt(t)] = t;
|
|
2400
|
+
for (n = n.toLowerCase(), t = 10; t < 16; ++t) ur[n.charAt(t)] = t;
|
|
2401
|
+
for (t = 0; t < r.length; ++t) ur[r.charAt(t)] = -1;
|
|
2402
|
+
}
|
|
2403
|
+
var i = [], a = 0, o = 0;
|
|
2404
|
+
for (t = 0; t < e.length; ++t) {
|
|
2405
|
+
var s = e.charAt(t);
|
|
2406
|
+
if (s == "=") break;
|
|
2407
|
+
if (s = ur[s], s != -1) {
|
|
2408
|
+
if (s === void 0) throw Error("Illegal character at offset " + t);
|
|
2409
|
+
a |= s, ++o >= 2 ? (i[i.length] = a, a = 0, o = 0) : a <<= 4;
|
|
2410
|
+
}
|
|
2411
|
+
}
|
|
2412
|
+
if (o) throw Error("Hex encoding incomplete: 4 bits missing");
|
|
2413
|
+
return i;
|
|
2414
|
+
} }, fr, pr = {
|
|
2415
|
+
decode: function(e) {
|
|
2416
|
+
var t;
|
|
2417
|
+
if (fr === void 0) {
|
|
2418
|
+
var n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", r = "= \f\n\r \xA0\u2028\u2029";
|
|
2419
|
+
for (fr = Object.create(null), t = 0; t < 64; ++t) fr[n.charAt(t)] = t;
|
|
2420
|
+
for (fr["-"] = 62, fr._ = 63, t = 0; t < r.length; ++t) fr[r.charAt(t)] = -1;
|
|
2421
|
+
}
|
|
2422
|
+
var i = [], a = 0, o = 0;
|
|
2423
|
+
for (t = 0; t < e.length; ++t) {
|
|
2424
|
+
var s = e.charAt(t);
|
|
2425
|
+
if (s == "=") break;
|
|
2426
|
+
if (s = fr[s], s != -1) {
|
|
2427
|
+
if (s === void 0) throw Error("Illegal character at offset " + t);
|
|
2428
|
+
a |= s, ++o >= 4 ? (i[i.length] = a >> 16, i[i.length] = a >> 8 & 255, i[i.length] = a & 255, a = 0, o = 0) : a <<= 6;
|
|
2429
|
+
}
|
|
2430
|
+
}
|
|
2431
|
+
switch (o) {
|
|
2432
|
+
case 1: throw Error("Base64 encoding incomplete: at least 2 bits missing");
|
|
2433
|
+
case 2:
|
|
2434
|
+
i[i.length] = a >> 10;
|
|
2435
|
+
break;
|
|
2436
|
+
case 3:
|
|
2437
|
+
i[i.length] = a >> 16, i[i.length] = a >> 8 & 255;
|
|
2438
|
+
break;
|
|
2439
|
+
}
|
|
2440
|
+
return i;
|
|
2441
|
+
},
|
|
2442
|
+
re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
|
|
2443
|
+
unarmor: function(e) {
|
|
2444
|
+
var t = pr.re.exec(e);
|
|
2445
|
+
if (t) if (t[1]) e = t[1];
|
|
2446
|
+
else if (t[2]) e = t[2];
|
|
2447
|
+
else throw Error("RegExp out of sync");
|
|
2448
|
+
return pr.decode(e);
|
|
2449
|
+
}
|
|
2450
|
+
}, mr = 0x9184e72a000, hr = function() {
|
|
2451
|
+
function e(e) {
|
|
2452
|
+
this.buf = [+e || 0];
|
|
2453
|
+
}
|
|
2454
|
+
return e.prototype.mulAdd = function(e, t) {
|
|
2455
|
+
var n = this.buf, r = n.length, i, a;
|
|
2456
|
+
for (i = 0; i < r; ++i) a = n[i] * e + t, a < mr ? t = 0 : (t = 0 | a / mr, a -= t * mr), n[i] = a;
|
|
2457
|
+
t > 0 && (n[i] = t);
|
|
2458
|
+
}, e.prototype.sub = function(e) {
|
|
2459
|
+
var t = this.buf, n = t.length, r, i;
|
|
2460
|
+
for (r = 0; r < n; ++r) i = t[r] - e, i < 0 ? (i += mr, e = 1) : e = 0, t[r] = i;
|
|
2461
|
+
for (; t[t.length - 1] === 0;) t.pop();
|
|
2462
|
+
}, e.prototype.toString = function(e) {
|
|
2463
|
+
if ((e || 10) != 10) throw Error("only base 10 is supported");
|
|
2464
|
+
for (var t = this.buf, n = t[t.length - 1].toString(), r = t.length - 2; r >= 0; --r) n += (mr + t[r]).toString().substring(1);
|
|
2465
|
+
return n;
|
|
2466
|
+
}, e.prototype.valueOf = function() {
|
|
2467
|
+
for (var e = this.buf, t = 0, n = e.length - 1; n >= 0; --n) t = t * mr + e[n];
|
|
2468
|
+
return t;
|
|
2469
|
+
}, e.prototype.simplify = function() {
|
|
2470
|
+
var e = this.buf;
|
|
2471
|
+
return e.length == 1 ? e[0] : this;
|
|
2472
|
+
}, e;
|
|
2473
|
+
}(), gr = "…", _r = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, vr = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
|
|
2474
|
+
function yr(e, t) {
|
|
2475
|
+
return e.length > t && (e = e.substring(0, t) + gr), e;
|
|
2476
|
+
}
|
|
2477
|
+
var br = function() {
|
|
2478
|
+
function e(t, n) {
|
|
2479
|
+
this.hexDigits = "0123456789ABCDEF", t instanceof e ? (this.enc = t.enc, this.pos = t.pos) : (this.enc = t, this.pos = n);
|
|
2480
|
+
}
|
|
2481
|
+
return e.prototype.get = function(e) {
|
|
2482
|
+
if (e === void 0 && (e = this.pos++), e >= this.enc.length) throw Error(`Requesting byte offset ${e} on a stream of length ${this.enc.length}`);
|
|
2483
|
+
return typeof this.enc == "string" ? this.enc.charCodeAt(e) : this.enc[e];
|
|
2484
|
+
}, e.prototype.hexByte = function(e) {
|
|
2485
|
+
return this.hexDigits.charAt(e >> 4 & 15) + this.hexDigits.charAt(e & 15);
|
|
2486
|
+
}, e.prototype.hexDump = function(e, t, n) {
|
|
2487
|
+
for (var r = "", i = e; i < t; ++i) if (r += this.hexByte(this.get(i)), n !== !0) switch (i & 15) {
|
|
2488
|
+
case 7:
|
|
2489
|
+
r += " ";
|
|
2490
|
+
break;
|
|
2491
|
+
case 15:
|
|
2492
|
+
r += "\n";
|
|
2493
|
+
break;
|
|
2494
|
+
default: r += " ";
|
|
2495
|
+
}
|
|
2496
|
+
return r;
|
|
2497
|
+
}, e.prototype.isASCII = function(e, t) {
|
|
2498
|
+
for (var n = e; n < t; ++n) {
|
|
2499
|
+
var r = this.get(n);
|
|
2500
|
+
if (r < 32 || r > 176) return !1;
|
|
2501
|
+
}
|
|
2502
|
+
return !0;
|
|
2503
|
+
}, e.prototype.parseStringISO = function(e, t) {
|
|
2504
|
+
for (var n = "", r = e; r < t; ++r) n += String.fromCharCode(this.get(r));
|
|
2505
|
+
return n;
|
|
2506
|
+
}, e.prototype.parseStringUTF = function(e, t) {
|
|
2507
|
+
for (var n = "", r = e; r < t;) {
|
|
2508
|
+
var i = this.get(r++);
|
|
2509
|
+
i < 128 ? n += String.fromCharCode(i) : i > 191 && i < 224 ? n += String.fromCharCode((i & 31) << 6 | this.get(r++) & 63) : n += String.fromCharCode((i & 15) << 12 | (this.get(r++) & 63) << 6 | this.get(r++) & 63);
|
|
2510
|
+
}
|
|
2511
|
+
return n;
|
|
2512
|
+
}, e.prototype.parseStringBMP = function(e, t) {
|
|
2513
|
+
for (var n = "", r, i, a = e; a < t;) r = this.get(a++), i = this.get(a++), n += String.fromCharCode(r << 8 | i);
|
|
2514
|
+
return n;
|
|
2515
|
+
}, e.prototype.parseTime = function(e, t, n) {
|
|
2516
|
+
var r = this.parseStringISO(e, t), i = (n ? _r : vr).exec(r);
|
|
2517
|
+
return i ? (n && (i[1] = +i[1], i[1] += +i[1] < 70 ? 2e3 : 1900), r = i[1] + "-" + i[2] + "-" + i[3] + " " + i[4], i[5] && (r += ":" + i[5], i[6] && (r += ":" + i[6], i[7] && (r += "." + i[7]))), i[8] && (r += " UTC", i[8] != "Z" && (r += i[8], i[9] && (r += ":" + i[9]))), r) : "Unrecognized time: " + r;
|
|
2518
|
+
}, e.prototype.parseInteger = function(e, t) {
|
|
2519
|
+
for (var n = this.get(e), r = n > 127, i = r ? 255 : 0, a, o = ""; n == i && ++e < t;) n = this.get(e);
|
|
2520
|
+
if (a = t - e, a === 0) return r ? -1 : 0;
|
|
2521
|
+
if (a > 4) {
|
|
2522
|
+
for (o = n, a <<= 3; !((+o ^ i) & 128);) o <<= 1, --a;
|
|
2523
|
+
o = "(" + a + " bit)\n";
|
|
2524
|
+
}
|
|
2525
|
+
r && (n -= 256);
|
|
2526
|
+
for (var s = new hr(n), c = e + 1; c < t; ++c) s.mulAdd(256, this.get(c));
|
|
2527
|
+
return o + s.toString();
|
|
2528
|
+
}, e.prototype.parseBitString = function(e, t, n) {
|
|
2529
|
+
for (var r = this.get(e), i = "(" + ((t - e - 1 << 3) - r) + " bit)\n", a = "", o = e + 1; o < t; ++o) {
|
|
2530
|
+
for (var s = this.get(o), c = o == t - 1 ? r : 0, l = 7; l >= c; --l) a += s >> l & 1 ? "1" : "0";
|
|
2531
|
+
if (a.length > n) return i + yr(a, n);
|
|
2532
|
+
}
|
|
2533
|
+
return i + a;
|
|
2534
|
+
}, e.prototype.parseOctetString = function(e, t, n) {
|
|
2535
|
+
if (this.isASCII(e, t)) return yr(this.parseStringISO(e, t), n);
|
|
2536
|
+
var r = t - e, i = "(" + r + " byte)\n";
|
|
2537
|
+
n /= 2, r > n && (t = e + n);
|
|
2538
|
+
for (var a = e; a < t; ++a) i += this.hexByte(this.get(a));
|
|
2539
|
+
return r > n && (i += gr), i;
|
|
2540
|
+
}, e.prototype.parseOID = function(e, t, n) {
|
|
2541
|
+
for (var r = "", i = new hr(), a = 0, o = e; o < t; ++o) {
|
|
2542
|
+
var s = this.get(o);
|
|
2543
|
+
if (i.mulAdd(128, s & 127), a += 7, !(s & 128)) {
|
|
2544
|
+
if (r === "") if (i = i.simplify(), i instanceof hr) i.sub(80), r = "2." + i.toString();
|
|
2545
|
+
else {
|
|
2546
|
+
var c = i < 80 ? i < 40 ? 0 : 1 : 2;
|
|
2547
|
+
r = c + "." + (i - c * 40);
|
|
2548
|
+
}
|
|
2549
|
+
else r += "." + i.toString();
|
|
2550
|
+
if (r.length > n) return yr(r, n);
|
|
2551
|
+
i = new hr(), a = 0;
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2554
|
+
return a > 0 && (r += ".incomplete"), r;
|
|
2555
|
+
}, e;
|
|
2556
|
+
}(), xr = function() {
|
|
2557
|
+
function e(e, t, n, r, i) {
|
|
2558
|
+
if (!(r instanceof Sr)) throw Error("Invalid tag value.");
|
|
2559
|
+
this.stream = e, this.header = t, this.length = n, this.tag = r, this.sub = i;
|
|
2560
|
+
}
|
|
2561
|
+
return e.prototype.typeName = function() {
|
|
2562
|
+
switch (this.tag.tagClass) {
|
|
2563
|
+
case 0:
|
|
2564
|
+
switch (this.tag.tagNumber) {
|
|
2565
|
+
case 0: return "EOC";
|
|
2566
|
+
case 1: return "BOOLEAN";
|
|
2567
|
+
case 2: return "INTEGER";
|
|
2568
|
+
case 3: return "BIT_STRING";
|
|
2569
|
+
case 4: return "OCTET_STRING";
|
|
2570
|
+
case 5: return "NULL";
|
|
2571
|
+
case 6: return "OBJECT_IDENTIFIER";
|
|
2572
|
+
case 7: return "ObjectDescriptor";
|
|
2573
|
+
case 8: return "EXTERNAL";
|
|
2574
|
+
case 9: return "REAL";
|
|
2575
|
+
case 10: return "ENUMERATED";
|
|
2576
|
+
case 11: return "EMBEDDED_PDV";
|
|
2577
|
+
case 12: return "UTF8String";
|
|
2578
|
+
case 16: return "SEQUENCE";
|
|
2579
|
+
case 17: return "SET";
|
|
2580
|
+
case 18: return "NumericString";
|
|
2581
|
+
case 19: return "PrintableString";
|
|
2582
|
+
case 20: return "TeletexString";
|
|
2583
|
+
case 21: return "VideotexString";
|
|
2584
|
+
case 22: return "IA5String";
|
|
2585
|
+
case 23: return "UTCTime";
|
|
2586
|
+
case 24: return "GeneralizedTime";
|
|
2587
|
+
case 25: return "GraphicString";
|
|
2588
|
+
case 26: return "VisibleString";
|
|
2589
|
+
case 27: return "GeneralString";
|
|
2590
|
+
case 28: return "UniversalString";
|
|
2591
|
+
case 30: return "BMPString";
|
|
2592
|
+
}
|
|
2593
|
+
return "Universal_" + this.tag.tagNumber.toString();
|
|
2594
|
+
case 1: return "Application_" + this.tag.tagNumber.toString();
|
|
2595
|
+
case 2: return "[" + this.tag.tagNumber.toString() + "]";
|
|
2596
|
+
case 3: return "Private_" + this.tag.tagNumber.toString();
|
|
2597
|
+
}
|
|
2598
|
+
}, e.prototype.content = function(e) {
|
|
2599
|
+
if (this.tag === void 0) return null;
|
|
2600
|
+
e === void 0 && (e = Infinity);
|
|
2601
|
+
var t = this.posContent(), n = Math.abs(this.length);
|
|
2602
|
+
if (!this.tag.isUniversal()) return this.sub === null ? this.stream.parseOctetString(t, t + n, e) : "(" + this.sub.length + " elem)";
|
|
2603
|
+
switch (this.tag.tagNumber) {
|
|
2604
|
+
case 1: return this.stream.get(t) === 0 ? "false" : "true";
|
|
2605
|
+
case 2: return this.stream.parseInteger(t, t + n);
|
|
2606
|
+
case 3: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseBitString(t, t + n, e);
|
|
2607
|
+
case 4: return this.sub ? "(" + this.sub.length + " elem)" : this.stream.parseOctetString(t, t + n, e);
|
|
2608
|
+
case 6: return this.stream.parseOID(t, t + n, e);
|
|
2609
|
+
case 16:
|
|
2610
|
+
case 17: return this.sub === null ? "(no elem)" : "(" + this.sub.length + " elem)";
|
|
2611
|
+
case 12: return yr(this.stream.parseStringUTF(t, t + n), e);
|
|
2612
|
+
case 18:
|
|
2613
|
+
case 19:
|
|
2614
|
+
case 20:
|
|
2615
|
+
case 21:
|
|
2616
|
+
case 22:
|
|
2617
|
+
case 26: return yr(this.stream.parseStringISO(t, t + n), e);
|
|
2618
|
+
case 30: return yr(this.stream.parseStringBMP(t, t + n), e);
|
|
2619
|
+
case 23:
|
|
2620
|
+
case 24: return this.stream.parseTime(t, t + n, this.tag.tagNumber == 23);
|
|
2621
|
+
}
|
|
2622
|
+
return null;
|
|
2623
|
+
}, e.prototype.toString = function() {
|
|
2624
|
+
return this.typeName() + "@" + this.stream.pos + "[header:" + this.header + ",length:" + this.length + ",sub:" + (this.sub === null ? "null" : this.sub.length) + "]";
|
|
2625
|
+
}, e.prototype.toPrettyString = function(e) {
|
|
2626
|
+
e === void 0 && (e = "");
|
|
2627
|
+
var t = e + this.typeName() + " @" + this.stream.pos;
|
|
2628
|
+
if (this.length >= 0 && (t += "+"), t += this.length, this.tag.tagConstructed ? t += " (constructed)" : this.tag.isUniversal() && (this.tag.tagNumber == 3 || this.tag.tagNumber == 4) && this.sub !== null && (t += " (encapsulates)"), t += "\n", this.sub !== null) {
|
|
2629
|
+
e += " ";
|
|
2630
|
+
for (var n = 0, r = this.sub.length; n < r; ++n) t += this.sub[n].toPrettyString(e);
|
|
2631
|
+
}
|
|
2632
|
+
return t;
|
|
2633
|
+
}, e.prototype.posStart = function() {
|
|
2634
|
+
return this.stream.pos;
|
|
2635
|
+
}, e.prototype.posContent = function() {
|
|
2636
|
+
return this.stream.pos + this.header;
|
|
2637
|
+
}, e.prototype.posEnd = function() {
|
|
2638
|
+
return this.stream.pos + this.header + Math.abs(this.length);
|
|
2639
|
+
}, e.prototype.toHexString = function() {
|
|
2640
|
+
return this.stream.hexDump(this.posStart(), this.posEnd(), !0);
|
|
2641
|
+
}, e.decodeLength = function(e) {
|
|
2642
|
+
var t = e.get(), n = t & 127;
|
|
2643
|
+
if (n == t) return n;
|
|
2644
|
+
if (n > 6) throw Error("Length over 48 bits not supported at position " + (e.pos - 1));
|
|
2645
|
+
if (n === 0) return null;
|
|
2646
|
+
t = 0;
|
|
2647
|
+
for (var r = 0; r < n; ++r) t = t * 256 + e.get();
|
|
2648
|
+
return t;
|
|
2649
|
+
}, e.prototype.getHexStringValue = function() {
|
|
2650
|
+
var e = this.toHexString(), t = this.header * 2, n = this.length * 2;
|
|
2651
|
+
return e.substring(t, t + n);
|
|
2652
|
+
}, e.decode = function(t) {
|
|
2653
|
+
var n = t instanceof br ? t : new br(t, 0), r = new br(n), i = new Sr(n), a = e.decodeLength(n), o = n.pos, s = o - r.pos, c = null, l = function() {
|
|
2654
|
+
var t = [];
|
|
2655
|
+
if (a !== null) {
|
|
2656
|
+
for (var r = o + a; n.pos < r;) t[t.length] = e.decode(n);
|
|
2657
|
+
if (n.pos != r) throw Error("Content size is not correct for container starting at offset " + o);
|
|
2658
|
+
} else try {
|
|
2659
|
+
for (;;) {
|
|
2660
|
+
var i = e.decode(n);
|
|
2661
|
+
if (i.tag.isEOC()) break;
|
|
2662
|
+
t[t.length] = i;
|
|
2663
|
+
}
|
|
2664
|
+
a = o - n.pos;
|
|
2665
|
+
} catch (e) {
|
|
2666
|
+
throw Error("Exception while decoding undefined length content: " + e);
|
|
2667
|
+
}
|
|
2668
|
+
return t;
|
|
2669
|
+
};
|
|
2670
|
+
if (i.tagConstructed) c = l();
|
|
2671
|
+
else if (i.isUniversal() && (i.tagNumber == 3 || i.tagNumber == 4)) try {
|
|
2672
|
+
if (i.tagNumber == 3 && n.get() != 0) throw Error("BIT STRINGs with unused bits cannot encapsulate.");
|
|
2673
|
+
c = l();
|
|
2674
|
+
for (var u = 0; u < c.length; ++u) if (c[u].tag.isEOC()) throw Error("EOC is not supposed to be actual content.");
|
|
2675
|
+
} catch {
|
|
2676
|
+
c = null;
|
|
2677
|
+
}
|
|
2678
|
+
if (c === null) {
|
|
2679
|
+
if (a === null) throw Error("We can't skip over an invalid tag with undefined length at offset " + o);
|
|
2680
|
+
n.pos = o + Math.abs(a);
|
|
2681
|
+
}
|
|
2682
|
+
return new e(r, s, a, i, c);
|
|
2683
|
+
}, e;
|
|
2684
|
+
}(), Sr = function() {
|
|
2685
|
+
function e(e) {
|
|
2686
|
+
var t = e.get();
|
|
2687
|
+
if (this.tagClass = t >> 6, this.tagConstructed = (t & 32) != 0, this.tagNumber = t & 31, this.tagNumber == 31) {
|
|
2688
|
+
var n = new hr();
|
|
2689
|
+
do
|
|
2690
|
+
t = e.get(), n.mulAdd(128, t & 127);
|
|
2691
|
+
while (t & 128);
|
|
2692
|
+
this.tagNumber = n.simplify();
|
|
2693
|
+
}
|
|
2694
|
+
}
|
|
2695
|
+
return e.prototype.isUniversal = function() {
|
|
2696
|
+
return this.tagClass === 0;
|
|
2697
|
+
}, e.prototype.isEOC = function() {
|
|
2698
|
+
return this.tagClass === 0 && this.tagNumber === 0;
|
|
2699
|
+
}, e;
|
|
2700
|
+
}(), Cr, wr = !0, U = [
|
|
2701
|
+
2,
|
|
2702
|
+
3,
|
|
2703
|
+
5,
|
|
2704
|
+
7,
|
|
2705
|
+
11,
|
|
2706
|
+
13,
|
|
2707
|
+
17,
|
|
2708
|
+
19,
|
|
2709
|
+
23,
|
|
2710
|
+
29,
|
|
2711
|
+
31,
|
|
2712
|
+
37,
|
|
2713
|
+
41,
|
|
2714
|
+
43,
|
|
2715
|
+
47,
|
|
2716
|
+
53,
|
|
2717
|
+
59,
|
|
2718
|
+
61,
|
|
2719
|
+
67,
|
|
2720
|
+
71,
|
|
2721
|
+
73,
|
|
2722
|
+
79,
|
|
2723
|
+
83,
|
|
2724
|
+
89,
|
|
2725
|
+
97,
|
|
2726
|
+
101,
|
|
2727
|
+
103,
|
|
2728
|
+
107,
|
|
2729
|
+
109,
|
|
2730
|
+
113,
|
|
2731
|
+
127,
|
|
2732
|
+
131,
|
|
2733
|
+
137,
|
|
2734
|
+
139,
|
|
2735
|
+
149,
|
|
2736
|
+
151,
|
|
2737
|
+
157,
|
|
2738
|
+
163,
|
|
2739
|
+
167,
|
|
2740
|
+
173,
|
|
2741
|
+
179,
|
|
2742
|
+
181,
|
|
2743
|
+
191,
|
|
2744
|
+
193,
|
|
2745
|
+
197,
|
|
2746
|
+
199,
|
|
2747
|
+
211,
|
|
2748
|
+
223,
|
|
2749
|
+
227,
|
|
2750
|
+
229,
|
|
2751
|
+
233,
|
|
2752
|
+
239,
|
|
2753
|
+
241,
|
|
2754
|
+
251,
|
|
2755
|
+
257,
|
|
2756
|
+
263,
|
|
2757
|
+
269,
|
|
2758
|
+
271,
|
|
2759
|
+
277,
|
|
2760
|
+
281,
|
|
2761
|
+
283,
|
|
2762
|
+
293,
|
|
2763
|
+
307,
|
|
2764
|
+
311,
|
|
2765
|
+
313,
|
|
2766
|
+
317,
|
|
2767
|
+
331,
|
|
2768
|
+
337,
|
|
2769
|
+
347,
|
|
2770
|
+
349,
|
|
2771
|
+
353,
|
|
2772
|
+
359,
|
|
2773
|
+
367,
|
|
2774
|
+
373,
|
|
2775
|
+
379,
|
|
2776
|
+
383,
|
|
2777
|
+
389,
|
|
2778
|
+
397,
|
|
2779
|
+
401,
|
|
2780
|
+
409,
|
|
2781
|
+
419,
|
|
2782
|
+
421,
|
|
2783
|
+
431,
|
|
2784
|
+
433,
|
|
2785
|
+
439,
|
|
2786
|
+
443,
|
|
2787
|
+
449,
|
|
2788
|
+
457,
|
|
2789
|
+
461,
|
|
2790
|
+
463,
|
|
2791
|
+
467,
|
|
2792
|
+
479,
|
|
2793
|
+
487,
|
|
2794
|
+
491,
|
|
2795
|
+
499,
|
|
2796
|
+
503,
|
|
2797
|
+
509,
|
|
2798
|
+
521,
|
|
2799
|
+
523,
|
|
2800
|
+
541,
|
|
2801
|
+
547,
|
|
2802
|
+
557,
|
|
2803
|
+
563,
|
|
2804
|
+
569,
|
|
2805
|
+
571,
|
|
2806
|
+
577,
|
|
2807
|
+
587,
|
|
2808
|
+
593,
|
|
2809
|
+
599,
|
|
2810
|
+
601,
|
|
2811
|
+
607,
|
|
2812
|
+
613,
|
|
2813
|
+
617,
|
|
2814
|
+
619,
|
|
2815
|
+
631,
|
|
2816
|
+
641,
|
|
2817
|
+
643,
|
|
2818
|
+
647,
|
|
2819
|
+
653,
|
|
2820
|
+
659,
|
|
2821
|
+
661,
|
|
2822
|
+
673,
|
|
2823
|
+
677,
|
|
2824
|
+
683,
|
|
2825
|
+
691,
|
|
2826
|
+
701,
|
|
2827
|
+
709,
|
|
2828
|
+
719,
|
|
2829
|
+
727,
|
|
2830
|
+
733,
|
|
2831
|
+
739,
|
|
2832
|
+
743,
|
|
2833
|
+
751,
|
|
2834
|
+
757,
|
|
2835
|
+
761,
|
|
2836
|
+
769,
|
|
2837
|
+
773,
|
|
2838
|
+
787,
|
|
2839
|
+
797,
|
|
2840
|
+
809,
|
|
2841
|
+
811,
|
|
2842
|
+
821,
|
|
2843
|
+
823,
|
|
2844
|
+
827,
|
|
2845
|
+
829,
|
|
2846
|
+
839,
|
|
2847
|
+
853,
|
|
2848
|
+
857,
|
|
2849
|
+
859,
|
|
2850
|
+
863,
|
|
2851
|
+
877,
|
|
2852
|
+
881,
|
|
2853
|
+
883,
|
|
2854
|
+
887,
|
|
2855
|
+
907,
|
|
2856
|
+
911,
|
|
2857
|
+
919,
|
|
2858
|
+
929,
|
|
2859
|
+
937,
|
|
2860
|
+
941,
|
|
2861
|
+
947,
|
|
2862
|
+
953,
|
|
2863
|
+
967,
|
|
2864
|
+
971,
|
|
2865
|
+
977,
|
|
2866
|
+
983,
|
|
2867
|
+
991,
|
|
2868
|
+
997
|
|
2869
|
+
], Tr = (1 << 26) / U[U.length - 1], W = function() {
|
|
2870
|
+
function e(e, t, n) {
|
|
2871
|
+
e != null && (typeof e == "number" ? this.fromNumber(e, t, n) : t == null && typeof e != "string" ? this.fromString(e, 256) : this.fromString(e, t));
|
|
2872
|
+
}
|
|
2873
|
+
return e.prototype.toString = function(e) {
|
|
2874
|
+
if (this.s < 0) return "-" + this.negate().toString(e);
|
|
2875
|
+
var t;
|
|
2876
|
+
if (e == 16) t = 4;
|
|
2877
|
+
else if (e == 8) t = 3;
|
|
2878
|
+
else if (e == 2) t = 1;
|
|
2879
|
+
else if (e == 32) t = 5;
|
|
2880
|
+
else if (e == 4) t = 2;
|
|
2881
|
+
else return this.toRadix(e);
|
|
2882
|
+
var n = (1 << t) - 1, r, i = !1, a = "", o = this.t, s = this.DB - o * this.DB % t;
|
|
2883
|
+
if (o-- > 0) for (s < this.DB && (r = this[o] >> s) > 0 && (i = !0, a = H(r)); o >= 0;) s < t ? (r = (this[o] & (1 << s) - 1) << t - s, r |= this[--o] >> (s += this.DB - t)) : (r = this[o] >> (s -= t) & n, s <= 0 && (s += this.DB, --o)), r > 0 && (i = !0), i && (a += H(r));
|
|
2884
|
+
return i ? a : "0";
|
|
2885
|
+
}, e.prototype.negate = function() {
|
|
2886
|
+
var t = G();
|
|
2887
|
+
return e.ZERO.subTo(this, t), t;
|
|
2888
|
+
}, e.prototype.abs = function() {
|
|
2889
|
+
return this.s < 0 ? this.negate() : this;
|
|
2890
|
+
}, e.prototype.compareTo = function(e) {
|
|
2891
|
+
var t = this.s - e.s;
|
|
2892
|
+
if (t != 0) return t;
|
|
2893
|
+
var n = this.t;
|
|
2894
|
+
if (t = n - e.t, t != 0) return this.s < 0 ? -t : t;
|
|
2895
|
+
for (; --n >= 0;) if ((t = this[n] - e[n]) != 0) return t;
|
|
2896
|
+
return 0;
|
|
2897
|
+
}, e.prototype.bitLength = function() {
|
|
2898
|
+
return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Ir(this[this.t - 1] ^ this.s & this.DM);
|
|
2899
|
+
}, e.prototype.mod = function(t) {
|
|
2900
|
+
var n = G();
|
|
2901
|
+
return this.abs().divRemTo(t, null, n), this.s < 0 && n.compareTo(e.ZERO) > 0 && t.subTo(n, n), n;
|
|
2902
|
+
}, e.prototype.modPowInt = function(e, t) {
|
|
2903
|
+
var n = e < 256 || t.isEven() ? new Dr(t) : new Or(t);
|
|
2904
|
+
return this.exp(e, n);
|
|
2905
|
+
}, e.prototype.clone = function() {
|
|
2906
|
+
var e = G();
|
|
2907
|
+
return this.copyTo(e), e;
|
|
2908
|
+
}, e.prototype.intValue = function() {
|
|
2909
|
+
if (this.s < 0) {
|
|
2910
|
+
if (this.t == 1) return this[0] - this.DV;
|
|
2911
|
+
if (this.t == 0) return -1;
|
|
2912
|
+
} else if (this.t == 1) return this[0];
|
|
2913
|
+
else if (this.t == 0) return 0;
|
|
2914
|
+
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
|
|
2915
|
+
}, e.prototype.byteValue = function() {
|
|
2916
|
+
return this.t == 0 ? this.s : this[0] << 24 >> 24;
|
|
2917
|
+
}, e.prototype.shortValue = function() {
|
|
2918
|
+
return this.t == 0 ? this.s : this[0] << 16 >> 16;
|
|
2919
|
+
}, e.prototype.signum = function() {
|
|
2920
|
+
return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
|
|
2921
|
+
}, e.prototype.toByteArray = function() {
|
|
2922
|
+
var e = this.t, t = [];
|
|
2923
|
+
t[0] = this.s;
|
|
2924
|
+
var n = this.DB - e * this.DB % 8, r, i = 0;
|
|
2925
|
+
if (e-- > 0) for (n < this.DB && (r = this[e] >> n) != (this.s & this.DM) >> n && (t[i++] = r | this.s << this.DB - n); e >= 0;) n < 8 ? (r = (this[e] & (1 << n) - 1) << 8 - n, r |= this[--e] >> (n += this.DB - 8)) : (r = this[e] >> (n -= 8) & 255, n <= 0 && (n += this.DB, --e)), r & 128 && (r |= -256), i == 0 && (this.s & 128) != (r & 128) && ++i, (i > 0 || r != this.s) && (t[i++] = r);
|
|
2926
|
+
return t;
|
|
2927
|
+
}, e.prototype.equals = function(e) {
|
|
2928
|
+
return this.compareTo(e) == 0;
|
|
2929
|
+
}, e.prototype.min = function(e) {
|
|
2930
|
+
return this.compareTo(e) < 0 ? this : e;
|
|
2931
|
+
}, e.prototype.max = function(e) {
|
|
2932
|
+
return this.compareTo(e) > 0 ? this : e;
|
|
2933
|
+
}, e.prototype.and = function(e) {
|
|
2934
|
+
var t = G();
|
|
2935
|
+
return this.bitwiseTo(e, er, t), t;
|
|
2936
|
+
}, e.prototype.or = function(e) {
|
|
2937
|
+
var t = G();
|
|
2938
|
+
return this.bitwiseTo(e, tr, t), t;
|
|
2939
|
+
}, e.prototype.xor = function(e) {
|
|
2940
|
+
var t = G();
|
|
2941
|
+
return this.bitwiseTo(e, nr, t), t;
|
|
2942
|
+
}, e.prototype.andNot = function(e) {
|
|
2943
|
+
var t = G();
|
|
2944
|
+
return this.bitwiseTo(e, rr, t), t;
|
|
2945
|
+
}, e.prototype.not = function() {
|
|
2946
|
+
for (var e = G(), t = 0; t < this.t; ++t) e[t] = this.DM & ~this[t];
|
|
2947
|
+
return e.t = this.t, e.s = ~this.s, e;
|
|
2948
|
+
}, e.prototype.shiftLeft = function(e) {
|
|
2949
|
+
var t = G();
|
|
2950
|
+
return e < 0 ? this.rShiftTo(-e, t) : this.lShiftTo(e, t), t;
|
|
2951
|
+
}, e.prototype.shiftRight = function(e) {
|
|
2952
|
+
var t = G();
|
|
2953
|
+
return e < 0 ? this.lShiftTo(-e, t) : this.rShiftTo(e, t), t;
|
|
2954
|
+
}, e.prototype.getLowestSetBit = function() {
|
|
2955
|
+
for (var e = 0; e < this.t; ++e) if (this[e] != 0) return e * this.DB + ir(this[e]);
|
|
2956
|
+
return this.s < 0 ? this.t * this.DB : -1;
|
|
2957
|
+
}, e.prototype.bitCount = function() {
|
|
2958
|
+
for (var e = 0, t = this.s & this.DM, n = 0; n < this.t; ++n) e += ar(this[n] ^ t);
|
|
2959
|
+
return e;
|
|
2960
|
+
}, e.prototype.testBit = function(e) {
|
|
2961
|
+
var t = Math.floor(e / this.DB);
|
|
2962
|
+
return t >= this.t ? this.s != 0 : (this[t] & 1 << e % this.DB) != 0;
|
|
2963
|
+
}, e.prototype.setBit = function(e) {
|
|
2964
|
+
return this.changeBit(e, tr);
|
|
2965
|
+
}, e.prototype.clearBit = function(e) {
|
|
2966
|
+
return this.changeBit(e, rr);
|
|
2967
|
+
}, e.prototype.flipBit = function(e) {
|
|
2968
|
+
return this.changeBit(e, nr);
|
|
2969
|
+
}, e.prototype.add = function(e) {
|
|
2970
|
+
var t = G();
|
|
2971
|
+
return this.addTo(e, t), t;
|
|
2972
|
+
}, e.prototype.subtract = function(e) {
|
|
2973
|
+
var t = G();
|
|
2974
|
+
return this.subTo(e, t), t;
|
|
2975
|
+
}, e.prototype.multiply = function(e) {
|
|
2976
|
+
var t = G();
|
|
2977
|
+
return this.multiplyTo(e, t), t;
|
|
2978
|
+
}, e.prototype.divide = function(e) {
|
|
2979
|
+
var t = G();
|
|
2980
|
+
return this.divRemTo(e, t, null), t;
|
|
2981
|
+
}, e.prototype.remainder = function(e) {
|
|
2982
|
+
var t = G();
|
|
2983
|
+
return this.divRemTo(e, null, t), t;
|
|
2984
|
+
}, e.prototype.divideAndRemainder = function(e) {
|
|
2985
|
+
var t = G(), n = G();
|
|
2986
|
+
return this.divRemTo(e, t, n), [t, n];
|
|
2987
|
+
}, e.prototype.modPow = function(e, t) {
|
|
2988
|
+
var n = e.bitLength(), r, i = Fr(1), a;
|
|
2989
|
+
if (n <= 0) return i;
|
|
2990
|
+
r = n < 18 ? 1 : n < 48 ? 3 : n < 144 ? 4 : n < 768 ? 5 : 6, a = n < 8 ? new Dr(t) : t.isEven() ? new kr(t) : new Or(t);
|
|
2991
|
+
var o = [], s = 3, c = r - 1, l = (1 << r) - 1;
|
|
2992
|
+
if (o[1] = a.convert(this), r > 1) {
|
|
2993
|
+
var u = G();
|
|
2994
|
+
for (a.sqrTo(o[1], u); s <= l;) o[s] = G(), a.mulTo(u, o[s - 2], o[s]), s += 2;
|
|
2995
|
+
}
|
|
2996
|
+
var d = e.t - 1, f, p = !0, m = G(), h;
|
|
2997
|
+
for (n = Ir(e[d]) - 1; d >= 0;) {
|
|
2998
|
+
for (n >= c ? f = e[d] >> n - c & l : (f = (e[d] & (1 << n + 1) - 1) << c - n, d > 0 && (f |= e[d - 1] >> this.DB + n - c)), s = r; !(f & 1);) f >>= 1, --s;
|
|
2999
|
+
if ((n -= s) < 0 && (n += this.DB, --d), p) o[f].copyTo(i), p = !1;
|
|
3000
|
+
else {
|
|
3001
|
+
for (; s > 1;) a.sqrTo(i, m), a.sqrTo(m, i), s -= 2;
|
|
3002
|
+
s > 0 ? a.sqrTo(i, m) : (h = i, i = m, m = h), a.mulTo(m, o[f], i);
|
|
3003
|
+
}
|
|
3004
|
+
for (; d >= 0 && !(e[d] & 1 << n);) a.sqrTo(i, m), h = i, i = m, m = h, --n < 0 && (n = this.DB - 1, --d);
|
|
3005
|
+
}
|
|
3006
|
+
return a.revert(i);
|
|
3007
|
+
}, e.prototype.modInverse = function(t) {
|
|
3008
|
+
var n = t.isEven();
|
|
3009
|
+
if (this.isEven() && n || t.signum() == 0) return e.ZERO;
|
|
3010
|
+
for (var r = t.clone(), i = this.clone(), a = Fr(1), o = Fr(0), s = Fr(0), c = Fr(1); r.signum() != 0;) {
|
|
3011
|
+
for (; r.isEven();) r.rShiftTo(1, r), n ? ((!a.isEven() || !o.isEven()) && (a.addTo(this, a), o.subTo(t, o)), a.rShiftTo(1, a)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o);
|
|
3012
|
+
for (; i.isEven();) i.rShiftTo(1, i), n ? ((!s.isEven() || !c.isEven()) && (s.addTo(this, s), c.subTo(t, c)), s.rShiftTo(1, s)) : c.isEven() || c.subTo(t, c), c.rShiftTo(1, c);
|
|
3013
|
+
r.compareTo(i) >= 0 ? (r.subTo(i, r), n && a.subTo(s, a), o.subTo(c, o)) : (i.subTo(r, i), n && s.subTo(a, s), c.subTo(o, c));
|
|
3014
|
+
}
|
|
3015
|
+
if (i.compareTo(e.ONE) != 0) return e.ZERO;
|
|
3016
|
+
if (c.compareTo(t) >= 0) return c.subtract(t);
|
|
3017
|
+
if (c.signum() < 0) c.addTo(t, c);
|
|
3018
|
+
else return c;
|
|
3019
|
+
return c.signum() < 0 ? c.add(t) : c;
|
|
3020
|
+
}, e.prototype.pow = function(e) {
|
|
3021
|
+
return this.exp(e, new Er());
|
|
3022
|
+
}, e.prototype.gcd = function(e) {
|
|
3023
|
+
var t = this.s < 0 ? this.negate() : this.clone(), n = e.s < 0 ? e.negate() : e.clone();
|
|
3024
|
+
if (t.compareTo(n) < 0) {
|
|
3025
|
+
var r = t;
|
|
3026
|
+
t = n, n = r;
|
|
3027
|
+
}
|
|
3028
|
+
var i = t.getLowestSetBit(), a = n.getLowestSetBit();
|
|
3029
|
+
if (a < 0) return t;
|
|
3030
|
+
for (i < a && (a = i), a > 0 && (t.rShiftTo(a, t), n.rShiftTo(a, n)); t.signum() > 0;) (i = t.getLowestSetBit()) > 0 && t.rShiftTo(i, t), (i = n.getLowestSetBit()) > 0 && n.rShiftTo(i, n), t.compareTo(n) >= 0 ? (t.subTo(n, t), t.rShiftTo(1, t)) : (n.subTo(t, n), n.rShiftTo(1, n));
|
|
3031
|
+
return a > 0 && n.lShiftTo(a, n), n;
|
|
3032
|
+
}, e.prototype.isProbablePrime = function(e) {
|
|
3033
|
+
var t, n = this.abs();
|
|
3034
|
+
if (n.t == 1 && n[0] <= U[U.length - 1]) {
|
|
3035
|
+
for (t = 0; t < U.length; ++t) if (n[0] == U[t]) return !0;
|
|
3036
|
+
return !1;
|
|
3037
|
+
}
|
|
3038
|
+
if (n.isEven()) return !1;
|
|
3039
|
+
for (t = 1; t < U.length;) {
|
|
3040
|
+
for (var r = U[t], i = t + 1; i < U.length && r < Tr;) r *= U[i++];
|
|
3041
|
+
for (r = n.modInt(r); t < i;) if (r % U[t++] == 0) return !1;
|
|
3042
|
+
}
|
|
3043
|
+
return n.millerRabin(e);
|
|
3044
|
+
}, e.prototype.copyTo = function(e) {
|
|
3045
|
+
for (var t = this.t - 1; t >= 0; --t) e[t] = this[t];
|
|
3046
|
+
e.t = this.t, e.s = this.s;
|
|
3047
|
+
}, e.prototype.fromInt = function(e) {
|
|
3048
|
+
this.t = 1, this.s = e < 0 ? -1 : 0, e > 0 ? this[0] = e : e < -1 ? this[0] = e + this.DV : this.t = 0;
|
|
3049
|
+
}, e.prototype.fromString = function(t, n) {
|
|
3050
|
+
var r;
|
|
3051
|
+
if (n == 16) r = 4;
|
|
3052
|
+
else if (n == 8) r = 3;
|
|
3053
|
+
else if (n == 256) r = 8;
|
|
3054
|
+
else if (n == 2) r = 1;
|
|
3055
|
+
else if (n == 32) r = 5;
|
|
3056
|
+
else if (n == 4) r = 2;
|
|
3057
|
+
else {
|
|
3058
|
+
this.fromRadix(t, n);
|
|
3059
|
+
return;
|
|
3060
|
+
}
|
|
3061
|
+
this.t = 0, this.s = 0;
|
|
3062
|
+
for (var i = t.length, a = !1, o = 0; --i >= 0;) {
|
|
3063
|
+
var s = r == 8 ? t[i] & 255 : Pr(t, i);
|
|
3064
|
+
if (s < 0) {
|
|
3065
|
+
t.charAt(i) == "-" && (a = !0);
|
|
3066
|
+
continue;
|
|
3067
|
+
}
|
|
3068
|
+
a = !1, o == 0 ? this[this.t++] = s : o + r > this.DB ? (this[this.t - 1] |= (s & (1 << this.DB - o) - 1) << o, this[this.t++] = s >> this.DB - o) : this[this.t - 1] |= s << o, o += r, o >= this.DB && (o -= this.DB);
|
|
3069
|
+
}
|
|
3070
|
+
r == 8 && t[0] & 128 && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), a && e.ZERO.subTo(this, this);
|
|
3071
|
+
}, e.prototype.clamp = function() {
|
|
3072
|
+
for (var e = this.s & this.DM; this.t > 0 && this[this.t - 1] == e;) --this.t;
|
|
3073
|
+
}, e.prototype.dlShiftTo = function(e, t) {
|
|
3074
|
+
var n;
|
|
3075
|
+
for (n = this.t - 1; n >= 0; --n) t[n + e] = this[n];
|
|
3076
|
+
for (n = e - 1; n >= 0; --n) t[n] = 0;
|
|
3077
|
+
t.t = this.t + e, t.s = this.s;
|
|
3078
|
+
}, e.prototype.drShiftTo = function(e, t) {
|
|
3079
|
+
for (var n = e; n < this.t; ++n) t[n - e] = this[n];
|
|
3080
|
+
t.t = Math.max(this.t - e, 0), t.s = this.s;
|
|
3081
|
+
}, e.prototype.lShiftTo = function(e, t) {
|
|
3082
|
+
for (var n = e % this.DB, r = this.DB - n, i = (1 << r) - 1, a = Math.floor(e / this.DB), o = this.s << n & this.DM, s = this.t - 1; s >= 0; --s) t[s + a + 1] = this[s] >> r | o, o = (this[s] & i) << n;
|
|
3083
|
+
for (var s = a - 1; s >= 0; --s) t[s] = 0;
|
|
3084
|
+
t[a] = o, t.t = this.t + a + 1, t.s = this.s, t.clamp();
|
|
3085
|
+
}, e.prototype.rShiftTo = function(e, t) {
|
|
3086
|
+
t.s = this.s;
|
|
3087
|
+
var n = Math.floor(e / this.DB);
|
|
3088
|
+
if (n >= this.t) {
|
|
3089
|
+
t.t = 0;
|
|
3090
|
+
return;
|
|
3091
|
+
}
|
|
3092
|
+
var r = e % this.DB, i = this.DB - r, a = (1 << r) - 1;
|
|
3093
|
+
t[0] = this[n] >> r;
|
|
3094
|
+
for (var o = n + 1; o < this.t; ++o) t[o - n - 1] |= (this[o] & a) << i, t[o - n] = this[o] >> r;
|
|
3095
|
+
r > 0 && (t[this.t - n - 1] |= (this.s & a) << i), t.t = this.t - n, t.clamp();
|
|
3096
|
+
}, e.prototype.subTo = function(e, t) {
|
|
3097
|
+
for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] - e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3098
|
+
if (e.t < this.t) {
|
|
3099
|
+
for (r -= e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3100
|
+
r += this.s;
|
|
3101
|
+
} else {
|
|
3102
|
+
for (r += this.s; n < e.t;) r -= e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3103
|
+
r -= e.s;
|
|
3104
|
+
}
|
|
3105
|
+
t.s = r < 0 ? -1 : 0, r < -1 ? t[n++] = this.DV + r : r > 0 && (t[n++] = r), t.t = n, t.clamp();
|
|
3106
|
+
}, e.prototype.multiplyTo = function(t, n) {
|
|
3107
|
+
var r = this.abs(), i = t.abs(), a = r.t;
|
|
3108
|
+
for (n.t = a + i.t; --a >= 0;) n[a] = 0;
|
|
3109
|
+
for (a = 0; a < i.t; ++a) n[a + r.t] = r.am(0, i[a], n, a, 0, r.t);
|
|
3110
|
+
n.s = 0, n.clamp(), this.s != t.s && e.ZERO.subTo(n, n);
|
|
3111
|
+
}, e.prototype.squareTo = function(e) {
|
|
3112
|
+
for (var t = this.abs(), n = e.t = 2 * t.t; --n >= 0;) e[n] = 0;
|
|
3113
|
+
for (n = 0; n < t.t - 1; ++n) {
|
|
3114
|
+
var r = t.am(n, t[n], e, 2 * n, 0, 1);
|
|
3115
|
+
(e[n + t.t] += t.am(n + 1, 2 * t[n], e, 2 * n + 1, r, t.t - n - 1)) >= t.DV && (e[n + t.t] -= t.DV, e[n + t.t + 1] = 1);
|
|
3116
|
+
}
|
|
3117
|
+
e.t > 0 && (e[e.t - 1] += t.am(n, t[n], e, 2 * n, 0, 1)), e.s = 0, e.clamp();
|
|
3118
|
+
}, e.prototype.divRemTo = function(t, n, r) {
|
|
3119
|
+
var i = t.abs();
|
|
3120
|
+
if (!(i.t <= 0)) {
|
|
3121
|
+
var a = this.abs();
|
|
3122
|
+
if (a.t < i.t) {
|
|
3123
|
+
n?.fromInt(0), r != null && this.copyTo(r);
|
|
3124
|
+
return;
|
|
3125
|
+
}
|
|
3126
|
+
r ??= G();
|
|
3127
|
+
var o = G(), s = this.s, c = t.s, l = this.DB - Ir(i[i.t - 1]);
|
|
3128
|
+
l > 0 ? (i.lShiftTo(l, o), a.lShiftTo(l, r)) : (i.copyTo(o), a.copyTo(r));
|
|
3129
|
+
var u = o.t, d = o[u - 1];
|
|
3130
|
+
if (d != 0) {
|
|
3131
|
+
var f = d * (1 << this.F1) + (u > 1 ? o[u - 2] >> this.F2 : 0), p = this.FV / f, m = (1 << this.F1) / f, h = 1 << this.F2, g = r.t, _ = g - u, v = n ?? G();
|
|
3132
|
+
for (o.dlShiftTo(_, v), r.compareTo(v) >= 0 && (r[r.t++] = 1, r.subTo(v, r)), e.ONE.dlShiftTo(u, v), v.subTo(o, o); o.t < u;) o[o.t++] = 0;
|
|
3133
|
+
for (; --_ >= 0;) {
|
|
3134
|
+
var y = r[--g] == d ? this.DM : Math.floor(r[g] * p + (r[g - 1] + h) * m);
|
|
3135
|
+
if ((r[g] += o.am(0, y, r, _, 0, u)) < y) for (o.dlShiftTo(_, v), r.subTo(v, r); r[g] < --y;) r.subTo(v, r);
|
|
3136
|
+
}
|
|
3137
|
+
n != null && (r.drShiftTo(u, n), s != c && e.ZERO.subTo(n, n)), r.t = u, r.clamp(), l > 0 && r.rShiftTo(l, r), s < 0 && e.ZERO.subTo(r, r);
|
|
3138
|
+
}
|
|
3139
|
+
}
|
|
3140
|
+
}, e.prototype.invDigit = function() {
|
|
3141
|
+
if (this.t < 1) return 0;
|
|
3142
|
+
var e = this[0];
|
|
3143
|
+
if (!(e & 1)) return 0;
|
|
3144
|
+
var t = e & 3;
|
|
3145
|
+
return t = t * (2 - (e & 15) * t) & 15, t = t * (2 - (e & 255) * t) & 255, t = t * (2 - ((e & 65535) * t & 65535)) & 65535, t = t * (2 - e * t % this.DV) % this.DV, t > 0 ? this.DV - t : -t;
|
|
3146
|
+
}, e.prototype.isEven = function() {
|
|
3147
|
+
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
|
3148
|
+
}, e.prototype.exp = function(t, n) {
|
|
3149
|
+
if (t > 4294967295 || t < 1) return e.ONE;
|
|
3150
|
+
var r = G(), i = G(), a = n.convert(this), o = Ir(t) - 1;
|
|
3151
|
+
for (a.copyTo(r); --o >= 0;) if (n.sqrTo(r, i), (t & 1 << o) > 0) n.mulTo(i, a, r);
|
|
3152
|
+
else {
|
|
3153
|
+
var s = r;
|
|
3154
|
+
r = i, i = s;
|
|
3155
|
+
}
|
|
3156
|
+
return n.revert(r);
|
|
3157
|
+
}, e.prototype.chunkSize = function(e) {
|
|
3158
|
+
return Math.floor(Math.LN2 * this.DB / Math.log(e));
|
|
3159
|
+
}, e.prototype.toRadix = function(e) {
|
|
3160
|
+
if (e ??= 10, this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
3161
|
+
var t = this.chunkSize(e), n = e ** +t, r = Fr(n), i = G(), a = G(), o = "";
|
|
3162
|
+
for (this.divRemTo(r, i, a); i.signum() > 0;) o = (n + a.intValue()).toString(e).substring(1) + o, i.divRemTo(r, i, a);
|
|
3163
|
+
return a.intValue().toString(e) + o;
|
|
3164
|
+
}, e.prototype.fromRadix = function(t, n) {
|
|
3165
|
+
this.fromInt(0), n ??= 10;
|
|
3166
|
+
for (var r = this.chunkSize(n), i = n ** +r, a = !1, o = 0, s = 0, c = 0; c < t.length; ++c) {
|
|
3167
|
+
var l = Pr(t, c);
|
|
3168
|
+
if (l < 0) {
|
|
3169
|
+
t.charAt(c) == "-" && this.signum() == 0 && (a = !0);
|
|
3170
|
+
continue;
|
|
3171
|
+
}
|
|
3172
|
+
s = n * s + l, ++o >= r && (this.dMultiply(i), this.dAddOffset(s, 0), o = 0, s = 0);
|
|
3173
|
+
}
|
|
3174
|
+
o > 0 && (this.dMultiply(n ** +o), this.dAddOffset(s, 0)), a && e.ZERO.subTo(this, this);
|
|
3175
|
+
}, e.prototype.fromNumber = function(t, n, r) {
|
|
3176
|
+
if (typeof n == "number") if (t < 2) this.fromInt(1);
|
|
3177
|
+
else for (this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), tr, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n);) this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(e.ONE.shiftLeft(t - 1), this);
|
|
3178
|
+
else {
|
|
3179
|
+
var i = [], a = t & 7;
|
|
3180
|
+
i.length = (t >> 3) + 1, n.nextBytes(i), a > 0 ? i[0] &= (1 << a) - 1 : i[0] = 0, this.fromString(i, 256);
|
|
3181
|
+
}
|
|
3182
|
+
}, e.prototype.bitwiseTo = function(e, t, n) {
|
|
3183
|
+
var r, i, a = Math.min(e.t, this.t);
|
|
3184
|
+
for (r = 0; r < a; ++r) n[r] = t(this[r], e[r]);
|
|
3185
|
+
if (e.t < this.t) {
|
|
3186
|
+
for (i = e.s & this.DM, r = a; r < this.t; ++r) n[r] = t(this[r], i);
|
|
3187
|
+
n.t = this.t;
|
|
3188
|
+
} else {
|
|
3189
|
+
for (i = this.s & this.DM, r = a; r < e.t; ++r) n[r] = t(i, e[r]);
|
|
3190
|
+
n.t = e.t;
|
|
3191
|
+
}
|
|
3192
|
+
n.s = t(this.s, e.s), n.clamp();
|
|
3193
|
+
}, e.prototype.changeBit = function(t, n) {
|
|
3194
|
+
var r = e.ONE.shiftLeft(t);
|
|
3195
|
+
return this.bitwiseTo(r, n, r), r;
|
|
3196
|
+
}, e.prototype.addTo = function(e, t) {
|
|
3197
|
+
for (var n = 0, r = 0, i = Math.min(e.t, this.t); n < i;) r += this[n] + e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3198
|
+
if (e.t < this.t) {
|
|
3199
|
+
for (r += e.s; n < this.t;) r += this[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3200
|
+
r += this.s;
|
|
3201
|
+
} else {
|
|
3202
|
+
for (r += this.s; n < e.t;) r += e[n], t[n++] = r & this.DM, r >>= this.DB;
|
|
3203
|
+
r += e.s;
|
|
3204
|
+
}
|
|
3205
|
+
t.s = r < 0 ? -1 : 0, r > 0 ? t[n++] = r : r < -1 && (t[n++] = this.DV + r), t.t = n, t.clamp();
|
|
3206
|
+
}, e.prototype.dMultiply = function(e) {
|
|
3207
|
+
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
|
|
3208
|
+
}, e.prototype.dAddOffset = function(e, t) {
|
|
3209
|
+
if (e != 0) {
|
|
3210
|
+
for (; this.t <= t;) this[this.t++] = 0;
|
|
3211
|
+
for (this[t] += e; this[t] >= this.DV;) this[t] -= this.DV, ++t >= this.t && (this[this.t++] = 0), ++this[t];
|
|
3212
|
+
}
|
|
3213
|
+
}, e.prototype.multiplyLowerTo = function(e, t, n) {
|
|
3214
|
+
var r = Math.min(this.t + e.t, t);
|
|
3215
|
+
for (n.s = 0, n.t = r; r > 0;) n[--r] = 0;
|
|
3216
|
+
for (var i = n.t - this.t; r < i; ++r) n[r + this.t] = this.am(0, e[r], n, r, 0, this.t);
|
|
3217
|
+
for (var i = Math.min(e.t, t); r < i; ++r) this.am(0, e[r], n, r, 0, t - r);
|
|
3218
|
+
n.clamp();
|
|
3219
|
+
}, e.prototype.multiplyUpperTo = function(e, t, n) {
|
|
3220
|
+
--t;
|
|
3221
|
+
var r = n.t = this.t + e.t - t;
|
|
3222
|
+
for (n.s = 0; --r >= 0;) n[r] = 0;
|
|
3223
|
+
for (r = Math.max(t - this.t, 0); r < e.t; ++r) n[this.t + r - t] = this.am(t - r, e[r], n, 0, 0, this.t + r - t);
|
|
3224
|
+
n.clamp(), n.drShiftTo(1, n);
|
|
3225
|
+
}, e.prototype.modInt = function(e) {
|
|
3226
|
+
if (e <= 0) return 0;
|
|
3227
|
+
var t = this.DV % e, n = this.s < 0 ? e - 1 : 0;
|
|
3228
|
+
if (this.t > 0) if (t == 0) n = this[0] % e;
|
|
3229
|
+
else for (var r = this.t - 1; r >= 0; --r) n = (t * n + this[r]) % e;
|
|
3230
|
+
return n;
|
|
3231
|
+
}, e.prototype.millerRabin = function(t) {
|
|
3232
|
+
var n = this.subtract(e.ONE), r = n.getLowestSetBit();
|
|
3233
|
+
if (r <= 0) return !1;
|
|
3234
|
+
var i = n.shiftRight(r);
|
|
3235
|
+
t = t + 1 >> 1, t > U.length && (t = U.length);
|
|
3236
|
+
for (var a = G(), o = 0; o < t; ++o) {
|
|
3237
|
+
a.fromInt(U[Math.floor(Math.random() * U.length)]);
|
|
3238
|
+
var s = a.modPow(i, this);
|
|
3239
|
+
if (s.compareTo(e.ONE) != 0 && s.compareTo(n) != 0) {
|
|
3240
|
+
for (var c = 1; c++ < r && s.compareTo(n) != 0;) if (s = s.modPowInt(2, this), s.compareTo(e.ONE) == 0) return !1;
|
|
3241
|
+
if (s.compareTo(n) != 0) return !1;
|
|
3242
|
+
}
|
|
3243
|
+
}
|
|
3244
|
+
return !0;
|
|
3245
|
+
}, e.prototype.square = function() {
|
|
3246
|
+
var e = G();
|
|
3247
|
+
return this.squareTo(e), e;
|
|
3248
|
+
}, e.prototype.gcda = function(e, t) {
|
|
3249
|
+
var n = this.s < 0 ? this.negate() : this.clone(), r = e.s < 0 ? e.negate() : e.clone();
|
|
3250
|
+
if (n.compareTo(r) < 0) {
|
|
3251
|
+
var i = n;
|
|
3252
|
+
n = r, r = i;
|
|
3253
|
+
}
|
|
3254
|
+
var a = n.getLowestSetBit(), o = r.getLowestSetBit();
|
|
3255
|
+
if (o < 0) {
|
|
3256
|
+
t(n);
|
|
3257
|
+
return;
|
|
3258
|
+
}
|
|
3259
|
+
a < o && (o = a), o > 0 && (n.rShiftTo(o, n), r.rShiftTo(o, r));
|
|
3260
|
+
var s = function() {
|
|
3261
|
+
(a = n.getLowestSetBit()) > 0 && n.rShiftTo(a, n), (a = r.getLowestSetBit()) > 0 && r.rShiftTo(a, r), n.compareTo(r) >= 0 ? (n.subTo(r, n), n.rShiftTo(1, n)) : (r.subTo(n, r), r.rShiftTo(1, r)), n.signum() > 0 ? setTimeout(s, 0) : (o > 0 && r.lShiftTo(o, r), setTimeout(function() {
|
|
3262
|
+
t(r);
|
|
3263
|
+
}, 0));
|
|
3264
|
+
};
|
|
3265
|
+
setTimeout(s, 10);
|
|
3266
|
+
}, e.prototype.fromNumberAsync = function(t, n, r, i) {
|
|
3267
|
+
if (typeof n == "number") if (t < 2) this.fromInt(1);
|
|
3268
|
+
else {
|
|
3269
|
+
this.fromNumber(t, r), this.testBit(t - 1) || this.bitwiseTo(e.ONE.shiftLeft(t - 1), tr, this), this.isEven() && this.dAddOffset(1, 0);
|
|
3270
|
+
var a = this, o = function() {
|
|
3271
|
+
a.dAddOffset(2, 0), a.bitLength() > t && a.subTo(e.ONE.shiftLeft(t - 1), a), a.isProbablePrime(n) ? setTimeout(function() {
|
|
3272
|
+
i();
|
|
3273
|
+
}, 0) : setTimeout(o, 0);
|
|
3274
|
+
};
|
|
3275
|
+
setTimeout(o, 0);
|
|
3276
|
+
}
|
|
3277
|
+
else {
|
|
3278
|
+
var s = [], c = t & 7;
|
|
3279
|
+
s.length = (t >> 3) + 1, n.nextBytes(s), c > 0 ? s[0] &= (1 << c) - 1 : s[0] = 0, this.fromString(s, 256);
|
|
3280
|
+
}
|
|
3281
|
+
}, e;
|
|
3282
|
+
}(), Er = function() {
|
|
3283
|
+
function e() {}
|
|
3284
|
+
return e.prototype.convert = function(e) {
|
|
3285
|
+
return e;
|
|
3286
|
+
}, e.prototype.revert = function(e) {
|
|
3287
|
+
return e;
|
|
3288
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3289
|
+
e.multiplyTo(t, n);
|
|
3290
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3291
|
+
e.squareTo(t);
|
|
3292
|
+
}, e;
|
|
3293
|
+
}(), Dr = function() {
|
|
3294
|
+
function e(e) {
|
|
3295
|
+
this.m = e;
|
|
3296
|
+
}
|
|
3297
|
+
return e.prototype.convert = function(e) {
|
|
3298
|
+
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
|
|
3299
|
+
}, e.prototype.revert = function(e) {
|
|
3300
|
+
return e;
|
|
3301
|
+
}, e.prototype.reduce = function(e) {
|
|
3302
|
+
e.divRemTo(this.m, null, e);
|
|
3303
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3304
|
+
e.multiplyTo(t, n), this.reduce(n);
|
|
3305
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3306
|
+
e.squareTo(t), this.reduce(t);
|
|
3307
|
+
}, e;
|
|
3308
|
+
}(), Or = function() {
|
|
3309
|
+
function e(e) {
|
|
3310
|
+
this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
|
|
3311
|
+
}
|
|
3312
|
+
return e.prototype.convert = function(e) {
|
|
3313
|
+
var t = G();
|
|
3314
|
+
return e.abs().dlShiftTo(this.m.t, t), t.divRemTo(this.m, null, t), e.s < 0 && t.compareTo(W.ZERO) > 0 && this.m.subTo(t, t), t;
|
|
3315
|
+
}, e.prototype.revert = function(e) {
|
|
3316
|
+
var t = G();
|
|
3317
|
+
return e.copyTo(t), this.reduce(t), t;
|
|
3318
|
+
}, e.prototype.reduce = function(e) {
|
|
3319
|
+
for (; e.t <= this.mt2;) e[e.t++] = 0;
|
|
3320
|
+
for (var t = 0; t < this.m.t; ++t) {
|
|
3321
|
+
var n = e[t] & 32767, r = n * this.mpl + ((n * this.mph + (e[t] >> 15) * this.mpl & this.um) << 15) & e.DM;
|
|
3322
|
+
for (n = t + this.m.t, e[n] += this.m.am(0, r, e, t, 0, this.m.t); e[n] >= e.DV;) e[n] -= e.DV, e[++n]++;
|
|
3323
|
+
}
|
|
3324
|
+
e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
|
|
3325
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3326
|
+
e.multiplyTo(t, n), this.reduce(n);
|
|
3327
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3328
|
+
e.squareTo(t), this.reduce(t);
|
|
3329
|
+
}, e;
|
|
3330
|
+
}(), kr = function() {
|
|
3331
|
+
function e(e) {
|
|
3332
|
+
this.m = e, this.r2 = G(), this.q3 = G(), W.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e);
|
|
3333
|
+
}
|
|
3334
|
+
return e.prototype.convert = function(e) {
|
|
3335
|
+
if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
|
|
3336
|
+
if (e.compareTo(this.m) < 0) return e;
|
|
3337
|
+
var t = G();
|
|
3338
|
+
return e.copyTo(t), this.reduce(t), t;
|
|
3339
|
+
}, e.prototype.revert = function(e) {
|
|
3340
|
+
return e;
|
|
3341
|
+
}, e.prototype.reduce = function(e) {
|
|
3342
|
+
for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0;) e.dAddOffset(1, this.m.t + 1);
|
|
3343
|
+
for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0;) e.subTo(this.m, e);
|
|
3344
|
+
}, e.prototype.mulTo = function(e, t, n) {
|
|
3345
|
+
e.multiplyTo(t, n), this.reduce(n);
|
|
3346
|
+
}, e.prototype.sqrTo = function(e, t) {
|
|
3347
|
+
e.squareTo(t), this.reduce(t);
|
|
3348
|
+
}, e;
|
|
3349
|
+
}();
|
|
3350
|
+
function G() {
|
|
3351
|
+
return new W(null);
|
|
3352
|
+
}
|
|
3353
|
+
function K(e, t) {
|
|
3354
|
+
return new W(e, t);
|
|
3355
|
+
}
|
|
3356
|
+
var Ar = typeof navigator < "u";
|
|
3357
|
+
Ar && wr && navigator.appName == "Microsoft Internet Explorer" ? (W.prototype.am = function(e, t, n, r, i, a) {
|
|
3358
|
+
for (var o = t & 32767, s = t >> 15; --a >= 0;) {
|
|
3359
|
+
var c = this[e] & 32767, l = this[e++] >> 15, u = s * c + l * o;
|
|
3360
|
+
c = o * c + ((u & 32767) << 15) + n[r] + (i & 1073741823), i = (c >>> 30) + (u >>> 15) + s * l + (i >>> 30), n[r++] = c & 1073741823;
|
|
3361
|
+
}
|
|
3362
|
+
return i;
|
|
3363
|
+
}, Cr = 30) : Ar && wr && navigator.appName != "Netscape" ? (W.prototype.am = function(e, t, n, r, i, a) {
|
|
3364
|
+
for (; --a >= 0;) {
|
|
3365
|
+
var o = t * this[e++] + n[r] + i;
|
|
3366
|
+
i = Math.floor(o / 67108864), n[r++] = o & 67108863;
|
|
3367
|
+
}
|
|
3368
|
+
return i;
|
|
3369
|
+
}, Cr = 26) : (W.prototype.am = function(e, t, n, r, i, a) {
|
|
3370
|
+
for (var o = t & 16383, s = t >> 14; --a >= 0;) {
|
|
3371
|
+
var c = this[e] & 16383, l = this[e++] >> 14, u = s * c + l * o;
|
|
3372
|
+
c = o * c + ((u & 16383) << 14) + n[r] + i, i = (c >> 28) + (u >> 14) + s * l, n[r++] = c & 268435455;
|
|
3373
|
+
}
|
|
3374
|
+
return i;
|
|
3375
|
+
}, Cr = 28), W.prototype.DB = Cr, W.prototype.DM = (1 << Cr) - 1, W.prototype.DV = 1 << Cr;
|
|
3376
|
+
var jr = 52;
|
|
3377
|
+
W.prototype.FV = 2 ** jr, W.prototype.F1 = jr - Cr, W.prototype.F2 = 2 * Cr - jr;
|
|
3378
|
+
var Mr = [], Nr = 48, q;
|
|
3379
|
+
for (q = 0; q <= 9; ++q) Mr[Nr++] = q;
|
|
3380
|
+
for (Nr = 97, q = 10; q < 36; ++q) Mr[Nr++] = q;
|
|
3381
|
+
for (Nr = 65, q = 10; q < 36; ++q) Mr[Nr++] = q;
|
|
3382
|
+
function Pr(e, t) {
|
|
3383
|
+
return Mr[e.charCodeAt(t)] ?? -1;
|
|
3384
|
+
}
|
|
3385
|
+
function Fr(e) {
|
|
3386
|
+
var t = G();
|
|
3387
|
+
return t.fromInt(e), t;
|
|
3388
|
+
}
|
|
3389
|
+
function Ir(e) {
|
|
3390
|
+
var t = 1, n;
|
|
3391
|
+
return (n = e >>> 16) != 0 && (e = n, t += 16), (n = e >> 8) != 0 && (e = n, t += 8), (n = e >> 4) != 0 && (e = n, t += 4), (n = e >> 2) != 0 && (e = n, t += 2), (n = e >> 1) != 0 && (e = n, t += 1), t;
|
|
3392
|
+
}
|
|
3393
|
+
W.ZERO = Fr(0), W.ONE = Fr(1);
|
|
3394
|
+
//#endregion
|
|
3395
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/prng4.js
|
|
3396
|
+
var Lr = function() {
|
|
3397
|
+
function e() {
|
|
3398
|
+
this.i = 0, this.j = 0, this.S = [];
|
|
3399
|
+
}
|
|
3400
|
+
return e.prototype.init = function(e) {
|
|
3401
|
+
var t, n, r;
|
|
3402
|
+
for (t = 0; t < 256; ++t) this.S[t] = t;
|
|
3403
|
+
for (n = 0, t = 0; t < 256; ++t) n = n + this.S[t] + e[t % e.length] & 255, r = this.S[t], this.S[t] = this.S[n], this.S[n] = r;
|
|
3404
|
+
this.i = 0, this.j = 0;
|
|
3405
|
+
}, e.prototype.next = function() {
|
|
3406
|
+
var e;
|
|
3407
|
+
return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
|
|
3408
|
+
}, e;
|
|
3409
|
+
}();
|
|
3410
|
+
function Rr() {
|
|
3411
|
+
return new Lr();
|
|
3412
|
+
}
|
|
3413
|
+
//#endregion
|
|
3414
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rng.js
|
|
3415
|
+
var zr, Br = null, J;
|
|
3416
|
+
if (Br == null) {
|
|
3417
|
+
Br = [], J = 0;
|
|
3418
|
+
var Vr = void 0;
|
|
3419
|
+
if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
|
|
3420
|
+
var Hr = new Uint32Array(256);
|
|
3421
|
+
for (self.crypto.getRandomValues(Hr), Vr = 0; Vr < Hr.length; ++Vr) Br[J++] = Hr[Vr] & 255;
|
|
3422
|
+
}
|
|
3423
|
+
var Ur = 0, Wr = function(e) {
|
|
3424
|
+
if (Ur ||= 0, Ur >= 256 || J >= 256) {
|
|
3425
|
+
self.removeEventListener ? self.removeEventListener("mousemove", Wr, !1) : self.detachEvent && self.detachEvent("onmousemove", Wr);
|
|
3426
|
+
return;
|
|
3427
|
+
}
|
|
3428
|
+
try {
|
|
3429
|
+
var t = e.x + e.y;
|
|
3430
|
+
Br[J++] = t & 255, Ur += 1;
|
|
3431
|
+
} catch {}
|
|
3432
|
+
};
|
|
3433
|
+
typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", Wr, !1) : self.attachEvent && self.attachEvent("onmousemove", Wr));
|
|
3434
|
+
}
|
|
3435
|
+
function Gr() {
|
|
3436
|
+
if (zr == null) {
|
|
3437
|
+
for (zr = Rr(); J < 256;) {
|
|
3438
|
+
var e = Math.floor(65536 * Math.random());
|
|
3439
|
+
Br[J++] = e & 255;
|
|
3440
|
+
}
|
|
3441
|
+
for (zr.init(Br), J = 0; J < Br.length; ++J) Br[J] = 0;
|
|
3442
|
+
J = 0;
|
|
3443
|
+
}
|
|
3444
|
+
return zr.next();
|
|
3445
|
+
}
|
|
3446
|
+
var Kr = function() {
|
|
3447
|
+
function e() {}
|
|
3448
|
+
return e.prototype.nextBytes = function(e) {
|
|
3449
|
+
for (var t = 0; t < e.length; ++t) e[t] = Gr();
|
|
3450
|
+
}, e;
|
|
3451
|
+
}();
|
|
3452
|
+
//#endregion
|
|
3453
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/sha256.js
|
|
3454
|
+
function qr(e) {
|
|
3455
|
+
return Xr(ai(Yr(e), e.length * 8));
|
|
3456
|
+
}
|
|
3457
|
+
function Jr(e) {
|
|
3458
|
+
for (var t = "0123456789abcdef", n = "", r = 0; r < e.length; r++) {
|
|
3459
|
+
var i = e.charCodeAt(r);
|
|
3460
|
+
n += t.charAt(i >>> 4 & 15) + t.charAt(i & 15);
|
|
3461
|
+
}
|
|
3462
|
+
return n;
|
|
3463
|
+
}
|
|
3464
|
+
function Yr(e) {
|
|
3465
|
+
for (var t = Array(e.length >> 2), n = 0; n < t.length; n++) t[n] = 0;
|
|
3466
|
+
for (var n = 0; n < e.length * 8; n += 8) t[n >> 5] |= (e.charCodeAt(n / 8) & 255) << 24 - n % 32;
|
|
3467
|
+
return t;
|
|
3468
|
+
}
|
|
3469
|
+
function Xr(e) {
|
|
3470
|
+
for (var t = "", n = 0; n < e.length * 32; n += 8) t += String.fromCharCode(e[n >> 5] >>> 24 - n % 32 & 255);
|
|
3471
|
+
return t;
|
|
3472
|
+
}
|
|
3473
|
+
function Y(e, t) {
|
|
3474
|
+
return e >>> t | e << 32 - t;
|
|
3475
|
+
}
|
|
3476
|
+
function Zr(e, t) {
|
|
3477
|
+
return e >>> t;
|
|
3478
|
+
}
|
|
3479
|
+
function Qr(e, t, n) {
|
|
3480
|
+
return e & t ^ ~e & n;
|
|
3481
|
+
}
|
|
3482
|
+
function $r(e, t, n) {
|
|
3483
|
+
return e & t ^ e & n ^ t & n;
|
|
3484
|
+
}
|
|
3485
|
+
function ei(e) {
|
|
3486
|
+
return Y(e, 2) ^ Y(e, 13) ^ Y(e, 22);
|
|
3487
|
+
}
|
|
3488
|
+
function ti(e) {
|
|
3489
|
+
return Y(e, 6) ^ Y(e, 11) ^ Y(e, 25);
|
|
3490
|
+
}
|
|
3491
|
+
function ni(e) {
|
|
3492
|
+
return Y(e, 7) ^ Y(e, 18) ^ Zr(e, 3);
|
|
3493
|
+
}
|
|
3494
|
+
function ri(e) {
|
|
3495
|
+
return Y(e, 17) ^ Y(e, 19) ^ Zr(e, 10);
|
|
3496
|
+
}
|
|
3497
|
+
var ii = [
|
|
3498
|
+
1116352408,
|
|
3499
|
+
1899447441,
|
|
3500
|
+
-1245643825,
|
|
3501
|
+
-373957723,
|
|
3502
|
+
961987163,
|
|
3503
|
+
1508970993,
|
|
3504
|
+
-1841331548,
|
|
3505
|
+
-1424204075,
|
|
3506
|
+
-670586216,
|
|
3507
|
+
310598401,
|
|
3508
|
+
607225278,
|
|
3509
|
+
1426881987,
|
|
3510
|
+
1925078388,
|
|
3511
|
+
-2132889090,
|
|
3512
|
+
-1680079193,
|
|
3513
|
+
-1046744716,
|
|
3514
|
+
-459576895,
|
|
3515
|
+
-272742522,
|
|
3516
|
+
264347078,
|
|
3517
|
+
604807628,
|
|
3518
|
+
770255983,
|
|
3519
|
+
1249150122,
|
|
3520
|
+
1555081692,
|
|
3521
|
+
1996064986,
|
|
3522
|
+
-1740746414,
|
|
3523
|
+
-1473132947,
|
|
3524
|
+
-1341970488,
|
|
3525
|
+
-1084653625,
|
|
3526
|
+
-958395405,
|
|
3527
|
+
-710438585,
|
|
3528
|
+
113926993,
|
|
3529
|
+
338241895,
|
|
3530
|
+
666307205,
|
|
3531
|
+
773529912,
|
|
3532
|
+
1294757372,
|
|
3533
|
+
1396182291,
|
|
3534
|
+
1695183700,
|
|
3535
|
+
1986661051,
|
|
3536
|
+
-2117940946,
|
|
3537
|
+
-1838011259,
|
|
3538
|
+
-1564481375,
|
|
3539
|
+
-1474664885,
|
|
3540
|
+
-1035236496,
|
|
3541
|
+
-949202525,
|
|
3542
|
+
-778901479,
|
|
3543
|
+
-694614492,
|
|
3544
|
+
-200395387,
|
|
3545
|
+
275423344,
|
|
3546
|
+
430227734,
|
|
3547
|
+
506948616,
|
|
3548
|
+
659060556,
|
|
3549
|
+
883997877,
|
|
3550
|
+
958139571,
|
|
3551
|
+
1322822218,
|
|
3552
|
+
1537002063,
|
|
3553
|
+
1747873779,
|
|
3554
|
+
1955562222,
|
|
3555
|
+
2024104815,
|
|
3556
|
+
-2067236844,
|
|
3557
|
+
-1933114872,
|
|
3558
|
+
-1866530822,
|
|
3559
|
+
-1538233109,
|
|
3560
|
+
-1090935817,
|
|
3561
|
+
-965641998
|
|
3562
|
+
];
|
|
3563
|
+
function ai(e, t) {
|
|
3564
|
+
var n = [
|
|
3565
|
+
1779033703,
|
|
3566
|
+
-1150833019,
|
|
3567
|
+
1013904242,
|
|
3568
|
+
-1521486534,
|
|
3569
|
+
1359893119,
|
|
3570
|
+
-1694144372,
|
|
3571
|
+
528734635,
|
|
3572
|
+
1541459225
|
|
3573
|
+
], r = Array(64), i, a, o, s, c, l, u, d, f, p, m, h;
|
|
3574
|
+
for (e[t >> 5] |= 128 << 24 - t % 32, e[(t + 64 >> 9 << 4) + 15] = t, f = 0; f < e.length; f += 16) {
|
|
3575
|
+
for (i = n[0], a = n[1], o = n[2], s = n[3], c = n[4], l = n[5], u = n[6], d = n[7], p = 0; p < 64; p++) p < 16 ? r[p] = e[p + f] : r[p] = X(X(X(ri(r[p - 2]), r[p - 7]), ni(r[p - 15])), r[p - 16]), m = X(X(X(X(d, ti(c)), Qr(c, l, u)), ii[p]), r[p]), h = X(ei(i), $r(i, a, o)), d = u, u = l, l = c, c = X(s, m), s = o, o = a, a = i, i = X(m, h);
|
|
3576
|
+
n[0] = X(i, n[0]), n[1] = X(a, n[1]), n[2] = X(o, n[2]), n[3] = X(s, n[3]), n[4] = X(c, n[4]), n[5] = X(l, n[5]), n[6] = X(u, n[6]), n[7] = X(d, n[7]);
|
|
3577
|
+
}
|
|
3578
|
+
return n;
|
|
3579
|
+
}
|
|
3580
|
+
function X(e, t) {
|
|
3581
|
+
var n = (e & 65535) + (t & 65535);
|
|
3582
|
+
return (e >> 16) + (t >> 16) + (n >> 16) << 16 | n & 65535;
|
|
3583
|
+
}
|
|
3584
|
+
//#endregion
|
|
3585
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsbn/rsa.js
|
|
3586
|
+
function oi(e, t) {
|
|
3587
|
+
if (t < e.length + 22) return console.error("Message too long for RSA"), null;
|
|
3588
|
+
for (var n = t - e.length - 6, r = "", i = 0; i < n; i += 2) r += "ff";
|
|
3589
|
+
return K("0001" + r + "00" + e, 16);
|
|
3590
|
+
}
|
|
3591
|
+
function si(e, t) {
|
|
3592
|
+
if (t < e.length + 11) return console.error("Message too long for RSA"), null;
|
|
3593
|
+
for (var n = [], r = e.length - 1; r >= 0 && t > 0;) {
|
|
3594
|
+
var i = e.charCodeAt(r--);
|
|
3595
|
+
i < 128 ? n[--t] = i : i > 127 && i < 2048 ? (n[--t] = i & 63 | 128, n[--t] = i >> 6 | 192) : (n[--t] = i & 63 | 128, n[--t] = i >> 6 & 63 | 128, n[--t] = i >> 12 | 224);
|
|
3596
|
+
}
|
|
3597
|
+
n[--t] = 0;
|
|
3598
|
+
for (var a = new Kr(), o = []; t > 2;) {
|
|
3599
|
+
for (o[0] = 0; o[0] == 0;) a.nextBytes(o);
|
|
3600
|
+
n[--t] = o[0];
|
|
3601
|
+
}
|
|
3602
|
+
return n[--t] = 2, n[--t] = 0, new W(n);
|
|
3603
|
+
}
|
|
3604
|
+
function ci(e, t, n) {
|
|
3605
|
+
for (var r = "", i = 0; r.length < t;) r += n(String.fromCharCode.apply(String, e.concat([
|
|
3606
|
+
(i & 4278190080) >> 24,
|
|
3607
|
+
(i & 16711680) >> 16,
|
|
3608
|
+
(i & 65280) >> 8,
|
|
3609
|
+
i & 255
|
|
3610
|
+
]))), i += 1;
|
|
3611
|
+
return r;
|
|
3612
|
+
}
|
|
3613
|
+
var li = 32;
|
|
3614
|
+
function ui(e, t) {
|
|
3615
|
+
var n = li, r = qr;
|
|
3616
|
+
if (e.length + 2 * n + 2 > t) throw "Message too long for RSA";
|
|
3617
|
+
var i = "", a;
|
|
3618
|
+
for (a = 0; a < t - e.length - 2 * n - 2; a += 1) i += "\0";
|
|
3619
|
+
var o = r("") + i + "" + e, s = Array(n);
|
|
3620
|
+
new Kr().nextBytes(s);
|
|
3621
|
+
var c = ci(s, o.length, r), l = [];
|
|
3622
|
+
for (a = 0; a < o.length; a += 1) l[a] = o.charCodeAt(a) ^ c.charCodeAt(a);
|
|
3623
|
+
var u = ci(l, s.length, r), d = [0];
|
|
3624
|
+
for (a = 0; a < s.length; a += 1) d[a + 1] = s[a] ^ u.charCodeAt(a);
|
|
3625
|
+
return new W(d.concat(l));
|
|
3626
|
+
}
|
|
3627
|
+
var di = function() {
|
|
3628
|
+
function e() {
|
|
3629
|
+
this.n = null, this.e = 0, this.d = null, this.p = null, this.q = null, this.dmp1 = null, this.dmq1 = null, this.coeff = null;
|
|
3630
|
+
}
|
|
3631
|
+
return e.prototype.doPublic = function(e) {
|
|
3632
|
+
return e.modPowInt(this.e, this.n);
|
|
3633
|
+
}, e.prototype.doPrivate = function(e) {
|
|
3634
|
+
if (this.p == null || this.q == null) return e.modPow(this.d, this.n);
|
|
3635
|
+
for (var t = e.mod(this.p).modPow(this.dmp1, this.p), n = e.mod(this.q).modPow(this.dmq1, this.q); t.compareTo(n) < 0;) t = t.add(this.p);
|
|
3636
|
+
return t.subtract(n).multiply(this.coeff).mod(this.p).multiply(this.q).add(n);
|
|
3637
|
+
}, e.prototype.setPublic = function(e, t) {
|
|
3638
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = K(e, 16), this.e = parseInt(t, 16)) : console.error("Invalid RSA public key");
|
|
3639
|
+
}, e.prototype.encrypt = function(e, t) {
|
|
3640
|
+
t === void 0 && (t = si);
|
|
3641
|
+
var n = this.n.bitLength() + 7 >> 3, r = t(e, n);
|
|
3642
|
+
if (r == null) return null;
|
|
3643
|
+
var i = this.doPublic(r);
|
|
3644
|
+
if (i == null) return null;
|
|
3645
|
+
for (var a = i.toString(16), o = a.length, s = 0; s < n * 2 - o; s++) a = "0" + a;
|
|
3646
|
+
return a;
|
|
3647
|
+
}, e.prototype.setPrivate = function(e, t, n) {
|
|
3648
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = K(e, 16), this.e = parseInt(t, 16), this.d = K(n, 16)) : console.error("Invalid RSA private key");
|
|
3649
|
+
}, e.prototype.setPrivateEx = function(e, t, n, r, i, a, o, s) {
|
|
3650
|
+
e != null && t != null && e.length > 0 && t.length > 0 ? (this.n = K(e, 16), this.e = parseInt(t, 16), this.d = K(n, 16), this.p = K(r, 16), this.q = K(i, 16), this.dmp1 = K(a, 16), this.dmq1 = K(o, 16), this.coeff = K(s, 16)) : console.error("Invalid RSA private key");
|
|
3651
|
+
}, e.prototype.generate = function(e, t) {
|
|
3652
|
+
var n = new Kr(), r = e >> 1;
|
|
3653
|
+
this.e = parseInt(t, 16);
|
|
3654
|
+
for (var i = new W(t, 16);;) {
|
|
3655
|
+
for (; this.p = new W(e - r, 1, n), !(this.p.subtract(W.ONE).gcd(i).compareTo(W.ONE) == 0 && this.p.isProbablePrime(10)););
|
|
3656
|
+
for (; this.q = new W(r, 1, n), !(this.q.subtract(W.ONE).gcd(i).compareTo(W.ONE) == 0 && this.q.isProbablePrime(10)););
|
|
3657
|
+
if (this.p.compareTo(this.q) <= 0) {
|
|
3658
|
+
var a = this.p;
|
|
3659
|
+
this.p = this.q, this.q = a;
|
|
3660
|
+
}
|
|
3661
|
+
var o = this.p.subtract(W.ONE), s = this.q.subtract(W.ONE), c = o.multiply(s);
|
|
3662
|
+
if (c.gcd(i).compareTo(W.ONE) == 0) {
|
|
3663
|
+
this.n = this.p.multiply(this.q), this.d = i.modInverse(c), this.dmp1 = this.d.mod(o), this.dmq1 = this.d.mod(s), this.coeff = this.q.modInverse(this.p);
|
|
3664
|
+
break;
|
|
3665
|
+
}
|
|
3666
|
+
}
|
|
3667
|
+
}, e.prototype.decrypt = function(e) {
|
|
3668
|
+
var t = K(e, 16), n = this.doPrivate(t);
|
|
3669
|
+
return n == null ? null : fi(n, this.n.bitLength() + 7 >> 3);
|
|
3670
|
+
}, e.prototype.generateAsync = function(e, t, n) {
|
|
3671
|
+
var r = new Kr(), i = e >> 1;
|
|
3672
|
+
this.e = parseInt(t, 16);
|
|
3673
|
+
var a = new W(t, 16), o = this, s = function() {
|
|
3674
|
+
var t = function() {
|
|
3675
|
+
if (o.p.compareTo(o.q) <= 0) {
|
|
3676
|
+
var e = o.p;
|
|
3677
|
+
o.p = o.q, o.q = e;
|
|
3678
|
+
}
|
|
3679
|
+
var t = o.p.subtract(W.ONE), r = o.q.subtract(W.ONE), i = t.multiply(r);
|
|
3680
|
+
i.gcd(a).compareTo(W.ONE) == 0 ? (o.n = o.p.multiply(o.q), o.d = a.modInverse(i), o.dmp1 = o.d.mod(t), o.dmq1 = o.d.mod(r), o.coeff = o.q.modInverse(o.p), setTimeout(function() {
|
|
3681
|
+
n();
|
|
3682
|
+
}, 0)) : setTimeout(s, 0);
|
|
3683
|
+
}, c = function() {
|
|
3684
|
+
o.q = G(), o.q.fromNumberAsync(i, 1, r, function() {
|
|
3685
|
+
o.q.subtract(W.ONE).gcda(a, function(e) {
|
|
3686
|
+
e.compareTo(W.ONE) == 0 && o.q.isProbablePrime(10) ? setTimeout(t, 0) : setTimeout(c, 0);
|
|
3687
|
+
});
|
|
3688
|
+
});
|
|
3689
|
+
}, l = function() {
|
|
3690
|
+
o.p = G(), o.p.fromNumberAsync(e - i, 1, r, function() {
|
|
3691
|
+
o.p.subtract(W.ONE).gcda(a, function(e) {
|
|
3692
|
+
e.compareTo(W.ONE) == 0 && o.p.isProbablePrime(10) ? setTimeout(c, 0) : setTimeout(l, 0);
|
|
3693
|
+
});
|
|
3694
|
+
});
|
|
3695
|
+
};
|
|
3696
|
+
setTimeout(l, 0);
|
|
3697
|
+
};
|
|
3698
|
+
setTimeout(s, 0);
|
|
3699
|
+
}, e.prototype.sign = function(e, t, n) {
|
|
3700
|
+
var r = mi(n) + t(e).toString(), i = this.n.bitLength() / 4, a = oi(r, i);
|
|
3701
|
+
if (a == null) return null;
|
|
3702
|
+
var o = this.doPrivate(a);
|
|
3703
|
+
if (o == null) return null;
|
|
3704
|
+
for (var s = o.toString(16), c = s.length, l = 0; l < i - c; l++) s = "0" + s;
|
|
3705
|
+
return s;
|
|
3706
|
+
}, e.prototype.verify = function(e, t, n) {
|
|
3707
|
+
var r = K(t, 16), i = this.doPublic(r);
|
|
3708
|
+
return i == null ? null : hi(i.toString(16).replace(/^1f+00/, "")) == n(e).toString();
|
|
3709
|
+
}, e;
|
|
3710
|
+
}();
|
|
3711
|
+
function fi(e, t) {
|
|
3712
|
+
for (var n = e.toByteArray(), r = 0; r < n.length && n[r] == 0;) ++r;
|
|
3713
|
+
if (n.length - r != t - 1 || n[r] != 2) return null;
|
|
3714
|
+
for (++r; n[r] != 0;) if (++r >= n.length) return null;
|
|
3715
|
+
for (var i = ""; ++r < n.length;) {
|
|
3716
|
+
var a = n[r] & 255;
|
|
3717
|
+
a < 128 ? i += String.fromCharCode(a) : a > 191 && a < 224 ? (i += String.fromCharCode((a & 31) << 6 | n[r + 1] & 63), ++r) : (i += String.fromCharCode((a & 15) << 12 | (n[r + 1] & 63) << 6 | n[r + 2] & 63), r += 2);
|
|
3718
|
+
}
|
|
3719
|
+
return i;
|
|
3720
|
+
}
|
|
3721
|
+
var pi = {
|
|
3722
|
+
md2: "3020300c06082a864886f70d020205000410",
|
|
3723
|
+
md5: "3020300c06082a864886f70d020505000410",
|
|
3724
|
+
sha1: "3021300906052b0e03021a05000414",
|
|
3725
|
+
sha224: "302d300d06096086480165030402040500041c",
|
|
3726
|
+
sha256: "3031300d060960864801650304020105000420",
|
|
3727
|
+
sha384: "3041300d060960864801650304020205000430",
|
|
3728
|
+
sha512: "3051300d060960864801650304020305000440",
|
|
3729
|
+
ripemd160: "3021300906052b2403020105000414"
|
|
3730
|
+
};
|
|
3731
|
+
function mi(e) {
|
|
3732
|
+
return pi[e] || "";
|
|
3733
|
+
}
|
|
3734
|
+
function hi(e) {
|
|
3735
|
+
for (var t in pi) if (pi.hasOwnProperty(t)) {
|
|
3736
|
+
var n = pi[t], r = n.length;
|
|
3737
|
+
if (e.substring(0, r) == n) return e.substring(r);
|
|
3738
|
+
}
|
|
3739
|
+
return e;
|
|
3740
|
+
}
|
|
3741
|
+
//#endregion
|
|
3742
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/lib/jsrsasign/asn1-1.0.js
|
|
3743
|
+
function Z(e, t, n) {
|
|
3744
|
+
if (!t || !e) throw Error("extend failed, please check that all dependencies are included.");
|
|
3745
|
+
var r = function() {};
|
|
3746
|
+
if (r.prototype = t.prototype, e.prototype = new r(), e.prototype.constructor = e, e.superclass = t.prototype, t.prototype.constructor == Object.prototype.constructor && (t.prototype.constructor = t), n) {
|
|
3747
|
+
for (var i in n) e.prototype[i] = n[i];
|
|
3748
|
+
var a = function() {}, o = ["toString", "valueOf"];
|
|
3749
|
+
try {
|
|
3750
|
+
/MSIE/.test(navigator.userAgent) && (a = function(e, t) {
|
|
3751
|
+
for (i = 0; i < o.length; i += 1) {
|
|
3752
|
+
var n = o[i], r = t[n];
|
|
3753
|
+
typeof r == "function" && r != Object.prototype[n] && (e[n] = r);
|
|
3754
|
+
}
|
|
3755
|
+
});
|
|
3756
|
+
} catch {}
|
|
3757
|
+
a(e.prototype, n);
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3760
|
+
var Q = {};
|
|
3761
|
+
(Q.asn1 === void 0 || !Q.asn1) && (Q.asn1 = {}), Q.asn1.ASN1Util = new function() {
|
|
3762
|
+
this.integerToByteHex = function(e) {
|
|
3763
|
+
var t = e.toString(16);
|
|
3764
|
+
return t.length % 2 == 1 && (t = "0" + t), t;
|
|
3765
|
+
}, this.bigIntToMinTwosComplementsHex = function(e) {
|
|
3766
|
+
var t = e.toString(16);
|
|
3767
|
+
if (t.substring(0, 1) != "-") t.length % 2 == 1 ? t = "0" + t : t.match(/^[0-7]/) || (t = "00" + t);
|
|
3768
|
+
else {
|
|
3769
|
+
var n = t.substring(1).length;
|
|
3770
|
+
n % 2 == 1 ? n += 1 : t.match(/^[0-7]/) || (n += 2);
|
|
3771
|
+
for (var r = "", i = 0; i < n; i++) r += "f";
|
|
3772
|
+
t = new W(r, 16).xor(e).add(W.ONE).toString(16).replace(/^-/, "");
|
|
3773
|
+
}
|
|
3774
|
+
return t;
|
|
3775
|
+
}, this.getPEMStringFromHex = function(e, t) {
|
|
3776
|
+
return hextopem(e, t);
|
|
3777
|
+
}, this.newObject = function(e) {
|
|
3778
|
+
var t = Q.asn1, n = t.DERBoolean, r = t.DERInteger, i = t.DERBitString, a = t.DEROctetString, o = t.DERNull, s = t.DERObjectIdentifier, c = t.DEREnumerated, l = t.DERUTF8String, u = t.DERNumericString, d = t.DERPrintableString, f = t.DERTeletexString, p = t.DERIA5String, m = t.DERUTCTime, h = t.DERGeneralizedTime, g = t.DERSequence, _ = t.DERSet, v = t.DERTaggedObject, y = t.ASN1Util.newObject, b = Object.keys(e);
|
|
3779
|
+
if (b.length != 1) throw "key of param shall be only one.";
|
|
3780
|
+
var x = b[0];
|
|
3781
|
+
if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + x + ":") == -1) throw "undefined key: " + x;
|
|
3782
|
+
if (x == "bool") return new n(e[x]);
|
|
3783
|
+
if (x == "int") return new r(e[x]);
|
|
3784
|
+
if (x == "bitstr") return new i(e[x]);
|
|
3785
|
+
if (x == "octstr") return new a(e[x]);
|
|
3786
|
+
if (x == "null") return new o(e[x]);
|
|
3787
|
+
if (x == "oid") return new s(e[x]);
|
|
3788
|
+
if (x == "enum") return new c(e[x]);
|
|
3789
|
+
if (x == "utf8str") return new l(e[x]);
|
|
3790
|
+
if (x == "numstr") return new u(e[x]);
|
|
3791
|
+
if (x == "prnstr") return new d(e[x]);
|
|
3792
|
+
if (x == "telstr") return new f(e[x]);
|
|
3793
|
+
if (x == "ia5str") return new p(e[x]);
|
|
3794
|
+
if (x == "utctime") return new m(e[x]);
|
|
3795
|
+
if (x == "gentime") return new h(e[x]);
|
|
3796
|
+
if (x == "seq") {
|
|
3797
|
+
for (var S = e[x], C = [], w = 0; w < S.length; w++) {
|
|
3798
|
+
var T = y(S[w]);
|
|
3799
|
+
C.push(T);
|
|
3800
|
+
}
|
|
3801
|
+
return new g({ array: C });
|
|
3802
|
+
}
|
|
3803
|
+
if (x == "set") {
|
|
3804
|
+
for (var S = e[x], C = [], w = 0; w < S.length; w++) {
|
|
3805
|
+
var T = y(S[w]);
|
|
3806
|
+
C.push(T);
|
|
3807
|
+
}
|
|
3808
|
+
return new _({ array: C });
|
|
3809
|
+
}
|
|
3810
|
+
if (x == "tag") {
|
|
3811
|
+
var E = e[x];
|
|
3812
|
+
if (Object.prototype.toString.call(E) === "[object Array]" && E.length == 3) {
|
|
3813
|
+
var D = y(E[2]);
|
|
3814
|
+
return new v({
|
|
3815
|
+
tag: E[0],
|
|
3816
|
+
explicit: E[1],
|
|
3817
|
+
obj: D
|
|
3818
|
+
});
|
|
3819
|
+
} else {
|
|
3820
|
+
var O = {};
|
|
3821
|
+
if (E.explicit !== void 0 && (O.explicit = E.explicit), E.tag !== void 0 && (O.tag = E.tag), E.obj === void 0) throw "obj shall be specified for 'tag'.";
|
|
3822
|
+
return O.obj = y(E.obj), new v(O);
|
|
3823
|
+
}
|
|
3824
|
+
}
|
|
3825
|
+
}, this.jsonToASN1HEX = function(e) {
|
|
3826
|
+
return this.newObject(e).getEncodedHex();
|
|
3827
|
+
};
|
|
3828
|
+
}(), Q.asn1.ASN1Util.oidHexToInt = function(e) {
|
|
3829
|
+
for (var t = "", n = parseInt(e.substring(0, 2), 16), r = Math.floor(n / 40), i = n % 40, t = r + "." + i, a = "", o = 2; o < e.length; o += 2) {
|
|
3830
|
+
var s = ("00000000" + parseInt(e.substring(o, o + 2), 16).toString(2)).slice(-8);
|
|
3831
|
+
if (a += s.substring(1, 8), s.substring(0, 1) == "0") {
|
|
3832
|
+
var c = new W(a, 2);
|
|
3833
|
+
t = t + "." + c.toString(10), a = "";
|
|
3834
|
+
}
|
|
3835
|
+
}
|
|
3836
|
+
return t;
|
|
3837
|
+
}, Q.asn1.ASN1Util.oidIntToHex = function(e) {
|
|
3838
|
+
var t = function(e) {
|
|
3839
|
+
var t = e.toString(16);
|
|
3840
|
+
return t.length == 1 && (t = "0" + t), t;
|
|
3841
|
+
}, n = function(e) {
|
|
3842
|
+
var n = "", r = new W(e, 10).toString(2), i = 7 - r.length % 7;
|
|
3843
|
+
i == 7 && (i = 0);
|
|
3844
|
+
for (var a = "", o = 0; o < i; o++) a += "0";
|
|
3845
|
+
r = a + r;
|
|
3846
|
+
for (var o = 0; o < r.length - 1; o += 7) {
|
|
3847
|
+
var s = r.substring(o, o + 7);
|
|
3848
|
+
o != r.length - 7 && (s = "1" + s), n += t(parseInt(s, 2));
|
|
3849
|
+
}
|
|
3850
|
+
return n;
|
|
3851
|
+
};
|
|
3852
|
+
if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
|
|
3853
|
+
var r = "", i = e.split("."), a = parseInt(i[0]) * 40 + parseInt(i[1]);
|
|
3854
|
+
r += t(a), i.splice(0, 2);
|
|
3855
|
+
for (var o = 0; o < i.length; o++) r += n(i[o]);
|
|
3856
|
+
return r;
|
|
3857
|
+
}, Q.asn1.ASN1Object = function() {
|
|
3858
|
+
var e = "";
|
|
3859
|
+
this.getLengthHexFromValue = function() {
|
|
3860
|
+
if (this.hV === void 0 || this.hV == null) throw "this.hV is null or undefined.";
|
|
3861
|
+
if (this.hV.length % 2 == 1) throw "value hex must be even length: n=" + e.length + ",v=" + this.hV;
|
|
3862
|
+
var t = this.hV.length / 2, n = t.toString(16);
|
|
3863
|
+
if (n.length % 2 == 1 && (n = "0" + n), t < 128) return n;
|
|
3864
|
+
var r = n.length / 2;
|
|
3865
|
+
if (r > 15) throw "ASN.1 length too long to represent by 8x: n = " + t.toString(16);
|
|
3866
|
+
return (128 + r).toString(16) + n;
|
|
3867
|
+
}, this.getEncodedHex = function() {
|
|
3868
|
+
return (this.hTLV == null || this.isModified) && (this.hV = this.getFreshValueHex(), this.hL = this.getLengthHexFromValue(), this.hTLV = this.hT + this.hL + this.hV, this.isModified = !1), this.hTLV;
|
|
3869
|
+
}, this.getValueHex = function() {
|
|
3870
|
+
return this.getEncodedHex(), this.hV;
|
|
3871
|
+
}, this.getFreshValueHex = function() {
|
|
3872
|
+
return "";
|
|
3873
|
+
};
|
|
3874
|
+
}, Q.asn1.DERAbstractString = function(e) {
|
|
3875
|
+
Q.asn1.DERAbstractString.superclass.constructor.call(this), this.getString = function() {
|
|
3876
|
+
return this.s;
|
|
3877
|
+
}, this.setString = function(e) {
|
|
3878
|
+
this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(this.s);
|
|
3879
|
+
}, this.setStringHex = function(e) {
|
|
3880
|
+
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = e;
|
|
3881
|
+
}, this.getFreshValueHex = function() {
|
|
3882
|
+
return this.hV;
|
|
3883
|
+
}, e !== void 0 && (typeof e == "string" ? this.setString(e) : e.str === void 0 ? e.hex !== void 0 && this.setStringHex(e.hex) : this.setString(e.str));
|
|
3884
|
+
}, Z(Q.asn1.DERAbstractString, Q.asn1.ASN1Object), Q.asn1.DERAbstractTime = function(e) {
|
|
3885
|
+
Q.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(e) {
|
|
3886
|
+
return utc = e.getTime() + e.getTimezoneOffset() * 6e4, new Date(utc);
|
|
3887
|
+
}, this.formatDate = function(e, t, n) {
|
|
3888
|
+
var r = this.zeroPadding, i = this.localDateToUTC(e), a = String(i.getFullYear());
|
|
3889
|
+
t == "utc" && (a = a.substring(2, 4));
|
|
3890
|
+
var o = r(String(i.getMonth() + 1), 2), s = r(String(i.getDate()), 2), c = r(String(i.getHours()), 2), l = r(String(i.getMinutes()), 2), u = r(String(i.getSeconds()), 2), d = a + o + s + c + l + u;
|
|
3891
|
+
if (n === !0) {
|
|
3892
|
+
var f = i.getMilliseconds();
|
|
3893
|
+
if (f != 0) {
|
|
3894
|
+
var p = r(String(f), 3);
|
|
3895
|
+
p = p.replace(/[0]+$/, ""), d = d + "." + p;
|
|
3896
|
+
}
|
|
3897
|
+
}
|
|
3898
|
+
return d + "Z";
|
|
3899
|
+
}, this.zeroPadding = function(e, t) {
|
|
3900
|
+
return e.length >= t ? e : Array(t - e.length + 1).join("0") + e;
|
|
3901
|
+
}, this.getString = function() {
|
|
3902
|
+
return this.s;
|
|
3903
|
+
}, this.setString = function(e) {
|
|
3904
|
+
this.hTLV = null, this.isModified = !0, this.s = e, this.hV = stohex(e);
|
|
3905
|
+
}, this.setByDateValue = function(e, t, n, r, i, a) {
|
|
3906
|
+
var o = new Date(Date.UTC(e, t - 1, n, r, i, a, 0));
|
|
3907
|
+
this.setByDate(o);
|
|
3908
|
+
}, this.getFreshValueHex = function() {
|
|
3909
|
+
return this.hV;
|
|
3910
|
+
};
|
|
3911
|
+
}, Z(Q.asn1.DERAbstractTime, Q.asn1.ASN1Object), Q.asn1.DERAbstractStructured = function(e) {
|
|
3912
|
+
Q.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(e) {
|
|
3913
|
+
this.hTLV = null, this.isModified = !0, this.asn1Array = e;
|
|
3914
|
+
}, this.appendASN1Object = function(e) {
|
|
3915
|
+
this.hTLV = null, this.isModified = !0, this.asn1Array.push(e);
|
|
3916
|
+
}, this.asn1Array = [], e !== void 0 && e.array !== void 0 && (this.asn1Array = e.array);
|
|
3917
|
+
}, Z(Q.asn1.DERAbstractStructured, Q.asn1.ASN1Object), Q.asn1.DERBoolean = function() {
|
|
3918
|
+
Q.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
|
|
3919
|
+
}, Z(Q.asn1.DERBoolean, Q.asn1.ASN1Object), Q.asn1.DERInteger = function(e) {
|
|
3920
|
+
Q.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(e) {
|
|
3921
|
+
this.hTLV = null, this.isModified = !0, this.hV = Q.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
3922
|
+
}, this.setByInteger = function(e) {
|
|
3923
|
+
var t = new W(String(e), 10);
|
|
3924
|
+
this.setByBigInteger(t);
|
|
3925
|
+
}, this.setValueHex = function(e) {
|
|
3926
|
+
this.hV = e;
|
|
3927
|
+
}, this.getFreshValueHex = function() {
|
|
3928
|
+
return this.hV;
|
|
3929
|
+
}, e !== void 0 && (e.bigint === void 0 ? e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int) : this.setByBigInteger(e.bigint));
|
|
3930
|
+
}, Z(Q.asn1.DERInteger, Q.asn1.ASN1Object), Q.asn1.DERBitString = function(e) {
|
|
3931
|
+
e !== void 0 && e.obj !== void 0 && (e.hex = "00" + Q.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), Q.asn1.DERBitString.superclass.constructor.call(this), this.hT = "03", this.setHexValueIncludingUnusedBits = function(e) {
|
|
3932
|
+
this.hTLV = null, this.isModified = !0, this.hV = e;
|
|
3933
|
+
}, this.setUnusedBitsAndHexValue = function(e, t) {
|
|
3934
|
+
if (e < 0 || 7 < e) throw "unused bits shall be from 0 to 7: u = " + e;
|
|
3935
|
+
var n = "0" + e;
|
|
3936
|
+
this.hTLV = null, this.isModified = !0, this.hV = n + t;
|
|
3937
|
+
}, this.setByBinaryString = function(e) {
|
|
3938
|
+
e = e.replace(/0+$/, "");
|
|
3939
|
+
var t = 8 - e.length % 8;
|
|
3940
|
+
t == 8 && (t = 0);
|
|
3941
|
+
for (var n = 0; n <= t; n++) e += "0";
|
|
3942
|
+
for (var r = "", n = 0; n < e.length - 1; n += 8) {
|
|
3943
|
+
var i = e.substring(n, n + 8), a = parseInt(i, 2).toString(16);
|
|
3944
|
+
a.length == 1 && (a = "0" + a), r += a;
|
|
3945
|
+
}
|
|
3946
|
+
this.hTLV = null, this.isModified = !0, this.hV = "0" + t + r;
|
|
3947
|
+
}, this.setByBooleanArray = function(e) {
|
|
3948
|
+
for (var t = "", n = 0; n < e.length; n++) e[n] == 1 ? t += "1" : t += "0";
|
|
3949
|
+
this.setByBinaryString(t);
|
|
3950
|
+
}, this.newFalseArray = function(e) {
|
|
3951
|
+
for (var t = Array(e), n = 0; n < e; n++) t[n] = !1;
|
|
3952
|
+
return t;
|
|
3953
|
+
}, this.getFreshValueHex = function() {
|
|
3954
|
+
return this.hV;
|
|
3955
|
+
}, e !== void 0 && (typeof e == "string" && e.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(e) : e.hex === void 0 ? e.bin === void 0 ? e.array !== void 0 && this.setByBooleanArray(e.array) : this.setByBinaryString(e.bin) : this.setHexValueIncludingUnusedBits(e.hex));
|
|
3956
|
+
}, Z(Q.asn1.DERBitString, Q.asn1.ASN1Object), Q.asn1.DEROctetString = function(e) {
|
|
3957
|
+
e !== void 0 && e.obj !== void 0 && (e.hex = Q.asn1.ASN1Util.newObject(e.obj).getEncodedHex()), Q.asn1.DEROctetString.superclass.constructor.call(this, e), this.hT = "04";
|
|
3958
|
+
}, Z(Q.asn1.DEROctetString, Q.asn1.DERAbstractString), Q.asn1.DERNull = function() {
|
|
3959
|
+
Q.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
|
|
3960
|
+
}, Z(Q.asn1.DERNull, Q.asn1.ASN1Object), Q.asn1.DERObjectIdentifier = function(e) {
|
|
3961
|
+
var t = function(e) {
|
|
3962
|
+
var t = e.toString(16);
|
|
3963
|
+
return t.length == 1 && (t = "0" + t), t;
|
|
3964
|
+
}, n = function(e) {
|
|
3965
|
+
var n = "", r = new W(e, 10).toString(2), i = 7 - r.length % 7;
|
|
3966
|
+
i == 7 && (i = 0);
|
|
3967
|
+
for (var a = "", o = 0; o < i; o++) a += "0";
|
|
3968
|
+
r = a + r;
|
|
3969
|
+
for (var o = 0; o < r.length - 1; o += 7) {
|
|
3970
|
+
var s = r.substring(o, o + 7);
|
|
3971
|
+
o != r.length - 7 && (s = "1" + s), n += t(parseInt(s, 2));
|
|
3972
|
+
}
|
|
3973
|
+
return n;
|
|
3974
|
+
};
|
|
3975
|
+
Q.asn1.DERObjectIdentifier.superclass.constructor.call(this), this.hT = "06", this.setValueHex = function(e) {
|
|
3976
|
+
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = e;
|
|
3977
|
+
}, this.setValueOidString = function(e) {
|
|
3978
|
+
if (!e.match(/^[0-9.]+$/)) throw "malformed oid string: " + e;
|
|
3979
|
+
var r = "", i = e.split("."), a = parseInt(i[0]) * 40 + parseInt(i[1]);
|
|
3980
|
+
r += t(a), i.splice(0, 2);
|
|
3981
|
+
for (var o = 0; o < i.length; o++) r += n(i[o]);
|
|
3982
|
+
this.hTLV = null, this.isModified = !0, this.s = null, this.hV = r;
|
|
3983
|
+
}, this.setValueName = function(e) {
|
|
3984
|
+
var t = Q.asn1.x509.OID.name2oid(e);
|
|
3985
|
+
if (t !== "") this.setValueOidString(t);
|
|
3986
|
+
else throw "DERObjectIdentifier oidName undefined: " + e;
|
|
3987
|
+
}, this.getFreshValueHex = function() {
|
|
3988
|
+
return this.hV;
|
|
3989
|
+
}, e !== void 0 && (typeof e == "string" ? e.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(e) : this.setValueName(e) : e.oid === void 0 ? e.hex === void 0 ? e.name !== void 0 && this.setValueName(e.name) : this.setValueHex(e.hex) : this.setValueOidString(e.oid));
|
|
3990
|
+
}, Z(Q.asn1.DERObjectIdentifier, Q.asn1.ASN1Object), Q.asn1.DEREnumerated = function(e) {
|
|
3991
|
+
Q.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(e) {
|
|
3992
|
+
this.hTLV = null, this.isModified = !0, this.hV = Q.asn1.ASN1Util.bigIntToMinTwosComplementsHex(e);
|
|
3993
|
+
}, this.setByInteger = function(e) {
|
|
3994
|
+
var t = new W(String(e), 10);
|
|
3995
|
+
this.setByBigInteger(t);
|
|
3996
|
+
}, this.setValueHex = function(e) {
|
|
3997
|
+
this.hV = e;
|
|
3998
|
+
}, this.getFreshValueHex = function() {
|
|
3999
|
+
return this.hV;
|
|
4000
|
+
}, e !== void 0 && (e.int === void 0 ? typeof e == "number" ? this.setByInteger(e) : e.hex !== void 0 && this.setValueHex(e.hex) : this.setByInteger(e.int));
|
|
4001
|
+
}, Z(Q.asn1.DEREnumerated, Q.asn1.ASN1Object), Q.asn1.DERUTF8String = function(e) {
|
|
4002
|
+
Q.asn1.DERUTF8String.superclass.constructor.call(this, e), this.hT = "0c";
|
|
4003
|
+
}, Z(Q.asn1.DERUTF8String, Q.asn1.DERAbstractString), Q.asn1.DERNumericString = function(e) {
|
|
4004
|
+
Q.asn1.DERNumericString.superclass.constructor.call(this, e), this.hT = "12";
|
|
4005
|
+
}, Z(Q.asn1.DERNumericString, Q.asn1.DERAbstractString), Q.asn1.DERPrintableString = function(e) {
|
|
4006
|
+
Q.asn1.DERPrintableString.superclass.constructor.call(this, e), this.hT = "13";
|
|
4007
|
+
}, Z(Q.asn1.DERPrintableString, Q.asn1.DERAbstractString), Q.asn1.DERTeletexString = function(e) {
|
|
4008
|
+
Q.asn1.DERTeletexString.superclass.constructor.call(this, e), this.hT = "14";
|
|
4009
|
+
}, Z(Q.asn1.DERTeletexString, Q.asn1.DERAbstractString), Q.asn1.DERIA5String = function(e) {
|
|
4010
|
+
Q.asn1.DERIA5String.superclass.constructor.call(this, e), this.hT = "16";
|
|
4011
|
+
}, Z(Q.asn1.DERIA5String, Q.asn1.DERAbstractString), Q.asn1.DERUTCTime = function(e) {
|
|
4012
|
+
Q.asn1.DERUTCTime.superclass.constructor.call(this, e), this.hT = "17", this.setByDate = function(e) {
|
|
4013
|
+
this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
|
|
4014
|
+
}, this.getFreshValueHex = function() {
|
|
4015
|
+
return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
|
|
4016
|
+
}, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{12}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str));
|
|
4017
|
+
}, Z(Q.asn1.DERUTCTime, Q.asn1.DERAbstractTime), Q.asn1.DERGeneralizedTime = function(e) {
|
|
4018
|
+
Q.asn1.DERGeneralizedTime.superclass.constructor.call(this, e), this.hT = "18", this.withMillis = !1, this.setByDate = function(e) {
|
|
4019
|
+
this.hTLV = null, this.isModified = !0, this.date = e, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
|
|
4020
|
+
}, this.getFreshValueHex = function() {
|
|
4021
|
+
return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
|
|
4022
|
+
}, e !== void 0 && (e.str === void 0 ? typeof e == "string" && e.match(/^[0-9]{14}Z$/) ? this.setString(e) : e.hex === void 0 ? e.date !== void 0 && this.setByDate(e.date) : this.setStringHex(e.hex) : this.setString(e.str), e.millis === !0 && (this.withMillis = !0));
|
|
4023
|
+
}, Z(Q.asn1.DERGeneralizedTime, Q.asn1.DERAbstractTime), Q.asn1.DERSequence = function(e) {
|
|
4024
|
+
Q.asn1.DERSequence.superclass.constructor.call(this, e), this.hT = "30", this.getFreshValueHex = function() {
|
|
4025
|
+
for (var e = "", t = 0; t < this.asn1Array.length; t++) {
|
|
4026
|
+
var n = this.asn1Array[t];
|
|
4027
|
+
e += n.getEncodedHex();
|
|
4028
|
+
}
|
|
4029
|
+
return this.hV = e, this.hV;
|
|
4030
|
+
};
|
|
4031
|
+
}, Z(Q.asn1.DERSequence, Q.asn1.DERAbstractStructured), Q.asn1.DERSet = function(e) {
|
|
4032
|
+
Q.asn1.DERSet.superclass.constructor.call(this, e), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
|
|
4033
|
+
for (var e = [], t = 0; t < this.asn1Array.length; t++) {
|
|
4034
|
+
var n = this.asn1Array[t];
|
|
4035
|
+
e.push(n.getEncodedHex());
|
|
4036
|
+
}
|
|
4037
|
+
return this.sortFlag == 1 && e.sort(), this.hV = e.join(""), this.hV;
|
|
4038
|
+
}, e !== void 0 && e.sortflag !== void 0 && e.sortflag == 0 && (this.sortFlag = !1);
|
|
4039
|
+
}, Z(Q.asn1.DERSet, Q.asn1.DERAbstractStructured), Q.asn1.DERTaggedObject = function(e) {
|
|
4040
|
+
Q.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(e, t, n) {
|
|
4041
|
+
this.hT = t, this.isExplicit = e, this.asn1Object = n, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = n.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, t), this.isModified = !1);
|
|
4042
|
+
}, this.getFreshValueHex = function() {
|
|
4043
|
+
return this.hV;
|
|
4044
|
+
}, e !== void 0 && (e.tag !== void 0 && (this.hT = e.tag), e.explicit !== void 0 && (this.isExplicit = e.explicit), e.obj !== void 0 && (this.asn1Object = e.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
|
|
4045
|
+
}, Z(Q.asn1.DERTaggedObject, Q.asn1.ASN1Object);
|
|
4046
|
+
//#endregion
|
|
4047
|
+
//#region ../../node_modules/.pnpm/jsencrypt@3.5.4/node_modules/jsencrypt/lib/JSEncryptRSAKey.js
|
|
4048
|
+
var gi = (function() {
|
|
4049
|
+
var e = function(t, n) {
|
|
4050
|
+
return e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(e, t) {
|
|
4051
|
+
e.__proto__ = t;
|
|
4052
|
+
} || function(e, t) {
|
|
4053
|
+
for (var n in t) Object.prototype.hasOwnProperty.call(t, n) && (e[n] = t[n]);
|
|
4054
|
+
}, e(t, n);
|
|
4055
|
+
};
|
|
4056
|
+
return function(t, n) {
|
|
4057
|
+
if (typeof n != "function" && n !== null) throw TypeError("Class extends value " + String(n) + " is not a constructor or null");
|
|
4058
|
+
e(t, n);
|
|
4059
|
+
function r() {
|
|
4060
|
+
this.constructor = t;
|
|
4061
|
+
}
|
|
4062
|
+
t.prototype = n === null ? Object.create(n) : (r.prototype = n.prototype, new r());
|
|
4063
|
+
};
|
|
4064
|
+
})(), _i = function(e) {
|
|
4065
|
+
gi(t, e);
|
|
4066
|
+
function t(n) {
|
|
4067
|
+
var r = e.call(this) || this;
|
|
4068
|
+
return n && (typeof n == "string" ? r.parseKey(n) : (t.hasPrivateKeyProperty(n) || t.hasPublicKeyProperty(n)) && r.parsePropertiesFrom(n)), r;
|
|
4069
|
+
}
|
|
4070
|
+
return t.prototype.parseKey = function(e) {
|
|
4071
|
+
try {
|
|
4072
|
+
var t = 0, n = 0, r = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/.test(e) ? dr.decode(e) : pr.unarmor(e), i = xr.decode(r);
|
|
4073
|
+
if (i.sub.length === 3 && (i = i.sub[2].sub[0]), i.sub.length === 9) {
|
|
4074
|
+
t = i.sub[1].getHexStringValue(), this.n = K(t, 16), n = i.sub[2].getHexStringValue(), this.e = parseInt(n, 16);
|
|
4075
|
+
var a = i.sub[3].getHexStringValue();
|
|
4076
|
+
this.d = K(a, 16);
|
|
4077
|
+
var o = i.sub[4].getHexStringValue();
|
|
4078
|
+
this.p = K(o, 16);
|
|
4079
|
+
var s = i.sub[5].getHexStringValue();
|
|
4080
|
+
this.q = K(s, 16);
|
|
4081
|
+
var c = i.sub[6].getHexStringValue();
|
|
4082
|
+
this.dmp1 = K(c, 16);
|
|
4083
|
+
var l = i.sub[7].getHexStringValue();
|
|
4084
|
+
this.dmq1 = K(l, 16);
|
|
4085
|
+
var u = i.sub[8].getHexStringValue();
|
|
4086
|
+
this.coeff = K(u, 16);
|
|
4087
|
+
} else if (i.sub.length === 2) if (i.sub[0].sub) {
|
|
4088
|
+
var d = i.sub[1].sub[0];
|
|
4089
|
+
t = d.sub[0].getHexStringValue(), this.n = K(t, 16), n = d.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
|
|
4090
|
+
} else t = i.sub[0].getHexStringValue(), this.n = K(t, 16), n = i.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
|
|
4091
|
+
else return !1;
|
|
4092
|
+
return !0;
|
|
4093
|
+
} catch {
|
|
4094
|
+
return !1;
|
|
4095
|
+
}
|
|
4096
|
+
}, t.prototype.getPrivateBaseKey = function() {
|
|
4097
|
+
var e = { array: [
|
|
4098
|
+
new Q.asn1.DERInteger({ int: 0 }),
|
|
4099
|
+
new Q.asn1.DERInteger({ bigint: this.n }),
|
|
4100
|
+
new Q.asn1.DERInteger({ int: this.e }),
|
|
4101
|
+
new Q.asn1.DERInteger({ bigint: this.d }),
|
|
4102
|
+
new Q.asn1.DERInteger({ bigint: this.p }),
|
|
4103
|
+
new Q.asn1.DERInteger({ bigint: this.q }),
|
|
4104
|
+
new Q.asn1.DERInteger({ bigint: this.dmp1 }),
|
|
4105
|
+
new Q.asn1.DERInteger({ bigint: this.dmq1 }),
|
|
4106
|
+
new Q.asn1.DERInteger({ bigint: this.coeff })
|
|
4107
|
+
] };
|
|
4108
|
+
return new Q.asn1.DERSequence(e).getEncodedHex();
|
|
4109
|
+
}, t.prototype.getPrivateBaseKeyB64 = function() {
|
|
4110
|
+
return cr(this.getPrivateBaseKey());
|
|
4111
|
+
}, t.prototype.getPublicBaseKey = function() {
|
|
4112
|
+
var e = new Q.asn1.DERSequence({ array: [new Q.asn1.DERObjectIdentifier({ oid: "1.2.840.113549.1.1.1" }), new Q.asn1.DERNull()] }), t = new Q.asn1.DERSequence({ array: [new Q.asn1.DERInteger({ bigint: this.n }), new Q.asn1.DERInteger({ int: this.e })] }), n = new Q.asn1.DERBitString({ hex: "00" + t.getEncodedHex() });
|
|
4113
|
+
return new Q.asn1.DERSequence({ array: [e, n] }).getEncodedHex();
|
|
4114
|
+
}, t.prototype.getPublicBaseKeyB64 = function() {
|
|
4115
|
+
return cr(this.getPublicBaseKey());
|
|
4116
|
+
}, t.wordwrap = function(e, t) {
|
|
4117
|
+
if (t ||= 64, !e) return e;
|
|
4118
|
+
var n = "(.{1," + t + "})( +|$\n?)|(.{1," + t + "})";
|
|
4119
|
+
return e.match(RegExp(n, "g")).join("\n");
|
|
4120
|
+
}, t.prototype.getPrivateKey = function() {
|
|
4121
|
+
var e = "-----BEGIN RSA PRIVATE KEY-----\n";
|
|
4122
|
+
return e += t.wordwrap(this.getPrivateBaseKeyB64()) + "\n", e += "-----END RSA PRIVATE KEY-----", e;
|
|
4123
|
+
}, t.prototype.getPublicKey = function() {
|
|
4124
|
+
var e = "-----BEGIN PUBLIC KEY-----\n";
|
|
4125
|
+
return e += t.wordwrap(this.getPublicBaseKeyB64()) + "\n", e += "-----END PUBLIC KEY-----", e;
|
|
4126
|
+
}, t.hasPublicKeyProperty = function(e) {
|
|
4127
|
+
return e ||= {}, e.hasOwnProperty("n") && e.hasOwnProperty("e");
|
|
4128
|
+
}, t.hasPrivateKeyProperty = function(e) {
|
|
4129
|
+
return e ||= {}, e.hasOwnProperty("n") && e.hasOwnProperty("e") && e.hasOwnProperty("d") && e.hasOwnProperty("p") && e.hasOwnProperty("q") && e.hasOwnProperty("dmp1") && e.hasOwnProperty("dmq1") && e.hasOwnProperty("coeff");
|
|
4130
|
+
}, t.prototype.parsePropertiesFrom = function(e) {
|
|
4131
|
+
this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
|
|
4132
|
+
}, t;
|
|
4133
|
+
}(di), vi = typeof process < "u" ? process.env?.npm_package_version : void 0, yi = function() {
|
|
4134
|
+
function e(e) {
|
|
4135
|
+
e === void 0 && (e = {}), this.default_key_size = e.default_key_size ? parseInt(e.default_key_size, 10) : 1024, this.default_public_exponent = e.default_public_exponent || "010001", this.log = e.log || !1, this.key = e.key || null;
|
|
4136
|
+
}
|
|
4137
|
+
return e.prototype.setKey = function(e) {
|
|
4138
|
+
e ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new _i(e)) : !this.key && this.log && console.error("A key was not set.");
|
|
4139
|
+
}, e.prototype.setPrivateKey = function(e) {
|
|
4140
|
+
this.setKey(e);
|
|
4141
|
+
}, e.prototype.setPublicKey = function(e) {
|
|
4142
|
+
this.setKey(e);
|
|
4143
|
+
}, e.prototype.decrypt = function(e) {
|
|
4144
|
+
try {
|
|
4145
|
+
return this.getKey().decrypt(lr(e));
|
|
4146
|
+
} catch {
|
|
4147
|
+
return !1;
|
|
4148
|
+
}
|
|
4149
|
+
}, e.prototype.encrypt = function(e) {
|
|
4150
|
+
try {
|
|
4151
|
+
return cr(this.getKey().encrypt(e));
|
|
4152
|
+
} catch {
|
|
4153
|
+
return !1;
|
|
4154
|
+
}
|
|
4155
|
+
}, e.prototype.encryptOAEP = function(e) {
|
|
4156
|
+
try {
|
|
4157
|
+
return cr(this.getKey().encrypt(e, ui));
|
|
4158
|
+
} catch {
|
|
4159
|
+
return !1;
|
|
4160
|
+
}
|
|
4161
|
+
}, e.prototype.sign = function(e, t, n) {
|
|
4162
|
+
t === void 0 && (t = function(e) {
|
|
4163
|
+
return e;
|
|
4164
|
+
}), n === void 0 && (n = "");
|
|
4165
|
+
try {
|
|
4166
|
+
return cr(this.getKey().sign(e, t, n));
|
|
4167
|
+
} catch {
|
|
4168
|
+
return !1;
|
|
4169
|
+
}
|
|
4170
|
+
}, e.prototype.signSha256 = function(e) {
|
|
4171
|
+
return this.sign(e, function(e) {
|
|
4172
|
+
return Jr(qr(e));
|
|
4173
|
+
}, "sha256");
|
|
4174
|
+
}, e.prototype.verify = function(e, t, n) {
|
|
4175
|
+
n === void 0 && (n = function(e) {
|
|
4176
|
+
return e;
|
|
4177
|
+
});
|
|
4178
|
+
try {
|
|
4179
|
+
return this.getKey().verify(e, lr(t), n);
|
|
4180
|
+
} catch {
|
|
4181
|
+
return !1;
|
|
4182
|
+
}
|
|
4183
|
+
}, e.prototype.verifySha256 = function(e, t) {
|
|
4184
|
+
return this.verify(e, t, function(e) {
|
|
4185
|
+
return Jr(qr(e));
|
|
4186
|
+
});
|
|
4187
|
+
}, e.prototype.getKey = function(e) {
|
|
4188
|
+
if (!this.key) {
|
|
4189
|
+
if (this.key = new _i(), e && {}.toString.call(e) === "[object Function]") {
|
|
4190
|
+
this.key.generateAsync(this.default_key_size, this.default_public_exponent, e);
|
|
4191
|
+
return;
|
|
4192
|
+
}
|
|
4193
|
+
this.key.generate(this.default_key_size, this.default_public_exponent);
|
|
4194
|
+
}
|
|
4195
|
+
return this.key;
|
|
4196
|
+
}, e.prototype.getPrivateKey = function() {
|
|
4197
|
+
return this.getKey().getPrivateKey();
|
|
4198
|
+
}, e.prototype.getPrivateKeyB64 = function() {
|
|
4199
|
+
return this.getKey().getPrivateBaseKeyB64();
|
|
4200
|
+
}, e.prototype.getPublicKey = function() {
|
|
4201
|
+
return this.getKey().getPublicKey();
|
|
4202
|
+
}, e.prototype.getPublicKeyB64 = function() {
|
|
4203
|
+
return this.getKey().getPublicBaseKeyB64();
|
|
4204
|
+
}, e.version = vi, e;
|
|
4205
|
+
}(), bi = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEApmTqXPG9vBsvUS2cmzdboGWL3vnqBlQ6PNdz8y5UxHe7lH8PyyZaquyNDS4BG00g8Yo1jF2I5Kg8jDd6+KLggKCL9xQSQUouU5nU3XAPnyCHS05oi6h7zaH7pP97DcovNsW5sEblncsMm0Xu9AcNHszIlSiX9fDJqi+bIyELyPWCw4QDmPToB+DsrVXxmUqPKxkjqb4yFghWDZY7nNVK28ra8i9KFj9segH4ujGymCorNPY8f8nEIe2+oxrb+dXGv5xmaBfwi/q7EEyMdzTkSDgUnExnkIhJ+Ki43u9cFFMU94noIsOzmFWJ78JAkiG+I9dE2c0XZx4Asm+tBgw+oQIDAQAB";
|
|
4206
|
+
(class e {
|
|
4207
|
+
static instance;
|
|
4208
|
+
encryptor;
|
|
4209
|
+
constructor() {
|
|
4210
|
+
this.encryptor = new yi(), this.encryptor.setPublicKey(bi);
|
|
4211
|
+
}
|
|
4212
|
+
static getInstance() {
|
|
4213
|
+
return e.instance ||= new e(), e.instance;
|
|
4214
|
+
}
|
|
4215
|
+
encrypt(e) {
|
|
4216
|
+
let t = this.encryptor.encrypt(e);
|
|
4217
|
+
if (!t) throw Error(`RSA 加密失败,数据: ${e.substring(0, 20)}...`);
|
|
4218
|
+
return t;
|
|
4219
|
+
}
|
|
4220
|
+
}).getInstance();
|
|
4221
|
+
function xi(e) {
|
|
4222
|
+
try {
|
|
4223
|
+
if (!e) return console.warn("Token 为空"), null;
|
|
4224
|
+
let t = e.split(".");
|
|
4225
|
+
if (t.length !== 3) return console.warn("Token 格式无效:不是有效的 JWT"), null;
|
|
4226
|
+
let n = t[1];
|
|
4227
|
+
if (!n) return console.warn("Token 格式无效:缺少 payload"), null;
|
|
4228
|
+
let r = n.replace(/-/g, "+").replace(/_/g, "/"), i = atob(r), a = decodeURIComponent(i.split("").map((e) => "%" + ("00" + e.charCodeAt(0).toString(16)).slice(-2)).join(""));
|
|
4229
|
+
return JSON.parse(a);
|
|
4230
|
+
} catch (e) {
|
|
4231
|
+
return console.error("Token 解析失败:", e), null;
|
|
4232
|
+
}
|
|
4233
|
+
}
|
|
4234
|
+
//#endregion
|
|
4235
|
+
//#region src/hooks/useUser.ts
|
|
4236
|
+
function Si() {
|
|
4237
|
+
let e = localStorage.getItem("TOKEN"), t = C(M(xi(e)) || {});
|
|
4238
|
+
function n() {
|
|
4239
|
+
return M(xi(e));
|
|
4240
|
+
}
|
|
4241
|
+
return {
|
|
4242
|
+
userInfo: t,
|
|
4243
|
+
getUserInfo: n
|
|
4244
|
+
};
|
|
4245
|
+
}
|
|
4246
|
+
//#endregion
|
|
4247
|
+
//#region src/hooks/index.ts
|
|
4248
|
+
var Ci = /* @__PURE__ */ L({
|
|
4249
|
+
useDictionary: () => Qn,
|
|
4250
|
+
useFetch: () => Vn,
|
|
4251
|
+
useRoute: () => Yn,
|
|
4252
|
+
useRouter: () => Xn,
|
|
4253
|
+
useTable: () => Wn,
|
|
4254
|
+
useUser: () => Si
|
|
4255
|
+
});
|
|
4256
|
+
//#endregion
|
|
4257
|
+
//#region src/components/YcApproval/useDetail.ts
|
|
4258
|
+
function wi(e) {
|
|
4259
|
+
return Bn.post("/process/operateProcess", e);
|
|
4260
|
+
}
|
|
4261
|
+
function Ti(e) {
|
|
4262
|
+
let n = Yn(), { userInfo: r } = Si(), i = T(), a = T(), o = T({}), s = T(!1), c = C({
|
|
4263
|
+
code: "",
|
|
4264
|
+
confirmVisible: !1,
|
|
4265
|
+
nextAssigneeVisible: !1,
|
|
4266
|
+
nextActivityVisible: !1,
|
|
4267
|
+
buttonList: [],
|
|
4268
|
+
currentHandlers: "",
|
|
4269
|
+
current: r.account,
|
|
4270
|
+
activityName: ""
|
|
4271
|
+
}), l = C({
|
|
4272
|
+
processInfo: {
|
|
4273
|
+
processId: "",
|
|
4274
|
+
processTitle: "",
|
|
4275
|
+
createdBy: "",
|
|
4276
|
+
createdByName: "",
|
|
4277
|
+
activityName: "",
|
|
4278
|
+
creationDate: "",
|
|
4279
|
+
assignee: "",
|
|
4280
|
+
assigneeName: "",
|
|
4281
|
+
processCode: e?.processCode,
|
|
4282
|
+
processVersion: void 0,
|
|
4283
|
+
activityId: "",
|
|
4284
|
+
activityCode: ""
|
|
4285
|
+
},
|
|
4286
|
+
processData: {
|
|
4287
|
+
attachment: "",
|
|
4288
|
+
direction: "",
|
|
4289
|
+
readScope: "",
|
|
4290
|
+
signScope: ""
|
|
4291
|
+
},
|
|
4292
|
+
action: "",
|
|
4293
|
+
businessData: {},
|
|
4294
|
+
historyList: [],
|
|
4295
|
+
nextAssignee: "",
|
|
4296
|
+
nextActivity: "",
|
|
4297
|
+
comments: ""
|
|
4298
|
+
}), u = t(() => [
|
|
4299
|
+
{
|
|
4300
|
+
label: "流程主题",
|
|
4301
|
+
prop: "processTitle",
|
|
4302
|
+
span: 12,
|
|
4303
|
+
required: !s.value,
|
|
4304
|
+
render: ({ h: e, data: t }) => s.value ? t?.processTitle || "" : e.input()
|
|
4305
|
+
},
|
|
4306
|
+
{
|
|
4307
|
+
label: "创建者",
|
|
4308
|
+
prop: "createdByName",
|
|
4309
|
+
span: 12,
|
|
4310
|
+
render: ({ data: e }) => e?.createdByName || ""
|
|
4311
|
+
},
|
|
4312
|
+
{
|
|
4313
|
+
label: "创建时间",
|
|
4314
|
+
prop: "creationDate",
|
|
4315
|
+
span: 12,
|
|
4316
|
+
render: ({ data: e }) => e?.creationDate || ""
|
|
4317
|
+
},
|
|
4318
|
+
{
|
|
4319
|
+
label: "当前环节",
|
|
4320
|
+
prop: "activityName",
|
|
4321
|
+
span: 12,
|
|
4322
|
+
render: ({ h: e, data: t }) => e.link({ prop: t?.activityName })
|
|
4323
|
+
},
|
|
4324
|
+
{
|
|
4325
|
+
label: "当前处理人",
|
|
4326
|
+
prop: "assigneeName",
|
|
4327
|
+
span: 12,
|
|
4328
|
+
render: ({ data: e }) => e?.assigneeName || ""
|
|
4329
|
+
}
|
|
4330
|
+
]);
|
|
4331
|
+
Vn("/process/queryProcessDetail", {
|
|
4332
|
+
defaultParams: {
|
|
4333
|
+
processCode: e.processCode,
|
|
4334
|
+
instanceId: n.query?.instanceId || ""
|
|
4335
|
+
},
|
|
4336
|
+
onSuccess: (e) => {
|
|
4337
|
+
let t = e.data || {};
|
|
4338
|
+
Object.assign(l, t), c.buttonList = t.buttonList || [];
|
|
4339
|
+
let n = ["ACT_START", "ACT_DRAFT"], i = n.includes(t?.processInfo?.activityCode) ? r.account : (t?.instanceHandlerList || [])?.find((e) => e.activityName === t.processInfo?.activityName)?.assignee, a = n.includes(t?.processInfo?.activityCode) && i?.includes(r.account);
|
|
4340
|
+
s.value = !a, sessionStorage.setItem("disabled", (!a).toString()), sessionStorage.setItem("activityCode", t?.processInfo?.activityCode);
|
|
4341
|
+
try {
|
|
4342
|
+
l.processData = t.processData ? JSON.parse(t.processData) : {}, l.businessData = Array.isArray(t?.businessData) ? t.businessData?.at(-1) : t?.businessData || {};
|
|
4343
|
+
} catch (e) {
|
|
4344
|
+
console.log("queryProcessDetail error ->>>", e);
|
|
4345
|
+
}
|
|
4346
|
+
}
|
|
4347
|
+
});
|
|
4348
|
+
let d = t(() => {
|
|
4349
|
+
let e = [];
|
|
4350
|
+
if (c.nextActivityVisible) {
|
|
4351
|
+
let t = o.value?.getValues();
|
|
4352
|
+
if (!t?.length) return;
|
|
4353
|
+
let n = t.findIndex((e) => e.activityCode === l.processInfo?.activityCode);
|
|
4354
|
+
e = t.slice(0, n).map((e) => ({
|
|
4355
|
+
label: e.activityName || "",
|
|
4356
|
+
value: e.activityId || ""
|
|
4357
|
+
}));
|
|
4358
|
+
}
|
|
4359
|
+
return [
|
|
4360
|
+
c.nextAssigneeVisible && {
|
|
4361
|
+
prop: "nextAssignee",
|
|
4362
|
+
label: "处理人",
|
|
4363
|
+
render: ({ h: e }) => e.staffSelect({ multiple: !0 })
|
|
4364
|
+
},
|
|
4365
|
+
c.nextActivityVisible && {
|
|
4366
|
+
prop: "nextActivity",
|
|
4367
|
+
label: "退回环节",
|
|
4368
|
+
render: ({ h: t }) => t.radio({
|
|
4369
|
+
multiple: !0,
|
|
4370
|
+
options: e
|
|
4371
|
+
})
|
|
4372
|
+
},
|
|
4373
|
+
{
|
|
4374
|
+
prop: "comments",
|
|
4375
|
+
label: "审批意见",
|
|
4376
|
+
render: ({ h: e }) => e.textarea({ rows: 4 })
|
|
4377
|
+
}
|
|
4378
|
+
].filter(Boolean);
|
|
4379
|
+
});
|
|
4380
|
+
async function f() {
|
|
4381
|
+
if (!a.value || !i.value || !o.value) return;
|
|
4382
|
+
let t = await i.value?.validate(), n = await o.value?.validate(), r = await e?.getData?.() || {};
|
|
4383
|
+
if (t || n || !r || !Object.keys(r).length) return z.Message.error("请完善信息");
|
|
4384
|
+
Object.assign(l.processInfo, i.value.getValues() || {}), l.instanceHandlerList = o.value.getValues(), l.processData.readScope = a.value?.formData?.readScope || [];
|
|
4385
|
+
let s = await wi({
|
|
4386
|
+
processInfo: { ...N(l.processInfo) },
|
|
4387
|
+
processData: JSON.stringify(l.processData),
|
|
4388
|
+
instanceHandlerList: l.instanceHandlerList,
|
|
4389
|
+
businessData: r,
|
|
4390
|
+
action: c.code,
|
|
4391
|
+
comments: l.comments,
|
|
4392
|
+
nextAssignee: c.nextAssigneeVisible ? l.nextAssignee : void 0,
|
|
4393
|
+
nextActivity: c.nextActivityVisible ? l.nextActivity : void 0
|
|
4394
|
+
});
|
|
4395
|
+
s.code === "ok" && s.data ? (z.Message.success("提交成功, 即将关闭页面..."), setTimeout(() => window.close(), 2e3)) : z.Message.error(s?.message || "提交失败");
|
|
4396
|
+
}
|
|
4397
|
+
async function p(e) {
|
|
4398
|
+
c.code = e, c.nextActivityVisible = e === "back", c.nextAssigneeVisible = ["forward", "reassign"].includes(e), c.confirmVisible = ![
|
|
4399
|
+
"withdraw",
|
|
4400
|
+
"draft",
|
|
4401
|
+
"save"
|
|
4402
|
+
].includes(e), c.confirmVisible || await f();
|
|
4403
|
+
}
|
|
4404
|
+
async function m(e) {
|
|
4405
|
+
l.comments = e.comments, l.nextAssignee = ((Array.isArray(e.nextAssignee) ? e.nextAssignee?.join(",") : e.nextAssignee)?.match(/\(([^)]+)\)/g)?.map((e) => e.slice(1, -1)) || []).join(","), l.nextActivity = e.nextActivity, c.confirmVisible = !1, await f();
|
|
4406
|
+
}
|
|
4407
|
+
return {
|
|
4408
|
+
processInfoRef: i,
|
|
4409
|
+
readScopeRef: a,
|
|
4410
|
+
remindRef: o,
|
|
4411
|
+
disabled: s,
|
|
4412
|
+
states: c,
|
|
4413
|
+
confirmFields: d,
|
|
4414
|
+
formData: l,
|
|
4415
|
+
baseFields: u,
|
|
4416
|
+
buttonClick: p,
|
|
4417
|
+
onConfirmSubmit: m
|
|
4418
|
+
};
|
|
4419
|
+
}
|
|
4420
|
+
//#endregion
|
|
4421
|
+
//#region src/components/YcApproval/useBtnActive.ts
|
|
4422
|
+
function Ei({ processCode: e }) {
|
|
4423
|
+
let n = localStorage.getItem("TOkEN"), r = Qn({
|
|
4424
|
+
code: "ApprovalButtonActive",
|
|
4425
|
+
pageSize: 100
|
|
4426
|
+
}), i = t(() => {
|
|
4427
|
+
let e = /* @__PURE__ */ new Map();
|
|
4428
|
+
return r.data?.forEach((t) => {
|
|
4429
|
+
e.set(t.code, [t.name, t.description || "default"]);
|
|
4430
|
+
}), e;
|
|
4431
|
+
});
|
|
4432
|
+
function a() {
|
|
4433
|
+
let t = `/intellicit-service/#/flowchart?processCode=${e}&instanceId=&token=${n}`;
|
|
4434
|
+
window.open(t);
|
|
4435
|
+
}
|
|
4436
|
+
return {
|
|
4437
|
+
btnActiveMaps: i,
|
|
4438
|
+
toFlowchart: a
|
|
4439
|
+
};
|
|
4440
|
+
}
|
|
4441
|
+
//#endregion
|
|
4442
|
+
//#region src/components/YcApproval/Remind.vue?vue&type=script&setup=true&lang.ts
|
|
4443
|
+
var Di = { key: 0 }, Oi = /* @__PURE__ */ u({
|
|
4444
|
+
__name: "Remind",
|
|
4445
|
+
props: {
|
|
4446
|
+
disabled: { type: Boolean },
|
|
4447
|
+
formData: {}
|
|
4448
|
+
},
|
|
4449
|
+
setup(e, { expose: r }) {
|
|
4450
|
+
let s = o(e, ["formData"]), { userInfo: u } = Si(), d = T([]), f = T([]);
|
|
4451
|
+
Vn("/process/queryProcessActivity", {
|
|
4452
|
+
defaultParams: t(() => ({ processId: e.formData?.processInfo?.processId })),
|
|
4453
|
+
ready: t(() => !!e.formData?.processInfo?.processId && e.formData?.processInfo?.activityCode === "ACT_START"),
|
|
4454
|
+
onSuccess: (t) => {
|
|
4455
|
+
e.formData?.instanceHandlerList && e.formData?.instanceHandlerList.length > 0 || (d.value = (t?.data || []).filter((e) => e.code !== "ACT_END").map((e) => e.code === "ACT_START" ? {
|
|
4456
|
+
activityCode: e.code,
|
|
4457
|
+
activityId: e.id,
|
|
4458
|
+
code: e.code,
|
|
4459
|
+
activityName: e.name,
|
|
4460
|
+
assigneeName: `${u.name}(${u.account})`
|
|
4461
|
+
} : {
|
|
4462
|
+
activityCode: e.code,
|
|
4463
|
+
activityId: e.id,
|
|
4464
|
+
code: e.code,
|
|
4465
|
+
activityName: e.name
|
|
4466
|
+
}));
|
|
4467
|
+
}
|
|
4468
|
+
}), ae(() => {
|
|
4469
|
+
d.value = (e.formData?.instanceHandlerList || []).map((e, t) => {
|
|
4470
|
+
if (t === 0) return {
|
|
4471
|
+
...e,
|
|
4472
|
+
assigneeName: e?.assignee ? `${e.assigneeName}(${e.assignee})` : ""
|
|
4473
|
+
};
|
|
4474
|
+
let n = e.assigneeName?.split(","), r = e?.assignee?.split(","), i = n?.map((e, t) => `${e}(${r?.[t]})`);
|
|
4475
|
+
return {
|
|
4476
|
+
...e,
|
|
4477
|
+
assigneeName: i
|
|
4478
|
+
};
|
|
4479
|
+
});
|
|
4480
|
+
});
|
|
4481
|
+
function p() {
|
|
4482
|
+
let e = !1;
|
|
4483
|
+
return f.value?.forEach((t, n) => {
|
|
4484
|
+
e = t?.validate();
|
|
4485
|
+
}), e;
|
|
4486
|
+
}
|
|
4487
|
+
function m() {
|
|
4488
|
+
return d.value.map((e, t) => {
|
|
4489
|
+
let n = e?.assigneeName;
|
|
4490
|
+
if (t === 0) {
|
|
4491
|
+
let t = n?.includes("(") ? n?.slice(0, n?.indexOf("(")) : n, r = n.slice(n.indexOf("(") + 1, -1);
|
|
4492
|
+
return {
|
|
4493
|
+
...e,
|
|
4494
|
+
assignee: r,
|
|
4495
|
+
assigneeName: t
|
|
4496
|
+
};
|
|
4497
|
+
}
|
|
4498
|
+
let r = (n || [])?.reduce((e, t) => {
|
|
4499
|
+
let n = t?.includes("(") ? t?.slice(0, t?.indexOf("(")) : t, r = t.slice(t.indexOf("(") + 1, -1);
|
|
4500
|
+
return e.name.push(n), e.account.push(r), e;
|
|
4501
|
+
}, {
|
|
4502
|
+
name: [],
|
|
4503
|
+
account: []
|
|
4504
|
+
});
|
|
4505
|
+
return {
|
|
4506
|
+
...e,
|
|
4507
|
+
assignee: r.account?.join(","),
|
|
4508
|
+
assigneeName: r.name?.join(",")
|
|
4509
|
+
};
|
|
4510
|
+
});
|
|
4511
|
+
}
|
|
4512
|
+
return r({
|
|
4513
|
+
getValues: m,
|
|
4514
|
+
validate: p
|
|
4515
|
+
}), (e, t) => {
|
|
4516
|
+
let r = O("el-table-column"), o = O("YcStaffSelect"), u = O("el-table"), p = O("yc-card");
|
|
4517
|
+
return S(), n(p, {
|
|
4518
|
+
icon: P(Ct),
|
|
4519
|
+
title: "流程提醒",
|
|
4520
|
+
hideBorder: !0,
|
|
4521
|
+
class: "mt-3"
|
|
4522
|
+
}, {
|
|
4523
|
+
default: I(() => [l(u, { data: d.value }, {
|
|
4524
|
+
default: I(() => [
|
|
4525
|
+
l(r, {
|
|
4526
|
+
label: "序号",
|
|
4527
|
+
type: "index",
|
|
4528
|
+
width: "60"
|
|
4529
|
+
}),
|
|
4530
|
+
l(r, {
|
|
4531
|
+
label: "流程环节",
|
|
4532
|
+
prop: "activityName"
|
|
4533
|
+
}),
|
|
4534
|
+
l(r, { prop: "assigneeName" }, {
|
|
4535
|
+
header: I(() => [...t[0] ||= [c("处理人 ", -1), a("span", { style: { color: "red" } }, "*", -1)]]),
|
|
4536
|
+
default: I(({ row: e, $index: t }) => [t === 0 ? (S(), i("span", Di, j(e.assigneeName), 1)) : (S(), n(o, {
|
|
4537
|
+
key: 1,
|
|
4538
|
+
ref: (e) => f.value[t] = e,
|
|
4539
|
+
modelValue: e.assigneeName,
|
|
4540
|
+
"onUpdate:modelValue": (t) => e.assigneeName = t,
|
|
4541
|
+
type: "dialog",
|
|
4542
|
+
valueOf: "all",
|
|
4543
|
+
disabled: s.disabled,
|
|
4544
|
+
required: ""
|
|
4545
|
+
}, null, 8, [
|
|
4546
|
+
"modelValue",
|
|
4547
|
+
"onUpdate:modelValue",
|
|
4548
|
+
"disabled"
|
|
4549
|
+
]))]),
|
|
4550
|
+
_: 1
|
|
4551
|
+
})
|
|
4552
|
+
]),
|
|
4553
|
+
_: 1
|
|
4554
|
+
}, 8, ["data"])]),
|
|
4555
|
+
_: 1
|
|
4556
|
+
}, 8, ["icon"]);
|
|
4557
|
+
};
|
|
4558
|
+
}
|
|
4559
|
+
}), ki = /* @__PURE__ */ u({
|
|
4560
|
+
__name: "ReadScope",
|
|
4561
|
+
props: {
|
|
4562
|
+
disabled: { type: Boolean },
|
|
4563
|
+
formData: {}
|
|
4564
|
+
},
|
|
4565
|
+
setup(e, { expose: t }) {
|
|
4566
|
+
let r = e, i = C({ readScope: "" });
|
|
4567
|
+
return ae(() => {
|
|
4568
|
+
i.readScope = r.formData?.processData?.readScope || [];
|
|
4569
|
+
}), t({ formData: i }), (e, t) => {
|
|
4570
|
+
let a = O("YcStaffSelect"), o = O("el-form-item"), s = O("el-form"), c = O("yc-card");
|
|
4571
|
+
return S(), n(c, {
|
|
4572
|
+
icon: P(Ue),
|
|
4573
|
+
title: "阅读范围",
|
|
4574
|
+
hideBorder: !0,
|
|
4575
|
+
class: "mt-3"
|
|
4576
|
+
}, {
|
|
4577
|
+
default: I(() => [l(s, {
|
|
4578
|
+
model: i,
|
|
4579
|
+
"label-width": "100px",
|
|
4580
|
+
"label-position": "left"
|
|
4581
|
+
}, {
|
|
4582
|
+
default: I(() => [l(o, {
|
|
4583
|
+
label: "阅读范围",
|
|
4584
|
+
prop: "readScope"
|
|
4585
|
+
}, {
|
|
4586
|
+
default: I(() => [l(a, {
|
|
4587
|
+
modelValue: i.readScope,
|
|
4588
|
+
"onUpdate:modelValue": t[0] ||= (e) => i.readScope = e,
|
|
4589
|
+
type: "dialog",
|
|
4590
|
+
disabled: r.disabled
|
|
4591
|
+
}, null, 8, ["modelValue", "disabled"])]),
|
|
4592
|
+
_: 1
|
|
4593
|
+
})]),
|
|
4594
|
+
_: 1
|
|
4595
|
+
}, 8, ["model"])]),
|
|
4596
|
+
_: 1
|
|
4597
|
+
}, 8, ["icon"]);
|
|
4598
|
+
};
|
|
4599
|
+
}
|
|
4600
|
+
}), Ai = /* @__PURE__ */ u({
|
|
4601
|
+
__name: "History",
|
|
4602
|
+
props: { formData: {} },
|
|
4603
|
+
setup(e) {
|
|
4604
|
+
let t = e, r = [
|
|
4605
|
+
{
|
|
4606
|
+
label: "审批环节",
|
|
4607
|
+
prop: "activityName",
|
|
4608
|
+
width: 120
|
|
4609
|
+
},
|
|
4610
|
+
{
|
|
4611
|
+
label: "审批人",
|
|
4612
|
+
prop: "allAssigneeName"
|
|
4613
|
+
},
|
|
4614
|
+
{
|
|
4615
|
+
label: "审批时间",
|
|
4616
|
+
prop: "creationDate",
|
|
4617
|
+
width: 180
|
|
4618
|
+
},
|
|
4619
|
+
{
|
|
4620
|
+
label: "操作",
|
|
4621
|
+
prop: "actionName",
|
|
4622
|
+
width: 120
|
|
4623
|
+
},
|
|
4624
|
+
{
|
|
4625
|
+
label: "意见",
|
|
4626
|
+
prop: "comments"
|
|
4627
|
+
}
|
|
4628
|
+
];
|
|
4629
|
+
return (e, i) => {
|
|
4630
|
+
let a = O("yc-table"), o = O("yc-card");
|
|
4631
|
+
return S(), n(o, {
|
|
4632
|
+
icon: P(yt),
|
|
4633
|
+
title: "审批历史",
|
|
4634
|
+
hideBorder: !0,
|
|
4635
|
+
class: "mt-3"
|
|
4636
|
+
}, {
|
|
4637
|
+
default: I(() => [l(a, {
|
|
4638
|
+
data: t?.formData?.historyList,
|
|
4639
|
+
columns: r,
|
|
4640
|
+
hidePagination: !0
|
|
4641
|
+
}, null, 8, ["data"])]),
|
|
4642
|
+
_: 1
|
|
4643
|
+
}, 8, ["icon"]);
|
|
4644
|
+
};
|
|
4645
|
+
}
|
|
4646
|
+
}), ji = { class: "mb-3 fixed-buttons" }, Mi = { key: 0 }, Ni = /* @__PURE__ */ u({
|
|
4647
|
+
__name: "index",
|
|
4648
|
+
props: {
|
|
4649
|
+
processCode: {},
|
|
4650
|
+
getData: { type: Function }
|
|
4651
|
+
},
|
|
4652
|
+
setup(t) {
|
|
4653
|
+
let o = t, s = o.processCode || Yn().params.processCode, u = {
|
|
4654
|
+
IntegratedApprovalProcess: "手工构建流程",
|
|
4655
|
+
SoftwareReleaseProcess: "软件释放流程"
|
|
4656
|
+
}, { btnActiveMaps: d, toFlowchart: f } = Ei({ processCode: s }), { processInfoRef: p, readScopeRef: m, remindRef: h, disabled: g, formData: _, states: v, confirmFields: y, baseFields: b, buttonClick: x, onConfirmSubmit: C } = Ti(o);
|
|
4657
|
+
return (t, o) => {
|
|
4658
|
+
let w = O("el-button"), T = O("yc-form"), k = O("yc-card"), te = O("el-card"), A = O("el-dialog"), M = ee("sticky");
|
|
4659
|
+
return S(), i(e, null, [l(te, { class: "ml-30 mr-30" }, {
|
|
4660
|
+
default: I(() => [
|
|
4661
|
+
oe((S(), i("div", ji, [P(v).buttonList.length ? (S(), i("div", Mi, [(S(!0), i(e, null, E(P(v).buttonList, (e) => (S(), n(w, {
|
|
4662
|
+
key: e.code,
|
|
4663
|
+
type: P(d)?.get(e.code)?.[1] || "default",
|
|
4664
|
+
onClick: (t) => P(x)(e.code)
|
|
4665
|
+
}, {
|
|
4666
|
+
default: I(() => [c(j(e.name), 1)]),
|
|
4667
|
+
_: 2
|
|
4668
|
+
}, 1032, ["type", "onClick"]))), 128)), l(w, {
|
|
4669
|
+
icon: P(ht),
|
|
4670
|
+
onClick: P(f)
|
|
4671
|
+
}, {
|
|
4672
|
+
default: I(() => [...o[1] ||= [c("流程图", -1)]]),
|
|
4673
|
+
_: 1
|
|
4674
|
+
}, 8, ["icon", "onClick"])])) : r("", !0), a("h3", null, j(u[P(s)]), 1)])), [[M]]),
|
|
4675
|
+
l(k, {
|
|
4676
|
+
icon: P(dt),
|
|
4677
|
+
title: "基本信息",
|
|
4678
|
+
class: "mt-4 mb-3",
|
|
4679
|
+
hideBorder: !0
|
|
4680
|
+
}, {
|
|
4681
|
+
default: I(() => [l(T, {
|
|
4682
|
+
ref_key: "processInfoRef",
|
|
4683
|
+
ref: p,
|
|
4684
|
+
model: P(_)?.processInfo,
|
|
4685
|
+
fields: P(b),
|
|
4686
|
+
hideHandle: !0,
|
|
4687
|
+
labelPosition: "left",
|
|
4688
|
+
valueModel: "underline"
|
|
4689
|
+
}, null, 8, ["model", "fields"])]),
|
|
4690
|
+
_: 1
|
|
4691
|
+
}, 8, ["icon"]),
|
|
4692
|
+
D(t.$slots, "default", { data: P(_)?.businessData }, void 0, !0),
|
|
4693
|
+
l(Oi, {
|
|
4694
|
+
ref_key: "remindRef",
|
|
4695
|
+
ref: h,
|
|
4696
|
+
"form-data": P(_),
|
|
4697
|
+
disabled: P(g)
|
|
4698
|
+
}, null, 8, ["form-data", "disabled"]),
|
|
4699
|
+
l(ki, {
|
|
4700
|
+
ref_key: "readScopeRef",
|
|
4701
|
+
ref: m,
|
|
4702
|
+
"form-data": P(_),
|
|
4703
|
+
disabled: P(g)
|
|
4704
|
+
}, null, 8, ["form-data", "disabled"]),
|
|
4705
|
+
l(Ai, {
|
|
4706
|
+
"form-data": P(_),
|
|
4707
|
+
disabled: P(g)
|
|
4708
|
+
}, null, 8, ["form-data", "disabled"])
|
|
4709
|
+
]),
|
|
4710
|
+
_: 3
|
|
4711
|
+
}), l(A, {
|
|
4712
|
+
modelValue: P(v).confirmVisible,
|
|
4713
|
+
"onUpdate:modelValue": o[0] ||= (e) => P(v).confirmVisible = e,
|
|
4714
|
+
"destroy-on-close": "",
|
|
4715
|
+
"close-on-click-modal": !1
|
|
4716
|
+
}, {
|
|
4717
|
+
default: I(() => [l(T, {
|
|
4718
|
+
fields: P(y),
|
|
4719
|
+
onSubmit: P(C)
|
|
4720
|
+
}, null, 8, ["fields", "onSubmit"])]),
|
|
4721
|
+
_: 1
|
|
4722
|
+
}, 8, ["modelValue"])], 64);
|
|
4723
|
+
};
|
|
4724
|
+
}
|
|
4725
|
+
}), Pi = /* @__PURE__ */ L({ default: () => Fi }), Fi = /* @__PURE__ */ R(Ni, [["__scopeId", "data-v-c1d084f4"]]), Ii = {
|
|
4726
|
+
mounted(e, t) {
|
|
4727
|
+
let n = t.value || {}, r = n.target || "body", i = n.top || 0;
|
|
4728
|
+
e._stickyOriginalStyles = {
|
|
4729
|
+
position: e.style.position || "",
|
|
4730
|
+
top: e.style.top || "",
|
|
4731
|
+
zIndex: e.style.zIndex || "",
|
|
4732
|
+
width: e.style.width || ""
|
|
4733
|
+
}, e._stickyConfig = {
|
|
4734
|
+
target: typeof r == "string" ? document.querySelector(r) || document.body : r,
|
|
4735
|
+
top: i
|
|
4736
|
+
}, e._stickyOffsetTop = e.offsetTop, e._stickyScrollListener = () => {
|
|
4737
|
+
(window.pageYOffset || document.documentElement.scrollTop) >= e._stickyOffsetTop - e._stickyConfig.top ? (e.style.position = "fixed", e.style.top = `${e._stickyConfig.top}px`, e.style.zIndex = "100", e.style.width = `${e.offsetWidth}px`) : (e.style.position = e._stickyOriginalStyles.position, e.style.top = e._stickyOriginalStyles.top, e.style.zIndex = e._stickyOriginalStyles.zIndex, e.style.width = e._stickyOriginalStyles.width);
|
|
4738
|
+
}, window.addEventListener("scroll", e._stickyScrollListener, { passive: !0 }), e._stickyScrollListener();
|
|
4739
|
+
},
|
|
4740
|
+
updated(e, t) {
|
|
4741
|
+
let n = t.value || {}, r = n.target || "body", i = n.top || 0;
|
|
4742
|
+
e._stickyConfig = {
|
|
4743
|
+
target: typeof r == "string" ? document.querySelector(r) || document.body : r,
|
|
4744
|
+
top: i
|
|
4745
|
+
}, e._stickyOffsetTop = e.offsetTop, e._stickyScrollListener();
|
|
4746
|
+
},
|
|
4747
|
+
unmounted(e) {
|
|
4748
|
+
e._stickyScrollListener && window.removeEventListener("scroll", e._stickyScrollListener), e._stickyOriginalStyles && (e.style.position = e._stickyOriginalStyles.position, e.style.top = e._stickyOriginalStyles.top, e.style.zIndex = e._stickyOriginalStyles.zIndex, e.style.width = e._stickyOriginalStyles.width);
|
|
4749
|
+
}
|
|
4750
|
+
}, Li = { mounted(e) {
|
|
4751
|
+
e.style.boxShadow = "0px 0px 12px rgba(0, 0, 0, 0.12)", e.style.padding = "20px", e.style.borderRadius = "4px", e.style.border = "1px solid #e4e7ed", e.style.backgroundColor = "#fff";
|
|
4752
|
+
} }, Ri = /* @__PURE__ */ L({
|
|
4753
|
+
card: () => Li,
|
|
4754
|
+
sticky: () => Ii
|
|
4755
|
+
}), zi = "Yc", Bi = {
|
|
4756
|
+
UiCard: pe,
|
|
4757
|
+
UiTable: Pe,
|
|
4758
|
+
UiFilter: At,
|
|
4759
|
+
UiForm: It,
|
|
4760
|
+
UiEditor: Bt,
|
|
4761
|
+
UiTree: Yt,
|
|
4762
|
+
UiInfiniteScroll: rn,
|
|
4763
|
+
UiDescriptions: ln,
|
|
4764
|
+
UiDialog: pn,
|
|
4765
|
+
UiStaffSelect: On,
|
|
4766
|
+
UiUpload: Pn
|
|
4767
|
+
}, Vi = null;
|
|
4768
|
+
function Hi(e) {
|
|
4769
|
+
Vi = e;
|
|
4770
|
+
}
|
|
4771
|
+
function $() {
|
|
4772
|
+
return Vi;
|
|
4773
|
+
}
|
|
4774
|
+
var Ui = { install(e, t) {
|
|
4775
|
+
t?.elementPlus && t.elementPlus.install(e), Vi ||= {
|
|
4776
|
+
...e,
|
|
4777
|
+
h: f
|
|
4778
|
+
};
|
|
4779
|
+
for (let [t, n] of Object.entries(Bi)) {
|
|
4780
|
+
let r = n?.default || n;
|
|
4781
|
+
if (r && (typeof r == "function" || typeof r == "object")) {
|
|
4782
|
+
let n = t.replace(/^Ui/, zi);
|
|
4783
|
+
e.component(n, r);
|
|
4784
|
+
let i = n.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase();
|
|
4785
|
+
i !== n && e.component(i, r);
|
|
4786
|
+
}
|
|
4787
|
+
}
|
|
4788
|
+
for (let [t, n] of Object.entries(wt)) e.component(t, n), e.component(t.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), n);
|
|
4789
|
+
for (let [t, n] of Object.entries(Ri)) (typeof n == "function" || typeof n == "object") && e.directive(t, n);
|
|
4790
|
+
} };
|
|
4791
|
+
//#endregion
|
|
4792
|
+
export { pe as S, Yt as _, Ci as a, At as b, Yn as c, Vn as d, Pn as f, rn as g, ln as h, Pi as i, Xn as l, pn as m, Hi as n, Si as o, On as p, Ui as r, Qn as s, $ as t, Wn as u, Bt as v, Pe as x, It as y };
|