gws-client 1.2.3 → 1.2.5
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/index.cjs.js +1 -1
- package/dist/index.d.ts +12 -17
- package/dist/index.es.js +341 -345
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
1
|
var Ne = Object.defineProperty, xe = Object.defineProperties;
|
|
2
2
|
var $e = Object.getOwnPropertyDescriptors;
|
|
3
|
-
var
|
|
3
|
+
var ae = Object.getOwnPropertySymbols;
|
|
4
4
|
var Te = Object.prototype.hasOwnProperty, Me = Object.prototype.propertyIsEnumerable;
|
|
5
5
|
var J = (s, e, t) => e in s ? Ne(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, E = (s, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
7
|
Te.call(e, t) && J(s, t, e[t]);
|
|
8
|
-
if (
|
|
9
|
-
for (var t of
|
|
8
|
+
if (ae)
|
|
9
|
+
for (var t of ae(e))
|
|
10
10
|
Me.call(e, t) && J(s, t, e[t]);
|
|
11
11
|
return s;
|
|
12
12
|
}, v = (s, e) => xe(s, $e(e));
|
|
13
13
|
var o = (s, e, t) => J(s, typeof e != "symbol" ? e + "" : e, t);
|
|
14
|
-
var
|
|
15
|
-
var
|
|
14
|
+
var c = (s, e, t) => new Promise((n, i) => {
|
|
15
|
+
var a = (d) => {
|
|
16
16
|
try {
|
|
17
|
-
|
|
17
|
+
l(t.next(d));
|
|
18
18
|
} catch (u) {
|
|
19
19
|
i(u);
|
|
20
20
|
}
|
|
21
|
-
},
|
|
21
|
+
}, r = (d) => {
|
|
22
22
|
try {
|
|
23
|
-
|
|
23
|
+
l(t.throw(d));
|
|
24
24
|
} catch (u) {
|
|
25
25
|
i(u);
|
|
26
26
|
}
|
|
27
|
-
},
|
|
28
|
-
|
|
27
|
+
}, l = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(a, r);
|
|
28
|
+
l((t = t.apply(s, e)).next());
|
|
29
29
|
});
|
|
30
|
-
const Oe = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527",
|
|
30
|
+
const Oe = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527", re = "1", oe = "2", Fe = "1", Ge = "2", Ve = "3";
|
|
31
31
|
var Ie = /* @__PURE__ */ ((s) => (s.MIN = "0", s.LOW = "1", s.MIDDLE = "2", s.HIGH = "3", s))(Ie || {});
|
|
32
32
|
const p = {
|
|
33
33
|
LEVEL_1: 1,
|
|
@@ -57,11 +57,11 @@ function ze(s) {
|
|
|
57
57
|
var O = {}, le;
|
|
58
58
|
function Re() {
|
|
59
59
|
if (le) return O;
|
|
60
|
-
le = 1, O.byteLength =
|
|
61
|
-
for (var s = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0,
|
|
60
|
+
le = 1, O.byteLength = l, O.toByteArray = u, O.fromByteArray = w;
|
|
61
|
+
for (var s = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, a = n.length; i < a; ++i)
|
|
62
62
|
s[i] = n[i], e[n.charCodeAt(i)] = i;
|
|
63
63
|
e[45] = 62, e[95] = 63;
|
|
64
|
-
function
|
|
64
|
+
function r(y) {
|
|
65
65
|
var g = y.length;
|
|
66
66
|
if (g % 4 > 0)
|
|
67
67
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
@@ -70,16 +70,16 @@ function Re() {
|
|
|
70
70
|
var f = m === g ? 0 : 4 - m % 4;
|
|
71
71
|
return [m, f];
|
|
72
72
|
}
|
|
73
|
-
function
|
|
74
|
-
var g =
|
|
73
|
+
function l(y) {
|
|
74
|
+
var g = r(y), m = g[0], f = g[1];
|
|
75
75
|
return (m + f) * 3 / 4 - f;
|
|
76
76
|
}
|
|
77
77
|
function d(y, g, m) {
|
|
78
78
|
return (g + m) * 3 / 4 - m;
|
|
79
79
|
}
|
|
80
80
|
function u(y) {
|
|
81
|
-
var g, m =
|
|
82
|
-
for (I = 0; I <
|
|
81
|
+
var g, m = r(y), f = m[0], S = m[1], k = new t(d(y, f, S)), _ = 0, P = S > 0 ? f - 4 : f, I;
|
|
82
|
+
for (I = 0; I < P; I += 4)
|
|
83
83
|
g = e[y.charCodeAt(I)] << 18 | e[y.charCodeAt(I + 1)] << 12 | e[y.charCodeAt(I + 2)] << 6 | e[y.charCodeAt(I + 3)], k[_++] = g >> 16 & 255, k[_++] = g >> 8 & 255, k[_++] = g & 255;
|
|
84
84
|
return S === 2 && (g = e[y.charCodeAt(I)] << 2 | e[y.charCodeAt(I + 1)] >> 4, k[_++] = g & 255), S === 1 && (g = e[y.charCodeAt(I)] << 10 | e[y.charCodeAt(I + 1)] << 4 | e[y.charCodeAt(I + 2)] >> 2, k[_++] = g >> 8 & 255, k[_++] = g & 255), k;
|
|
85
85
|
}
|
|
@@ -92,8 +92,8 @@ function Re() {
|
|
|
92
92
|
return S.join("");
|
|
93
93
|
}
|
|
94
94
|
function w(y) {
|
|
95
|
-
for (var g, m = y.length, f = m % 3, S = [], k = 16383, _ = 0,
|
|
96
|
-
S.push(h(y, _, _ + k >
|
|
95
|
+
for (var g, m = y.length, f = m % 3, S = [], k = 16383, _ = 0, P = m - f; _ < P; _ += k)
|
|
96
|
+
S.push(h(y, _, _ + k > P ? P : _ + k));
|
|
97
97
|
return f === 1 ? (g = y[m - 1], S.push(
|
|
98
98
|
s[g >> 2] + s[g << 4 & 63] + "=="
|
|
99
99
|
)) : f === 2 && (g = (y[m - 2] << 8) + y[m - 1], S.push(
|
|
@@ -167,19 +167,19 @@ function tt(s, e, t, n) {
|
|
|
167
167
|
if (e.dirty === void 0)
|
|
168
168
|
return i;
|
|
169
169
|
if (typeof i == "object") {
|
|
170
|
-
const
|
|
171
|
-
for (let
|
|
172
|
-
|
|
173
|
-
return
|
|
170
|
+
const a = [], r = Math.max(e.dirty.length, i.length);
|
|
171
|
+
for (let l = 0; l < r; l += 1)
|
|
172
|
+
a[l] = e.dirty[l] | i[l];
|
|
173
|
+
return a;
|
|
174
174
|
}
|
|
175
175
|
return e.dirty | i;
|
|
176
176
|
}
|
|
177
177
|
return e.dirty;
|
|
178
178
|
}
|
|
179
|
-
function nt(s, e, t, n, i,
|
|
179
|
+
function nt(s, e, t, n, i, a) {
|
|
180
180
|
if (i) {
|
|
181
|
-
const
|
|
182
|
-
s.p(
|
|
181
|
+
const r = pe(e, t, n, a);
|
|
182
|
+
s.p(r, i);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
185
|
function st(s) {
|
|
@@ -207,7 +207,7 @@ function _e(s, e) {
|
|
|
207
207
|
for (let t = 0; t < s.length; t += 1)
|
|
208
208
|
s[t] && s[t].d(e);
|
|
209
209
|
}
|
|
210
|
-
function
|
|
210
|
+
function A(s) {
|
|
211
211
|
return document.createElement(s);
|
|
212
212
|
}
|
|
213
213
|
function T(s) {
|
|
@@ -222,10 +222,10 @@ function it() {
|
|
|
222
222
|
function F(s, e, t, n) {
|
|
223
223
|
return s.addEventListener(e, t, n), () => s.removeEventListener(e, t, n);
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function B(s, e, t) {
|
|
226
226
|
t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t);
|
|
227
227
|
}
|
|
228
|
-
function
|
|
228
|
+
function at(s) {
|
|
229
229
|
return Array.from(s.childNodes);
|
|
230
230
|
}
|
|
231
231
|
function z(s, e) {
|
|
@@ -241,10 +241,10 @@ function Z(s) {
|
|
|
241
241
|
}
|
|
242
242
|
const x = [], ye = [];
|
|
243
243
|
let M = [];
|
|
244
|
-
const Ce = [],
|
|
244
|
+
const Ce = [], rt = /* @__PURE__ */ Promise.resolve();
|
|
245
245
|
let te = !1;
|
|
246
246
|
function ot() {
|
|
247
|
-
te || (te = !0,
|
|
247
|
+
te || (te = !0, rt.then(Le));
|
|
248
248
|
}
|
|
249
249
|
function ne(s) {
|
|
250
250
|
M.push(s);
|
|
@@ -291,7 +291,7 @@ let ut;
|
|
|
291
291
|
function ie(s, e) {
|
|
292
292
|
s && s.i && (R.delete(s), s.i(e));
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function De(s, e, t, n) {
|
|
295
295
|
if (s && s.o) {
|
|
296
296
|
if (R.has(s)) return;
|
|
297
297
|
R.add(s), ut.c.push(() => {
|
|
@@ -305,28 +305,28 @@ function Q(s) {
|
|
|
305
305
|
function dt(s) {
|
|
306
306
|
s && s.c();
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Be(s, e, t) {
|
|
309
309
|
const { fragment: n, after_update: i } = s.$$;
|
|
310
310
|
n && n.m(e, t), ne(() => {
|
|
311
|
-
const
|
|
312
|
-
s.$$.on_destroy ? s.$$.on_destroy.push(...
|
|
311
|
+
const a = s.$$.on_mount.map(ke).filter(V);
|
|
312
|
+
s.$$.on_destroy ? s.$$.on_destroy.push(...a) : U(a), s.$$.on_mount = [];
|
|
313
313
|
}), i.forEach(ne);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Pe(s, e) {
|
|
316
316
|
const t = s.$$;
|
|
317
317
|
t.fragment !== null && (lt(t.after_update), U(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
|
|
318
318
|
}
|
|
319
319
|
function ht(s, e) {
|
|
320
320
|
s.$$.dirty[0] === -1 && (x.push(s), ot(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
322
|
+
function Ae(s, e, t, n, i, a, r = null, l = [-1]) {
|
|
323
323
|
const d = se;
|
|
324
324
|
Z(s);
|
|
325
325
|
const u = s.$$ = {
|
|
326
326
|
fragment: null,
|
|
327
327
|
ctx: [],
|
|
328
328
|
// state
|
|
329
|
-
props:
|
|
329
|
+
props: a,
|
|
330
330
|
update: ee,
|
|
331
331
|
not_equal: i,
|
|
332
332
|
bound: he(),
|
|
@@ -339,22 +339,22 @@ function De(s, e, t, n, i, r, a = null, c = [-1]) {
|
|
|
339
339
|
context: new Map(e.context || (d ? d.$$.context : [])),
|
|
340
340
|
// everything else
|
|
341
341
|
callbacks: he(),
|
|
342
|
-
dirty:
|
|
342
|
+
dirty: l,
|
|
343
343
|
skip_bound: !1,
|
|
344
344
|
root: e.target || d.$$.root
|
|
345
345
|
};
|
|
346
|
-
|
|
346
|
+
r && r(u.root);
|
|
347
347
|
let C = !1;
|
|
348
348
|
if (u.ctx = t ? t(s, e.props || {}, (h, w, ...y) => {
|
|
349
349
|
const g = y.length ? y[0] : w;
|
|
350
350
|
return u.ctx && i(u.ctx[h], u.ctx[h] = g) && (!u.skip_bound && u.bound[h] && u.bound[h](g), C && ht(s, h)), w;
|
|
351
351
|
}) : [], u.update(), C = !0, U(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
|
352
352
|
if (e.hydrate) {
|
|
353
|
-
const h =
|
|
353
|
+
const h = at(e.target);
|
|
354
354
|
u.fragment && u.fragment.l(h), h.forEach(j);
|
|
355
355
|
} else
|
|
356
356
|
u.fragment && u.fragment.c();
|
|
357
|
-
e.intro && ie(s.$$.fragment),
|
|
357
|
+
e.intro && ie(s.$$.fragment), Be(s, e.target, e.anchor), Le();
|
|
358
358
|
}
|
|
359
359
|
Z(d);
|
|
360
360
|
}
|
|
@@ -364,7 +364,7 @@ class be {
|
|
|
364
364
|
}
|
|
365
365
|
/** @returns {void} */
|
|
366
366
|
$destroy() {
|
|
367
|
-
|
|
367
|
+
Pe(this, 1), this.$destroy = ee;
|
|
368
368
|
}
|
|
369
369
|
/**
|
|
370
370
|
* @template {Extract<keyof Events, string>} K
|
|
@@ -395,18 +395,18 @@ function yt(s) {
|
|
|
395
395
|
let e, t, n, i = (
|
|
396
396
|
/*title*/
|
|
397
397
|
(s[1] || "标题") + ""
|
|
398
|
-
),
|
|
398
|
+
), a, r, l, d, u, C, h = (
|
|
399
399
|
/*cancelText*/
|
|
400
400
|
(s[4] || "取消") + ""
|
|
401
401
|
), w, y, g, m = (
|
|
402
402
|
/*okText*/
|
|
403
403
|
(s[5] || "确认") + ""
|
|
404
404
|
), f, S, k, _;
|
|
405
|
-
const
|
|
405
|
+
const P = (
|
|
406
406
|
/*#slots*/
|
|
407
407
|
s[8].default
|
|
408
408
|
), I = et(
|
|
409
|
-
|
|
409
|
+
P,
|
|
410
410
|
s,
|
|
411
411
|
/*$$scope*/
|
|
412
412
|
s[7],
|
|
@@ -414,15 +414,15 @@ function yt(s) {
|
|
|
414
414
|
);
|
|
415
415
|
return {
|
|
416
416
|
c() {
|
|
417
|
-
e =
|
|
417
|
+
e = A("div"), t = A("div"), n = A("div"), a = T(i), r = K(), l = A("div"), I && I.c(), d = K(), u = A("div"), C = A("button"), w = T(h), y = K(), g = A("button"), f = T(m), B(n, "class", "model-title svelte-16iv9d0"), B(l, "class", "slot svelte-16iv9d0"), B(C, "class", "modal-btn svelte-16iv9d0"), B(g, "class", "modal-btn success svelte-16iv9d0"), Y(
|
|
418
418
|
g,
|
|
419
419
|
"background-color",
|
|
420
420
|
/*theme*/
|
|
421
421
|
s[6]
|
|
422
|
-
),
|
|
422
|
+
), B(u, "class", "modal-footer svelte-16iv9d0"), B(t, "class", "modal-content svelte-16iv9d0"), B(e, "class", "modal-background modal-visible svelte-16iv9d0");
|
|
423
423
|
},
|
|
424
|
-
m(
|
|
425
|
-
W(
|
|
424
|
+
m(D, b) {
|
|
425
|
+
W(D, e, b), L(e, t), L(t, n), L(n, a), L(t, r), L(t, l), I && I.m(l, null), L(t, d), L(t, u), L(u, C), L(C, w), L(u, y), L(u, g), L(g, f), S = !0, k || (_ = [
|
|
426
426
|
F(C, "click", function() {
|
|
427
427
|
V(
|
|
428
428
|
/*onCancel*/
|
|
@@ -444,18 +444,18 @@ function yt(s) {
|
|
|
444
444
|
})
|
|
445
445
|
], k = !0);
|
|
446
446
|
},
|
|
447
|
-
p(
|
|
448
|
-
s =
|
|
447
|
+
p(D, [b]) {
|
|
448
|
+
s = D, (!S || b & /*title*/
|
|
449
449
|
2) && i !== (i = /*title*/
|
|
450
|
-
(s[1] || "标题") + "") && z(
|
|
450
|
+
(s[1] || "标题") + "") && z(a, i), I && I.p && (!S || b & /*$$scope*/
|
|
451
451
|
128) && nt(
|
|
452
452
|
I,
|
|
453
|
-
|
|
453
|
+
P,
|
|
454
454
|
s,
|
|
455
455
|
/*$$scope*/
|
|
456
456
|
s[7],
|
|
457
457
|
S ? tt(
|
|
458
|
-
|
|
458
|
+
P,
|
|
459
459
|
/*$$scope*/
|
|
460
460
|
s[7],
|
|
461
461
|
b,
|
|
@@ -477,27 +477,27 @@ function yt(s) {
|
|
|
477
477
|
s[6]
|
|
478
478
|
);
|
|
479
479
|
},
|
|
480
|
-
i(
|
|
481
|
-
S || (ie(I,
|
|
480
|
+
i(D) {
|
|
481
|
+
S || (ie(I, D), S = !0);
|
|
482
482
|
},
|
|
483
|
-
o(
|
|
484
|
-
|
|
483
|
+
o(D) {
|
|
484
|
+
De(I, D), S = !1;
|
|
485
485
|
},
|
|
486
|
-
d(
|
|
487
|
-
|
|
486
|
+
d(D) {
|
|
487
|
+
D && j(e), I && I.d(D), k = !1, U(_);
|
|
488
488
|
}
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
491
|
const Ct = (s) => s.stopPropagation();
|
|
492
492
|
function ft(s, e, t) {
|
|
493
|
-
let { $$slots: n = {}, $$scope: i } = e, { onCancel:
|
|
493
|
+
let { $$slots: n = {}, $$scope: i } = e, { onCancel: a } = e, { title: r } = e, { onOk: l } = e, { onClose: d } = e, { cancelText: u } = e, { okText: C } = e, { theme: h } = e;
|
|
494
494
|
return s.$$set = (w) => {
|
|
495
|
-
"onCancel" in w && t(0,
|
|
496
|
-
}, [
|
|
495
|
+
"onCancel" in w && t(0, a = w.onCancel), "title" in w && t(1, r = w.title), "onOk" in w && t(2, l = w.onOk), "onClose" in w && t(3, d = w.onClose), "cancelText" in w && t(4, u = w.cancelText), "okText" in w && t(5, C = w.okText), "theme" in w && t(6, h = w.theme), "$$scope" in w && t(7, i = w.$$scope);
|
|
496
|
+
}, [a, r, l, d, u, C, h, i, n];
|
|
497
497
|
}
|
|
498
498
|
class wt extends be {
|
|
499
499
|
constructor(e) {
|
|
500
|
-
super(),
|
|
500
|
+
super(), Ae(this, e, ft, yt, ve, {
|
|
501
501
|
onCancel: 0,
|
|
502
502
|
title: 1,
|
|
503
503
|
onOk: 2,
|
|
@@ -535,14 +535,14 @@ function me(s) {
|
|
|
535
535
|
), n;
|
|
536
536
|
return {
|
|
537
537
|
c() {
|
|
538
|
-
e =
|
|
538
|
+
e = A("div"), n = T(t), B(e, "class", "svelte-1kh75ag"), Y(e, "width", `${100 / /*columns*/
|
|
539
539
|
s[1].length}%`);
|
|
540
540
|
},
|
|
541
|
-
m(i,
|
|
542
|
-
W(i, e,
|
|
541
|
+
m(i, a) {
|
|
542
|
+
W(i, e, a), L(e, n);
|
|
543
543
|
},
|
|
544
|
-
p(i,
|
|
545
|
-
|
|
544
|
+
p(i, a) {
|
|
545
|
+
a & /*columns, data*/
|
|
546
546
|
3 && t !== (t = /*col*/
|
|
547
547
|
(i[16].format ? (
|
|
548
548
|
/*col*/
|
|
@@ -556,7 +556,7 @@ function me(s) {
|
|
|
556
556
|
/*col*/
|
|
557
557
|
i[16].key
|
|
558
558
|
]
|
|
559
|
-
)) + "") && z(n, t),
|
|
559
|
+
)) + "") && z(n, t), a & /*columns*/
|
|
560
560
|
2 && Y(e, "width", `${100 / /*columns*/
|
|
561
561
|
i[1].length}%`);
|
|
562
562
|
},
|
|
@@ -566,12 +566,12 @@ function me(s) {
|
|
|
566
566
|
};
|
|
567
567
|
}
|
|
568
568
|
function Ee(s) {
|
|
569
|
-
let e, t, n, i,
|
|
569
|
+
let e, t, n, i, a, r = Q(
|
|
570
570
|
/*columns*/
|
|
571
571
|
s[1]
|
|
572
|
-
),
|
|
573
|
-
for (let u = 0; u <
|
|
574
|
-
|
|
572
|
+
), l = [];
|
|
573
|
+
for (let u = 0; u < r.length; u += 1)
|
|
574
|
+
l[u] = me(we(s, r, u));
|
|
575
575
|
function d() {
|
|
576
576
|
return (
|
|
577
577
|
/*click_handler*/
|
|
@@ -583,44 +583,44 @@ function Ee(s) {
|
|
|
583
583
|
}
|
|
584
584
|
return {
|
|
585
585
|
c() {
|
|
586
|
-
e =
|
|
587
|
-
for (let u = 0; u <
|
|
588
|
-
|
|
589
|
-
t = K(),
|
|
586
|
+
e = A("div");
|
|
587
|
+
for (let u = 0; u < l.length; u += 1)
|
|
588
|
+
l[u].c();
|
|
589
|
+
t = K(), B(e, "class", n = ge(`cert-item ${/*index*/
|
|
590
590
|
s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
|
|
591
591
|
s[15] === /*selectedIndex*/
|
|
592
592
|
s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag");
|
|
593
593
|
},
|
|
594
594
|
m(u, C) {
|
|
595
595
|
W(u, e, C);
|
|
596
|
-
for (let h = 0; h <
|
|
597
|
-
|
|
598
|
-
L(e, t), i || (
|
|
596
|
+
for (let h = 0; h < l.length; h += 1)
|
|
597
|
+
l[h] && l[h].m(e, null);
|
|
598
|
+
L(e, t), i || (a = F(e, "click", d), i = !0);
|
|
599
599
|
},
|
|
600
600
|
p(u, C) {
|
|
601
601
|
if (s = u, C & /*columns, data*/
|
|
602
602
|
3) {
|
|
603
|
-
|
|
603
|
+
r = Q(
|
|
604
604
|
/*columns*/
|
|
605
605
|
s[1]
|
|
606
606
|
);
|
|
607
607
|
let h;
|
|
608
|
-
for (h = 0; h <
|
|
609
|
-
const w = we(s,
|
|
610
|
-
|
|
608
|
+
for (h = 0; h < r.length; h += 1) {
|
|
609
|
+
const w = we(s, r, h);
|
|
610
|
+
l[h] ? l[h].p(w, C) : (l[h] = me(w), l[h].c(), l[h].m(e, t));
|
|
611
611
|
}
|
|
612
|
-
for (; h <
|
|
613
|
-
|
|
614
|
-
|
|
612
|
+
for (; h < l.length; h += 1)
|
|
613
|
+
l[h].d(1);
|
|
614
|
+
l.length = r.length;
|
|
615
615
|
}
|
|
616
616
|
C & /*selectedIndex*/
|
|
617
617
|
128 && n !== (n = ge(`cert-item ${/*index*/
|
|
618
618
|
s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
|
|
619
619
|
s[15] === /*selectedIndex*/
|
|
620
|
-
s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") &&
|
|
620
|
+
s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") && B(e, "class", n);
|
|
621
621
|
},
|
|
622
622
|
d(u) {
|
|
623
|
-
u && j(e), _e(
|
|
623
|
+
u && j(e), _e(l, u), i = !1, a();
|
|
624
624
|
}
|
|
625
625
|
};
|
|
626
626
|
}
|
|
@@ -637,25 +637,25 @@ function mt(s) {
|
|
|
637
637
|
n[i].c();
|
|
638
638
|
e = it();
|
|
639
639
|
},
|
|
640
|
-
m(i,
|
|
641
|
-
for (let
|
|
642
|
-
n[
|
|
643
|
-
W(i, e,
|
|
640
|
+
m(i, a) {
|
|
641
|
+
for (let r = 0; r < n.length; r += 1)
|
|
642
|
+
n[r] && n[r].m(i, a);
|
|
643
|
+
W(i, e, a);
|
|
644
644
|
},
|
|
645
|
-
p(i,
|
|
646
|
-
if (
|
|
645
|
+
p(i, a) {
|
|
646
|
+
if (a & /*selectedIndex, columns, data*/
|
|
647
647
|
131) {
|
|
648
648
|
t = Q(
|
|
649
649
|
/*data*/
|
|
650
650
|
i[0]
|
|
651
651
|
);
|
|
652
|
-
let
|
|
653
|
-
for (
|
|
654
|
-
const
|
|
655
|
-
n[
|
|
652
|
+
let r;
|
|
653
|
+
for (r = 0; r < t.length; r += 1) {
|
|
654
|
+
const l = fe(i, t, r);
|
|
655
|
+
n[r] ? n[r].p(l, a) : (n[r] = Ee(l), n[r].c(), n[r].m(e.parentNode, e));
|
|
656
656
|
}
|
|
657
|
-
for (;
|
|
658
|
-
n[
|
|
657
|
+
for (; r < n.length; r += 1)
|
|
658
|
+
n[r].d(1);
|
|
659
659
|
n.length = t.length;
|
|
660
660
|
}
|
|
661
661
|
},
|
|
@@ -704,47 +704,47 @@ function Et(s) {
|
|
|
704
704
|
dt(e.$$.fragment);
|
|
705
705
|
},
|
|
706
706
|
m(n, i) {
|
|
707
|
-
|
|
707
|
+
Be(e, n, i), t = !0;
|
|
708
708
|
},
|
|
709
709
|
p(n, [i]) {
|
|
710
|
-
const
|
|
710
|
+
const a = {};
|
|
711
711
|
i & /*onClose*/
|
|
712
|
-
4 && (
|
|
712
|
+
4 && (a.onClose = /*onClose*/
|
|
713
713
|
n[2]), i & /*cancelText*/
|
|
714
|
-
8 && (
|
|
714
|
+
8 && (a.cancelText = /*cancelText*/
|
|
715
715
|
n[3]), i & /*okText*/
|
|
716
|
-
16 && (
|
|
716
|
+
16 && (a.okText = /*okText*/
|
|
717
717
|
n[4]), i & /*title*/
|
|
718
|
-
64 && (
|
|
718
|
+
64 && (a.title = /*title*/
|
|
719
719
|
n[6]), i & /*theme*/
|
|
720
|
-
32 && (
|
|
720
|
+
32 && (a.theme = /*theme*/
|
|
721
721
|
n[5]), i & /*$$scope, data, selectedIndex, columns*/
|
|
722
|
-
524419 && (
|
|
722
|
+
524419 && (a.$$scope = { dirty: i, ctx: n }), e.$set(a);
|
|
723
723
|
},
|
|
724
724
|
i(n) {
|
|
725
725
|
t || (ie(e.$$.fragment, n), t = !0);
|
|
726
726
|
},
|
|
727
727
|
o(n) {
|
|
728
|
-
|
|
728
|
+
De(e.$$.fragment, n), t = !1;
|
|
729
729
|
},
|
|
730
730
|
d(n) {
|
|
731
|
-
|
|
731
|
+
Pe(e, n);
|
|
732
732
|
}
|
|
733
733
|
};
|
|
734
734
|
}
|
|
735
735
|
function St(s, e, t) {
|
|
736
|
-
let { data: n = [] } = e, { columns: i = [] } = e, { onCancel:
|
|
736
|
+
let { data: n = [] } = e, { columns: i = [] } = e, { onCancel: a } = e, { onOk: r } = e, { onClose: l } = e, { cancelText: d = "" } = e, { okText: u = "" } = e, { theme: C = "#409eff" } = e, { title: h = "" } = e, w = 0;
|
|
737
737
|
const y = () => {
|
|
738
|
-
|
|
738
|
+
a(`${h}失败`), l == null || l();
|
|
739
739
|
}, g = () => {
|
|
740
|
-
|
|
740
|
+
r == null || r(n[w]), l == null || l();
|
|
741
741
|
}, m = (f) => t(7, w = f);
|
|
742
742
|
return s.$$set = (f) => {
|
|
743
|
-
"data" in f && t(0, n = f.data), "columns" in f && t(1, i = f.columns), "onCancel" in f && t(10,
|
|
743
|
+
"data" in f && t(0, n = f.data), "columns" in f && t(1, i = f.columns), "onCancel" in f && t(10, a = f.onCancel), "onOk" in f && t(11, r = f.onOk), "onClose" in f && t(2, l = f.onClose), "cancelText" in f && t(3, d = f.cancelText), "okText" in f && t(4, u = f.okText), "theme" in f && t(5, C = f.theme), "title" in f && t(6, h = f.title);
|
|
744
744
|
}, [
|
|
745
745
|
n,
|
|
746
746
|
i,
|
|
747
|
-
|
|
747
|
+
l,
|
|
748
748
|
d,
|
|
749
749
|
u,
|
|
750
750
|
C,
|
|
@@ -752,14 +752,14 @@ function St(s, e, t) {
|
|
|
752
752
|
w,
|
|
753
753
|
y,
|
|
754
754
|
g,
|
|
755
|
-
r,
|
|
756
755
|
a,
|
|
756
|
+
r,
|
|
757
757
|
m
|
|
758
758
|
];
|
|
759
759
|
}
|
|
760
760
|
class It extends be {
|
|
761
761
|
constructor(e) {
|
|
762
|
-
super(),
|
|
762
|
+
super(), Ae(this, e, St, Et, ve, {
|
|
763
763
|
data: 0,
|
|
764
764
|
columns: 1,
|
|
765
765
|
onCancel: 10,
|
|
@@ -806,12 +806,12 @@ const G = new kt();
|
|
|
806
806
|
function vt(s = 32, e = !0, t = 0) {
|
|
807
807
|
const n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), i = [];
|
|
808
808
|
if (t = t || n.length, s)
|
|
809
|
-
for (let
|
|
809
|
+
for (let a = 0; a < s; a++) i[a] = n[0 | Math.random() * t];
|
|
810
810
|
else {
|
|
811
|
-
let
|
|
811
|
+
let a;
|
|
812
812
|
i[8] = i[13] = i[18] = i[23] = "-", i[14] = "4";
|
|
813
|
-
for (let
|
|
814
|
-
i[
|
|
813
|
+
for (let r = 0; r < 36; r++)
|
|
814
|
+
i[r] || (a = 0 | Math.random() * 16, i[r] = n[r === 19 ? a & 3 | 8 : a]);
|
|
815
815
|
}
|
|
816
816
|
return e ? (i.shift(), `u${i.join("")}`) : i.join("");
|
|
817
817
|
}
|
|
@@ -844,7 +844,7 @@ const pt = [
|
|
|
844
844
|
key: "sn"
|
|
845
845
|
}
|
|
846
846
|
];
|
|
847
|
-
class
|
|
847
|
+
class Dt {
|
|
848
848
|
constructor(e) {
|
|
849
849
|
o(this, "socketInstance", null);
|
|
850
850
|
o(this, "eventBus", new Qe());
|
|
@@ -862,19 +862,19 @@ class Bt {
|
|
|
862
862
|
var e;
|
|
863
863
|
(e = this.socketInstance) == null || e.close();
|
|
864
864
|
});
|
|
865
|
-
o(this, "sendMessage", (e, t, n) => new Promise((i,
|
|
866
|
-
var
|
|
867
|
-
const
|
|
865
|
+
o(this, "sendMessage", (e, t, n) => new Promise((i, a) => {
|
|
866
|
+
var l;
|
|
867
|
+
const r = () => {
|
|
868
868
|
var h, w;
|
|
869
869
|
if (((h = this.socketInstance) == null ? void 0 : h.readyState) !== WebSocket.OPEN) {
|
|
870
|
-
|
|
870
|
+
a({
|
|
871
871
|
errCode: je,
|
|
872
872
|
msg: "数字证书客户端连接失败"
|
|
873
873
|
});
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
876
|
const d = vt(), u = (y) => {
|
|
877
|
-
y.success ? i(y.data) :
|
|
877
|
+
y.success ? i(y.data) : a(y);
|
|
878
878
|
}, C = {
|
|
879
879
|
function: e,
|
|
880
880
|
args: t ? [t] : [],
|
|
@@ -883,24 +883,24 @@ class Bt {
|
|
|
883
883
|
(w = this.socketInstance) == null || w.send(JSON.stringify(C)), this.eventBus.on(e, u), this.eventBus.on(d, u);
|
|
884
884
|
};
|
|
885
885
|
if (n && (this.scene & n) !== n) {
|
|
886
|
-
|
|
886
|
+
a({
|
|
887
887
|
errCode: Ke,
|
|
888
888
|
msg: "无权限执行此操作"
|
|
889
889
|
});
|
|
890
890
|
return;
|
|
891
891
|
}
|
|
892
|
-
if (((
|
|
893
|
-
|
|
892
|
+
if (((l = this.socketInstance) == null ? void 0 : l.readyState) === WebSocket.OPEN) {
|
|
893
|
+
r();
|
|
894
894
|
return;
|
|
895
895
|
}
|
|
896
|
-
this.messageQueue.push(
|
|
896
|
+
this.messageQueue.push(r), this.isConnecting || this.initSocket(this.socketConfig);
|
|
897
897
|
}));
|
|
898
898
|
o(this, "flushMsgQueue", () => {
|
|
899
899
|
var e;
|
|
900
900
|
(e = this.messageQueue) == null || e.forEach((t) => t()), this.messageQueue = [];
|
|
901
901
|
});
|
|
902
|
-
o(this, "handleEventData", (e) =>
|
|
903
|
-
var t, n, i,
|
|
902
|
+
o(this, "handleEventData", (e) => c(this, null, function* () {
|
|
903
|
+
var t, n, i, a, r, l, d, u;
|
|
904
904
|
if (e.data instanceof Blob) {
|
|
905
905
|
const C = yield e.data.arrayBuffer(), y = new TextDecoder(
|
|
906
906
|
navigator.userAgent.includes("Windows") ? "gbk" : "utf-8"
|
|
@@ -909,8 +909,8 @@ class Bt {
|
|
|
909
909
|
msg: (n = g.result) == null ? void 0 : n.msg,
|
|
910
910
|
errCode: (i = g.result) == null ? void 0 : i.errCode,
|
|
911
911
|
data: g.data,
|
|
912
|
-
type: (
|
|
913
|
-
}, f = (
|
|
912
|
+
type: (a = g.result) == null ? void 0 : a.event
|
|
913
|
+
}, f = (r = g.result) == null ? void 0 : r.function, S = (l = g.result) == null ? void 0 : l.msgid;
|
|
914
914
|
S ? this.eventBus.emit(S, m) : this.eventBus.emit(f, m), (u = (d = this.socketConfig) == null ? void 0 : d.onMessage) == null || u.call(d, m);
|
|
915
915
|
}
|
|
916
916
|
}));
|
|
@@ -922,16 +922,16 @@ class Bt {
|
|
|
922
922
|
const t = ue.toByteArray(e);
|
|
923
923
|
return new TextDecoder().decode(t);
|
|
924
924
|
});
|
|
925
|
-
o(this, "changeIsRememberPin", (e) =>
|
|
925
|
+
o(this, "changeIsRememberPin", (e) => c(this, null, function* () {
|
|
926
926
|
this.isRememberPin = e;
|
|
927
927
|
}));
|
|
928
|
-
o(this, "changePinPolicy", (e) =>
|
|
928
|
+
o(this, "changePinPolicy", (e) => c(this, null, function* () {
|
|
929
929
|
this.pinPolicy = e;
|
|
930
930
|
}));
|
|
931
|
-
o(this, "checkCertIsLogin", (e) =>
|
|
931
|
+
o(this, "checkCertIsLogin", (e) => c(this, null, function* () {
|
|
932
932
|
return yield this.sendMessage("GZCA_IsLogin", e);
|
|
933
933
|
}));
|
|
934
|
-
o(this, "addUkeyEvents", () =>
|
|
934
|
+
o(this, "addUkeyEvents", () => c(this, null, function* () {
|
|
935
935
|
this.sendMessage("GZCA_WaitForDevEvent", {
|
|
936
936
|
Type: He
|
|
937
937
|
}), this.eventBus.on(
|
|
@@ -944,7 +944,7 @@ class Bt {
|
|
|
944
944
|
}
|
|
945
945
|
);
|
|
946
946
|
}));
|
|
947
|
-
o(this, "certLogin", (e) =>
|
|
947
|
+
o(this, "certLogin", (e) => c(this, null, function* () {
|
|
948
948
|
const t = yield this.checkCertIsLogin({
|
|
949
949
|
ContainerName: e
|
|
950
950
|
});
|
|
@@ -955,7 +955,7 @@ class Bt {
|
|
|
955
955
|
PinPolicy: this.pinPolicy
|
|
956
956
|
}));
|
|
957
957
|
}));
|
|
958
|
-
o(this, "verifyPin", (e) =>
|
|
958
|
+
o(this, "verifyPin", (e) => c(this, null, function* () {
|
|
959
959
|
var t;
|
|
960
960
|
yield this.sendMessage("GZCA_Login", {
|
|
961
961
|
ContainerName: e.ContainerName,
|
|
@@ -964,11 +964,11 @@ class Bt {
|
|
|
964
964
|
PinPolicy: this.pinPolicy
|
|
965
965
|
});
|
|
966
966
|
}));
|
|
967
|
-
o(this, "getCert", (e, t, n) =>
|
|
967
|
+
o(this, "getCert", (e, t, n) => c(this, null, function* () {
|
|
968
968
|
const i = t != null ? t : yield this.chooseCert(e);
|
|
969
969
|
return this.isRememberPin && n && (yield this.certLogin(i.ContainerName)), i;
|
|
970
970
|
}));
|
|
971
|
-
o(this, "chooseCert", (e) =>
|
|
971
|
+
o(this, "chooseCert", (e) => c(this, null, function* () {
|
|
972
972
|
var i;
|
|
973
973
|
const t = yield this.getCertList(e);
|
|
974
974
|
return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield G.open({
|
|
@@ -981,37 +981,37 @@ class Bt {
|
|
|
981
981
|
msg: "暂无证书"
|
|
982
982
|
});
|
|
983
983
|
}));
|
|
984
|
-
o(this, "getCertList", (e) =>
|
|
984
|
+
o(this, "getCertList", (e) => c(this, null, function* () {
|
|
985
985
|
return yield this.sendMessage(
|
|
986
986
|
"GZCA_GetCertList",
|
|
987
987
|
e
|
|
988
988
|
);
|
|
989
989
|
}));
|
|
990
|
-
o(this, "pkcs1Sign", (e) =>
|
|
990
|
+
o(this, "pkcs1Sign", (e) => c(this, null, function* () {
|
|
991
991
|
return yield this.sendMessage("GZCA_Pkcs1SignData", E({
|
|
992
992
|
IsLogin: this.getIsLogin(),
|
|
993
993
|
PinPolicy: this.pinPolicy
|
|
994
994
|
}, e != null ? e : {}));
|
|
995
995
|
}));
|
|
996
|
-
o(this, "pkcs1Base64Sign", (e) =>
|
|
996
|
+
o(this, "pkcs1Base64Sign", (e) => c(this, null, function* () {
|
|
997
997
|
return yield this.sendMessage("GZCA_Pkcs1SignDataEx", E({
|
|
998
998
|
IsLogin: this.getIsLogin(),
|
|
999
999
|
PinPolicy: this.pinPolicy
|
|
1000
1000
|
}, e != null ? e : {}));
|
|
1001
1001
|
}));
|
|
1002
|
-
o(this, "batchPkcs1Base64Sign", (e) =>
|
|
1002
|
+
o(this, "batchPkcs1Base64Sign", (e) => c(this, null, function* () {
|
|
1003
1003
|
return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", E({
|
|
1004
1004
|
IsLogin: this.getIsLogin(),
|
|
1005
1005
|
PinPolicy: this.pinPolicy
|
|
1006
1006
|
}, e != null ? e : {}));
|
|
1007
1007
|
}));
|
|
1008
|
-
o(this, "pkcs1VerifySignature", (e) =>
|
|
1008
|
+
o(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
|
|
1009
1009
|
return yield this.sendMessage("GZCA_Pkcs1VerifySign", e);
|
|
1010
1010
|
}));
|
|
1011
|
-
o(this, "pkcs1Base64VerifySignature", (e) =>
|
|
1011
|
+
o(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
|
|
1012
1012
|
return yield this.sendMessage("GZCA_Pkcs1VerifySignEx", e);
|
|
1013
1013
|
}));
|
|
1014
|
-
o(this, "getSealList", (e) =>
|
|
1014
|
+
o(this, "getSealList", (e) => c(this, null, function* () {
|
|
1015
1015
|
return yield this.sendMessage(
|
|
1016
1016
|
"GZCA_EnumSeals",
|
|
1017
1017
|
E({
|
|
@@ -1020,7 +1020,7 @@ class Bt {
|
|
|
1020
1020
|
p.LEVEL_2
|
|
1021
1021
|
);
|
|
1022
1022
|
}));
|
|
1023
|
-
o(this, "writeSeal", (e) =>
|
|
1023
|
+
o(this, "writeSeal", (e) => c(this, null, function* () {
|
|
1024
1024
|
return yield this.sendMessage(
|
|
1025
1025
|
"GZCA_WriteSeal",
|
|
1026
1026
|
E({
|
|
@@ -1029,7 +1029,7 @@ class Bt {
|
|
|
1029
1029
|
p.LEVEL_2
|
|
1030
1030
|
);
|
|
1031
1031
|
}));
|
|
1032
|
-
o(this, "deleteSeal", (e) =>
|
|
1032
|
+
o(this, "deleteSeal", (e) => c(this, null, function* () {
|
|
1033
1033
|
return yield this.sendMessage(
|
|
1034
1034
|
"GZCA_DeleteSeal",
|
|
1035
1035
|
E({
|
|
@@ -1038,7 +1038,7 @@ class Bt {
|
|
|
1038
1038
|
p.LEVEL_2
|
|
1039
1039
|
);
|
|
1040
1040
|
}));
|
|
1041
|
-
o(this, "getSealInfo", (e) =>
|
|
1041
|
+
o(this, "getSealInfo", (e) => c(this, null, function* () {
|
|
1042
1042
|
return yield this.sendMessage(
|
|
1043
1043
|
"GZCA_ReadSeal",
|
|
1044
1044
|
E({
|
|
@@ -1047,7 +1047,7 @@ class Bt {
|
|
|
1047
1047
|
p.LEVEL_2
|
|
1048
1048
|
);
|
|
1049
1049
|
}));
|
|
1050
|
-
o(this, "getTPSealList", (e) =>
|
|
1050
|
+
o(this, "getTPSealList", (e) => c(this, null, function* () {
|
|
1051
1051
|
return yield this.sendMessage(
|
|
1052
1052
|
"GZCA_GetSealPicList",
|
|
1053
1053
|
E({
|
|
@@ -1056,7 +1056,7 @@ class Bt {
|
|
|
1056
1056
|
p.LEVEL_2
|
|
1057
1057
|
);
|
|
1058
1058
|
}));
|
|
1059
|
-
o(this, "getTPSealPic", (e) =>
|
|
1059
|
+
o(this, "getTPSealPic", (e) => c(this, null, function* () {
|
|
1060
1060
|
var n;
|
|
1061
1061
|
return yield this.sendMessage(
|
|
1062
1062
|
"GZCA_GetSealPicData",
|
|
@@ -1066,87 +1066,87 @@ class Bt {
|
|
|
1066
1066
|
p.LEVEL_2
|
|
1067
1067
|
);
|
|
1068
1068
|
}));
|
|
1069
|
-
o(this, "sm2SignPreprocess1", (e) =>
|
|
1069
|
+
o(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
|
|
1070
1070
|
return yield this.sendMessage("GZCA_PrepareSm2SignStep1", e);
|
|
1071
1071
|
}));
|
|
1072
|
-
o(this, "sm2SignPreprocess2", (e) =>
|
|
1072
|
+
o(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
|
|
1073
1073
|
return yield this.sendMessage("GZCA_PrepareSm2SignStep2", e);
|
|
1074
1074
|
}));
|
|
1075
|
-
o(this, "pkcs1HashSign", (e) =>
|
|
1075
|
+
o(this, "pkcs1HashSign", (e) => c(this, null, function* () {
|
|
1076
1076
|
return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", E({
|
|
1077
1077
|
IsLogin: this.getIsLogin(),
|
|
1078
1078
|
PinPolicy: this.pinPolicy
|
|
1079
1079
|
}, e != null ? e : {}));
|
|
1080
1080
|
}));
|
|
1081
|
-
o(this, "pkcs1HashVerifySignature", (e) =>
|
|
1081
|
+
o(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
|
|
1082
1082
|
return yield this.sendMessage("GZCA_Pkcs1VerifySignForHash", e);
|
|
1083
1083
|
}));
|
|
1084
|
-
o(this, "pkcs7Sign", (e) =>
|
|
1084
|
+
o(this, "pkcs7Sign", (e) => c(this, null, function* () {
|
|
1085
1085
|
return yield this.sendMessage("GZCA_Pkcs7SignData", E({
|
|
1086
1086
|
IsLogin: this.getIsLogin(),
|
|
1087
1087
|
IsAuthAttr: "Y",
|
|
1088
1088
|
PinPolicy: this.pinPolicy
|
|
1089
1089
|
}, e != null ? e : {}));
|
|
1090
1090
|
}));
|
|
1091
|
-
o(this, "pkcs7VerifySignature", (e) =>
|
|
1091
|
+
o(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
|
|
1092
1092
|
return yield this.sendMessage("GZCA_Pkcs7VerifySign", e);
|
|
1093
1093
|
}));
|
|
1094
|
-
o(this, "sm3Hash", (e) =>
|
|
1094
|
+
o(this, "sm3Hash", (e) => c(this, null, function* () {
|
|
1095
1095
|
return yield this.sendMessage("GZCA_HashData", e);
|
|
1096
1096
|
}));
|
|
1097
|
-
o(this, "sm3HexHash", (e) =>
|
|
1097
|
+
o(this, "sm3HexHash", (e) => c(this, null, function* () {
|
|
1098
1098
|
return yield this.sendMessage("GZCA_HashDataEx", e);
|
|
1099
1099
|
}));
|
|
1100
|
-
o(this, "sm3FileHash", (e) =>
|
|
1100
|
+
o(this, "sm3FileHash", (e) => c(this, null, function* () {
|
|
1101
1101
|
return yield this.sendMessage("GZCA_HashFile", e);
|
|
1102
1102
|
}));
|
|
1103
|
-
o(this, "sm3HashEncryption", (e) =>
|
|
1103
|
+
o(this, "sm3HashEncryption", (e) => c(this, null, function* () {
|
|
1104
1104
|
return yield this.sendMessage("GZCA_HMac", e);
|
|
1105
1105
|
}));
|
|
1106
|
-
o(this, "pkcs7Encryption", (e) =>
|
|
1106
|
+
o(this, "pkcs7Encryption", (e) => c(this, null, function* () {
|
|
1107
1107
|
return yield this.sendMessage("GZCA_Pkcs7EncryptData", e);
|
|
1108
1108
|
}));
|
|
1109
|
-
o(this, "pkcs7Decryption", (e) =>
|
|
1109
|
+
o(this, "pkcs7Decryption", (e) => c(this, null, function* () {
|
|
1110
1110
|
return yield this.sendMessage("GZCA_Pkcs7DecryptData", E({
|
|
1111
1111
|
IsLogin: this.getIsLogin()
|
|
1112
1112
|
}, e != null ? e : {}));
|
|
1113
1113
|
}));
|
|
1114
|
-
o(this, "pkcs7FileEncryption", (e) =>
|
|
1114
|
+
o(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
|
|
1115
1115
|
return yield this.sendMessage("GZCA_EnvelopeSealFileEx_qyzc", e);
|
|
1116
1116
|
}));
|
|
1117
|
-
o(this, "pkcs7FileDecryption", (e) =>
|
|
1117
|
+
o(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
|
|
1118
1118
|
return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", E({
|
|
1119
1119
|
IsLogin: this.getIsLogin()
|
|
1120
1120
|
}, e != null ? e : {}));
|
|
1121
1121
|
}));
|
|
1122
|
-
o(this, "asymmetricEncryption", (e) =>
|
|
1122
|
+
o(this, "asymmetricEncryption", (e) => c(this, null, function* () {
|
|
1123
1123
|
return yield this.sendMessage("GZCA_AsymEncryptData", e);
|
|
1124
1124
|
}));
|
|
1125
|
-
o(this, "asymmetricDecryption", (e) =>
|
|
1125
|
+
o(this, "asymmetricDecryption", (e) => c(this, null, function* () {
|
|
1126
1126
|
return yield this.sendMessage("GZCA_AsymDecryptData", E({
|
|
1127
1127
|
IsLogin: this.getIsLogin()
|
|
1128
1128
|
}, e != null ? e : {}));
|
|
1129
1129
|
}));
|
|
1130
|
-
o(this, "sm4Encryption", (e) =>
|
|
1130
|
+
o(this, "sm4Encryption", (e) => c(this, null, function* () {
|
|
1131
1131
|
return yield this.sendMessage("GZCA_EncryptDataEx", e);
|
|
1132
1132
|
}));
|
|
1133
|
-
o(this, "sm4Decryption", (e) =>
|
|
1133
|
+
o(this, "sm4Decryption", (e) => c(this, null, function* () {
|
|
1134
1134
|
return yield this.sendMessage("GZCA_DecryptDataEx", e);
|
|
1135
1135
|
}));
|
|
1136
|
-
o(this, "getCertInfo", (e) =>
|
|
1136
|
+
o(this, "getCertInfo", (e) => c(this, null, function* () {
|
|
1137
1137
|
return yield this.sendMessage("GZCA_GetCertInfo", e);
|
|
1138
1138
|
}));
|
|
1139
|
-
o(this, "getCertInfoByOid", (e) =>
|
|
1139
|
+
o(this, "getCertInfoByOid", (e) => c(this, null, function* () {
|
|
1140
1140
|
return yield this.sendMessage("GZCA_GetCertInfoByOid", e);
|
|
1141
1141
|
}));
|
|
1142
|
-
o(this, "getSealVendor", (e) =>
|
|
1142
|
+
o(this, "getSealVendor", (e) => c(this, null, function* () {
|
|
1143
1143
|
return yield this.sendMessage(
|
|
1144
1144
|
"GZCA_GetSealIssuer",
|
|
1145
1145
|
e,
|
|
1146
1146
|
p.LEVEL_2
|
|
1147
1147
|
);
|
|
1148
1148
|
}));
|
|
1149
|
-
o(this, "deleteAllSealByVendor", (e) =>
|
|
1149
|
+
o(this, "deleteAllSealByVendor", (e) => c(this, null, function* () {
|
|
1150
1150
|
return yield this.sendMessage(
|
|
1151
1151
|
"GZCA_ClearSeal",
|
|
1152
1152
|
E({
|
|
@@ -1155,7 +1155,7 @@ class Bt {
|
|
|
1155
1155
|
p.LEVEL_2
|
|
1156
1156
|
);
|
|
1157
1157
|
}));
|
|
1158
|
-
o(this, "applyCert", (e) =>
|
|
1158
|
+
o(this, "applyCert", (e) => c(this, null, function* () {
|
|
1159
1159
|
return yield this.sendMessage(
|
|
1160
1160
|
"GZCA_ApplyCert",
|
|
1161
1161
|
{
|
|
@@ -1168,21 +1168,21 @@ class Bt {
|
|
|
1168
1168
|
p.LEVEL_3
|
|
1169
1169
|
);
|
|
1170
1170
|
}));
|
|
1171
|
-
o(this, "resetPin", (e) =>
|
|
1171
|
+
o(this, "resetPin", (e) => c(this, null, function* () {
|
|
1172
1172
|
return yield this.sendMessage(
|
|
1173
1173
|
"GZCA_UnblockUserPin",
|
|
1174
1174
|
E({}, e != null ? e : {}),
|
|
1175
1175
|
p.LEVEL_3
|
|
1176
1176
|
);
|
|
1177
1177
|
}));
|
|
1178
|
-
o(this, "getUKeyList", () =>
|
|
1178
|
+
o(this, "getUKeyList", () => c(this, null, function* () {
|
|
1179
1179
|
return yield this.sendMessage(
|
|
1180
1180
|
"GetUKeyList",
|
|
1181
1181
|
void 0,
|
|
1182
1182
|
p.LEVEL_3
|
|
1183
1183
|
);
|
|
1184
1184
|
}));
|
|
1185
|
-
o(this, "getUKeyInfo", (e) =>
|
|
1185
|
+
o(this, "getUKeyInfo", (e) => c(this, null, function* () {
|
|
1186
1186
|
return yield this.sendMessage(
|
|
1187
1187
|
"GetUKeyID",
|
|
1188
1188
|
e != null ? e : {},
|
|
@@ -1217,11 +1217,11 @@ const $ = class $ {
|
|
|
1217
1217
|
o(this, "coreInstance", null);
|
|
1218
1218
|
o(this, "gwsConfig", {});
|
|
1219
1219
|
o(this, "createGwsCore", (e) => {
|
|
1220
|
-
this.gwsConfig = e != null ? e : {}, this.coreInstance = new
|
|
1220
|
+
this.gwsConfig = e != null ? e : {}, this.coreInstance = new Dt(v(E({}, e != null ? e : {}), {
|
|
1221
1221
|
url: Oe
|
|
1222
1222
|
}));
|
|
1223
1223
|
});
|
|
1224
|
-
o(this, "appendCertBase64", (e, t = !0) =>
|
|
1224
|
+
o(this, "appendCertBase64", (e, t = !0) => c(this, null, function* () {
|
|
1225
1225
|
if (e.CertB64) return e;
|
|
1226
1226
|
const n = t ? yield this.getSignatureCert() : yield this.getEncryptionCert();
|
|
1227
1227
|
return v(E({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
|
|
@@ -1237,29 +1237,29 @@ const $ = class $ {
|
|
|
1237
1237
|
var e;
|
|
1238
1238
|
return (e = this.coreInstance) == null ? void 0 : e.getSocketReadyState();
|
|
1239
1239
|
});
|
|
1240
|
-
o(this, "verifyPin", (e, t) =>
|
|
1241
|
-
var i,
|
|
1240
|
+
o(this, "verifyPin", (e, t) => c(this, null, function* () {
|
|
1241
|
+
var i, a;
|
|
1242
1242
|
const n = yield this.getSignatureCert(t);
|
|
1243
|
-
return (
|
|
1243
|
+
return (a = this.coreInstance) == null ? void 0 : a.verifyPin({
|
|
1244
1244
|
ContainerName: (i = n == null ? void 0 : n.ContainerName) != null ? i : "",
|
|
1245
1245
|
UserPin: e == null ? void 0 : e.UserPin
|
|
1246
1246
|
});
|
|
1247
1247
|
}));
|
|
1248
|
-
o(this, "getSignatureCert", (e, t = !0) =>
|
|
1248
|
+
o(this, "getSignatureCert", (e, t = !0) => c(this, null, function* () {
|
|
1249
1249
|
var i;
|
|
1250
1250
|
return yield (i = this.coreInstance) == null ? void 0 : i.getCert(
|
|
1251
|
-
{ CertType:
|
|
1251
|
+
{ CertType: re },
|
|
1252
1252
|
e,
|
|
1253
1253
|
t
|
|
1254
1254
|
);
|
|
1255
1255
|
}));
|
|
1256
|
-
o(this, "getSignatureCertList", () =>
|
|
1256
|
+
o(this, "getSignatureCertList", () => c(this, null, function* () {
|
|
1257
1257
|
var t;
|
|
1258
1258
|
return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
|
|
1259
|
-
CertType:
|
|
1259
|
+
CertType: re
|
|
1260
1260
|
});
|
|
1261
1261
|
}));
|
|
1262
|
-
o(this, "getEncryptionCert", (e, t = !0) =>
|
|
1262
|
+
o(this, "getEncryptionCert", (e, t = !0) => c(this, null, function* () {
|
|
1263
1263
|
var i;
|
|
1264
1264
|
return yield (i = this.coreInstance) == null ? void 0 : i.getCert(
|
|
1265
1265
|
{ CertType: oe },
|
|
@@ -1267,7 +1267,7 @@ const $ = class $ {
|
|
|
1267
1267
|
t
|
|
1268
1268
|
);
|
|
1269
1269
|
}));
|
|
1270
|
-
o(this, "getEncryptionCertList", () =>
|
|
1270
|
+
o(this, "getEncryptionCertList", () => c(this, null, function* () {
|
|
1271
1271
|
var t;
|
|
1272
1272
|
return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
|
|
1273
1273
|
CertType: oe
|
|
@@ -1289,60 +1289,60 @@ const $ = class $ {
|
|
|
1289
1289
|
var t;
|
|
1290
1290
|
(t = this.coreInstance) == null || t.changePinPolicy(e);
|
|
1291
1291
|
});
|
|
1292
|
-
o(this, "pkcs1Sign", (e, t) =>
|
|
1293
|
-
var
|
|
1294
|
-
const n = yield this.getSignatureCert(t), i = yield (
|
|
1295
|
-
ContainerName: (
|
|
1292
|
+
o(this, "pkcs1Sign", (e, t) => c(this, null, function* () {
|
|
1293
|
+
var a, r, l;
|
|
1294
|
+
const n = yield this.getSignatureCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.pkcs1Sign(v(E({}, e != null ? e : {}), {
|
|
1295
|
+
ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : ""
|
|
1296
1296
|
}));
|
|
1297
|
-
return (
|
|
1297
|
+
return (l = i == null ? void 0 : i[0]) == null ? void 0 : l.SignData;
|
|
1298
1298
|
}));
|
|
1299
|
-
o(this, "pkcs1VerifySignature", (e) =>
|
|
1299
|
+
o(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
|
|
1300
1300
|
var i;
|
|
1301
1301
|
const t = yield this.appendCertBase64(e), n = yield (i = this.coreInstance) == null ? void 0 : i.pkcs1VerifySignature(t);
|
|
1302
1302
|
return Array.isArray(n);
|
|
1303
1303
|
}));
|
|
1304
|
-
o(this, "pkcs1Base64Sign", (e, t) =>
|
|
1305
|
-
var
|
|
1306
|
-
const n = yield this.getSignatureCert(t), i = (
|
|
1304
|
+
o(this, "pkcs1Base64Sign", (e, t) => c(this, null, function* () {
|
|
1305
|
+
var r, l, d, u, C;
|
|
1306
|
+
const n = yield this.getSignatureCert(t), i = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), a = yield (u = this.coreInstance) == null ? void 0 : u.pkcs1Base64Sign(v(E({}, e != null ? e : {}), {
|
|
1307
1307
|
ContainerName: (d = n == null ? void 0 : n.ContainerName) != null ? d : "",
|
|
1308
1308
|
DataB64: i
|
|
1309
1309
|
}));
|
|
1310
|
-
return (C =
|
|
1310
|
+
return (C = a == null ? void 0 : a[0]) == null ? void 0 : C.SignData;
|
|
1311
1311
|
}));
|
|
1312
|
-
o(this, "batchPkcs1Base64Sign", (e, t) =>
|
|
1312
|
+
o(this, "batchPkcs1Base64Sign", (e, t) => c(this, null, function* () {
|
|
1313
1313
|
var C, h, w, y, g, m;
|
|
1314
|
-
const n = "|", i = (h = e.DataB64) != null ? h : (C = e.Data) == null ? void 0 : C.map((f) => this.base64Encode({ Data: f })),
|
|
1315
|
-
let
|
|
1316
|
-
|
|
1317
|
-
const
|
|
1318
|
-
ContainerName: (w =
|
|
1319
|
-
DataB64:
|
|
1320
|
-
}), d = (m = (g =
|
|
1314
|
+
const n = "|", i = (h = e.DataB64) != null ? h : (C = e.Data) == null ? void 0 : C.map((f) => this.base64Encode({ Data: f })), a = yield this.getSignatureCert(t);
|
|
1315
|
+
let r = "";
|
|
1316
|
+
r = Array.isArray(i) ? i == null ? void 0 : i.map((f, S) => `${S}:${f}`).join(n) : "";
|
|
1317
|
+
const l = yield (y = this.coreInstance) == null ? void 0 : y.batchPkcs1Base64Sign({
|
|
1318
|
+
ContainerName: (w = a == null ? void 0 : a.ContainerName) != null ? w : "",
|
|
1319
|
+
DataB64: r
|
|
1320
|
+
}), d = (m = (g = l == null ? void 0 : l[0]) == null ? void 0 : g.SignData) == null ? void 0 : m.split(n), u = [];
|
|
1321
1321
|
return d.forEach((f) => {
|
|
1322
1322
|
const S = f.split(":"), k = Number(S[0]), _ = S[1];
|
|
1323
1323
|
u[k] = _;
|
|
1324
1324
|
}), u;
|
|
1325
1325
|
}));
|
|
1326
|
-
o(this, "pkcs1Base64VerifySignature", (e) =>
|
|
1327
|
-
var
|
|
1328
|
-
const t = (
|
|
1329
|
-
return !!(yield (
|
|
1326
|
+
o(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
|
|
1327
|
+
var a, r, l;
|
|
1328
|
+
const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), n = yield this.appendCertBase64(e);
|
|
1329
|
+
return !!(yield (l = this.coreInstance) == null ? void 0 : l.pkcs1Base64VerifySignature({
|
|
1330
1330
|
CertB64: n.CertB64,
|
|
1331
1331
|
DataB64: t,
|
|
1332
1332
|
SignData: n.SignData
|
|
1333
1333
|
}));
|
|
1334
1334
|
}));
|
|
1335
|
-
o(this, "writeSeal", (e, t) =>
|
|
1336
|
-
var
|
|
1335
|
+
o(this, "writeSeal", (e, t) => c(this, null, function* () {
|
|
1336
|
+
var a, r;
|
|
1337
1337
|
const n = yield this.getSignatureCert(t);
|
|
1338
|
-
return !!(yield (
|
|
1339
|
-
ContainerName: (
|
|
1338
|
+
return !!(yield (r = this.coreInstance) == null ? void 0 : r.writeSeal(v(E({}, e != null ? e : {}), {
|
|
1339
|
+
ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : ""
|
|
1340
1340
|
})));
|
|
1341
1341
|
}));
|
|
1342
|
-
o(this, "deleteSeal", (e) =>
|
|
1343
|
-
var
|
|
1342
|
+
o(this, "deleteSeal", (e) => c(this, null, function* () {
|
|
1343
|
+
var r, l, d, u, C;
|
|
1344
1344
|
const t = yield this.getSealList(e);
|
|
1345
|
-
if (!((
|
|
1345
|
+
if (!((r = t == null ? void 0 : t.data) != null && r.length))
|
|
1346
1346
|
return Promise.reject({
|
|
1347
1347
|
errCode: q,
|
|
1348
1348
|
msg: "暂无印章"
|
|
@@ -1352,22 +1352,22 @@ const $ = class $ {
|
|
|
1352
1352
|
data: t == null ? void 0 : t.data,
|
|
1353
1353
|
columns: Se,
|
|
1354
1354
|
okText: "删除"
|
|
1355
|
-
}), i = (
|
|
1355
|
+
}), i = (l = n == null ? void 0 : n.SealId) != null ? l : "";
|
|
1356
1356
|
return !!(yield (C = this.coreInstance) == null ? void 0 : C.deleteSeal({
|
|
1357
1357
|
ContainerName: (u = (d = t == null ? void 0 : t.cert) == null ? void 0 : d.ContainerName) != null ? u : "",
|
|
1358
1358
|
SealId: i
|
|
1359
1359
|
}));
|
|
1360
1360
|
}));
|
|
1361
|
-
o(this, "deleteSealById", (e, t) =>
|
|
1362
|
-
var
|
|
1361
|
+
o(this, "deleteSealById", (e, t) => c(this, null, function* () {
|
|
1362
|
+
var a, r;
|
|
1363
1363
|
const n = yield this.getSignatureCert(t);
|
|
1364
|
-
return !!(yield (
|
|
1365
|
-
ContainerName: (
|
|
1364
|
+
return !!(yield (r = this.coreInstance) == null ? void 0 : r.deleteSeal(v(E({}, e != null ? e : {}), {
|
|
1365
|
+
ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : ""
|
|
1366
1366
|
})));
|
|
1367
1367
|
}));
|
|
1368
|
-
o(this, "getSealList", (e) =>
|
|
1369
|
-
var i,
|
|
1370
|
-
const t = yield this.getSignatureCert(e), n = yield (
|
|
1368
|
+
o(this, "getSealList", (e) => c(this, null, function* () {
|
|
1369
|
+
var i, a;
|
|
1370
|
+
const t = yield this.getSignatureCert(e), n = yield (a = this.coreInstance) == null ? void 0 : a.getSealList({
|
|
1371
1371
|
ContainerName: (i = t == null ? void 0 : t.ContainerName) != null ? i : "",
|
|
1372
1372
|
IsLogin: "Y"
|
|
1373
1373
|
});
|
|
@@ -1376,235 +1376,231 @@ const $ = class $ {
|
|
|
1376
1376
|
data: n
|
|
1377
1377
|
};
|
|
1378
1378
|
}));
|
|
1379
|
-
o(this, "getSealInfo", (e) =>
|
|
1380
|
-
var
|
|
1379
|
+
o(this, "getSealInfo", (e) => c(this, null, function* () {
|
|
1380
|
+
var a, r, l, d, u, C, h;
|
|
1381
1381
|
const t = yield this.getSealList(e);
|
|
1382
|
-
if (!((
|
|
1382
|
+
if (!((a = t == null ? void 0 : t.data) != null && a.length))
|
|
1383
1383
|
return Promise.reject({
|
|
1384
1384
|
errCode: q,
|
|
1385
1385
|
msg: "暂无印章"
|
|
1386
1386
|
});
|
|
1387
|
-
const n = ((
|
|
1387
|
+
const n = ((r = t == null ? void 0 : t.data) == null ? void 0 : r.length) > 1 ? yield G.open({
|
|
1388
1388
|
title: "选择印章",
|
|
1389
1389
|
data: t == null ? void 0 : t.data,
|
|
1390
1390
|
columns: Se,
|
|
1391
|
-
theme: (
|
|
1391
|
+
theme: (l = this.gwsConfig) == null ? void 0 : l.theme
|
|
1392
1392
|
}) : t == null ? void 0 : t.data[0], i = yield (h = this.coreInstance) == null ? void 0 : h.getSealInfo({
|
|
1393
1393
|
ContainerName: (u = (d = t == null ? void 0 : t.cert) == null ? void 0 : d.ContainerName) != null ? u : "",
|
|
1394
1394
|
SealId: (C = n == null ? void 0 : n.SealId) != null ? C : ""
|
|
1395
1395
|
});
|
|
1396
1396
|
return i == null ? void 0 : i[0];
|
|
1397
1397
|
}));
|
|
1398
|
-
o(this, "getTPSealList", (e, t) =>
|
|
1399
|
-
var
|
|
1400
|
-
const n = yield this.getSignatureCert(t)
|
|
1401
|
-
|
|
1398
|
+
o(this, "getTPSealList", (e, t) => c(this, null, function* () {
|
|
1399
|
+
var a, r;
|
|
1400
|
+
const n = yield this.getSignatureCert(t);
|
|
1401
|
+
return yield (r = this.coreInstance) == null ? void 0 : r.getTPSealList({
|
|
1402
|
+
ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : "",
|
|
1402
1403
|
Vid: e == null ? void 0 : e.Vid
|
|
1403
1404
|
});
|
|
1404
|
-
return {
|
|
1405
|
-
cert: n,
|
|
1406
|
-
data: i
|
|
1407
|
-
};
|
|
1408
1405
|
}));
|
|
1409
|
-
o(this, "getTPSeal", (e, t) =>
|
|
1410
|
-
var
|
|
1406
|
+
o(this, "getTPSeal", (e, t) => c(this, null, function* () {
|
|
1407
|
+
var a;
|
|
1411
1408
|
const n = yield this.getTPSealList(e, t);
|
|
1412
|
-
|
|
1413
|
-
return Promise.reject({
|
|
1414
|
-
errCode: q,
|
|
1415
|
-
msg: "暂无印章"
|
|
1416
|
-
});
|
|
1417
|
-
const i = ((a = n == null ? void 0 : n.data) == null ? void 0 : a.length) === 1 ? n == null ? void 0 : n.data[0] : yield G.open({
|
|
1409
|
+
return n != null && n.length ? (n == null ? void 0 : n.length) === 1 ? n == null ? void 0 : n[0] : yield G.open({
|
|
1418
1410
|
title: "选择印章",
|
|
1419
|
-
data: n
|
|
1411
|
+
data: n,
|
|
1420
1412
|
columns: _t,
|
|
1421
|
-
theme: (
|
|
1413
|
+
theme: (a = this.gwsConfig) == null ? void 0 : a.theme
|
|
1414
|
+
}) : Promise.reject({
|
|
1415
|
+
errCode: q,
|
|
1416
|
+
msg: "暂无印章"
|
|
1422
1417
|
});
|
|
1423
|
-
return {
|
|
1424
|
-
cert: n == null ? void 0 : n.cert,
|
|
1425
|
-
data: i
|
|
1426
|
-
};
|
|
1427
1418
|
}));
|
|
1428
|
-
o(this, "getTPSealPic", (e, t) =>
|
|
1429
|
-
var
|
|
1430
|
-
const
|
|
1431
|
-
ContainerName: (
|
|
1432
|
-
},
|
|
1433
|
-
FileSize: String(
|
|
1419
|
+
o(this, "getTPSealPic", (e, t, n) => c(this, null, function* () {
|
|
1420
|
+
var l, d;
|
|
1421
|
+
const i = yield this.getSignatureCert(t), a = n || (yield this.getTPSeal(e, t)), r = yield (d = this.coreInstance) == null ? void 0 : d.getTPSealPic(v(E({
|
|
1422
|
+
ContainerName: (l = i == null ? void 0 : i.ContainerName) != null ? l : ""
|
|
1423
|
+
}, a != null ? a : {}), {
|
|
1424
|
+
FileSize: String(a == null ? void 0 : a.FileSize)
|
|
1434
1425
|
}));
|
|
1435
|
-
return
|
|
1426
|
+
return r == null ? void 0 : r[0];
|
|
1436
1427
|
}));
|
|
1437
|
-
o(this, "sm2SignPreprocess1", (e) =>
|
|
1438
|
-
var i,
|
|
1428
|
+
o(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
|
|
1429
|
+
var i, a;
|
|
1439
1430
|
const t = yield this.appendCertBase64(e), n = yield (i = this.coreInstance) == null ? void 0 : i.sm2SignPreprocess1(t);
|
|
1440
|
-
return (
|
|
1431
|
+
return (a = n == null ? void 0 : n[0]) == null ? void 0 : a.Z;
|
|
1441
1432
|
}));
|
|
1442
|
-
o(this, "sm2SignPreprocess2", (e) =>
|
|
1443
|
-
var
|
|
1444
|
-
const t = this.base64Encode({ Data: (
|
|
1433
|
+
o(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
|
|
1434
|
+
var a, r;
|
|
1435
|
+
const t = this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), n = yield this.appendCertBase64(e), i = yield (r = this.coreInstance) == null ? void 0 : r.sm2SignPreprocess2({
|
|
1445
1436
|
CertB64: n.CertB64,
|
|
1446
1437
|
DataB64: t
|
|
1447
1438
|
});
|
|
1448
1439
|
return i == null ? void 0 : i[0].H;
|
|
1449
1440
|
}));
|
|
1450
|
-
o(this, "pkcs1HashSign", (e, t) =>
|
|
1451
|
-
var
|
|
1452
|
-
const n = yield this.getSignatureCert(t), i = yield (
|
|
1453
|
-
ContainerName: (
|
|
1441
|
+
o(this, "pkcs1HashSign", (e, t) => c(this, null, function* () {
|
|
1442
|
+
var a, r, l, d;
|
|
1443
|
+
const n = yield this.getSignatureCert(t), i = yield (l = this.coreInstance) == null ? void 0 : l.pkcs1HashSign({
|
|
1444
|
+
ContainerName: (a = n == null ? void 0 : n.ContainerName) != null ? a : "",
|
|
1454
1445
|
DataB64: e.DataB64,
|
|
1455
|
-
HashAlg: (
|
|
1446
|
+
HashAlg: (r = e.HashAlg) != null ? r : "sm3"
|
|
1456
1447
|
});
|
|
1457
1448
|
return (d = i == null ? void 0 : i[0]) == null ? void 0 : d.SignData;
|
|
1458
1449
|
}));
|
|
1459
|
-
o(this, "pkcs1HashVerifySignature", (e) =>
|
|
1460
|
-
var i,
|
|
1450
|
+
o(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
|
|
1451
|
+
var i, a;
|
|
1461
1452
|
const t = yield this.appendCertBase64(e);
|
|
1462
|
-
return !!(yield (
|
|
1453
|
+
return !!(yield (a = this.coreInstance) == null ? void 0 : a.pkcs1HashVerifySignature(v(E({}, t), {
|
|
1463
1454
|
HashAlg: (i = t.HashAlg) != null ? i : "sm3"
|
|
1464
1455
|
})));
|
|
1465
1456
|
}));
|
|
1466
|
-
o(this, "pkcs7Sign", (e, t) =>
|
|
1467
|
-
var
|
|
1468
|
-
const n = (
|
|
1457
|
+
o(this, "pkcs7Sign", (e, t) => c(this, null, function* () {
|
|
1458
|
+
var r, l, d, u, C;
|
|
1459
|
+
const n = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), i = yield this.getSignatureCert(t), a = yield (u = this.coreInstance) == null ? void 0 : u.pkcs7Sign(v(E({}, e != null ? e : {}), {
|
|
1469
1460
|
ContainerName: (d = i == null ? void 0 : i.ContainerName) != null ? d : "",
|
|
1470
1461
|
DataB64: n
|
|
1471
1462
|
}));
|
|
1472
|
-
return (C =
|
|
1463
|
+
return (C = a == null ? void 0 : a[0]) == null ? void 0 : C.SignData;
|
|
1473
1464
|
}));
|
|
1474
|
-
o(this, "pkcs7VerifySignature", (e) =>
|
|
1475
|
-
var i,
|
|
1476
|
-
const t = (
|
|
1477
|
-
return !!(yield (
|
|
1465
|
+
o(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
|
|
1466
|
+
var i, a, r;
|
|
1467
|
+
const t = (a = e.DataB64) != null ? a : this.base64Encode({ Data: (i = e.Data) != null ? i : "" });
|
|
1468
|
+
return !!(yield (r = this.coreInstance) == null ? void 0 : r.pkcs7VerifySignature({
|
|
1478
1469
|
DataB64: t,
|
|
1479
1470
|
SignData: e.SignData
|
|
1480
1471
|
}));
|
|
1481
1472
|
}));
|
|
1482
|
-
o(this, "sm3Hash", (e) =>
|
|
1473
|
+
o(this, "sm3Hash", (e) => c(this, null, function* () {
|
|
1483
1474
|
var n, i;
|
|
1484
1475
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3Hash(e);
|
|
1485
1476
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
|
|
1486
1477
|
}));
|
|
1487
|
-
o(this, "sm3HexHash", (e) =>
|
|
1478
|
+
o(this, "sm3HexHash", (e) => c(this, null, function* () {
|
|
1488
1479
|
var n, i;
|
|
1489
1480
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3HexHash(e);
|
|
1490
1481
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
|
|
1491
1482
|
}));
|
|
1492
|
-
o(this, "sm3FileHash", (e) =>
|
|
1483
|
+
o(this, "sm3FileHash", (e) => c(this, null, function* () {
|
|
1493
1484
|
var n, i;
|
|
1494
1485
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3FileHash(e);
|
|
1495
1486
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
|
|
1496
1487
|
}));
|
|
1497
|
-
o(this, "sm3HashEncryption", (e) =>
|
|
1498
|
-
var
|
|
1499
|
-
const t = (
|
|
1488
|
+
o(this, "sm3HashEncryption", (e) => c(this, null, function* () {
|
|
1489
|
+
var a, r, l, d, u, C;
|
|
1490
|
+
const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), n = (d = e.KeyB64) != null ? d : this.base64Encode({ Data: (l = e.Key) != null ? l : "" }), i = yield (u = this.coreInstance) == null ? void 0 : u.sm3HashEncryption({
|
|
1500
1491
|
dataB64: t,
|
|
1501
1492
|
keyB64: n,
|
|
1502
1493
|
alg: "sm3"
|
|
1503
1494
|
});
|
|
1504
1495
|
return (C = i == null ? void 0 : i[0]) == null ? void 0 : C.DataB64;
|
|
1505
1496
|
}));
|
|
1506
|
-
o(this, "pkcs7Encryption", (e) =>
|
|
1507
|
-
var i,
|
|
1497
|
+
o(this, "pkcs7Encryption", (e) => c(this, null, function* () {
|
|
1498
|
+
var i, a, r, l;
|
|
1508
1499
|
if (!e.CertB64List) {
|
|
1509
1500
|
const d = yield this.getEncryptionCert();
|
|
1510
1501
|
e.CertB64List = d == null ? void 0 : d.CertB64;
|
|
1511
1502
|
}
|
|
1512
|
-
const t = (
|
|
1503
|
+
const t = (a = e.DataB64) != null ? a : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7Encryption({
|
|
1513
1504
|
DataB64: t,
|
|
1514
1505
|
CertB64List: e.CertB64List
|
|
1515
1506
|
});
|
|
1516
|
-
return (
|
|
1507
|
+
return (l = n == null ? void 0 : n[0]) == null ? void 0 : l.DataB64;
|
|
1517
1508
|
}));
|
|
1518
|
-
o(this, "pkcs7Decryption", (e) =>
|
|
1519
|
-
var
|
|
1520
|
-
const t = yield this.getEncryptionCert(), n = yield (
|
|
1509
|
+
o(this, "pkcs7Decryption", (e) => c(this, null, function* () {
|
|
1510
|
+
var a, r;
|
|
1511
|
+
const t = yield this.getEncryptionCert(), n = yield (a = this.coreInstance) == null ? void 0 : a.pkcs7Decryption(v(E({}, e != null ? e : {}), {
|
|
1521
1512
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1522
|
-
})), i = (
|
|
1513
|
+
})), i = (r = n == null ? void 0 : n[0]) == null ? void 0 : r.DataB64;
|
|
1523
1514
|
return e.shouldDecodeBase64 ? this.base64Decode({ DataB64: i }) : i;
|
|
1524
1515
|
}));
|
|
1525
|
-
o(this, "pkcs7FileEncryption", (e) =>
|
|
1526
|
-
var i,
|
|
1516
|
+
o(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
|
|
1517
|
+
var i, a;
|
|
1527
1518
|
const t = yield this.appendCertBase64(e, !1), n = yield (i = this.coreInstance) == null ? void 0 : i.pkcs7FileEncryption(t);
|
|
1528
|
-
return (
|
|
1519
|
+
return (a = n == null ? void 0 : n[0]) == null ? void 0 : a.DataB64;
|
|
1529
1520
|
}));
|
|
1530
|
-
o(this, "pkcs7FileDecryption", (e) =>
|
|
1531
|
-
var i,
|
|
1532
|
-
const t = yield this.getEncryptionCert(), n = yield (
|
|
1521
|
+
o(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
|
|
1522
|
+
var i, a, r;
|
|
1523
|
+
const t = yield this.getEncryptionCert(), n = yield (a = this.coreInstance) == null ? void 0 : a.pkcs7FileDecryption({
|
|
1533
1524
|
SrcFile: e.SrcFile,
|
|
1534
1525
|
DstFile: (i = e.DstFile) != null ? i : e.SrcFile.slice(0, -4),
|
|
1535
1526
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1536
1527
|
});
|
|
1537
|
-
return (
|
|
1528
|
+
return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.DataB64;
|
|
1538
1529
|
}));
|
|
1539
|
-
o(this, "asymmetricEncryption", (e) =>
|
|
1540
|
-
var i,
|
|
1530
|
+
o(this, "asymmetricEncryption", (e) => c(this, null, function* () {
|
|
1531
|
+
var i, a;
|
|
1541
1532
|
const t = yield this.appendCertBase64(e, !1), n = yield (i = this.coreInstance) == null ? void 0 : i.asymmetricEncryption(t);
|
|
1542
|
-
return (
|
|
1533
|
+
return (a = n == null ? void 0 : n[0]) == null ? void 0 : a.Data;
|
|
1543
1534
|
}));
|
|
1544
|
-
o(this, "asymmetricDecryption", (e, t) =>
|
|
1545
|
-
var
|
|
1546
|
-
const n = yield this.getEncryptionCert(t), i = yield (
|
|
1535
|
+
o(this, "asymmetricDecryption", (e, t) => c(this, null, function* () {
|
|
1536
|
+
var a, r;
|
|
1537
|
+
const n = yield this.getEncryptionCert(t), i = yield (a = this.coreInstance) == null ? void 0 : a.asymmetricDecryption(v(E({}, e != null ? e : {}), {
|
|
1547
1538
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1548
1539
|
}));
|
|
1549
|
-
return (
|
|
1540
|
+
return (r = i == null ? void 0 : i[0]) == null ? void 0 : r.Data;
|
|
1550
1541
|
}));
|
|
1551
|
-
o(this, "sm4Encryption", (e) =>
|
|
1542
|
+
o(this, "sm4Encryption", (e) => c(this, null, function* () {
|
|
1552
1543
|
var n;
|
|
1553
1544
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Encryption(e);
|
|
1554
1545
|
return t == null ? void 0 : t[0];
|
|
1555
1546
|
}));
|
|
1556
|
-
o(this, "sm4Decryption", (e) =>
|
|
1547
|
+
o(this, "sm4Decryption", (e) => c(this, null, function* () {
|
|
1557
1548
|
var n, i;
|
|
1558
1549
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Decryption(e);
|
|
1559
1550
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.Data;
|
|
1560
1551
|
}));
|
|
1561
|
-
o(this, "getCertInfo", (e) =>
|
|
1562
|
-
var i,
|
|
1563
|
-
const t = yield (i = this.coreInstance) == null ? void 0 : i.getCertInfo(e), n = (
|
|
1552
|
+
o(this, "getCertInfo", (e) => c(this, null, function* () {
|
|
1553
|
+
var i, a, r, l, d;
|
|
1554
|
+
const t = yield (i = this.coreInstance) == null ? void 0 : i.getCertInfo(e), n = (a = t == null ? void 0 : t[0]) != null ? a : {};
|
|
1564
1555
|
for (let u = 0; u < ce.length; u++) {
|
|
1565
1556
|
const C = ce[u];
|
|
1566
1557
|
try {
|
|
1567
|
-
const h = yield (
|
|
1558
|
+
const h = yield (r = this.coreInstance) == null ? void 0 : r.getCertInfoByOid({
|
|
1568
1559
|
Oid: C.oid,
|
|
1569
1560
|
CertB64: e.CertB64
|
|
1570
1561
|
});
|
|
1571
|
-
n[C.key] = (d = (
|
|
1562
|
+
n[C.key] = (d = (l = h == null ? void 0 : h[0]) == null ? void 0 : l.OidValue) == null ? void 0 : d.replace(".", "");
|
|
1572
1563
|
} catch (h) {
|
|
1573
1564
|
n[C.key] = null;
|
|
1574
1565
|
}
|
|
1575
1566
|
}
|
|
1576
1567
|
return n != null && n.idCardNo ? n != null && n.CertSubject.includes("O=") || n.orgCode ? n.certCate = Ge : n.certCate = Fe : n.certCate = Ve, n;
|
|
1577
1568
|
}));
|
|
1578
|
-
o(this, "getCertInfoByOid", (e) =>
|
|
1569
|
+
o(this, "getCertInfoByOid", (e) => c(this, null, function* () {
|
|
1579
1570
|
var n, i;
|
|
1580
1571
|
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(E({}, e != null ? e : {}));
|
|
1581
1572
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.OidValue;
|
|
1582
1573
|
}));
|
|
1583
|
-
o(this, "getSealVendor", (e) =>
|
|
1574
|
+
o(this, "getSealVendor", (e) => c(this, null, function* () {
|
|
1584
1575
|
var i;
|
|
1585
1576
|
const t = yield this.getSignatureCert(e), n = yield (i = this.coreInstance) == null ? void 0 : i.getSealVendor({
|
|
1586
1577
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1587
1578
|
});
|
|
1588
1579
|
return n == null ? void 0 : n[0];
|
|
1589
1580
|
}));
|
|
1590
|
-
o(this, "deleteAllSealByVendor", (e, t) =>
|
|
1591
|
-
var
|
|
1592
|
-
const n = yield this.getSignatureCert(t), i = yield (
|
|
1581
|
+
o(this, "deleteAllSealByVendor", (e, t) => c(this, null, function* () {
|
|
1582
|
+
var a;
|
|
1583
|
+
const n = yield this.getSignatureCert(t), i = yield (a = this.coreInstance) == null ? void 0 : a.deleteAllSealByVendor(v(E({}, e != null ? e : {}), {
|
|
1593
1584
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1594
1585
|
}));
|
|
1595
1586
|
return i == null ? void 0 : i[0];
|
|
1596
1587
|
}));
|
|
1597
|
-
o(this, "getUKey", (e) =>
|
|
1598
|
-
var i;
|
|
1588
|
+
o(this, "getUKey", (e) => c(this, null, function* () {
|
|
1589
|
+
var i, a;
|
|
1599
1590
|
if (e) return e;
|
|
1600
1591
|
const t = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyList();
|
|
1601
1592
|
return yield G.open({
|
|
1602
1593
|
title: "选择介质",
|
|
1603
1594
|
data: t,
|
|
1604
|
-
columns: Lt
|
|
1595
|
+
columns: Lt,
|
|
1596
|
+
theme: (a = this.gwsConfig) == null ? void 0 : a.theme
|
|
1605
1597
|
});
|
|
1606
1598
|
}));
|
|
1607
|
-
o(this, "
|
|
1599
|
+
o(this, "getUKeyList", () => c(this, null, function* () {
|
|
1600
|
+
var t;
|
|
1601
|
+
return yield (t = this.coreInstance) == null ? void 0 : t.getUKeyList();
|
|
1602
|
+
}));
|
|
1603
|
+
o(this, "getUKeyInfo", (e) => c(this, null, function* () {
|
|
1608
1604
|
var i;
|
|
1609
1605
|
const t = yield this.getUKey(e), n = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyInfo({
|
|
1610
1606
|
manu: t == null ? void 0 : t.manu,
|
|
@@ -1612,19 +1608,19 @@ const $ = class $ {
|
|
|
1612
1608
|
});
|
|
1613
1609
|
return n == null ? void 0 : n[0];
|
|
1614
1610
|
}));
|
|
1615
|
-
o(this, "applyCert", (e, t) =>
|
|
1616
|
-
var
|
|
1611
|
+
o(this, "applyCert", (e, t) => c(this, null, function* () {
|
|
1612
|
+
var r;
|
|
1617
1613
|
const n = yield this.getUKey(t), i = yield this.getUKeyInfo(n);
|
|
1618
|
-
return yield (
|
|
1614
|
+
return yield (r = this.coreInstance) == null ? void 0 : r.applyCert(v(E({}, e != null ? e : {}), {
|
|
1619
1615
|
manu: i == null ? void 0 : i.manu,
|
|
1620
1616
|
sn: i == null ? void 0 : i.sn,
|
|
1621
1617
|
ContainerName: i == null ? void 0 : i.keyid
|
|
1622
1618
|
}));
|
|
1623
1619
|
}));
|
|
1624
|
-
o(this, "resetPin", (e, t) =>
|
|
1625
|
-
var
|
|
1620
|
+
o(this, "resetPin", (e, t) => c(this, null, function* () {
|
|
1621
|
+
var a;
|
|
1626
1622
|
const n = yield this.getSignatureCert(t);
|
|
1627
|
-
return yield (
|
|
1623
|
+
return yield (a = this.coreInstance) == null ? void 0 : a.resetPin(v(E({}, e != null ? e : {}), {
|
|
1628
1624
|
manu: n == null ? void 0 : n.manu,
|
|
1629
1625
|
sn: n == null ? void 0 : n.sn,
|
|
1630
1626
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
@@ -1635,19 +1631,19 @@ const $ = class $ {
|
|
|
1635
1631
|
};
|
|
1636
1632
|
o($, "instance", null);
|
|
1637
1633
|
let H = $;
|
|
1638
|
-
function
|
|
1634
|
+
function Pt(s) {
|
|
1639
1635
|
return new Promise((e, t) => {
|
|
1640
1636
|
if (H.instance && !(s != null && s.isCreateNew))
|
|
1641
1637
|
e(H.instance);
|
|
1642
1638
|
else {
|
|
1643
1639
|
const n = new H(v(E({}, s != null ? s : {}), {
|
|
1644
1640
|
onOpen(i) {
|
|
1645
|
-
var
|
|
1646
|
-
e(n), (
|
|
1641
|
+
var a;
|
|
1642
|
+
e(n), (a = s == null ? void 0 : s.onOpen) == null || a.call(s, i);
|
|
1647
1643
|
},
|
|
1648
1644
|
onClose(i) {
|
|
1649
|
-
var
|
|
1650
|
-
t(i), (
|
|
1645
|
+
var a;
|
|
1646
|
+
t(i), (a = s == null ? void 0 : s.onClose) == null || a.call(s, i);
|
|
1651
1647
|
}
|
|
1652
1648
|
}));
|
|
1653
1649
|
}
|
|
@@ -1655,5 +1651,5 @@ function At(s) {
|
|
|
1655
1651
|
}
|
|
1656
1652
|
export {
|
|
1657
1653
|
H as GwsService,
|
|
1658
|
-
|
|
1654
|
+
Pt as createService
|
|
1659
1655
|
};
|