gws-client 1.2.1 → 1.2.3
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 +4 -3
- package/dist/index.es.js +253 -249
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -9,34 +9,34 @@ var J = (s, e, t) => e in s ? Ne(s, e, { enumerable: !0, configurable: !0, writa
|
|
|
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 p = {
|
|
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: p.LEVEL_1,
|
|
38
|
+
INTERNAL: p.LEVEL_2 | p.LEVEL_1,
|
|
39
|
+
OMP: p.LEVEL_3 | p.LEVEL_2 | p.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",
|
|
@@ -51,59 +51,59 @@ const v = {
|
|
|
51
51
|
key: "orgCode"
|
|
52
52
|
}
|
|
53
53
|
];
|
|
54
|
-
function
|
|
54
|
+
function ze(s) {
|
|
55
55
|
return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
|
|
56
56
|
}
|
|
57
57
|
var O = {}, le;
|
|
58
|
-
function
|
|
58
|
+
function Re() {
|
|
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
|
-
function a(
|
|
65
|
-
var
|
|
66
|
-
if (
|
|
64
|
+
function a(y) {
|
|
65
|
+
var g = y.length;
|
|
66
|
+
if (g % 4 > 0)
|
|
67
67
|
throw new Error("Invalid string. Length must be a multiple of 4");
|
|
68
|
-
var m =
|
|
69
|
-
m === -1 && (m =
|
|
70
|
-
var
|
|
71
|
-
return [m,
|
|
68
|
+
var m = y.indexOf("=");
|
|
69
|
+
m === -1 && (m = g);
|
|
70
|
+
var f = m === g ? 0 : 4 - m % 4;
|
|
71
|
+
return [m, f];
|
|
72
72
|
}
|
|
73
|
-
function c(
|
|
74
|
-
var
|
|
75
|
-
return (m +
|
|
73
|
+
function c(y) {
|
|
74
|
+
var g = a(y), m = g[0], f = g[1];
|
|
75
|
+
return (m + f) * 3 / 4 - f;
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
return (
|
|
77
|
+
function d(y, g, m) {
|
|
78
|
+
return (g + m) * 3 / 4 - m;
|
|
79
79
|
}
|
|
80
|
-
function
|
|
81
|
-
var
|
|
82
|
-
for (I = 0; I <
|
|
83
|
-
|
|
84
|
-
return S === 2 && (
|
|
80
|
+
function u(y) {
|
|
81
|
+
var g, m = a(y), f = m[0], S = m[1], k = new t(d(y, f, S)), _ = 0, A = S > 0 ? f - 4 : f, I;
|
|
82
|
+
for (I = 0; I < A; I += 4)
|
|
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
|
+
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
|
}
|
|
86
|
-
function
|
|
87
|
-
return s[
|
|
86
|
+
function C(y) {
|
|
87
|
+
return s[y >> 18 & 63] + s[y >> 12 & 63] + s[y >> 6 & 63] + s[y & 63];
|
|
88
88
|
}
|
|
89
|
-
function h(
|
|
90
|
-
for (var
|
|
91
|
-
|
|
89
|
+
function h(y, g, m) {
|
|
90
|
+
for (var f, S = [], k = g; k < m; k += 3)
|
|
91
|
+
f = (y[k] << 16 & 16711680) + (y[k + 1] << 8 & 65280) + (y[k + 2] & 255), S.push(C(f));
|
|
92
92
|
return S.join("");
|
|
93
93
|
}
|
|
94
|
-
function w(
|
|
95
|
-
for (var
|
|
96
|
-
S.push(h(
|
|
97
|
-
return
|
|
98
|
-
s[
|
|
99
|
-
)) :
|
|
100
|
-
s[
|
|
94
|
+
function w(y) {
|
|
95
|
+
for (var g, m = y.length, f = m % 3, S = [], k = 16383, _ = 0, A = m - f; _ < A; _ += k)
|
|
96
|
+
S.push(h(y, _, _ + k > A ? A : _ + k));
|
|
97
|
+
return f === 1 ? (g = y[m - 1], S.push(
|
|
98
|
+
s[g >> 2] + s[g << 4 & 63] + "=="
|
|
99
|
+
)) : f === 2 && (g = (y[m - 2] << 8) + y[m - 1], S.push(
|
|
100
|
+
s[g >> 10] + s[g >> 4 & 63] + s[g << 2 & 63] + "="
|
|
101
101
|
)), S.join("");
|
|
102
102
|
}
|
|
103
103
|
return O;
|
|
104
104
|
}
|
|
105
|
-
var Ye =
|
|
106
|
-
const
|
|
105
|
+
var Ye = Re();
|
|
106
|
+
const ue = /* @__PURE__ */ ze(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) {
|
|
@@ -154,11 +154,11 @@ function Xe(s) {
|
|
|
154
154
|
}
|
|
155
155
|
function et(s, e, t, n) {
|
|
156
156
|
if (s) {
|
|
157
|
-
const i =
|
|
157
|
+
const i = pe(s, e, t, n);
|
|
158
158
|
return s[0](i);
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
|
-
function
|
|
161
|
+
function pe(s, e, t, n) {
|
|
162
162
|
return s[1] && n ? qe(t.ctx.slice(), s[1](n(e))) : t.ctx;
|
|
163
163
|
}
|
|
164
164
|
function tt(s, e, t, n) {
|
|
@@ -178,7 +178,7 @@ function tt(s, e, t, n) {
|
|
|
178
178
|
}
|
|
179
179
|
function nt(s, e, t, n, i, r) {
|
|
180
180
|
if (i) {
|
|
181
|
-
const a =
|
|
181
|
+
const a = pe(e, t, n, r);
|
|
182
182
|
s.p(a, i);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
@@ -203,7 +203,7 @@ function W(s, e, t) {
|
|
|
203
203
|
function j(s) {
|
|
204
204
|
s.parentNode && s.parentNode.removeChild(s);
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
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
|
}
|
|
@@ -222,13 +222,13 @@ 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) {
|
|
229
229
|
return Array.from(s.childNodes);
|
|
230
230
|
}
|
|
231
|
-
function
|
|
231
|
+
function z(s, e) {
|
|
232
232
|
e = "" + e, s.data !== e && (s.data = /** @type {string} */
|
|
233
233
|
e);
|
|
234
234
|
}
|
|
@@ -286,33 +286,33 @@ function lt(s) {
|
|
|
286
286
|
const e = [], t = [];
|
|
287
287
|
M.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), M = e;
|
|
288
288
|
}
|
|
289
|
-
const
|
|
290
|
-
let
|
|
289
|
+
const R = /* @__PURE__ */ new Set();
|
|
290
|
+
let ut;
|
|
291
291
|
function ie(s, e) {
|
|
292
|
-
s && s.i && (
|
|
292
|
+
s && s.i && (R.delete(s), s.i(e));
|
|
293
293
|
}
|
|
294
|
-
function
|
|
294
|
+
function Be(s, e, t, n) {
|
|
295
295
|
if (s && s.o) {
|
|
296
|
-
if (
|
|
297
|
-
|
|
298
|
-
|
|
296
|
+
if (R.has(s)) return;
|
|
297
|
+
R.add(s), ut.c.push(() => {
|
|
298
|
+
R.delete(s);
|
|
299
299
|
}), s.o(e);
|
|
300
300
|
}
|
|
301
301
|
}
|
|
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, ...y) => {
|
|
349
|
+
const g = y.length ? y[0] : w;
|
|
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
|
+
}) : [], 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,
|
|
401
|
+
), w, y, g, m = (
|
|
402
402
|
/*okText*/
|
|
403
403
|
(s[5] || "确认") + ""
|
|
404
|
-
),
|
|
405
|
-
const
|
|
404
|
+
), f, S, k, _;
|
|
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), y = K(), g = D("button"), f = T(m), P(n, "class", "model-title svelte-16iv9d0"), P(c, "class", "slot svelte-16iv9d0"), P(C, "class", "modal-btn svelte-16iv9d0"), P(g, "class", "modal-btn success svelte-16iv9d0"), Y(
|
|
418
|
+
g,
|
|
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, y), L(u, g), L(g, f), S = !0, k || (_ = [
|
|
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(g, "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
|
-
(s[1] || "标题") + "") &&
|
|
450
|
+
(s[1] || "标题") + "") && z(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,
|
|
@@ -467,33 +467,33 @@ function yt(s) {
|
|
|
467
467
|
null
|
|
468
468
|
), (!S || b & /*cancelText*/
|
|
469
469
|
16) && h !== (h = /*cancelText*/
|
|
470
|
-
(s[4] || "取消") + "") &&
|
|
470
|
+
(s[4] || "取消") + "") && z(w, h), (!S || b & /*okText*/
|
|
471
471
|
32) && m !== (m = /*okText*/
|
|
472
|
-
(s[5] || "确认") + "") &&
|
|
472
|
+
(s[5] || "确认") + "") && z(f, m), (!S || b & /*theme*/
|
|
473
473
|
64) && Y(
|
|
474
|
-
|
|
474
|
+
g,
|
|
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(_);
|
|
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) {
|
|
@@ -556,7 +556,7 @@ function Ee(s) {
|
|
|
556
556
|
/*col*/
|
|
557
557
|
i[16].key
|
|
558
558
|
]
|
|
559
|
-
)) + "") &&
|
|
559
|
+
)) + "") && z(n, t), r & /*columns*/
|
|
560
560
|
2 && Y(e, "width", `${100 / /*columns*/
|
|
561
561
|
i[1].length}%`);
|
|
562
562
|
},
|
|
@@ -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), _e(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);
|
|
@@ -660,11 +660,11 @@ function Et(s) {
|
|
|
660
660
|
}
|
|
661
661
|
},
|
|
662
662
|
d(i) {
|
|
663
|
-
i && j(e),
|
|
663
|
+
i && j(e), _e(n, i);
|
|
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,33 +725,33 @@ 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:
|
|
737
|
-
const
|
|
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
|
+
const y = () => {
|
|
738
738
|
r(`${h}失败`), c == null || c();
|
|
739
|
-
},
|
|
739
|
+
}, g = () => {
|
|
740
740
|
a == null || a(n[w]), c == null || c();
|
|
741
|
-
}, m = (
|
|
742
|
-
return s.$$set = (
|
|
743
|
-
"data" in
|
|
741
|
+
}, m = (f) => t(7, w = f);
|
|
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, r = f.onCancel), "onOk" in f && t(11, a = f.onOk), "onClose" in f && t(2, c = 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
|
c,
|
|
748
|
-
u,
|
|
749
748
|
d,
|
|
750
|
-
|
|
749
|
+
u,
|
|
750
|
+
C,
|
|
751
751
|
h,
|
|
752
752
|
w,
|
|
753
|
+
y,
|
|
753
754
|
g,
|
|
754
|
-
C,
|
|
755
755
|
r,
|
|
756
756
|
a,
|
|
757
757
|
m
|
|
@@ -759,7 +759,7 @@ function St(s, e, t) {
|
|
|
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(E({}, e), {
|
|
782
782
|
onCancel: (i) => {
|
|
783
783
|
n({
|
|
784
784
|
code: -1,
|
|
@@ -815,14 +815,14 @@ function vt(s = 32, e = !0, t = 0) {
|
|
|
815
815
|
}
|
|
816
816
|
return e ? (i.shift(), `u${i.join("")}`) : i.join("");
|
|
817
817
|
}
|
|
818
|
-
const
|
|
818
|
+
const pt = [
|
|
819
819
|
{
|
|
820
820
|
key: "CN"
|
|
821
821
|
},
|
|
822
822
|
{
|
|
823
823
|
format: (s) => `${s.DevClass}(${s.sn})`
|
|
824
824
|
}
|
|
825
|
-
],
|
|
825
|
+
], _t = [
|
|
826
826
|
{
|
|
827
827
|
key: "SealId"
|
|
828
828
|
},
|
|
@@ -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
|
|
877
|
-
|
|
878
|
-
},
|
|
876
|
+
const d = vt(), u = (y) => {
|
|
877
|
+
y.success ? i(y.data) : r(y);
|
|
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(), y = new TextDecoder(
|
|
906
906
|
navigator.userAgent.includes("Windows") ? "gbk" : "utf-8"
|
|
907
|
-
).decode(
|
|
907
|
+
).decode(C).replace(/\\(?!(["\\\/bfnrtu]))/g, ""), g = JSON.parse(y), m = {
|
|
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
|
-
|
|
913
|
+
}, f = (a = g.result) == null ? void 0 : a.function, S = (c = g.result) == null ? void 0 : c.msgid;
|
|
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
|
}));
|
|
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(E({}, e), {
|
|
942
942
|
data: (n = e.data) == null ? void 0 : n[0]
|
|
943
943
|
}));
|
|
944
944
|
}
|
|
@@ -974,7 +974,7 @@ class Pt {
|
|
|
974
974
|
return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield G.open({
|
|
975
975
|
title: "选择证书",
|
|
976
976
|
data: t,
|
|
977
|
-
columns:
|
|
977
|
+
columns: pt,
|
|
978
978
|
theme: (i = this.socketConfig) == null ? void 0 : i.theme
|
|
979
979
|
}) : Promise.reject({
|
|
980
980
|
errCode: Ue,
|
|
@@ -1017,7 +1017,7 @@ class Pt {
|
|
|
1017
1017
|
E({
|
|
1018
1018
|
IsLogin: this.getIsLogin()
|
|
1019
1019
|
}, e != null ? e : {}),
|
|
1020
|
-
|
|
1020
|
+
p.LEVEL_2
|
|
1021
1021
|
);
|
|
1022
1022
|
}));
|
|
1023
1023
|
o(this, "writeSeal", (e) => l(this, null, function* () {
|
|
@@ -1026,7 +1026,7 @@ class Pt {
|
|
|
1026
1026
|
E({
|
|
1027
1027
|
IsLogin: this.getIsLogin()
|
|
1028
1028
|
}, e != null ? e : {}),
|
|
1029
|
-
|
|
1029
|
+
p.LEVEL_2
|
|
1030
1030
|
);
|
|
1031
1031
|
}));
|
|
1032
1032
|
o(this, "deleteSeal", (e) => l(this, null, function* () {
|
|
@@ -1035,7 +1035,7 @@ class Pt {
|
|
|
1035
1035
|
E({
|
|
1036
1036
|
IsLogin: this.getIsLogin()
|
|
1037
1037
|
}, e != null ? e : {}),
|
|
1038
|
-
|
|
1038
|
+
p.LEVEL_2
|
|
1039
1039
|
);
|
|
1040
1040
|
}));
|
|
1041
1041
|
o(this, "getSealInfo", (e) => l(this, null, function* () {
|
|
@@ -1044,7 +1044,7 @@ class Pt {
|
|
|
1044
1044
|
E({
|
|
1045
1045
|
IsLogin: this.getIsLogin()
|
|
1046
1046
|
}, e != null ? e : {}),
|
|
1047
|
-
|
|
1047
|
+
p.LEVEL_2
|
|
1048
1048
|
);
|
|
1049
1049
|
}));
|
|
1050
1050
|
o(this, "getTPSealList", (e) => l(this, null, function* () {
|
|
@@ -1053,7 +1053,7 @@ class Pt {
|
|
|
1053
1053
|
E({
|
|
1054
1054
|
IsLogin: this.getIsLogin()
|
|
1055
1055
|
}, e != null ? e : {}),
|
|
1056
|
-
|
|
1056
|
+
p.LEVEL_2
|
|
1057
1057
|
);
|
|
1058
1058
|
}));
|
|
1059
1059
|
o(this, "getTPSealPic", (e) => l(this, null, function* () {
|
|
@@ -1063,7 +1063,7 @@ class Pt {
|
|
|
1063
1063
|
E({
|
|
1064
1064
|
IsLogin: (n = e.IsLogin) != null ? n : this.getIsLogin()
|
|
1065
1065
|
}, e != null ? e : {}),
|
|
1066
|
-
|
|
1066
|
+
p.LEVEL_2
|
|
1067
1067
|
);
|
|
1068
1068
|
}));
|
|
1069
1069
|
o(this, "sm2SignPreprocess1", (e) => l(this, null, function* () {
|
|
@@ -1143,7 +1143,7 @@ class Pt {
|
|
|
1143
1143
|
return yield this.sendMessage(
|
|
1144
1144
|
"GZCA_GetSealIssuer",
|
|
1145
1145
|
e,
|
|
1146
|
-
|
|
1146
|
+
p.LEVEL_2
|
|
1147
1147
|
);
|
|
1148
1148
|
}));
|
|
1149
1149
|
o(this, "deleteAllSealByVendor", (e) => l(this, null, function* () {
|
|
@@ -1152,7 +1152,7 @@ class Pt {
|
|
|
1152
1152
|
E({
|
|
1153
1153
|
IsLogin: this.getIsLogin()
|
|
1154
1154
|
}, e != null ? e : {}),
|
|
1155
|
-
|
|
1155
|
+
p.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
|
+
p.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
1174
|
E({}, e != null ? e : {}),
|
|
1175
|
-
|
|
1175
|
+
p.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
|
+
p.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
|
+
p.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(E({}, 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(E({}, 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(E({}, 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(E({}, 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, 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 })), r = yield this.getSignatureCert(t);
|
|
1315
1315
|
let a = "";
|
|
1316
|
-
a = Array.isArray(i) ? i == null ? void 0 : i.map((
|
|
1317
|
-
const c = yield (
|
|
1316
|
+
a = Array.isArray(i) ? i == null ? void 0 : i.map((f, S) => `${S}:${f}`).join(n) : "";
|
|
1317
|
+
const c = yield (y = this.coreInstance) == null ? void 0 : y.batchPkcs1Base64Sign({
|
|
1318
1318
|
ContainerName: (w = r == null ? void 0 : r.ContainerName) != null ? w : "",
|
|
1319
1319
|
DataB64: a
|
|
1320
|
-
}),
|
|
1321
|
-
return
|
|
1322
|
-
const S =
|
|
1323
|
-
|
|
1324
|
-
}),
|
|
1320
|
+
}), d = (m = (g = c == null ? void 0 : c[0]) == null ? void 0 : g.SignData) == null ? void 0 : m.split(n), u = [];
|
|
1321
|
+
return d.forEach((f) => {
|
|
1322
|
+
const S = f.split(":"), k = Number(S[0]), _ = S[1];
|
|
1323
|
+
u[k] = _;
|
|
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(E({}, 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(E({}, 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
|
}));
|
|
@@ -1414,7 +1417,7 @@ const $ = class $ {
|
|
|
1414
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({
|
|
1415
1418
|
title: "选择印章",
|
|
1416
1419
|
data: n == null ? void 0 : n.data,
|
|
1417
|
-
columns:
|
|
1420
|
+
columns: _t,
|
|
1418
1421
|
theme: (c = this.gwsConfig) == null ? void 0 : c.theme
|
|
1419
1422
|
});
|
|
1420
1423
|
return {
|
|
@@ -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(E({
|
|
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(E({}, 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(E({}, 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(E({}, 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(E({}, 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,20 +1559,21 @@ 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.replace(".", "");
|
|
1569
1572
|
} catch (h) {
|
|
1573
|
+
n[C.key] = null;
|
|
1570
1574
|
}
|
|
1571
1575
|
}
|
|
1572
|
-
return n != null && n.idCardNo ? n != null && n.CertSubject.includes("O") || n.orgCode ? n.certCate = Ge : n.certCate = Fe : n.certCate = Ve, n;
|
|
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;
|
|
@@ -1585,12 +1589,12 @@ 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(E({}, e != null ? e : {}), {
|
|
1589
1593
|
ContainerName: n == null ? void 0 : n.ContainerName
|
|
1590
1594
|
}));
|
|
1591
1595
|
return i == null ? void 0 : i[0];
|
|
1592
1596
|
}));
|
|
1593
|
-
o(this, "
|
|
1597
|
+
o(this, "getUKey", (e) => l(this, null, function* () {
|
|
1594
1598
|
var i;
|
|
1595
1599
|
if (e) return e;
|
|
1596
1600
|
const t = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyList();
|
|
@@ -1602,7 +1606,7 @@ const $ = class $ {
|
|
|
1602
1606
|
}));
|
|
1603
1607
|
o(this, "getUKeyInfo", (e) => l(this, null, function* () {
|
|
1604
1608
|
var i;
|
|
1605
|
-
const t = yield this.
|
|
1609
|
+
const t = yield this.getUKey(e), n = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyInfo({
|
|
1606
1610
|
manu: t == null ? void 0 : t.manu,
|
|
1607
1611
|
sn: t == null ? void 0 : t.sn
|
|
1608
1612
|
});
|
|
@@ -1610,8 +1614,8 @@ const $ = class $ {
|
|
|
1610
1614
|
}));
|
|
1611
1615
|
o(this, "applyCert", (e, t) => l(this, null, function* () {
|
|
1612
1616
|
var a;
|
|
1613
|
-
const n = yield this.
|
|
1614
|
-
return yield (a = this.coreInstance) == null ? void 0 : a.applyCert(
|
|
1617
|
+
const n = yield this.getUKey(t), i = yield this.getUKeyInfo(n);
|
|
1618
|
+
return yield (a = this.coreInstance) == null ? void 0 : a.applyCert(v(E({}, 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(E({}, 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(E({}, 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
|
};
|