gws-client 1.2.1 → 1.2.2
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 +3 -2
- package/dist/index.es.js +240 -236
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -2,41 +2,41 @@ var Ne = Object.defineProperty, xe = Object.defineProperties;
|
|
|
2
2
|
var $e = Object.getOwnPropertyDescriptors;
|
|
3
3
|
var re = Object.getOwnPropertySymbols;
|
|
4
4
|
var Te = Object.prototype.hasOwnProperty, Me = Object.prototype.propertyIsEnumerable;
|
|
5
|
-
var J = (s, e, t) => e in s ? Ne(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t,
|
|
5
|
+
var J = (s, e, t) => e in s ? Ne(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, m = (s, e) => {
|
|
6
6
|
for (var t in e || (e = {}))
|
|
7
7
|
Te.call(e, t) && J(s, t, e[t]);
|
|
8
8
|
if (re)
|
|
9
9
|
for (var t of re(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
14
|
var l = (s, e, t) => new Promise((n, i) => {
|
|
15
|
-
var r = (
|
|
15
|
+
var r = (d) => {
|
|
16
16
|
try {
|
|
17
|
-
c(t.next(
|
|
18
|
-
} catch (
|
|
19
|
-
i(
|
|
17
|
+
c(t.next(d));
|
|
18
|
+
} catch (u) {
|
|
19
|
+
i(u);
|
|
20
20
|
}
|
|
21
|
-
}, a = (
|
|
21
|
+
}, a = (d) => {
|
|
22
22
|
try {
|
|
23
|
-
c(t.throw(
|
|
24
|
-
} catch (
|
|
25
|
-
i(
|
|
23
|
+
c(t.throw(d));
|
|
24
|
+
} catch (u) {
|
|
25
|
+
i(u);
|
|
26
26
|
}
|
|
27
|
-
}, c = (
|
|
27
|
+
}, c = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(r, a);
|
|
28
28
|
c((t = t.apply(s, e)).next());
|
|
29
29
|
});
|
|
30
30
|
const Oe = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527", ae = "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
|
-
const
|
|
32
|
+
const _ = {
|
|
33
33
|
LEVEL_1: 1,
|
|
34
34
|
LEVEL_2: 2,
|
|
35
35
|
LEVEL_3: 4
|
|
36
36
|
}, Ze = {
|
|
37
|
-
OPEN:
|
|
38
|
-
INTERNAL:
|
|
39
|
-
OMP:
|
|
37
|
+
OPEN: _.LEVEL_1,
|
|
38
|
+
INTERNAL: _.LEVEL_2 | _.LEVEL_1,
|
|
39
|
+
OMP: _.LEVEL_3 | _.LEVEL_2 | _.LEVEL_1
|
|
40
40
|
}, He = "00000001", q = "NO_SEAL_AVAILABLE", Ue = "CERTIFICATE_NOT_FOUND", je = "CLIENT_CONNECTION_FAILED", Ke = "ACCESS_DENIED", ce = [
|
|
41
41
|
{
|
|
42
42
|
oid: "1.2.86.21.1.3",
|
|
@@ -57,53 +57,53 @@ function Re(s) {
|
|
|
57
57
|
var O = {}, le;
|
|
58
58
|
function ze() {
|
|
59
59
|
if (le) return O;
|
|
60
|
-
le = 1, O.byteLength = c, O.toByteArray =
|
|
60
|
+
le = 1, O.byteLength = c, O.toByteArray = u, O.fromByteArray = w;
|
|
61
61
|
for (var s = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, r = n.length; i < r; ++i)
|
|
62
62
|
s[i] = n[i], e[n.charCodeAt(i)] = i;
|
|
63
63
|
e[45] = 62, e[95] = 63;
|
|
64
64
|
function a(g) {
|
|
65
|
-
var
|
|
66
|
-
if (
|
|
65
|
+
var f = g.length;
|
|
66
|
+
if (f % 4 > 0)
|
|
67
67
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
68
|
-
var
|
|
69
|
-
|
|
70
|
-
var y =
|
|
71
|
-
return [
|
|
68
|
+
var E = g.indexOf("=");
|
|
69
|
+
E === -1 && (E = f);
|
|
70
|
+
var y = E === f ? 0 : 4 - E % 4;
|
|
71
|
+
return [E, y];
|
|
72
72
|
}
|
|
73
73
|
function c(g) {
|
|
74
|
-
var
|
|
75
|
-
return (
|
|
74
|
+
var f = a(g), E = f[0], y = f[1];
|
|
75
|
+
return (E + y) * 3 / 4 - y;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return (
|
|
77
|
+
function d(g, f, E) {
|
|
78
|
+
return (f + E) * 3 / 4 - E;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
var
|
|
82
|
-
for (I = 0; I <
|
|
83
|
-
|
|
84
|
-
return S === 2 && (
|
|
80
|
+
function u(g) {
|
|
81
|
+
var f, E = a(g), y = E[0], S = E[1], k = new t(d(g, y, S)), p = 0, A = S > 0 ? y - 4 : y, I;
|
|
82
|
+
for (I = 0; I < A; I += 4)
|
|
83
|
+
f = e[g.charCodeAt(I)] << 18 | e[g.charCodeAt(I + 1)] << 12 | e[g.charCodeAt(I + 2)] << 6 | e[g.charCodeAt(I + 3)], k[p++] = f >> 16 & 255, k[p++] = f >> 8 & 255, k[p++] = f & 255;
|
|
84
|
+
return S === 2 && (f = e[g.charCodeAt(I)] << 2 | e[g.charCodeAt(I + 1)] >> 4, k[p++] = f & 255), S === 1 && (f = e[g.charCodeAt(I)] << 10 | e[g.charCodeAt(I + 1)] << 4 | e[g.charCodeAt(I + 2)] >> 2, k[p++] = f >> 8 & 255, k[p++] = f & 255), k;
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function C(g) {
|
|
87
87
|
return s[g >> 18 & 63] + s[g >> 12 & 63] + s[g >> 6 & 63] + s[g & 63];
|
|
88
88
|
}
|
|
89
|
-
function h(g,
|
|
90
|
-
for (var y, S = [], k =
|
|
91
|
-
y = (g[k] << 16 & 16711680) + (g[k + 1] << 8 & 65280) + (g[k + 2] & 255), S.push(
|
|
89
|
+
function h(g, f, E) {
|
|
90
|
+
for (var y, S = [], k = f; k < E; k += 3)
|
|
91
|
+
y = (g[k] << 16 & 16711680) + (g[k + 1] << 8 & 65280) + (g[k + 2] & 255), S.push(C(y));
|
|
92
92
|
return S.join("");
|
|
93
93
|
}
|
|
94
94
|
function w(g) {
|
|
95
|
-
for (var
|
|
96
|
-
S.push(h(g,
|
|
97
|
-
return y === 1 ? (
|
|
98
|
-
s[
|
|
99
|
-
)) : y === 2 && (
|
|
100
|
-
s[
|
|
95
|
+
for (var f, E = g.length, y = E % 3, S = [], k = 16383, p = 0, A = E - y; p < A; p += k)
|
|
96
|
+
S.push(h(g, p, p + k > A ? A : p + k));
|
|
97
|
+
return y === 1 ? (f = g[E - 1], S.push(
|
|
98
|
+
s[f >> 2] + s[f << 4 & 63] + "=="
|
|
99
|
+
)) : y === 2 && (f = (g[E - 2] << 8) + g[E - 1], S.push(
|
|
100
|
+
s[f >> 10] + s[f >> 4 & 63] + s[f << 2 & 63] + "="
|
|
101
101
|
)), S.join("");
|
|
102
102
|
}
|
|
103
103
|
return O;
|
|
104
104
|
}
|
|
105
105
|
var Ye = ze();
|
|
106
|
-
const
|
|
106
|
+
const ue = /* @__PURE__ */ Re(Ye);
|
|
107
107
|
class Qe {
|
|
108
108
|
constructor() {
|
|
109
109
|
o(this, "deps", /* @__PURE__ */ new Map());
|
|
@@ -124,7 +124,7 @@ class Qe {
|
|
|
124
124
|
console.error("vite-plugin-css-injected-by-js", e);
|
|
125
125
|
}
|
|
126
126
|
})();
|
|
127
|
-
var We = Object.defineProperty, Je = (s, e, t) => e in s ? We(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t,
|
|
127
|
+
var We = Object.defineProperty, Je = (s, e, t) => e in s ? We(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, de = (s, e, t) => Je(s, typeof e != "symbol" ? e + "" : e, t);
|
|
128
128
|
function ee() {
|
|
129
129
|
}
|
|
130
130
|
function qe(s, e) {
|
|
@@ -222,7 +222,7 @@ 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 P(s, e, t) {
|
|
226
226
|
t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t);
|
|
227
227
|
}
|
|
228
228
|
function rt(s) {
|
|
@@ -287,14 +287,14 @@ function lt(s) {
|
|
|
287
287
|
M.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), M = e;
|
|
288
288
|
}
|
|
289
289
|
const z = /* @__PURE__ */ new Set();
|
|
290
|
-
let
|
|
290
|
+
let ut;
|
|
291
291
|
function ie(s, e) {
|
|
292
292
|
s && s.i && (z.delete(s), s.i(e));
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Be(s, e, t, n) {
|
|
295
295
|
if (s && s.o) {
|
|
296
296
|
if (z.has(s)) return;
|
|
297
|
-
z.add(s),
|
|
297
|
+
z.add(s), ut.c.push(() => {
|
|
298
298
|
z.delete(s);
|
|
299
299
|
}), s.o(e);
|
|
300
300
|
}
|
|
@@ -302,17 +302,17 @@ function Pe(s, e, t, n) {
|
|
|
302
302
|
function Q(s) {
|
|
303
303
|
return (s == null ? void 0 : s.length) !== void 0 ? s : Array.from(s);
|
|
304
304
|
}
|
|
305
|
-
function
|
|
305
|
+
function dt(s) {
|
|
306
306
|
s && s.c();
|
|
307
307
|
}
|
|
308
|
-
function
|
|
308
|
+
function Pe(s, e, t) {
|
|
309
309
|
const { fragment: n, after_update: i } = s.$$;
|
|
310
310
|
n && n.m(e, t), ne(() => {
|
|
311
311
|
const r = s.$$.on_mount.map(ke).filter(V);
|
|
312
312
|
s.$$.on_destroy ? s.$$.on_destroy.push(...r) : U(r), s.$$.on_mount = [];
|
|
313
313
|
}), i.forEach(ne);
|
|
314
314
|
}
|
|
315
|
-
function
|
|
315
|
+
function Ae(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
|
}
|
|
@@ -320,9 +320,9 @@ 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
322
|
function De(s, e, t, n, i, r, a = null, c = [-1]) {
|
|
323
|
-
const
|
|
323
|
+
const d = se;
|
|
324
324
|
Z(s);
|
|
325
|
-
const
|
|
325
|
+
const u = s.$$ = {
|
|
326
326
|
fragment: null,
|
|
327
327
|
ctx: [],
|
|
328
328
|
// state
|
|
@@ -336,35 +336,35 @@ function De(s, e, t, n, i, r, a = null, c = [-1]) {
|
|
|
336
336
|
on_disconnect: [],
|
|
337
337
|
before_update: [],
|
|
338
338
|
after_update: [],
|
|
339
|
-
context: new Map(e.context || (
|
|
339
|
+
context: new Map(e.context || (d ? d.$$.context : [])),
|
|
340
340
|
// everything else
|
|
341
341
|
callbacks: he(),
|
|
342
342
|
dirty: c,
|
|
343
343
|
skip_bound: !1,
|
|
344
|
-
root: e.target ||
|
|
344
|
+
root: e.target || d.$$.root
|
|
345
345
|
};
|
|
346
|
-
a && a(
|
|
347
|
-
let
|
|
348
|
-
if (
|
|
349
|
-
const
|
|
350
|
-
return
|
|
351
|
-
}) : [],
|
|
346
|
+
a && a(u.root);
|
|
347
|
+
let C = !1;
|
|
348
|
+
if (u.ctx = t ? t(s, e.props || {}, (h, w, ...g) => {
|
|
349
|
+
const f = g.length ? g[0] : w;
|
|
350
|
+
return u.ctx && i(u.ctx[h], u.ctx[h] = f) && (!u.skip_bound && u.bound[h] && u.bound[h](f), C && ht(s, h)), w;
|
|
351
|
+
}) : [], u.update(), C = !0, U(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
|
|
352
352
|
if (e.hydrate) {
|
|
353
353
|
const h = rt(e.target);
|
|
354
|
-
|
|
354
|
+
u.fragment && u.fragment.l(h), h.forEach(j);
|
|
355
355
|
} else
|
|
356
|
-
|
|
357
|
-
e.intro && ie(s.$$.fragment),
|
|
356
|
+
u.fragment && u.fragment.c();
|
|
357
|
+
e.intro && ie(s.$$.fragment), Pe(s, e.target, e.anchor), Le();
|
|
358
358
|
}
|
|
359
|
-
Z(
|
|
359
|
+
Z(d);
|
|
360
360
|
}
|
|
361
361
|
class be {
|
|
362
362
|
constructor() {
|
|
363
|
-
|
|
363
|
+
de(this, "$$"), de(this, "$$set");
|
|
364
364
|
}
|
|
365
365
|
/** @returns {void} */
|
|
366
366
|
$destroy() {
|
|
367
|
-
|
|
367
|
+
Ae(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
|
-
), r, a, c,
|
|
398
|
+
), r, a, c, d, u, C, h = (
|
|
399
399
|
/*cancelText*/
|
|
400
400
|
(s[4] || "取消") + ""
|
|
401
|
-
), w, g,
|
|
401
|
+
), w, g, f, E = (
|
|
402
402
|
/*okText*/
|
|
403
403
|
(s[5] || "确认") + ""
|
|
404
|
-
), y, S, k,
|
|
405
|
-
const
|
|
404
|
+
), y, S, k, p;
|
|
405
|
+
const A = (
|
|
406
406
|
/*#slots*/
|
|
407
407
|
s[8].default
|
|
408
408
|
), I = et(
|
|
409
|
-
|
|
409
|
+
A,
|
|
410
410
|
s,
|
|
411
411
|
/*$$scope*/
|
|
412
412
|
s[7],
|
|
@@ -414,22 +414,22 @@ function yt(s) {
|
|
|
414
414
|
);
|
|
415
415
|
return {
|
|
416
416
|
c() {
|
|
417
|
-
e = D("div"), t = D("div"), n = D("div"), r = T(i), a = K(), c = D("div"), I && I.c(),
|
|
418
|
-
|
|
417
|
+
e = D("div"), t = D("div"), n = D("div"), r = T(i), a = K(), c = D("div"), I && I.c(), d = K(), u = D("div"), C = D("button"), w = T(h), g = K(), f = D("button"), y = T(E), P(n, "class", "model-title svelte-16iv9d0"), P(c, "class", "slot svelte-16iv9d0"), P(C, "class", "modal-btn svelte-16iv9d0"), P(f, "class", "modal-btn success svelte-16iv9d0"), Y(
|
|
418
|
+
f,
|
|
419
419
|
"background-color",
|
|
420
420
|
/*theme*/
|
|
421
421
|
s[6]
|
|
422
|
-
),
|
|
422
|
+
), P(u, "class", "modal-footer svelte-16iv9d0"), P(t, "class", "modal-content svelte-16iv9d0"), P(e, "class", "modal-background modal-visible svelte-16iv9d0");
|
|
423
423
|
},
|
|
424
|
-
m(
|
|
425
|
-
W(
|
|
426
|
-
F(
|
|
424
|
+
m(B, b) {
|
|
425
|
+
W(B, e, b), L(e, t), L(t, n), L(n, r), L(t, a), L(t, c), I && I.m(c, null), L(t, d), L(t, u), L(u, C), L(C, w), L(u, g), L(u, f), L(f, y), S = !0, k || (p = [
|
|
426
|
+
F(C, "click", function() {
|
|
427
427
|
V(
|
|
428
428
|
/*onCancel*/
|
|
429
429
|
s[0]
|
|
430
430
|
) && s[0].apply(this, arguments);
|
|
431
431
|
}),
|
|
432
|
-
F(
|
|
432
|
+
F(f, "click", function() {
|
|
433
433
|
V(
|
|
434
434
|
/*onOk*/
|
|
435
435
|
s[2]
|
|
@@ -444,18 +444,18 @@ function yt(s) {
|
|
|
444
444
|
})
|
|
445
445
|
], k = !0);
|
|
446
446
|
},
|
|
447
|
-
p(
|
|
448
|
-
s =
|
|
447
|
+
p(B, [b]) {
|
|
448
|
+
s = B, (!S || b & /*title*/
|
|
449
449
|
2) && i !== (i = /*title*/
|
|
450
450
|
(s[1] || "标题") + "") && R(r, i), I && I.p && (!S || b & /*$$scope*/
|
|
451
451
|
128) && nt(
|
|
452
452
|
I,
|
|
453
|
-
|
|
453
|
+
A,
|
|
454
454
|
s,
|
|
455
455
|
/*$$scope*/
|
|
456
456
|
s[7],
|
|
457
457
|
S ? tt(
|
|
458
|
-
|
|
458
|
+
A,
|
|
459
459
|
/*$$scope*/
|
|
460
460
|
s[7],
|
|
461
461
|
b,
|
|
@@ -468,32 +468,32 @@ function yt(s) {
|
|
|
468
468
|
), (!S || b & /*cancelText*/
|
|
469
469
|
16) && h !== (h = /*cancelText*/
|
|
470
470
|
(s[4] || "取消") + "") && R(w, h), (!S || b & /*okText*/
|
|
471
|
-
32) &&
|
|
472
|
-
(s[5] || "确认") + "") && R(y,
|
|
471
|
+
32) && E !== (E = /*okText*/
|
|
472
|
+
(s[5] || "确认") + "") && R(y, E), (!S || b & /*theme*/
|
|
473
473
|
64) && Y(
|
|
474
|
-
|
|
474
|
+
f,
|
|
475
475
|
"background-color",
|
|
476
476
|
/*theme*/
|
|
477
477
|
s[6]
|
|
478
478
|
);
|
|
479
479
|
},
|
|
480
|
-
i(
|
|
481
|
-
S || (ie(I,
|
|
480
|
+
i(B) {
|
|
481
|
+
S || (ie(I, B), S = !0);
|
|
482
482
|
},
|
|
483
|
-
o(
|
|
484
|
-
|
|
483
|
+
o(B) {
|
|
484
|
+
Be(I, B), S = !1;
|
|
485
485
|
},
|
|
486
|
-
d(
|
|
487
|
-
|
|
486
|
+
d(B) {
|
|
487
|
+
B && j(e), I && I.d(B), k = !1, U(p);
|
|
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: r } = e, { title: a } = e, { onOk: c } = e, { onClose:
|
|
493
|
+
let { $$slots: n = {}, $$scope: i } = e, { onCancel: r } = e, { title: a } = e, { onOk: c } = 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, r = w.onCancel), "title" in w && t(1, a = w.title), "onOk" in w && t(2, c = w.onOk), "onClose" in w && t(3,
|
|
496
|
-
}, [r, a, c,
|
|
495
|
+
"onCancel" in w && t(0, r = w.onCancel), "title" in w && t(1, a = w.title), "onOk" in w && t(2, c = 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
|
+
}, [r, a, c, d, u, C, h, i, n];
|
|
497
497
|
}
|
|
498
498
|
class wt extends be {
|
|
499
499
|
constructor(e) {
|
|
@@ -516,7 +516,7 @@ function we(s, e, t) {
|
|
|
516
516
|
const n = s.slice();
|
|
517
517
|
return n[16] = e[t], n;
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function me(s) {
|
|
520
520
|
let e, t = (
|
|
521
521
|
/*col*/
|
|
522
522
|
(s[16].format ? (
|
|
@@ -535,7 +535,7 @@ function Ee(s) {
|
|
|
535
535
|
), n;
|
|
536
536
|
return {
|
|
537
537
|
c() {
|
|
538
|
-
e = D("div"), n = T(t),
|
|
538
|
+
e = D("div"), n = T(t), P(e, "class", "svelte-1kh75ag"), Y(e, "width", `${100 / /*columns*/
|
|
539
539
|
s[1].length}%`);
|
|
540
540
|
},
|
|
541
541
|
m(i, r) {
|
|
@@ -565,14 +565,14 @@ function Ee(s) {
|
|
|
565
565
|
}
|
|
566
566
|
};
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function Ee(s) {
|
|
569
569
|
let e, t, n, i, r, a = Q(
|
|
570
570
|
/*columns*/
|
|
571
571
|
s[1]
|
|
572
572
|
), c = [];
|
|
573
|
-
for (let
|
|
574
|
-
c[
|
|
575
|
-
function
|
|
573
|
+
for (let u = 0; u < a.length; u += 1)
|
|
574
|
+
c[u] = me(we(s, a, u));
|
|
575
|
+
function d() {
|
|
576
576
|
return (
|
|
577
577
|
/*click_handler*/
|
|
578
578
|
s[12](
|
|
@@ -584,21 +584,21 @@ function me(s) {
|
|
|
584
584
|
return {
|
|
585
585
|
c() {
|
|
586
586
|
e = D("div");
|
|
587
|
-
for (let
|
|
588
|
-
c[
|
|
589
|
-
t = K(),
|
|
587
|
+
for (let u = 0; u < c.length; u += 1)
|
|
588
|
+
c[u].c();
|
|
589
|
+
t = K(), P(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
|
-
m(
|
|
595
|
-
W(
|
|
594
|
+
m(u, C) {
|
|
595
|
+
W(u, e, C);
|
|
596
596
|
for (let h = 0; h < c.length; h += 1)
|
|
597
597
|
c[h] && c[h].m(e, null);
|
|
598
|
-
L(e, t), i || (r = F(e, "click",
|
|
598
|
+
L(e, t), i || (r = F(e, "click", d), i = !0);
|
|
599
599
|
},
|
|
600
|
-
p(
|
|
601
|
-
if (s =
|
|
600
|
+
p(u, C) {
|
|
601
|
+
if (s = u, C & /*columns, data*/
|
|
602
602
|
3) {
|
|
603
603
|
a = Q(
|
|
604
604
|
/*columns*/
|
|
@@ -607,30 +607,30 @@ function me(s) {
|
|
|
607
607
|
let h;
|
|
608
608
|
for (h = 0; h < a.length; h += 1) {
|
|
609
609
|
const w = we(s, a, h);
|
|
610
|
-
c[h] ? c[h].p(w,
|
|
610
|
+
c[h] ? c[h].p(w, C) : (c[h] = me(w), c[h].c(), c[h].m(e, t));
|
|
611
611
|
}
|
|
612
612
|
for (; h < c.length; h += 1)
|
|
613
613
|
c[h].d(1);
|
|
614
614
|
c.length = a.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") && P(e, "class", n);
|
|
621
621
|
},
|
|
622
|
-
d(
|
|
623
|
-
|
|
622
|
+
d(u) {
|
|
623
|
+
u && j(e), pe(c, u), i = !1, r();
|
|
624
624
|
}
|
|
625
625
|
};
|
|
626
626
|
}
|
|
627
|
-
function
|
|
627
|
+
function mt(s) {
|
|
628
628
|
let e, t = Q(
|
|
629
629
|
/*data*/
|
|
630
630
|
s[0]
|
|
631
631
|
), n = [];
|
|
632
632
|
for (let i = 0; i < t.length; i += 1)
|
|
633
|
-
n[i] =
|
|
633
|
+
n[i] = Ee(fe(s, t, i));
|
|
634
634
|
return {
|
|
635
635
|
c() {
|
|
636
636
|
for (let i = 0; i < n.length; i += 1)
|
|
@@ -652,7 +652,7 @@ function Et(s) {
|
|
|
652
652
|
let a;
|
|
653
653
|
for (a = 0; a < t.length; a += 1) {
|
|
654
654
|
const c = fe(i, t, a);
|
|
655
|
-
n[a] ? n[a].p(c, r) : (n[a] =
|
|
655
|
+
n[a] ? n[a].p(c, r) : (n[a] = Ee(c), n[a].c(), n[a].m(e.parentNode, e));
|
|
656
656
|
}
|
|
657
657
|
for (; a < n.length; a += 1)
|
|
658
658
|
n[a].d(1);
|
|
@@ -664,7 +664,7 @@ function Et(s) {
|
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
666
|
}
|
|
667
|
-
function
|
|
667
|
+
function Et(s) {
|
|
668
668
|
let e, t;
|
|
669
669
|
return e = new wt({
|
|
670
670
|
props: {
|
|
@@ -696,15 +696,15 @@ function mt(s) {
|
|
|
696
696
|
/*theme*/
|
|
697
697
|
s[5]
|
|
698
698
|
),
|
|
699
|
-
$$slots: { default: [
|
|
699
|
+
$$slots: { default: [mt] },
|
|
700
700
|
$$scope: { ctx: s }
|
|
701
701
|
}
|
|
702
702
|
}), {
|
|
703
703
|
c() {
|
|
704
|
-
|
|
704
|
+
dt(e.$$.fragment);
|
|
705
705
|
},
|
|
706
706
|
m(n, i) {
|
|
707
|
-
|
|
707
|
+
Pe(e, n, i), t = !0;
|
|
708
708
|
},
|
|
709
709
|
p(n, [i]) {
|
|
710
710
|
const r = {};
|
|
@@ -725,41 +725,41 @@ function mt(s) {
|
|
|
725
725
|
t || (ie(e.$$.fragment, n), t = !0);
|
|
726
726
|
},
|
|
727
727
|
o(n) {
|
|
728
|
-
|
|
728
|
+
Be(e.$$.fragment, n), t = !1;
|
|
729
729
|
},
|
|
730
730
|
d(n) {
|
|
731
|
-
|
|
731
|
+
Ae(e, n);
|
|
732
732
|
}
|
|
733
733
|
};
|
|
734
734
|
}
|
|
735
735
|
function St(s, e, t) {
|
|
736
|
-
let { data: n = [] } = e, { columns: i = [] } = e, { onCancel: r } = e, { onOk: a } = e, { onClose: c } = e, { cancelText:
|
|
736
|
+
let { data: n = [] } = e, { columns: i = [] } = e, { onCancel: r } = e, { onOk: a } = e, { onClose: c } = e, { cancelText: d = "" } = e, { okText: u = "" } = e, { theme: C = "#409eff" } = e, { title: h = "" } = e, w = 0;
|
|
737
737
|
const g = () => {
|
|
738
738
|
r(`${h}失败`), c == null || c();
|
|
739
|
-
},
|
|
739
|
+
}, f = () => {
|
|
740
740
|
a == null || a(n[w]), c == null || c();
|
|
741
|
-
},
|
|
741
|
+
}, E = (y) => t(7, w = y);
|
|
742
742
|
return s.$$set = (y) => {
|
|
743
|
-
"data" in y && t(0, n = y.data), "columns" in y && t(1, i = y.columns), "onCancel" in y && t(10, r = y.onCancel), "onOk" in y && t(11, a = y.onOk), "onClose" in y && t(2, c = y.onClose), "cancelText" in y && t(3,
|
|
743
|
+
"data" in y && t(0, n = y.data), "columns" in y && t(1, i = y.columns), "onCancel" in y && t(10, r = y.onCancel), "onOk" in y && t(11, a = y.onOk), "onClose" in y && t(2, c = y.onClose), "cancelText" in y && t(3, d = y.cancelText), "okText" in y && t(4, u = y.okText), "theme" in y && t(5, C = y.theme), "title" in y && t(6, h = y.title);
|
|
744
744
|
}, [
|
|
745
745
|
n,
|
|
746
746
|
i,
|
|
747
747
|
c,
|
|
748
|
-
u,
|
|
749
748
|
d,
|
|
750
|
-
|
|
749
|
+
u,
|
|
750
|
+
C,
|
|
751
751
|
h,
|
|
752
752
|
w,
|
|
753
753
|
g,
|
|
754
|
-
|
|
754
|
+
f,
|
|
755
755
|
r,
|
|
756
756
|
a,
|
|
757
|
-
|
|
757
|
+
E
|
|
758
758
|
];
|
|
759
759
|
}
|
|
760
760
|
class It extends be {
|
|
761
761
|
constructor(e) {
|
|
762
|
-
super(), De(this, e, St,
|
|
762
|
+
super(), De(this, e, St, Et, ve, {
|
|
763
763
|
data: 0,
|
|
764
764
|
columns: 1,
|
|
765
765
|
onCancel: 10,
|
|
@@ -778,7 +778,7 @@ class kt {
|
|
|
778
778
|
o(this, "open", (e) => new Promise((t, n) => {
|
|
779
779
|
this.modalInstance.current = new It({
|
|
780
780
|
target: document.body,
|
|
781
|
-
props:
|
|
781
|
+
props: v(m({}, e), {
|
|
782
782
|
onCancel: (i) => {
|
|
783
783
|
n({
|
|
784
784
|
code: -1,
|
|
@@ -844,7 +844,7 @@ const _t = [
|
|
|
844
844
|
key: "sn"
|
|
845
845
|
}
|
|
846
846
|
];
|
|
847
|
-
class
|
|
847
|
+
class Bt {
|
|
848
848
|
constructor(e) {
|
|
849
849
|
o(this, "socketInstance", null);
|
|
850
850
|
o(this, "eventBus", new Qe());
|
|
@@ -873,14 +873,14 @@ class Pt {
|
|
|
873
873
|
});
|
|
874
874
|
return;
|
|
875
875
|
}
|
|
876
|
-
const
|
|
876
|
+
const d = vt(), u = (g) => {
|
|
877
877
|
g.success ? i(g.data) : r(g);
|
|
878
|
-
},
|
|
878
|
+
}, C = {
|
|
879
879
|
function: e,
|
|
880
880
|
args: t ? [t] : [],
|
|
881
|
-
msgid:
|
|
881
|
+
msgid: d
|
|
882
882
|
};
|
|
883
|
-
(w = this.socketInstance) == null || w.send(JSON.stringify(
|
|
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
|
r({
|
|
@@ -900,26 +900,26 @@ class Pt {
|
|
|
900
900
|
(e = this.messageQueue) == null || e.forEach((t) => t()), this.messageQueue = [];
|
|
901
901
|
});
|
|
902
902
|
o(this, "handleEventData", (e) => l(this, null, function* () {
|
|
903
|
-
var t, n, i, r, a, c,
|
|
903
|
+
var t, n, i, r, a, c, d, u;
|
|
904
904
|
if (e.data instanceof Blob) {
|
|
905
|
-
const
|
|
905
|
+
const C = yield e.data.arrayBuffer(), w = new TextDecoder(
|
|
906
906
|
navigator.userAgent.includes("Windows") ? "gbk" : "utf-8"
|
|
907
|
-
).decode(
|
|
907
|
+
).decode(C), g = JSON.parse(w), f = {
|
|
908
908
|
success: (t = g.result) == null ? void 0 : t.success,
|
|
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
912
|
type: (r = g.result) == null ? void 0 : r.event
|
|
913
|
-
},
|
|
914
|
-
y ? this.eventBus.emit(y,
|
|
913
|
+
}, E = (a = g.result) == null ? void 0 : a.function, y = (c = g.result) == null ? void 0 : c.msgid;
|
|
914
|
+
y ? this.eventBus.emit(y, f) : this.eventBus.emit(E, f), (u = (d = this.socketConfig) == null ? void 0 : d.onMessage) == null || u.call(d, f);
|
|
915
915
|
}
|
|
916
916
|
}));
|
|
917
917
|
o(this, "base64Encode", (e) => {
|
|
918
918
|
const t = new TextEncoder().encode(e);
|
|
919
|
-
return
|
|
919
|
+
return ue.fromByteArray(t);
|
|
920
920
|
});
|
|
921
921
|
o(this, "base64Decode", (e) => {
|
|
922
|
-
const t =
|
|
922
|
+
const t = ue.toByteArray(e);
|
|
923
923
|
return new TextDecoder().decode(t);
|
|
924
924
|
});
|
|
925
925
|
o(this, "changeIsRememberPin", (e) => l(this, null, function* () {
|
|
@@ -938,7 +938,7 @@ class Pt {
|
|
|
938
938
|
"GZCA_OnDeviceChange",
|
|
939
939
|
(e) => {
|
|
940
940
|
var t, n, i;
|
|
941
|
-
(i = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || i.call(t,
|
|
941
|
+
(i = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || i.call(t, v(m({}, e), {
|
|
942
942
|
data: (n = e.data) == null ? void 0 : n[0]
|
|
943
943
|
}));
|
|
944
944
|
}
|
|
@@ -988,19 +988,19 @@ class Pt {
|
|
|
988
988
|
);
|
|
989
989
|
}));
|
|
990
990
|
o(this, "pkcs1Sign", (e) => l(this, null, function* () {
|
|
991
|
-
return yield this.sendMessage("GZCA_Pkcs1SignData",
|
|
991
|
+
return yield this.sendMessage("GZCA_Pkcs1SignData", m({
|
|
992
992
|
IsLogin: this.getIsLogin(),
|
|
993
993
|
PinPolicy: this.pinPolicy
|
|
994
994
|
}, e != null ? e : {}));
|
|
995
995
|
}));
|
|
996
996
|
o(this, "pkcs1Base64Sign", (e) => l(this, null, function* () {
|
|
997
|
-
return yield this.sendMessage("GZCA_Pkcs1SignDataEx",
|
|
997
|
+
return yield this.sendMessage("GZCA_Pkcs1SignDataEx", m({
|
|
998
998
|
IsLogin: this.getIsLogin(),
|
|
999
999
|
PinPolicy: this.pinPolicy
|
|
1000
1000
|
}, e != null ? e : {}));
|
|
1001
1001
|
}));
|
|
1002
1002
|
o(this, "batchPkcs1Base64Sign", (e) => l(this, null, function* () {
|
|
1003
|
-
return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx",
|
|
1003
|
+
return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", m({
|
|
1004
1004
|
IsLogin: this.getIsLogin(),
|
|
1005
1005
|
PinPolicy: this.pinPolicy
|
|
1006
1006
|
}, e != null ? e : {}));
|
|
@@ -1014,56 +1014,56 @@ class Pt {
|
|
|
1014
1014
|
o(this, "getSealList", (e) => l(this, null, function* () {
|
|
1015
1015
|
return yield this.sendMessage(
|
|
1016
1016
|
"GZCA_EnumSeals",
|
|
1017
|
-
|
|
1017
|
+
m({
|
|
1018
1018
|
IsLogin: this.getIsLogin()
|
|
1019
1019
|
}, e != null ? e : {}),
|
|
1020
|
-
|
|
1020
|
+
_.LEVEL_2
|
|
1021
1021
|
);
|
|
1022
1022
|
}));
|
|
1023
1023
|
o(this, "writeSeal", (e) => l(this, null, function* () {
|
|
1024
1024
|
return yield this.sendMessage(
|
|
1025
1025
|
"GZCA_WriteSeal",
|
|
1026
|
-
|
|
1026
|
+
m({
|
|
1027
1027
|
IsLogin: this.getIsLogin()
|
|
1028
1028
|
}, e != null ? e : {}),
|
|
1029
|
-
|
|
1029
|
+
_.LEVEL_2
|
|
1030
1030
|
);
|
|
1031
1031
|
}));
|
|
1032
1032
|
o(this, "deleteSeal", (e) => l(this, null, function* () {
|
|
1033
1033
|
return yield this.sendMessage(
|
|
1034
1034
|
"GZCA_DeleteSeal",
|
|
1035
|
-
|
|
1035
|
+
m({
|
|
1036
1036
|
IsLogin: this.getIsLogin()
|
|
1037
1037
|
}, e != null ? e : {}),
|
|
1038
|
-
|
|
1038
|
+
_.LEVEL_2
|
|
1039
1039
|
);
|
|
1040
1040
|
}));
|
|
1041
1041
|
o(this, "getSealInfo", (e) => l(this, null, function* () {
|
|
1042
1042
|
return yield this.sendMessage(
|
|
1043
1043
|
"GZCA_ReadSeal",
|
|
1044
|
-
|
|
1044
|
+
m({
|
|
1045
1045
|
IsLogin: this.getIsLogin()
|
|
1046
1046
|
}, e != null ? e : {}),
|
|
1047
|
-
|
|
1047
|
+
_.LEVEL_2
|
|
1048
1048
|
);
|
|
1049
1049
|
}));
|
|
1050
1050
|
o(this, "getTPSealList", (e) => l(this, null, function* () {
|
|
1051
1051
|
return yield this.sendMessage(
|
|
1052
1052
|
"GZCA_GetSealPicList",
|
|
1053
|
-
|
|
1053
|
+
m({
|
|
1054
1054
|
IsLogin: this.getIsLogin()
|
|
1055
1055
|
}, e != null ? e : {}),
|
|
1056
|
-
|
|
1056
|
+
_.LEVEL_2
|
|
1057
1057
|
);
|
|
1058
1058
|
}));
|
|
1059
1059
|
o(this, "getTPSealPic", (e) => l(this, null, function* () {
|
|
1060
1060
|
var n;
|
|
1061
1061
|
return yield this.sendMessage(
|
|
1062
1062
|
"GZCA_GetSealPicData",
|
|
1063
|
-
|
|
1063
|
+
m({
|
|
1064
1064
|
IsLogin: (n = e.IsLogin) != null ? n : this.getIsLogin()
|
|
1065
1065
|
}, e != null ? e : {}),
|
|
1066
|
-
|
|
1066
|
+
_.LEVEL_2
|
|
1067
1067
|
);
|
|
1068
1068
|
}));
|
|
1069
1069
|
o(this, "sm2SignPreprocess1", (e) => l(this, null, function* () {
|
|
@@ -1073,7 +1073,7 @@ class Pt {
|
|
|
1073
1073
|
return yield this.sendMessage("GZCA_PrepareSm2SignStep2", e);
|
|
1074
1074
|
}));
|
|
1075
1075
|
o(this, "pkcs1HashSign", (e) => l(this, null, function* () {
|
|
1076
|
-
return yield this.sendMessage("GZCA_Pkcs1SignDataForHash",
|
|
1076
|
+
return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", m({
|
|
1077
1077
|
IsLogin: this.getIsLogin(),
|
|
1078
1078
|
PinPolicy: this.pinPolicy
|
|
1079
1079
|
}, e != null ? e : {}));
|
|
@@ -1082,7 +1082,7 @@ class Pt {
|
|
|
1082
1082
|
return yield this.sendMessage("GZCA_Pkcs1VerifySignForHash", e);
|
|
1083
1083
|
}));
|
|
1084
1084
|
o(this, "pkcs7Sign", (e) => l(this, null, function* () {
|
|
1085
|
-
return yield this.sendMessage("GZCA_Pkcs7SignData",
|
|
1085
|
+
return yield this.sendMessage("GZCA_Pkcs7SignData", m({
|
|
1086
1086
|
IsLogin: this.getIsLogin(),
|
|
1087
1087
|
IsAuthAttr: "Y",
|
|
1088
1088
|
PinPolicy: this.pinPolicy
|
|
@@ -1107,7 +1107,7 @@ class Pt {
|
|
|
1107
1107
|
return yield this.sendMessage("GZCA_Pkcs7EncryptData", e);
|
|
1108
1108
|
}));
|
|
1109
1109
|
o(this, "pkcs7Decryption", (e) => l(this, null, function* () {
|
|
1110
|
-
return yield this.sendMessage("GZCA_Pkcs7DecryptData",
|
|
1110
|
+
return yield this.sendMessage("GZCA_Pkcs7DecryptData", m({
|
|
1111
1111
|
IsLogin: this.getIsLogin()
|
|
1112
1112
|
}, e != null ? e : {}));
|
|
1113
1113
|
}));
|
|
@@ -1115,7 +1115,7 @@ class Pt {
|
|
|
1115
1115
|
return yield this.sendMessage("GZCA_EnvelopeSealFileEx_qyzc", e);
|
|
1116
1116
|
}));
|
|
1117
1117
|
o(this, "pkcs7FileDecryption", (e) => l(this, null, function* () {
|
|
1118
|
-
return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc",
|
|
1118
|
+
return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", m({
|
|
1119
1119
|
IsLogin: this.getIsLogin()
|
|
1120
1120
|
}, e != null ? e : {}));
|
|
1121
1121
|
}));
|
|
@@ -1123,7 +1123,7 @@ class Pt {
|
|
|
1123
1123
|
return yield this.sendMessage("GZCA_AsymEncryptData", e);
|
|
1124
1124
|
}));
|
|
1125
1125
|
o(this, "asymmetricDecryption", (e) => l(this, null, function* () {
|
|
1126
|
-
return yield this.sendMessage("GZCA_AsymDecryptData",
|
|
1126
|
+
return yield this.sendMessage("GZCA_AsymDecryptData", m({
|
|
1127
1127
|
IsLogin: this.getIsLogin()
|
|
1128
1128
|
}, e != null ? e : {}));
|
|
1129
1129
|
}));
|
|
@@ -1143,16 +1143,16 @@ class Pt {
|
|
|
1143
1143
|
return yield this.sendMessage(
|
|
1144
1144
|
"GZCA_GetSealIssuer",
|
|
1145
1145
|
e,
|
|
1146
|
-
|
|
1146
|
+
_.LEVEL_2
|
|
1147
1147
|
);
|
|
1148
1148
|
}));
|
|
1149
1149
|
o(this, "deleteAllSealByVendor", (e) => l(this, null, function* () {
|
|
1150
1150
|
return yield this.sendMessage(
|
|
1151
1151
|
"GZCA_ClearSeal",
|
|
1152
|
-
|
|
1152
|
+
m({
|
|
1153
1153
|
IsLogin: this.getIsLogin()
|
|
1154
1154
|
}, e != null ? e : {}),
|
|
1155
|
-
|
|
1155
|
+
_.LEVEL_2
|
|
1156
1156
|
);
|
|
1157
1157
|
}));
|
|
1158
1158
|
o(this, "applyCert", (e) => l(this, null, function* () {
|
|
@@ -1165,28 +1165,28 @@ class Pt {
|
|
|
1165
1165
|
type: e.type,
|
|
1166
1166
|
url: e.url
|
|
1167
1167
|
},
|
|
1168
|
-
|
|
1168
|
+
_.LEVEL_3
|
|
1169
1169
|
);
|
|
1170
1170
|
}));
|
|
1171
1171
|
o(this, "resetPin", (e) => l(this, null, function* () {
|
|
1172
1172
|
return yield this.sendMessage(
|
|
1173
1173
|
"GZCA_UnblockUserPin",
|
|
1174
|
-
|
|
1175
|
-
|
|
1174
|
+
m({}, e != null ? e : {}),
|
|
1175
|
+
_.LEVEL_3
|
|
1176
1176
|
);
|
|
1177
1177
|
}));
|
|
1178
1178
|
o(this, "getUKeyList", () => l(this, null, function* () {
|
|
1179
1179
|
return yield this.sendMessage(
|
|
1180
1180
|
"GetUKeyList",
|
|
1181
1181
|
void 0,
|
|
1182
|
-
|
|
1182
|
+
_.LEVEL_3
|
|
1183
1183
|
);
|
|
1184
1184
|
}));
|
|
1185
1185
|
o(this, "getUKeyInfo", (e) => l(this, null, function* () {
|
|
1186
1186
|
return yield this.sendMessage(
|
|
1187
1187
|
"GetUKeyID",
|
|
1188
1188
|
e != null ? e : {},
|
|
1189
|
-
|
|
1189
|
+
_.LEVEL_3
|
|
1190
1190
|
);
|
|
1191
1191
|
}));
|
|
1192
1192
|
var t, n, i;
|
|
@@ -1217,14 +1217,14 @@ 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 Bt(v(m({}, e != null ? e : {}), {
|
|
1221
1221
|
url: Oe
|
|
1222
1222
|
}));
|
|
1223
1223
|
});
|
|
1224
1224
|
o(this, "appendCertBase64", (e, t = !0) => l(this, null, function* () {
|
|
1225
1225
|
if (e.CertB64) return e;
|
|
1226
1226
|
const n = t ? yield this.getSignatureCert() : yield this.getEncryptionCert();
|
|
1227
|
-
return
|
|
1227
|
+
return v(m({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
|
|
1228
1228
|
}));
|
|
1229
1229
|
o(this, "destroy", () => {
|
|
1230
1230
|
var e;
|
|
@@ -1291,7 +1291,7 @@ const $ = class $ {
|
|
|
1291
1291
|
});
|
|
1292
1292
|
o(this, "pkcs1Sign", (e, t) => l(this, null, function* () {
|
|
1293
1293
|
var r, a, c;
|
|
1294
|
-
const n = yield this.getSignatureCert(t), i = yield (a = this.coreInstance) == null ? void 0 : a.pkcs1Sign(
|
|
1294
|
+
const n = yield this.getSignatureCert(t), i = yield (a = this.coreInstance) == null ? void 0 : a.pkcs1Sign(v(m({}, e != null ? e : {}), {
|
|
1295
1295
|
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1296
1296
|
}));
|
|
1297
1297
|
return (c = i == null ? void 0 : i[0]) == null ? void 0 : c.SignData;
|
|
@@ -1302,26 +1302,26 @@ const $ = class $ {
|
|
|
1302
1302
|
return Array.isArray(n);
|
|
1303
1303
|
}));
|
|
1304
1304
|
o(this, "pkcs1Base64Sign", (e, t) => l(this, null, function* () {
|
|
1305
|
-
var a, c,
|
|
1306
|
-
const n = yield this.getSignatureCert(t), i = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), r = yield (
|
|
1307
|
-
ContainerName: (
|
|
1305
|
+
var a, c, d, u, C;
|
|
1306
|
+
const n = yield this.getSignatureCert(t), i = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs1Base64Sign(v(m({}, e != null ? e : {}), {
|
|
1307
|
+
ContainerName: (d = n == null ? void 0 : n.ContainerName) != null ? d : "",
|
|
1308
1308
|
DataB64: i
|
|
1309
1309
|
}));
|
|
1310
|
-
return (
|
|
1310
|
+
return (C = r == null ? void 0 : r[0]) == null ? void 0 : C.SignData;
|
|
1311
1311
|
}));
|
|
1312
1312
|
o(this, "batchPkcs1Base64Sign", (e, t) => l(this, null, function* () {
|
|
1313
|
-
var
|
|
1314
|
-
const n = "|", i = (h = e.DataB64) != null ? h : (
|
|
1313
|
+
var C, h, w, g, f, E;
|
|
1314
|
+
const n = "|", i = (h = e.DataB64) != null ? h : (C = e.Data) == null ? void 0 : C.map((y) => this.base64Encode({ Data: y })), r = yield this.getSignatureCert(t);
|
|
1315
1315
|
let a = "";
|
|
1316
1316
|
a = Array.isArray(i) ? i == null ? void 0 : i.map((y, S) => `${S}:${y}`).join(n) : "";
|
|
1317
1317
|
const c = yield (g = this.coreInstance) == null ? void 0 : g.batchPkcs1Base64Sign({
|
|
1318
1318
|
ContainerName: (w = r == null ? void 0 : r.ContainerName) != null ? w : "",
|
|
1319
1319
|
DataB64: a
|
|
1320
|
-
}),
|
|
1321
|
-
return
|
|
1322
|
-
const S = y.split(":"), k = Number(S[0]),
|
|
1323
|
-
|
|
1324
|
-
}),
|
|
1320
|
+
}), d = (E = (f = c == null ? void 0 : c[0]) == null ? void 0 : f.SignData) == null ? void 0 : E.split(n), u = [];
|
|
1321
|
+
return d.forEach((y) => {
|
|
1322
|
+
const S = y.split(":"), k = Number(S[0]), p = S[1];
|
|
1323
|
+
u[k] = p;
|
|
1324
|
+
}), u;
|
|
1325
1325
|
}));
|
|
1326
1326
|
o(this, "pkcs1Base64VerifySignature", (e) => l(this, null, function* () {
|
|
1327
1327
|
var r, a, c;
|
|
@@ -1335,33 +1335,36 @@ const $ = class $ {
|
|
|
1335
1335
|
o(this, "writeSeal", (e, t) => l(this, null, function* () {
|
|
1336
1336
|
var r, a;
|
|
1337
1337
|
const n = yield this.getSignatureCert(t);
|
|
1338
|
-
return !!(yield (a = this.coreInstance) == null ? void 0 : a.writeSeal(
|
|
1338
|
+
return !!(yield (a = this.coreInstance) == null ? void 0 : a.writeSeal(v(m({}, e != null ? e : {}), {
|
|
1339
1339
|
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1340
1340
|
})));
|
|
1341
1341
|
}));
|
|
1342
|
-
o(this, "deleteSeal", (e
|
|
1343
|
-
var a, c,
|
|
1344
|
-
const
|
|
1345
|
-
if (!((a =
|
|
1342
|
+
o(this, "deleteSeal", (e) => l(this, null, function* () {
|
|
1343
|
+
var a, c, d, u, C;
|
|
1344
|
+
const t = yield this.getSealList(e);
|
|
1345
|
+
if (!((a = t == null ? void 0 : t.data) != null && a.length))
|
|
1346
1346
|
return Promise.reject({
|
|
1347
1347
|
errCode: q,
|
|
1348
1348
|
msg: "暂无印章"
|
|
1349
1349
|
});
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
i = (c = h == null ? void 0 : h.SealId) != null ? c : "";
|
|
1359
|
-
}
|
|
1360
|
-
return !!(yield (f = this.coreInstance) == null ? void 0 : f.deleteSeal({
|
|
1361
|
-
ContainerName: (d = (u = n == null ? void 0 : n.cert) == null ? void 0 : u.ContainerName) != null ? d : "",
|
|
1350
|
+
const n = yield G.open({
|
|
1351
|
+
title: "删除印章",
|
|
1352
|
+
data: t == null ? void 0 : t.data,
|
|
1353
|
+
columns: Se,
|
|
1354
|
+
okText: "删除"
|
|
1355
|
+
}), i = (c = n == null ? void 0 : n.SealId) != null ? c : "";
|
|
1356
|
+
return !!(yield (C = this.coreInstance) == null ? void 0 : C.deleteSeal({
|
|
1357
|
+
ContainerName: (u = (d = t == null ? void 0 : t.cert) == null ? void 0 : d.ContainerName) != null ? u : "",
|
|
1362
1358
|
SealId: i
|
|
1363
1359
|
}));
|
|
1364
1360
|
}));
|
|
1361
|
+
o(this, "deleteSealById", (e, t) => l(this, null, function* () {
|
|
1362
|
+
var r, a;
|
|
1363
|
+
const n = yield this.getSignatureCert(t);
|
|
1364
|
+
return !!(yield (a = this.coreInstance) == null ? void 0 : a.deleteSeal(v(m({}, e != null ? e : {}), {
|
|
1365
|
+
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
|
|
1366
|
+
})));
|
|
1367
|
+
}));
|
|
1365
1368
|
o(this, "getSealList", (e) => l(this, null, function* () {
|
|
1366
1369
|
var i, r;
|
|
1367
1370
|
const t = yield this.getSignatureCert(e), n = yield (r = this.coreInstance) == null ? void 0 : r.getSealList({
|
|
@@ -1374,7 +1377,7 @@ const $ = class $ {
|
|
|
1374
1377
|
};
|
|
1375
1378
|
}));
|
|
1376
1379
|
o(this, "getSealInfo", (e) => l(this, null, function* () {
|
|
1377
|
-
var r, a, c,
|
|
1380
|
+
var r, a, c, d, u, C, h;
|
|
1378
1381
|
const t = yield this.getSealList(e);
|
|
1379
1382
|
if (!((r = t == null ? void 0 : t.data) != null && r.length))
|
|
1380
1383
|
return Promise.reject({
|
|
@@ -1387,8 +1390,8 @@ const $ = class $ {
|
|
|
1387
1390
|
columns: Se,
|
|
1388
1391
|
theme: (c = this.gwsConfig) == null ? void 0 : c.theme
|
|
1389
1392
|
}) : t == null ? void 0 : t.data[0], i = yield (h = this.coreInstance) == null ? void 0 : h.getSealInfo({
|
|
1390
|
-
ContainerName: (
|
|
1391
|
-
SealId: (
|
|
1393
|
+
ContainerName: (u = (d = t == null ? void 0 : t.cert) == null ? void 0 : d.ContainerName) != null ? u : "",
|
|
1394
|
+
SealId: (C = n == null ? void 0 : n.SealId) != null ? C : ""
|
|
1392
1395
|
});
|
|
1393
1396
|
return i == null ? void 0 : i[0];
|
|
1394
1397
|
}));
|
|
@@ -1423,11 +1426,11 @@ const $ = class $ {
|
|
|
1423
1426
|
};
|
|
1424
1427
|
}));
|
|
1425
1428
|
o(this, "getTPSealPic", (e, t) => l(this, null, function* () {
|
|
1426
|
-
var r, a, c,
|
|
1427
|
-
const n = yield this.getTPSeal(e, t), i = yield (
|
|
1429
|
+
var r, a, c, d, u;
|
|
1430
|
+
const n = yield this.getTPSeal(e, t), i = yield (u = this.coreInstance) == null ? void 0 : u.getTPSealPic(v(m({
|
|
1428
1431
|
ContainerName: (a = (r = n == null ? void 0 : n.cert) == null ? void 0 : r.ContainerName) != null ? a : ""
|
|
1429
1432
|
}, (c = n == null ? void 0 : n.data) != null ? c : {}), {
|
|
1430
|
-
FileSize: String((
|
|
1433
|
+
FileSize: String((d = n == null ? void 0 : n.data) == null ? void 0 : d.FileSize)
|
|
1431
1434
|
}));
|
|
1432
1435
|
return i == null ? void 0 : i[0];
|
|
1433
1436
|
}));
|
|
@@ -1445,28 +1448,28 @@ const $ = class $ {
|
|
|
1445
1448
|
return i == null ? void 0 : i[0].H;
|
|
1446
1449
|
}));
|
|
1447
1450
|
o(this, "pkcs1HashSign", (e, t) => l(this, null, function* () {
|
|
1448
|
-
var r, a, c,
|
|
1451
|
+
var r, a, c, d;
|
|
1449
1452
|
const n = yield this.getSignatureCert(t), i = yield (c = this.coreInstance) == null ? void 0 : c.pkcs1HashSign({
|
|
1450
1453
|
ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : "",
|
|
1451
1454
|
DataB64: e.DataB64,
|
|
1452
1455
|
HashAlg: (a = e.HashAlg) != null ? a : "sm3"
|
|
1453
1456
|
});
|
|
1454
|
-
return (
|
|
1457
|
+
return (d = i == null ? void 0 : i[0]) == null ? void 0 : d.SignData;
|
|
1455
1458
|
}));
|
|
1456
1459
|
o(this, "pkcs1HashVerifySignature", (e) => l(this, null, function* () {
|
|
1457
1460
|
var i, r;
|
|
1458
1461
|
const t = yield this.appendCertBase64(e);
|
|
1459
|
-
return !!(yield (r = this.coreInstance) == null ? void 0 : r.pkcs1HashVerifySignature(
|
|
1462
|
+
return !!(yield (r = this.coreInstance) == null ? void 0 : r.pkcs1HashVerifySignature(v(m({}, t), {
|
|
1460
1463
|
HashAlg: (i = t.HashAlg) != null ? i : "sm3"
|
|
1461
1464
|
})));
|
|
1462
1465
|
}));
|
|
1463
1466
|
o(this, "pkcs7Sign", (e, t) => l(this, null, function* () {
|
|
1464
|
-
var a, c,
|
|
1465
|
-
const n = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), i = yield this.getSignatureCert(t), r = yield (
|
|
1466
|
-
ContainerName: (
|
|
1467
|
+
var a, c, d, u, C;
|
|
1468
|
+
const n = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), i = yield this.getSignatureCert(t), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs7Sign(v(m({}, e != null ? e : {}), {
|
|
1469
|
+
ContainerName: (d = i == null ? void 0 : i.ContainerName) != null ? d : "",
|
|
1467
1470
|
DataB64: n
|
|
1468
1471
|
}));
|
|
1469
|
-
return (
|
|
1472
|
+
return (C = r == null ? void 0 : r[0]) == null ? void 0 : C.SignData;
|
|
1470
1473
|
}));
|
|
1471
1474
|
o(this, "pkcs7VerifySignature", (e) => l(this, null, function* () {
|
|
1472
1475
|
var i, r, a;
|
|
@@ -1492,19 +1495,19 @@ const $ = class $ {
|
|
|
1492
1495
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
|
|
1493
1496
|
}));
|
|
1494
1497
|
o(this, "sm3HashEncryption", (e) => l(this, null, function* () {
|
|
1495
|
-
var r, a, c,
|
|
1496
|
-
const t = (a = e.DataB64) != null ? a : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = (
|
|
1498
|
+
var r, a, c, d, u, C;
|
|
1499
|
+
const t = (a = e.DataB64) != null ? a : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = (d = e.KeyB64) != null ? d : this.base64Encode({ Data: (c = e.Key) != null ? c : "" }), i = yield (u = this.coreInstance) == null ? void 0 : u.sm3HashEncryption({
|
|
1497
1500
|
dataB64: t,
|
|
1498
1501
|
keyB64: n,
|
|
1499
1502
|
alg: "sm3"
|
|
1500
1503
|
});
|
|
1501
|
-
return (
|
|
1504
|
+
return (C = i == null ? void 0 : i[0]) == null ? void 0 : C.DataB64;
|
|
1502
1505
|
}));
|
|
1503
1506
|
o(this, "pkcs7Encryption", (e) => l(this, null, function* () {
|
|
1504
1507
|
var i, r, a, c;
|
|
1505
1508
|
if (!e.CertB64List) {
|
|
1506
|
-
const
|
|
1507
|
-
e.CertB64List =
|
|
1509
|
+
const d = yield this.getEncryptionCert();
|
|
1510
|
+
e.CertB64List = d == null ? void 0 : d.CertB64;
|
|
1508
1511
|
}
|
|
1509
1512
|
const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), n = yield (a = this.coreInstance) == null ? void 0 : a.pkcs7Encryption({
|
|
1510
1513
|
DataB64: t,
|
|
@@ -1514,7 +1517,7 @@ const $ = class $ {
|
|
|
1514
1517
|
}));
|
|
1515
1518
|
o(this, "pkcs7Decryption", (e) => l(this, null, function* () {
|
|
1516
1519
|
var r, a;
|
|
1517
|
-
const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7Decryption(
|
|
1520
|
+
const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7Decryption(v(m({}, e != null ? e : {}), {
|
|
1518
1521
|
ContainerName: t == null ? void 0 : t.ContainerName
|
|
1519
1522
|
})), i = (a = n == null ? void 0 : n[0]) == null ? void 0 : a.DataB64;
|
|
1520
1523
|
return e.shouldDecodeBase64 ? this.base64Decode({ DataB64: i }) : i;
|
|
@@ -1540,7 +1543,7 @@ const $ = class $ {
|
|
|
1540
1543
|
}));
|
|
1541
1544
|
o(this, "asymmetricDecryption", (e, t) => l(this, null, function* () {
|
|
1542
1545
|
var r, a;
|
|
1543
|
-
const n = yield this.getEncryptionCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.asymmetricDecryption(
|
|
1546
|
+
const n = yield this.getEncryptionCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.asymmetricDecryption(v(m({}, e != null ? e : {}), {
|
|
1544
1547
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1545
1548
|
}));
|
|
1546
1549
|
return (a = i == null ? void 0 : i[0]) == null ? void 0 : a.Data;
|
|
@@ -1556,24 +1559,25 @@ const $ = class $ {
|
|
|
1556
1559
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.Data;
|
|
1557
1560
|
}));
|
|
1558
1561
|
o(this, "getCertInfo", (e) => l(this, null, function* () {
|
|
1559
|
-
var i, r, a, c,
|
|
1562
|
+
var i, r, a, c, d;
|
|
1560
1563
|
const t = yield (i = this.coreInstance) == null ? void 0 : i.getCertInfo(e), n = (r = t == null ? void 0 : t[0]) != null ? r : {};
|
|
1561
|
-
for (let
|
|
1562
|
-
const
|
|
1564
|
+
for (let u = 0; u < ce.length; u++) {
|
|
1565
|
+
const C = ce[u];
|
|
1563
1566
|
try {
|
|
1564
1567
|
const h = yield (a = this.coreInstance) == null ? void 0 : a.getCertInfoByOid({
|
|
1565
|
-
Oid:
|
|
1568
|
+
Oid: C.oid,
|
|
1566
1569
|
CertB64: e.CertB64
|
|
1567
1570
|
});
|
|
1568
|
-
n[
|
|
1571
|
+
n[C.key] = (d = (c = h == null ? void 0 : h[0]) == null ? void 0 : c.OidValue) == null ? void 0 : d.slice(2);
|
|
1569
1572
|
} catch (h) {
|
|
1573
|
+
n[C.key] = null;
|
|
1570
1574
|
}
|
|
1571
1575
|
}
|
|
1572
1576
|
return n != null && n.idCardNo ? n != null && n.CertSubject.includes("O") || n.orgCode ? n.certCate = Ge : n.certCate = Fe : n.certCate = Ve, n;
|
|
1573
1577
|
}));
|
|
1574
1578
|
o(this, "getCertInfoByOid", (e) => l(this, null, function* () {
|
|
1575
1579
|
var n, i;
|
|
1576
|
-
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(
|
|
1580
|
+
const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(m({}, e != null ? e : {}));
|
|
1577
1581
|
return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.OidValue;
|
|
1578
1582
|
}));
|
|
1579
1583
|
o(this, "getSealVendor", (e) => l(this, null, function* () {
|
|
@@ -1585,7 +1589,7 @@ const $ = class $ {
|
|
|
1585
1589
|
}));
|
|
1586
1590
|
o(this, "deleteAllSealByVendor", (e, t) => l(this, null, function* () {
|
|
1587
1591
|
var r;
|
|
1588
|
-
const n = yield this.getSignatureCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.deleteAllSealByVendor(
|
|
1592
|
+
const n = yield this.getSignatureCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.deleteAllSealByVendor(v(m({}, e != null ? e : {}), {
|
|
1589
1593
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1590
1594
|
}));
|
|
1591
1595
|
return i == null ? void 0 : i[0];
|
|
@@ -1611,7 +1615,7 @@ const $ = class $ {
|
|
|
1611
1615
|
o(this, "applyCert", (e, t) => l(this, null, function* () {
|
|
1612
1616
|
var a;
|
|
1613
1617
|
const n = yield this.getUKeyList(t), i = yield this.getUKeyInfo(n);
|
|
1614
|
-
return yield (a = this.coreInstance) == null ? void 0 : a.applyCert(
|
|
1618
|
+
return yield (a = this.coreInstance) == null ? void 0 : a.applyCert(v(m({}, e != null ? e : {}), {
|
|
1615
1619
|
manu: i == null ? void 0 : i.manu,
|
|
1616
1620
|
sn: i == null ? void 0 : i.sn,
|
|
1617
1621
|
ContainerName: i == null ? void 0 : i.keyid
|
|
@@ -1620,7 +1624,7 @@ const $ = class $ {
|
|
|
1620
1624
|
o(this, "resetPin", (e, t) => l(this, null, function* () {
|
|
1621
1625
|
var r;
|
|
1622
1626
|
const n = yield this.getSignatureCert(t);
|
|
1623
|
-
return yield (r = this.coreInstance) == null ? void 0 : r.resetPin(
|
|
1627
|
+
return yield (r = this.coreInstance) == null ? void 0 : r.resetPin(v(m({}, e != null ? e : {}), {
|
|
1624
1628
|
manu: n == null ? void 0 : n.manu,
|
|
1625
1629
|
sn: n == null ? void 0 : n.sn,
|
|
1626
1630
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
@@ -1631,12 +1635,12 @@ const $ = class $ {
|
|
|
1631
1635
|
};
|
|
1632
1636
|
o($, "instance", null);
|
|
1633
1637
|
let H = $;
|
|
1634
|
-
function
|
|
1638
|
+
function At(s) {
|
|
1635
1639
|
return new Promise((e, t) => {
|
|
1636
1640
|
if (H.instance && !(s != null && s.isCreateNew))
|
|
1637
1641
|
e(H.instance);
|
|
1638
1642
|
else {
|
|
1639
|
-
const n = new H(
|
|
1643
|
+
const n = new H(v(m({}, s != null ? s : {}), {
|
|
1640
1644
|
onOpen(i) {
|
|
1641
1645
|
var r;
|
|
1642
1646
|
e(n), (r = s == null ? void 0 : s.onOpen) == null || r.call(s, i);
|
|
@@ -1651,5 +1655,5 @@ function Bt(s) {
|
|
|
1651
1655
|
}
|
|
1652
1656
|
export {
|
|
1653
1657
|
H as GwsService,
|
|
1654
|
-
|
|
1658
|
+
At as createService
|
|
1655
1659
|
};
|