gws-client 1.2.0 → 1.2.1

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.es.js CHANGED
@@ -1,99 +1,112 @@
1
- var be = Object.defineProperty, xe = Object.defineProperties;
2
- var Ne = Object.getOwnPropertyDescriptors;
1
+ var Ne = Object.defineProperty, xe = Object.defineProperties;
2
+ var $e = Object.getOwnPropertyDescriptors;
3
3
  var re = Object.getOwnPropertySymbols;
4
- var $e = Object.prototype.hasOwnProperty, Te = Object.prototype.propertyIsEnumerable;
5
- var Y = (s, e, t) => e in s ? be(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, m = (s, e) => {
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, E = (s, e) => {
6
6
  for (var t in e || (e = {}))
7
- $e.call(e, t) && Y(s, t, e[t]);
7
+ Te.call(e, t) && J(s, t, e[t]);
8
8
  if (re)
9
9
  for (var t of re(e))
10
- Te.call(e, t) && Y(s, t, e[t]);
10
+ Me.call(e, t) && J(s, t, e[t]);
11
11
  return s;
12
- }, _ = (s, e) => xe(s, Ne(e));
13
- var a = (s, e, t) => Y(s, typeof e != "symbol" ? e + "" : e, t);
14
- var c = (s, e, t) => new Promise((n, i) => {
15
- var r = (d) => {
12
+ }, p = (s, e) => xe(s, $e(e));
13
+ var o = (s, e, t) => J(s, typeof e != "symbol" ? e + "" : e, t);
14
+ var l = (s, e, t) => new Promise((n, i) => {
15
+ var r = (u) => {
16
16
  try {
17
- l(t.next(d));
18
- } catch (u) {
19
- i(u);
17
+ c(t.next(u));
18
+ } catch (d) {
19
+ i(d);
20
20
  }
21
- }, o = (d) => {
21
+ }, a = (u) => {
22
22
  try {
23
- l(t.throw(d));
24
- } catch (u) {
25
- i(u);
23
+ c(t.throw(u));
24
+ } catch (d) {
25
+ i(d);
26
26
  }
27
- }, l = (d) => d.done ? n(d.value) : Promise.resolve(d.value).then(r, o);
28
- l((t = t.apply(s, e)).next());
27
+ }, c = (u) => u.done ? n(u.value) : Promise.resolve(u.value).then(r, a);
28
+ c((t = t.apply(s, e)).next());
29
29
  });
30
- const Me = window.location.href.includes("https") ? "wss://localhost:19528" : "ws://localhost:9527", ae = "1", oe = "2";
31
- var Se = /* @__PURE__ */ ((s) => (s.MIN = "0", s.LOW = "1", s.MIDDLE = "2", s.HIGH = "3", s))(Se || {});
32
- const I = {
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
+ var Ie = /* @__PURE__ */ ((s) => (s.MIN = "0", s.LOW = "1", s.MIDDLE = "2", s.HIGH = "3", s))(Ie || {});
32
+ const v = {
33
33
  LEVEL_1: 1,
34
34
  LEVEL_2: 2,
35
35
  LEVEL_3: 4
36
- }, Fe = {
37
- OPEN: I.LEVEL_1,
38
- INTERNAL: I.LEVEL_2 | I.LEVEL_1,
39
- OMP: I.LEVEL_3 | I.LEVEL_2 | I.LEVEL_1
40
- }, Ge = "00000001", q = "NO_SEAL_AVAILABLE", Oe = "CERTIFICATE_NOT_FOUND", Ve = "CLIENT_CONNECTION_FAILED", Ze = "ACCESS_DENIED";
41
- function He(s) {
36
+ }, Ze = {
37
+ OPEN: v.LEVEL_1,
38
+ INTERNAL: v.LEVEL_2 | v.LEVEL_1,
39
+ OMP: v.LEVEL_3 | v.LEVEL_2 | v.LEVEL_1
40
+ }, He = "00000001", q = "NO_SEAL_AVAILABLE", Ue = "CERTIFICATE_NOT_FOUND", je = "CLIENT_CONNECTION_FAILED", Ke = "ACCESS_DENIED", ce = [
41
+ {
42
+ oid: "1.2.86.21.1.3",
43
+ key: "trustServiceNo"
44
+ },
45
+ {
46
+ oid: "1.2.156.10260.4.1.1",
47
+ key: "idCardNo"
48
+ },
49
+ {
50
+ oid: "1.2.156.10260.4.1.4",
51
+ key: "orgCode"
52
+ }
53
+ ];
54
+ function Re(s) {
42
55
  return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, "default") ? s.default : s;
43
56
  }
44
- var F = {}, ce;
45
- function Ue() {
46
- if (ce) return F;
47
- ce = 1, F.byteLength = l, F.toByteArray = u, F.fromByteArray = w;
57
+ var O = {}, le;
58
+ function ze() {
59
+ if (le) return O;
60
+ le = 1, O.byteLength = c, O.toByteArray = d, O.fromByteArray = w;
48
61
  for (var s = [], e = [], t = typeof Uint8Array != "undefined" ? Uint8Array : Array, n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = 0, r = n.length; i < r; ++i)
49
62
  s[i] = n[i], e[n.charCodeAt(i)] = i;
50
63
  e[45] = 62, e[95] = 63;
51
- function o(h) {
52
- var f = h.length;
53
- if (f % 4 > 0)
64
+ function a(g) {
65
+ var C = g.length;
66
+ if (C % 4 > 0)
54
67
  throw new Error("Invalid string. Length must be a multiple of 4");
55
- var E = h.indexOf("=");
56
- E === -1 && (E = f);
57
- var y = E === f ? 0 : 4 - E % 4;
58
- return [E, y];
68
+ var m = g.indexOf("=");
69
+ m === -1 && (m = C);
70
+ var y = m === C ? 0 : 4 - m % 4;
71
+ return [m, y];
59
72
  }
60
- function l(h) {
61
- var f = o(h), E = f[0], y = f[1];
62
- return (E + y) * 3 / 4 - y;
73
+ function c(g) {
74
+ var C = a(g), m = C[0], y = C[1];
75
+ return (m + y) * 3 / 4 - y;
63
76
  }
64
- function d(h, f, E) {
65
- return (f + E) * 3 / 4 - E;
77
+ function u(g, C, m) {
78
+ return (C + m) * 3 / 4 - m;
66
79
  }
67
- function u(h) {
68
- var f, E = o(h), y = E[0], S = E[1], k = new t(d(h, y, S)), p = 0, D = S > 0 ? y - 4 : y, v;
69
- for (v = 0; v < D; v += 4)
70
- f = e[h.charCodeAt(v)] << 18 | e[h.charCodeAt(v + 1)] << 12 | e[h.charCodeAt(v + 2)] << 6 | e[h.charCodeAt(v + 3)], k[p++] = f >> 16 & 255, k[p++] = f >> 8 & 255, k[p++] = f & 255;
71
- return S === 2 && (f = e[h.charCodeAt(v)] << 2 | e[h.charCodeAt(v + 1)] >> 4, k[p++] = f & 255), S === 1 && (f = e[h.charCodeAt(v)] << 10 | e[h.charCodeAt(v + 1)] << 4 | e[h.charCodeAt(v + 2)] >> 2, k[p++] = f >> 8 & 255, k[p++] = f & 255), k;
80
+ function d(g) {
81
+ var C, m = a(g), y = m[0], S = m[1], k = new t(u(g, y, S)), _ = 0, B = S > 0 ? y - 4 : y, I;
82
+ for (I = 0; I < B; I += 4)
83
+ C = e[g.charCodeAt(I)] << 18 | e[g.charCodeAt(I + 1)] << 12 | e[g.charCodeAt(I + 2)] << 6 | e[g.charCodeAt(I + 3)], k[_++] = C >> 16 & 255, k[_++] = C >> 8 & 255, k[_++] = C & 255;
84
+ return S === 2 && (C = e[g.charCodeAt(I)] << 2 | e[g.charCodeAt(I + 1)] >> 4, k[_++] = C & 255), S === 1 && (C = e[g.charCodeAt(I)] << 10 | e[g.charCodeAt(I + 1)] << 4 | e[g.charCodeAt(I + 2)] >> 2, k[_++] = C >> 8 & 255, k[_++] = C & 255), k;
72
85
  }
73
- function C(h) {
74
- return s[h >> 18 & 63] + s[h >> 12 & 63] + s[h >> 6 & 63] + s[h & 63];
86
+ function f(g) {
87
+ return s[g >> 18 & 63] + s[g >> 12 & 63] + s[g >> 6 & 63] + s[g & 63];
75
88
  }
76
- function g(h, f, E) {
77
- for (var y, S = [], k = f; k < E; k += 3)
78
- y = (h[k] << 16 & 16711680) + (h[k + 1] << 8 & 65280) + (h[k + 2] & 255), S.push(C(y));
89
+ function h(g, C, m) {
90
+ for (var y, S = [], k = C; k < m; k += 3)
91
+ y = (g[k] << 16 & 16711680) + (g[k + 1] << 8 & 65280) + (g[k + 2] & 255), S.push(f(y));
79
92
  return S.join("");
80
93
  }
81
- function w(h) {
82
- for (var f, E = h.length, y = E % 3, S = [], k = 16383, p = 0, D = E - y; p < D; p += k)
83
- S.push(g(h, p, p + k > D ? D : p + k));
84
- return y === 1 ? (f = h[E - 1], S.push(
85
- s[f >> 2] + s[f << 4 & 63] + "=="
86
- )) : y === 2 && (f = (h[E - 2] << 8) + h[E - 1], S.push(
87
- s[f >> 10] + s[f >> 4 & 63] + s[f << 2 & 63] + "="
94
+ function w(g) {
95
+ for (var C, m = g.length, y = m % 3, S = [], k = 16383, _ = 0, B = m - y; _ < B; _ += k)
96
+ S.push(h(g, _, _ + k > B ? B : _ + k));
97
+ return y === 1 ? (C = g[m - 1], S.push(
98
+ s[C >> 2] + s[C << 4 & 63] + "=="
99
+ )) : y === 2 && (C = (g[m - 2] << 8) + g[m - 1], S.push(
100
+ s[C >> 10] + s[C >> 4 & 63] + s[C << 2 & 63] + "="
88
101
  )), S.join("");
89
102
  }
90
- return F;
103
+ return O;
91
104
  }
92
- var je = Ue();
93
- const le = /* @__PURE__ */ He(je);
94
- class Ke {
105
+ var Ye = ze();
106
+ const de = /* @__PURE__ */ Re(Ye);
107
+ class Qe {
95
108
  constructor() {
96
- a(this, "deps", /* @__PURE__ */ new Map());
109
+ o(this, "deps", /* @__PURE__ */ new Map());
97
110
  }
98
111
  on(e, t) {
99
112
  this.deps.set(e, t);
@@ -111,65 +124,65 @@ class Ke {
111
124
  console.error("vite-plugin-css-injected-by-js", e);
112
125
  }
113
126
  })();
114
- var ze = Object.defineProperty, Qe = (s, e, t) => e in s ? ze(s, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[e] = t, ue = (s, e, t) => Qe(s, typeof e != "symbol" ? e + "" : 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, ue = (s, e, t) => Je(s, typeof e != "symbol" ? e + "" : e, t);
115
128
  function ee() {
116
129
  }
117
- function We(s, e) {
130
+ function qe(s, e) {
118
131
  for (const t in e) s[t] = e[t];
119
132
  return (
120
133
  /** @type {T & S} */
121
134
  s
122
135
  );
123
136
  }
124
- function ve(s) {
137
+ function ke(s) {
125
138
  return s();
126
139
  }
127
- function de() {
140
+ function he() {
128
141
  return /* @__PURE__ */ Object.create(null);
129
142
  }
130
143
  function U(s) {
131
- s.forEach(ve);
144
+ s.forEach(ke);
132
145
  }
133
146
  function V(s) {
134
147
  return typeof s == "function";
135
148
  }
136
- function ke(s, e) {
149
+ function ve(s, e) {
137
150
  return s != s ? e == e : s !== e || s && typeof s == "object" || typeof s == "function";
138
151
  }
139
- function Je(s) {
152
+ function Xe(s) {
140
153
  return Object.keys(s).length === 0;
141
154
  }
142
- function Re(s, e, t, n) {
155
+ function et(s, e, t, n) {
143
156
  if (s) {
144
- const i = Ie(s, e, t, n);
157
+ const i = _e(s, e, t, n);
145
158
  return s[0](i);
146
159
  }
147
160
  }
148
- function Ie(s, e, t, n) {
149
- return s[1] && n ? We(t.ctx.slice(), s[1](n(e))) : t.ctx;
161
+ function _e(s, e, t, n) {
162
+ return s[1] && n ? qe(t.ctx.slice(), s[1](n(e))) : t.ctx;
150
163
  }
151
- function Ye(s, e, t, n) {
164
+ function tt(s, e, t, n) {
152
165
  if (s[2] && n) {
153
166
  const i = s[2](n(t));
154
167
  if (e.dirty === void 0)
155
168
  return i;
156
169
  if (typeof i == "object") {
157
- const r = [], o = Math.max(e.dirty.length, i.length);
158
- for (let l = 0; l < o; l += 1)
159
- r[l] = e.dirty[l] | i[l];
170
+ const r = [], a = Math.max(e.dirty.length, i.length);
171
+ for (let c = 0; c < a; c += 1)
172
+ r[c] = e.dirty[c] | i[c];
160
173
  return r;
161
174
  }
162
175
  return e.dirty | i;
163
176
  }
164
177
  return e.dirty;
165
178
  }
166
- function qe(s, e, t, n, i, r) {
179
+ function nt(s, e, t, n, i, r) {
167
180
  if (i) {
168
- const o = Ie(e, t, n, r);
169
- s.p(o, i);
181
+ const a = _e(e, t, n, r);
182
+ s.p(a, i);
170
183
  }
171
184
  }
172
- function Xe(s) {
185
+ function st(s) {
173
186
  if (s.ctx.length > 32) {
174
187
  const e = [], t = s.ctx.length / 32;
175
188
  for (let n = 0; n < t; n++)
@@ -178,13 +191,13 @@ function Xe(s) {
178
191
  }
179
192
  return -1;
180
193
  }
181
- function he(s) {
194
+ function ge(s) {
182
195
  return s == null ? "" : s;
183
196
  }
184
197
  function L(s, e) {
185
198
  s.appendChild(e);
186
199
  }
187
- function R(s, e, t) {
200
+ function W(s, e, t) {
188
201
  s.insertBefore(e, t || null);
189
202
  }
190
203
  function j(s) {
@@ -194,7 +207,7 @@ function pe(s, e) {
194
207
  for (let t = 0; t < s.length; t += 1)
195
208
  s[t] && s[t].d(e);
196
209
  }
197
- function P(s) {
210
+ function D(s) {
198
211
  return document.createElement(s);
199
212
  }
200
213
  function T(s) {
@@ -203,149 +216,149 @@ function T(s) {
203
216
  function K() {
204
217
  return T(" ");
205
218
  }
206
- function et() {
219
+ function it() {
207
220
  return T("");
208
221
  }
209
- function G(s, e, t, n) {
222
+ function F(s, e, t, n) {
210
223
  return s.addEventListener(e, t, n), () => s.removeEventListener(e, t, n);
211
224
  }
212
- function B(s, e, t) {
225
+ function A(s, e, t) {
213
226
  t == null ? s.removeAttribute(e) : s.getAttribute(e) !== t && s.setAttribute(e, t);
214
227
  }
215
- function tt(s) {
228
+ function rt(s) {
216
229
  return Array.from(s.childNodes);
217
230
  }
218
- function z(s, e) {
231
+ function R(s, e) {
219
232
  e = "" + e, s.data !== e && (s.data = /** @type {string} */
220
233
  e);
221
234
  }
222
- function W(s, e, t, n) {
235
+ function Y(s, e, t, n) {
223
236
  t == null ? s.style.removeProperty(e) : s.style.setProperty(e, t, "");
224
237
  }
225
238
  let se;
226
239
  function Z(s) {
227
240
  se = s;
228
241
  }
229
- const N = [], ge = [];
242
+ const x = [], ye = [];
230
243
  let M = [];
231
- const ye = [], nt = /* @__PURE__ */ Promise.resolve();
244
+ const Ce = [], at = /* @__PURE__ */ Promise.resolve();
232
245
  let te = !1;
233
- function st() {
234
- te || (te = !0, nt.then(_e));
246
+ function ot() {
247
+ te || (te = !0, at.then(Le));
235
248
  }
236
249
  function ne(s) {
237
250
  M.push(s);
238
251
  }
239
252
  const X = /* @__PURE__ */ new Set();
240
- let x = 0;
241
- function _e() {
242
- if (x !== 0)
253
+ let N = 0;
254
+ function Le() {
255
+ if (N !== 0)
243
256
  return;
244
257
  const s = se;
245
258
  do {
246
259
  try {
247
- for (; x < N.length; ) {
248
- const e = N[x];
249
- x++, Z(e), it(e.$$);
260
+ for (; N < x.length; ) {
261
+ const e = x[N];
262
+ N++, Z(e), ct(e.$$);
250
263
  }
251
264
  } catch (e) {
252
- throw N.length = 0, x = 0, e;
265
+ throw x.length = 0, N = 0, e;
253
266
  }
254
- for (Z(null), N.length = 0, x = 0; ge.length; ) ge.pop()();
267
+ for (Z(null), x.length = 0, N = 0; ye.length; ) ye.pop()();
255
268
  for (let e = 0; e < M.length; e += 1) {
256
269
  const t = M[e];
257
270
  X.has(t) || (X.add(t), t());
258
271
  }
259
272
  M.length = 0;
260
- } while (N.length);
261
- for (; ye.length; )
262
- ye.pop()();
273
+ } while (x.length);
274
+ for (; Ce.length; )
275
+ Ce.pop()();
263
276
  te = !1, X.clear(), Z(s);
264
277
  }
265
- function it(s) {
278
+ function ct(s) {
266
279
  if (s.fragment !== null) {
267
280
  s.update(), U(s.before_update);
268
281
  const e = s.dirty;
269
282
  s.dirty = [-1], s.fragment && s.fragment.p(s.ctx, e), s.after_update.forEach(ne);
270
283
  }
271
284
  }
272
- function rt(s) {
285
+ function lt(s) {
273
286
  const e = [], t = [];
274
287
  M.forEach((n) => s.indexOf(n) === -1 ? e.push(n) : t.push(n)), t.forEach((n) => n()), M = e;
275
288
  }
276
- const Q = /* @__PURE__ */ new Set();
277
- let at;
289
+ const z = /* @__PURE__ */ new Set();
290
+ let dt;
278
291
  function ie(s, e) {
279
- s && s.i && (Q.delete(s), s.i(e));
292
+ s && s.i && (z.delete(s), s.i(e));
280
293
  }
281
- function Le(s, e, t, n) {
294
+ function Pe(s, e, t, n) {
282
295
  if (s && s.o) {
283
- if (Q.has(s)) return;
284
- Q.add(s), at.c.push(() => {
285
- Q.delete(s);
296
+ if (z.has(s)) return;
297
+ z.add(s), dt.c.push(() => {
298
+ z.delete(s);
286
299
  }), s.o(e);
287
300
  }
288
301
  }
289
- function J(s) {
302
+ function Q(s) {
290
303
  return (s == null ? void 0 : s.length) !== void 0 ? s : Array.from(s);
291
304
  }
292
- function ot(s) {
305
+ function ut(s) {
293
306
  s && s.c();
294
307
  }
295
308
  function Ae(s, e, t) {
296
309
  const { fragment: n, after_update: i } = s.$$;
297
310
  n && n.m(e, t), ne(() => {
298
- const r = s.$$.on_mount.map(ve).filter(V);
311
+ const r = s.$$.on_mount.map(ke).filter(V);
299
312
  s.$$.on_destroy ? s.$$.on_destroy.push(...r) : U(r), s.$$.on_mount = [];
300
313
  }), i.forEach(ne);
301
314
  }
302
315
  function Be(s, e) {
303
316
  const t = s.$$;
304
- t.fragment !== null && (rt(t.after_update), U(t.on_destroy), t.fragment && t.fragment.d(e), t.on_destroy = t.fragment = null, t.ctx = []);
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 = []);
305
318
  }
306
- function ct(s, e) {
307
- s.$$.dirty[0] === -1 && (N.push(s), st(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
319
+ function ht(s, e) {
320
+ s.$$.dirty[0] === -1 && (x.push(s), ot(), s.$$.dirty.fill(0)), s.$$.dirty[e / 31 | 0] |= 1 << e % 31;
308
321
  }
309
- function De(s, e, t, n, i, r, o = null, l = [-1]) {
310
- const d = se;
322
+ function De(s, e, t, n, i, r, a = null, c = [-1]) {
323
+ const u = se;
311
324
  Z(s);
312
- const u = s.$$ = {
325
+ const d = s.$$ = {
313
326
  fragment: null,
314
327
  ctx: [],
315
328
  // state
316
329
  props: r,
317
330
  update: ee,
318
331
  not_equal: i,
319
- bound: de(),
332
+ bound: he(),
320
333
  // lifecycle
321
334
  on_mount: [],
322
335
  on_destroy: [],
323
336
  on_disconnect: [],
324
337
  before_update: [],
325
338
  after_update: [],
326
- context: new Map(e.context || (d ? d.$$.context : [])),
339
+ context: new Map(e.context || (u ? u.$$.context : [])),
327
340
  // everything else
328
- callbacks: de(),
329
- dirty: l,
341
+ callbacks: he(),
342
+ dirty: c,
330
343
  skip_bound: !1,
331
- root: e.target || d.$$.root
344
+ root: e.target || u.$$.root
332
345
  };
333
- o && o(u.root);
334
- let C = !1;
335
- if (u.ctx = t ? t(s, e.props || {}, (g, w, ...h) => {
336
- const f = h.length ? h[0] : w;
337
- return u.ctx && i(u.ctx[g], u.ctx[g] = f) && (!u.skip_bound && u.bound[g] && u.bound[g](f), C && ct(s, g)), w;
338
- }) : [], u.update(), C = !0, U(u.before_update), u.fragment = n ? n(u.ctx) : !1, e.target) {
346
+ a && a(d.root);
347
+ let f = !1;
348
+ if (d.ctx = t ? t(s, e.props || {}, (h, w, ...g) => {
349
+ const C = g.length ? g[0] : w;
350
+ return d.ctx && i(d.ctx[h], d.ctx[h] = C) && (!d.skip_bound && d.bound[h] && d.bound[h](C), f && ht(s, h)), w;
351
+ }) : [], d.update(), f = !0, U(d.before_update), d.fragment = n ? n(d.ctx) : !1, e.target) {
339
352
  if (e.hydrate) {
340
- const g = tt(e.target);
341
- u.fragment && u.fragment.l(g), g.forEach(j);
353
+ const h = rt(e.target);
354
+ d.fragment && d.fragment.l(h), h.forEach(j);
342
355
  } else
343
- u.fragment && u.fragment.c();
344
- e.intro && ie(s.$$.fragment), Ae(s, e.target, e.anchor), _e();
356
+ d.fragment && d.fragment.c();
357
+ e.intro && ie(s.$$.fragment), Ae(s, e.target, e.anchor), Le();
345
358
  }
346
- Z(d);
359
+ Z(u);
347
360
  }
348
- class Pe {
361
+ class be {
349
362
  constructor() {
350
363
  ue(this, "$$"), ue(this, "$$set");
351
364
  }
@@ -373,27 +386,27 @@ class Pe {
373
386
  * @returns {void}
374
387
  */
375
388
  $set(e) {
376
- this.$$set && !Je(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
389
+ this.$$set && !Xe(e) && (this.$$.skip_bound = !0, this.$$set(e), this.$$.skip_bound = !1);
377
390
  }
378
391
  }
379
- const lt = "4";
380
- typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(lt);
381
- function ut(s) {
392
+ const gt = "4";
393
+ typeof window != "undefined" && (window.__svelte || (window.__svelte = { v: /* @__PURE__ */ new Set() })).v.add(gt);
394
+ function yt(s) {
382
395
  let e, t, n, i = (
383
396
  /*title*/
384
397
  (s[1] || "标题") + ""
385
- ), r, o, l, d, u, C, g = (
398
+ ), r, a, c, u, d, f, h = (
386
399
  /*cancelText*/
387
400
  (s[4] || "取消") + ""
388
- ), w, h, f, E = (
401
+ ), w, g, C, m = (
389
402
  /*okText*/
390
403
  (s[5] || "确认") + ""
391
- ), y, S, k, p;
392
- const D = (
404
+ ), y, S, k, _;
405
+ const B = (
393
406
  /*#slots*/
394
407
  s[8].default
395
- ), v = Re(
396
- D,
408
+ ), I = et(
409
+ B,
397
410
  s,
398
411
  /*$$scope*/
399
412
  s[7],
@@ -401,29 +414,29 @@ function ut(s) {
401
414
  );
402
415
  return {
403
416
  c() {
404
- e = P("div"), t = P("div"), n = P("div"), r = T(i), o = K(), l = P("div"), v && v.c(), d = K(), u = P("div"), C = P("button"), w = T(g), h = K(), f = P("button"), y = T(E), B(n, "class", "model-title svelte-16iv9d0"), B(l, "class", "slot svelte-16iv9d0"), B(C, "class", "modal-btn svelte-16iv9d0"), B(f, "class", "modal-btn success svelte-16iv9d0"), W(
405
- f,
417
+ e = D("div"), t = D("div"), n = D("div"), r = T(i), a = K(), c = D("div"), I && I.c(), u = K(), d = D("div"), f = D("button"), w = T(h), g = K(), C = D("button"), y = T(m), A(n, "class", "model-title svelte-16iv9d0"), A(c, "class", "slot svelte-16iv9d0"), A(f, "class", "modal-btn svelte-16iv9d0"), A(C, "class", "modal-btn success svelte-16iv9d0"), Y(
418
+ C,
406
419
  "background-color",
407
420
  /*theme*/
408
421
  s[6]
409
- ), B(u, "class", "modal-footer svelte-16iv9d0"), B(t, "class", "modal-content svelte-16iv9d0"), B(e, "class", "modal-background modal-visible svelte-16iv9d0");
422
+ ), A(d, "class", "modal-footer svelte-16iv9d0"), A(t, "class", "modal-content svelte-16iv9d0"), A(e, "class", "modal-background modal-visible svelte-16iv9d0");
410
423
  },
411
- m(A, b) {
412
- R(A, e, b), L(e, t), L(t, n), L(n, r), L(t, o), L(t, l), v && v.m(l, null), L(t, d), L(t, u), L(u, C), L(C, w), L(u, h), L(u, f), L(f, y), S = !0, k || (p = [
413
- G(C, "click", function() {
424
+ m(P, b) {
425
+ W(P, e, b), L(e, t), L(t, n), L(n, r), L(t, a), L(t, c), I && I.m(c, null), L(t, u), L(t, d), L(d, f), L(f, w), L(d, g), L(d, C), L(C, y), S = !0, k || (_ = [
426
+ F(f, "click", function() {
414
427
  V(
415
428
  /*onCancel*/
416
429
  s[0]
417
430
  ) && s[0].apply(this, arguments);
418
431
  }),
419
- G(f, "click", function() {
432
+ F(C, "click", function() {
420
433
  V(
421
434
  /*onOk*/
422
435
  s[2]
423
436
  ) && s[2].apply(this, arguments);
424
437
  }),
425
- G(t, "click", dt),
426
- G(e, "click", function() {
438
+ F(t, "click", Ct),
439
+ F(e, "click", function() {
427
440
  V(
428
441
  /*onClose*/
429
442
  s[3]
@@ -431,60 +444,60 @@ function ut(s) {
431
444
  })
432
445
  ], k = !0);
433
446
  },
434
- p(A, [b]) {
435
- s = A, (!S || b & /*title*/
447
+ p(P, [b]) {
448
+ s = P, (!S || b & /*title*/
436
449
  2) && i !== (i = /*title*/
437
- (s[1] || "标题") + "") && z(r, i), v && v.p && (!S || b & /*$$scope*/
438
- 128) && qe(
439
- v,
440
- D,
450
+ (s[1] || "标题") + "") && R(r, i), I && I.p && (!S || b & /*$$scope*/
451
+ 128) && nt(
452
+ I,
453
+ B,
441
454
  s,
442
455
  /*$$scope*/
443
456
  s[7],
444
- S ? Ye(
445
- D,
457
+ S ? tt(
458
+ B,
446
459
  /*$$scope*/
447
460
  s[7],
448
461
  b,
449
462
  null
450
- ) : Xe(
463
+ ) : st(
451
464
  /*$$scope*/
452
465
  s[7]
453
466
  ),
454
467
  null
455
468
  ), (!S || b & /*cancelText*/
456
- 16) && g !== (g = /*cancelText*/
457
- (s[4] || "取消") + "") && z(w, g), (!S || b & /*okText*/
458
- 32) && E !== (E = /*okText*/
459
- (s[5] || "确认") + "") && z(y, E), (!S || b & /*theme*/
460
- 64) && W(
461
- f,
469
+ 16) && h !== (h = /*cancelText*/
470
+ (s[4] || "取消") + "") && R(w, h), (!S || b & /*okText*/
471
+ 32) && m !== (m = /*okText*/
472
+ (s[5] || "确认") + "") && R(y, m), (!S || b & /*theme*/
473
+ 64) && Y(
474
+ C,
462
475
  "background-color",
463
476
  /*theme*/
464
477
  s[6]
465
478
  );
466
479
  },
467
- i(A) {
468
- S || (ie(v, A), S = !0);
480
+ i(P) {
481
+ S || (ie(I, P), S = !0);
469
482
  },
470
- o(A) {
471
- Le(v, A), S = !1;
483
+ o(P) {
484
+ Pe(I, P), S = !1;
472
485
  },
473
- d(A) {
474
- A && j(e), v && v.d(A), k = !1, U(p);
486
+ d(P) {
487
+ P && j(e), I && I.d(P), k = !1, U(_);
475
488
  }
476
489
  };
477
490
  }
478
- const dt = (s) => s.stopPropagation();
479
- function ht(s, e, t) {
480
- let { $$slots: n = {}, $$scope: i } = e, { onCancel: r } = e, { title: o } = e, { onOk: l } = e, { onClose: d } = e, { cancelText: u } = e, { okText: C } = e, { theme: g } = e;
491
+ const Ct = (s) => s.stopPropagation();
492
+ function ft(s, e, t) {
493
+ let { $$slots: n = {}, $$scope: i } = e, { onCancel: r } = e, { title: a } = e, { onOk: c } = e, { onClose: u } = e, { cancelText: d } = e, { okText: f } = e, { theme: h } = e;
481
494
  return s.$$set = (w) => {
482
- "onCancel" in w && t(0, r = w.onCancel), "title" in w && t(1, o = w.title), "onOk" in w && t(2, l = w.onOk), "onClose" in w && t(3, d = w.onClose), "cancelText" in w && t(4, u = w.cancelText), "okText" in w && t(5, C = w.okText), "theme" in w && t(6, g = w.theme), "$$scope" in w && t(7, i = w.$$scope);
483
- }, [r, o, l, d, u, C, g, i, n];
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, u = w.onClose), "cancelText" in w && t(4, d = w.cancelText), "okText" in w && t(5, f = w.okText), "theme" in w && t(6, h = w.theme), "$$scope" in w && t(7, i = w.$$scope);
496
+ }, [r, a, c, u, d, f, h, i, n];
484
497
  }
485
- class gt extends Pe {
498
+ class wt extends be {
486
499
  constructor(e) {
487
- super(), De(this, e, ht, ut, ke, {
500
+ super(), De(this, e, ft, yt, ve, {
488
501
  onCancel: 0,
489
502
  title: 1,
490
503
  onOk: 2,
@@ -499,11 +512,11 @@ function fe(s, e, t) {
499
512
  const n = s.slice();
500
513
  return n[13] = e[t], n[15] = t, n;
501
514
  }
502
- function Ce(s, e, t) {
515
+ function we(s, e, t) {
503
516
  const n = s.slice();
504
517
  return n[16] = e[t], n;
505
518
  }
506
- function we(s) {
519
+ function Ee(s) {
507
520
  let e, t = (
508
521
  /*col*/
509
522
  (s[16].format ? (
@@ -522,11 +535,11 @@ function we(s) {
522
535
  ), n;
523
536
  return {
524
537
  c() {
525
- e = P("div"), n = T(t), B(e, "class", "svelte-1kh75ag"), W(e, "width", `${100 / /*columns*/
538
+ e = D("div"), n = T(t), A(e, "class", "svelte-1kh75ag"), Y(e, "width", `${100 / /*columns*/
526
539
  s[1].length}%`);
527
540
  },
528
541
  m(i, r) {
529
- R(i, e, r), L(e, n);
542
+ W(i, e, r), L(e, n);
530
543
  },
531
544
  p(i, r) {
532
545
  r & /*columns, data*/
@@ -543,8 +556,8 @@ function we(s) {
543
556
  /*col*/
544
557
  i[16].key
545
558
  ]
546
- )) + "") && z(n, t), r & /*columns*/
547
- 2 && W(e, "width", `${100 / /*columns*/
559
+ )) + "") && R(n, t), r & /*columns*/
560
+ 2 && Y(e, "width", `${100 / /*columns*/
548
561
  i[1].length}%`);
549
562
  },
550
563
  d(i) {
@@ -553,13 +566,13 @@ function we(s) {
553
566
  };
554
567
  }
555
568
  function me(s) {
556
- let e, t, n, i, r, o = J(
569
+ let e, t, n, i, r, a = Q(
557
570
  /*columns*/
558
571
  s[1]
559
- ), l = [];
560
- for (let u = 0; u < o.length; u += 1)
561
- l[u] = we(Ce(s, o, u));
562
- function d() {
572
+ ), c = [];
573
+ for (let d = 0; d < a.length; d += 1)
574
+ c[d] = Ee(we(s, a, d));
575
+ function u() {
563
576
  return (
564
577
  /*click_handler*/
565
578
  s[12](
@@ -570,49 +583,49 @@ function me(s) {
570
583
  }
571
584
  return {
572
585
  c() {
573
- e = P("div");
574
- for (let u = 0; u < l.length; u += 1)
575
- l[u].c();
576
- t = K(), B(e, "class", n = he(`cert-item ${/*index*/
586
+ e = D("div");
587
+ for (let d = 0; d < c.length; d += 1)
588
+ c[d].c();
589
+ t = K(), A(e, "class", n = ge(`cert-item ${/*index*/
577
590
  s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
578
591
  s[15] === /*selectedIndex*/
579
592
  s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag");
580
593
  },
581
- m(u, C) {
582
- R(u, e, C);
583
- for (let g = 0; g < l.length; g += 1)
584
- l[g] && l[g].m(e, null);
585
- L(e, t), i || (r = G(e, "click", d), i = !0);
594
+ m(d, f) {
595
+ W(d, e, f);
596
+ for (let h = 0; h < c.length; h += 1)
597
+ c[h] && c[h].m(e, null);
598
+ L(e, t), i || (r = F(e, "click", u), i = !0);
586
599
  },
587
- p(u, C) {
588
- if (s = u, C & /*columns, data*/
600
+ p(d, f) {
601
+ if (s = d, f & /*columns, data*/
589
602
  3) {
590
- o = J(
603
+ a = Q(
591
604
  /*columns*/
592
605
  s[1]
593
606
  );
594
- let g;
595
- for (g = 0; g < o.length; g += 1) {
596
- const w = Ce(s, o, g);
597
- l[g] ? l[g].p(w, C) : (l[g] = we(w), l[g].c(), l[g].m(e, t));
607
+ let h;
608
+ for (h = 0; h < a.length; h += 1) {
609
+ const w = we(s, a, h);
610
+ c[h] ? c[h].p(w, f) : (c[h] = Ee(w), c[h].c(), c[h].m(e, t));
598
611
  }
599
- for (; g < l.length; g += 1)
600
- l[g].d(1);
601
- l.length = o.length;
612
+ for (; h < c.length; h += 1)
613
+ c[h].d(1);
614
+ c.length = a.length;
602
615
  }
603
- C & /*selectedIndex*/
604
- 128 && n !== (n = he(`cert-item ${/*index*/
616
+ f & /*selectedIndex*/
617
+ 128 && n !== (n = ge(`cert-item ${/*index*/
605
618
  s[15] === 0 ? "cert-item-first" : ""} ${/*index*/
606
619
  s[15] === /*selectedIndex*/
607
- s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") && B(e, "class", n);
620
+ s[7] ? "cert-item-selected" : ""}`) + " svelte-1kh75ag") && A(e, "class", n);
608
621
  },
609
- d(u) {
610
- u && j(e), pe(l, u), i = !1, r();
622
+ d(d) {
623
+ d && j(e), pe(c, d), i = !1, r();
611
624
  }
612
625
  };
613
626
  }
614
- function yt(s) {
615
- let e, t = J(
627
+ function Et(s) {
628
+ let e, t = Q(
616
629
  /*data*/
617
630
  s[0]
618
631
  ), n = [];
@@ -622,27 +635,27 @@ function yt(s) {
622
635
  c() {
623
636
  for (let i = 0; i < n.length; i += 1)
624
637
  n[i].c();
625
- e = et();
638
+ e = it();
626
639
  },
627
640
  m(i, r) {
628
- for (let o = 0; o < n.length; o += 1)
629
- n[o] && n[o].m(i, r);
630
- R(i, e, r);
641
+ for (let a = 0; a < n.length; a += 1)
642
+ n[a] && n[a].m(i, r);
643
+ W(i, e, r);
631
644
  },
632
645
  p(i, r) {
633
646
  if (r & /*selectedIndex, columns, data*/
634
647
  131) {
635
- t = J(
648
+ t = Q(
636
649
  /*data*/
637
650
  i[0]
638
651
  );
639
- let o;
640
- for (o = 0; o < t.length; o += 1) {
641
- const l = fe(i, t, o);
642
- n[o] ? n[o].p(l, r) : (n[o] = me(l), n[o].c(), n[o].m(e.parentNode, e));
652
+ let a;
653
+ for (a = 0; a < t.length; a += 1) {
654
+ const c = fe(i, t, a);
655
+ n[a] ? n[a].p(c, r) : (n[a] = me(c), n[a].c(), n[a].m(e.parentNode, e));
643
656
  }
644
- for (; o < n.length; o += 1)
645
- n[o].d(1);
657
+ for (; a < n.length; a += 1)
658
+ n[a].d(1);
646
659
  n.length = t.length;
647
660
  }
648
661
  },
@@ -651,9 +664,9 @@ function yt(s) {
651
664
  }
652
665
  };
653
666
  }
654
- function ft(s) {
667
+ function mt(s) {
655
668
  let e, t;
656
- return e = new gt({
669
+ return e = new wt({
657
670
  props: {
658
671
  onOk: (
659
672
  /*handleOk*/
@@ -683,12 +696,12 @@ function ft(s) {
683
696
  /*theme*/
684
697
  s[5]
685
698
  ),
686
- $$slots: { default: [yt] },
699
+ $$slots: { default: [Et] },
687
700
  $$scope: { ctx: s }
688
701
  }
689
702
  }), {
690
703
  c() {
691
- ot(e.$$.fragment);
704
+ ut(e.$$.fragment);
692
705
  },
693
706
  m(n, i) {
694
707
  Ae(e, n, i), t = !0;
@@ -712,41 +725,41 @@ function ft(s) {
712
725
  t || (ie(e.$$.fragment, n), t = !0);
713
726
  },
714
727
  o(n) {
715
- Le(e.$$.fragment, n), t = !1;
728
+ Pe(e.$$.fragment, n), t = !1;
716
729
  },
717
730
  d(n) {
718
731
  Be(e, n);
719
732
  }
720
733
  };
721
734
  }
722
- function Ct(s, e, t) {
723
- let { data: n = [] } = e, { columns: i = [] } = e, { onCancel: r } = e, { onOk: o } = e, { onClose: l } = e, { cancelText: d = "" } = e, { okText: u = "" } = e, { theme: C = "#409eff" } = e, { title: g = "" } = e, w = 0;
724
- const h = () => {
725
- r(`${g}失败`), l == null || l();
726
- }, f = () => {
727
- o == null || o(n[w]), l == null || l();
728
- }, E = (y) => t(7, w = y);
735
+ function St(s, e, t) {
736
+ let { data: n = [] } = e, { columns: i = [] } = e, { onCancel: r } = e, { onOk: a } = e, { onClose: c } = e, { cancelText: u = "" } = e, { okText: d = "" } = e, { theme: f = "#409eff" } = e, { title: h = "" } = e, w = 0;
737
+ const g = () => {
738
+ r(`${h}失败`), c == null || c();
739
+ }, C = () => {
740
+ a == null || a(n[w]), c == null || c();
741
+ }, m = (y) => t(7, w = y);
729
742
  return s.$$set = (y) => {
730
- "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, o = y.onOk), "onClose" in y && t(2, l = 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, g = y.title);
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, u = y.cancelText), "okText" in y && t(4, d = y.okText), "theme" in y && t(5, f = y.theme), "title" in y && t(6, h = y.title);
731
744
  }, [
732
745
  n,
733
746
  i,
734
- l,
735
- d,
747
+ c,
736
748
  u,
737
- C,
738
- g,
739
- w,
740
- h,
749
+ d,
741
750
  f,
751
+ h,
752
+ w,
753
+ g,
754
+ C,
742
755
  r,
743
- o,
744
- E
756
+ a,
757
+ m
745
758
  ];
746
759
  }
747
- class wt extends Pe {
760
+ class It extends be {
748
761
  constructor(e) {
749
- super(), De(this, e, Ct, ft, ke, {
762
+ super(), De(this, e, St, mt, ve, {
750
763
  data: 0,
751
764
  columns: 1,
752
765
  onCancel: 10,
@@ -759,13 +772,13 @@ class wt extends Pe {
759
772
  });
760
773
  }
761
774
  }
762
- class mt {
775
+ class kt {
763
776
  constructor() {
764
- a(this, "modalInstance", { current: null });
765
- a(this, "open", (e) => new Promise((t, n) => {
766
- this.modalInstance.current = new wt({
777
+ o(this, "modalInstance", { current: null });
778
+ o(this, "open", (e) => new Promise((t, n) => {
779
+ this.modalInstance.current = new It({
767
780
  target: document.body,
768
- props: _(m({}, e), {
781
+ props: p(E({}, e), {
769
782
  onCancel: (i) => {
770
783
  n({
771
784
  code: -1,
@@ -781,7 +794,7 @@ class mt {
781
794
  })
782
795
  });
783
796
  }));
784
- a(this, "close", () => {
797
+ o(this, "close", () => {
785
798
  setTimeout(() => {
786
799
  var e;
787
800
  (e = this.modalInstance.current) == null || e.$destroy();
@@ -789,27 +802,27 @@ class mt {
789
802
  });
790
803
  }
791
804
  }
792
- const O = new mt();
793
- function Et(s = 32, e = !0, t = 0) {
805
+ const G = new kt();
806
+ function vt(s = 32, e = !0, t = 0) {
794
807
  const n = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""), i = [];
795
808
  if (t = t || n.length, s)
796
809
  for (let r = 0; r < s; r++) i[r] = n[0 | Math.random() * t];
797
810
  else {
798
811
  let r;
799
812
  i[8] = i[13] = i[18] = i[23] = "-", i[14] = "4";
800
- for (let o = 0; o < 36; o++)
801
- i[o] || (r = 0 | Math.random() * 16, i[o] = n[o === 19 ? r & 3 | 8 : r]);
813
+ for (let a = 0; a < 36; a++)
814
+ i[a] || (r = 0 | Math.random() * 16, i[a] = n[a === 19 ? r & 3 | 8 : r]);
802
815
  }
803
816
  return e ? (i.shift(), `u${i.join("")}`) : i.join("");
804
817
  }
805
- const St = [
818
+ const _t = [
806
819
  {
807
820
  key: "CN"
808
821
  },
809
822
  {
810
823
  format: (s) => `${s.DevClass}(${s.sn})`
811
824
  }
812
- ], vt = [
825
+ ], pt = [
813
826
  {
814
827
  key: "SealId"
815
828
  },
@@ -819,11 +832,11 @@ const St = [
819
832
  {
820
833
  format: (s) => `${s.FileName}(${s.FileSize}B)`
821
834
  }
822
- ], Ee = [
835
+ ], Se = [
823
836
  {
824
837
  key: "SealId"
825
838
  }
826
- ], kt = [
839
+ ], Lt = [
827
840
  {
828
841
  key: "manu"
829
842
  },
@@ -831,107 +844,107 @@ const St = [
831
844
  key: "sn"
832
845
  }
833
846
  ];
834
- class It {
847
+ class Pt {
835
848
  constructor(e) {
836
- a(this, "socketInstance", null);
837
- a(this, "eventBus", new Ke());
838
- a(this, "scene");
839
- a(this, "isRememberPin", !1);
840
- a(this, "pinPolicy");
841
- a(this, "socketConfig", null);
842
- a(this, "isConnecting", !1);
843
- a(this, "messageQueue", []);
844
- a(this, "getSocketReadyState", () => {
849
+ o(this, "socketInstance", null);
850
+ o(this, "eventBus", new Qe());
851
+ o(this, "scene");
852
+ o(this, "isRememberPin", !1);
853
+ o(this, "pinPolicy");
854
+ o(this, "socketConfig", null);
855
+ o(this, "isConnecting", !1);
856
+ o(this, "messageQueue", []);
857
+ o(this, "getSocketReadyState", () => {
845
858
  var e;
846
859
  return (e = this.socketInstance) == null ? void 0 : e.readyState;
847
860
  });
848
- a(this, "destroy", () => {
861
+ o(this, "destroy", () => {
849
862
  var e;
850
863
  (e = this.socketInstance) == null || e.close();
851
864
  });
852
- a(this, "sendMessage", (e, t, n) => new Promise((i, r) => {
853
- var l;
854
- const o = () => {
855
- var g, w;
856
- if (((g = this.socketInstance) == null ? void 0 : g.readyState) !== WebSocket.OPEN) {
865
+ o(this, "sendMessage", (e, t, n) => new Promise((i, r) => {
866
+ var c;
867
+ const a = () => {
868
+ var h, w;
869
+ if (((h = this.socketInstance) == null ? void 0 : h.readyState) !== WebSocket.OPEN) {
857
870
  r({
858
- errCode: Ve,
871
+ errCode: je,
859
872
  msg: "数字证书客户端连接失败"
860
873
  });
861
874
  return;
862
875
  }
863
- const d = Et(), u = (h) => {
864
- h.success ? i(h.data) : r(h);
865
- }, C = {
876
+ const u = vt(), d = (g) => {
877
+ g.success ? i(g.data) : r(g);
878
+ }, f = {
866
879
  function: e,
867
880
  args: t ? [t] : [],
868
- msgid: d
881
+ msgid: u
869
882
  };
870
- (w = this.socketInstance) == null || w.send(JSON.stringify(C)), this.eventBus.on(e, u), this.eventBus.on(d, u);
883
+ (w = this.socketInstance) == null || w.send(JSON.stringify(f)), this.eventBus.on(e, d), this.eventBus.on(u, d);
871
884
  };
872
885
  if (n && (this.scene & n) !== n) {
873
886
  r({
874
- errCode: Ze,
887
+ errCode: Ke,
875
888
  msg: "无权限执行此操作"
876
889
  });
877
890
  return;
878
891
  }
879
- if (((l = this.socketInstance) == null ? void 0 : l.readyState) === WebSocket.OPEN) {
880
- o();
892
+ if (((c = this.socketInstance) == null ? void 0 : c.readyState) === WebSocket.OPEN) {
893
+ a();
881
894
  return;
882
895
  }
883
- this.messageQueue.push(o), this.isConnecting || this.initSocket(this.socketConfig);
896
+ this.messageQueue.push(a), this.isConnecting || this.initSocket(this.socketConfig);
884
897
  }));
885
- a(this, "flushMsgQueue", () => {
898
+ o(this, "flushMsgQueue", () => {
886
899
  var e;
887
900
  (e = this.messageQueue) == null || e.forEach((t) => t()), this.messageQueue = [];
888
901
  });
889
- a(this, "handleEventData", (e) => c(this, null, function* () {
890
- var t, n, i, r, o, l, d, u;
902
+ o(this, "handleEventData", (e) => l(this, null, function* () {
903
+ var t, n, i, r, a, c, u, d;
891
904
  if (e.data instanceof Blob) {
892
- const C = yield e.data.arrayBuffer(), w = new TextDecoder(
905
+ const f = yield e.data.arrayBuffer(), w = new TextDecoder(
893
906
  navigator.userAgent.includes("Windows") ? "gbk" : "utf-8"
894
- ).decode(C), h = JSON.parse(w), f = {
895
- success: (t = h.result) == null ? void 0 : t.success,
896
- msg: (n = h.result) == null ? void 0 : n.msg,
897
- errCode: (i = h.result) == null ? void 0 : i.errCode,
898
- data: h.data,
899
- type: (r = h.result) == null ? void 0 : r.event
900
- }, E = (o = h.result) == null ? void 0 : o.function, y = (l = h.result) == null ? void 0 : l.msgid;
901
- 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);
907
+ ).decode(f), g = JSON.parse(w), C = {
908
+ success: (t = g.result) == null ? void 0 : t.success,
909
+ msg: (n = g.result) == null ? void 0 : n.msg,
910
+ errCode: (i = g.result) == null ? void 0 : i.errCode,
911
+ data: g.data,
912
+ type: (r = g.result) == null ? void 0 : r.event
913
+ }, m = (a = g.result) == null ? void 0 : a.function, y = (c = g.result) == null ? void 0 : c.msgid;
914
+ y ? this.eventBus.emit(y, C) : this.eventBus.emit(m, C), (d = (u = this.socketConfig) == null ? void 0 : u.onMessage) == null || d.call(u, C);
902
915
  }
903
916
  }));
904
- a(this, "base64Encode", (e) => {
917
+ o(this, "base64Encode", (e) => {
905
918
  const t = new TextEncoder().encode(e);
906
- return le.fromByteArray(t);
919
+ return de.fromByteArray(t);
907
920
  });
908
- a(this, "base64Decode", (e) => {
909
- const t = le.toByteArray(e);
921
+ o(this, "base64Decode", (e) => {
922
+ const t = de.toByteArray(e);
910
923
  return new TextDecoder().decode(t);
911
924
  });
912
- a(this, "changeIsRememberPin", (e) => c(this, null, function* () {
925
+ o(this, "changeIsRememberPin", (e) => l(this, null, function* () {
913
926
  this.isRememberPin = e;
914
927
  }));
915
- a(this, "changePinPolicy", (e) => c(this, null, function* () {
928
+ o(this, "changePinPolicy", (e) => l(this, null, function* () {
916
929
  this.pinPolicy = e;
917
930
  }));
918
- a(this, "checkCertIsLogin", (e) => c(this, null, function* () {
931
+ o(this, "checkCertIsLogin", (e) => l(this, null, function* () {
919
932
  return yield this.sendMessage("GZCA_IsLogin", e);
920
933
  }));
921
- a(this, "addUkeyEvents", () => c(this, null, function* () {
934
+ o(this, "addUkeyEvents", () => l(this, null, function* () {
922
935
  this.sendMessage("GZCA_WaitForDevEvent", {
923
- Type: Ge
936
+ Type: He
924
937
  }), this.eventBus.on(
925
938
  "GZCA_OnDeviceChange",
926
939
  (e) => {
927
940
  var t, n, i;
928
- (i = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || i.call(t, _(m({}, e), {
941
+ (i = (t = this.socketConfig) == null ? void 0 : t.onUkeyChange) == null || i.call(t, p(E({}, e), {
929
942
  data: (n = e.data) == null ? void 0 : n[0]
930
943
  }));
931
944
  }
932
945
  );
933
946
  }));
934
- a(this, "certLogin", (e) => c(this, null, function* () {
947
+ o(this, "certLogin", (e) => l(this, null, function* () {
935
948
  const t = yield this.checkCertIsLogin({
936
949
  ContainerName: e
937
950
  });
@@ -942,7 +955,7 @@ class It {
942
955
  PinPolicy: this.pinPolicy
943
956
  }));
944
957
  }));
945
- a(this, "verifyPin", (e) => c(this, null, function* () {
958
+ o(this, "verifyPin", (e) => l(this, null, function* () {
946
959
  var t;
947
960
  yield this.sendMessage("GZCA_Login", {
948
961
  ContainerName: e.ContainerName,
@@ -951,198 +964,198 @@ class It {
951
964
  PinPolicy: this.pinPolicy
952
965
  });
953
966
  }));
954
- a(this, "getCert", (e, t, n) => c(this, null, function* () {
967
+ o(this, "getCert", (e, t, n) => l(this, null, function* () {
955
968
  const i = t != null ? t : yield this.chooseCert(e);
956
969
  return this.isRememberPin && n && (yield this.certLogin(i.ContainerName)), i;
957
970
  }));
958
- a(this, "chooseCert", (e) => c(this, null, function* () {
971
+ o(this, "chooseCert", (e) => l(this, null, function* () {
959
972
  var i;
960
973
  const t = yield this.getCertList(e);
961
- return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield O.open({
974
+ return t != null && t.length ? (t == null ? void 0 : t.length) === 1 ? t[0] : yield G.open({
962
975
  title: "选择证书",
963
976
  data: t,
964
- columns: St,
977
+ columns: _t,
965
978
  theme: (i = this.socketConfig) == null ? void 0 : i.theme
966
979
  }) : Promise.reject({
967
- errCode: Oe,
980
+ errCode: Ue,
968
981
  msg: "暂无证书"
969
982
  });
970
983
  }));
971
- a(this, "getCertList", (e) => c(this, null, function* () {
984
+ o(this, "getCertList", (e) => l(this, null, function* () {
972
985
  return yield this.sendMessage(
973
986
  "GZCA_GetCertList",
974
987
  e
975
988
  );
976
989
  }));
977
- a(this, "pkcs1Sign", (e) => c(this, null, function* () {
978
- return yield this.sendMessage("GZCA_Pkcs1SignData", m({
990
+ o(this, "pkcs1Sign", (e) => l(this, null, function* () {
991
+ return yield this.sendMessage("GZCA_Pkcs1SignData", E({
979
992
  IsLogin: this.getIsLogin(),
980
993
  PinPolicy: this.pinPolicy
981
994
  }, e != null ? e : {}));
982
995
  }));
983
- a(this, "pkcs1Base64Sign", (e) => c(this, null, function* () {
984
- return yield this.sendMessage("GZCA_Pkcs1SignDataEx", m({
996
+ o(this, "pkcs1Base64Sign", (e) => l(this, null, function* () {
997
+ return yield this.sendMessage("GZCA_Pkcs1SignDataEx", E({
985
998
  IsLogin: this.getIsLogin(),
986
999
  PinPolicy: this.pinPolicy
987
1000
  }, e != null ? e : {}));
988
1001
  }));
989
- a(this, "batchPkcs1Base64Sign", (e) => c(this, null, function* () {
990
- return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", m({
1002
+ o(this, "batchPkcs1Base64Sign", (e) => l(this, null, function* () {
1003
+ return yield this.sendMessage("GZCA_BatchPkcs1SignDataEx", E({
991
1004
  IsLogin: this.getIsLogin(),
992
1005
  PinPolicy: this.pinPolicy
993
1006
  }, e != null ? e : {}));
994
1007
  }));
995
- a(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
1008
+ o(this, "pkcs1VerifySignature", (e) => l(this, null, function* () {
996
1009
  return yield this.sendMessage("GZCA_Pkcs1VerifySign", e);
997
1010
  }));
998
- a(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
1011
+ o(this, "pkcs1Base64VerifySignature", (e) => l(this, null, function* () {
999
1012
  return yield this.sendMessage("GZCA_Pkcs1VerifySignEx", e);
1000
1013
  }));
1001
- a(this, "getSealList", (e) => c(this, null, function* () {
1014
+ o(this, "getSealList", (e) => l(this, null, function* () {
1002
1015
  return yield this.sendMessage(
1003
1016
  "GZCA_EnumSeals",
1004
- m({
1017
+ E({
1005
1018
  IsLogin: this.getIsLogin()
1006
1019
  }, e != null ? e : {}),
1007
- I.LEVEL_2
1020
+ v.LEVEL_2
1008
1021
  );
1009
1022
  }));
1010
- a(this, "writeSeal", (e) => c(this, null, function* () {
1023
+ o(this, "writeSeal", (e) => l(this, null, function* () {
1011
1024
  return yield this.sendMessage(
1012
1025
  "GZCA_WriteSeal",
1013
- m({
1026
+ E({
1014
1027
  IsLogin: this.getIsLogin()
1015
1028
  }, e != null ? e : {}),
1016
- I.LEVEL_2
1029
+ v.LEVEL_2
1017
1030
  );
1018
1031
  }));
1019
- a(this, "deleteSeal", (e) => c(this, null, function* () {
1032
+ o(this, "deleteSeal", (e) => l(this, null, function* () {
1020
1033
  return yield this.sendMessage(
1021
1034
  "GZCA_DeleteSeal",
1022
- m({
1035
+ E({
1023
1036
  IsLogin: this.getIsLogin()
1024
1037
  }, e != null ? e : {}),
1025
- I.LEVEL_2
1038
+ v.LEVEL_2
1026
1039
  );
1027
1040
  }));
1028
- a(this, "getSealInfo", (e) => c(this, null, function* () {
1041
+ o(this, "getSealInfo", (e) => l(this, null, function* () {
1029
1042
  return yield this.sendMessage(
1030
1043
  "GZCA_ReadSeal",
1031
- m({
1044
+ E({
1032
1045
  IsLogin: this.getIsLogin()
1033
1046
  }, e != null ? e : {}),
1034
- I.LEVEL_2
1047
+ v.LEVEL_2
1035
1048
  );
1036
1049
  }));
1037
- a(this, "getTPSealList", (e) => c(this, null, function* () {
1050
+ o(this, "getTPSealList", (e) => l(this, null, function* () {
1038
1051
  return yield this.sendMessage(
1039
1052
  "GZCA_GetSealPicList",
1040
- m({
1053
+ E({
1041
1054
  IsLogin: this.getIsLogin()
1042
1055
  }, e != null ? e : {}),
1043
- I.LEVEL_2
1056
+ v.LEVEL_2
1044
1057
  );
1045
1058
  }));
1046
- a(this, "getTPSealPic", (e) => c(this, null, function* () {
1059
+ o(this, "getTPSealPic", (e) => l(this, null, function* () {
1047
1060
  var n;
1048
1061
  return yield this.sendMessage(
1049
1062
  "GZCA_GetSealPicData",
1050
- m({
1063
+ E({
1051
1064
  IsLogin: (n = e.IsLogin) != null ? n : this.getIsLogin()
1052
1065
  }, e != null ? e : {}),
1053
- I.LEVEL_2
1066
+ v.LEVEL_2
1054
1067
  );
1055
1068
  }));
1056
- a(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
1069
+ o(this, "sm2SignPreprocess1", (e) => l(this, null, function* () {
1057
1070
  return yield this.sendMessage("GZCA_PrepareSm2SignStep1", e);
1058
1071
  }));
1059
- a(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
1072
+ o(this, "sm2SignPreprocess2", (e) => l(this, null, function* () {
1060
1073
  return yield this.sendMessage("GZCA_PrepareSm2SignStep2", e);
1061
1074
  }));
1062
- a(this, "pkcs1HashSign", (e) => c(this, null, function* () {
1063
- return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", m({
1075
+ o(this, "pkcs1HashSign", (e) => l(this, null, function* () {
1076
+ return yield this.sendMessage("GZCA_Pkcs1SignDataForHash", E({
1064
1077
  IsLogin: this.getIsLogin(),
1065
1078
  PinPolicy: this.pinPolicy
1066
1079
  }, e != null ? e : {}));
1067
1080
  }));
1068
- a(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
1081
+ o(this, "pkcs1HashVerifySignature", (e) => l(this, null, function* () {
1069
1082
  return yield this.sendMessage("GZCA_Pkcs1VerifySignForHash", e);
1070
1083
  }));
1071
- a(this, "pkcs7Sign", (e) => c(this, null, function* () {
1072
- return yield this.sendMessage("GZCA_Pkcs7SignData", m({
1084
+ o(this, "pkcs7Sign", (e) => l(this, null, function* () {
1085
+ return yield this.sendMessage("GZCA_Pkcs7SignData", E({
1073
1086
  IsLogin: this.getIsLogin(),
1074
1087
  IsAuthAttr: "Y",
1075
1088
  PinPolicy: this.pinPolicy
1076
1089
  }, e != null ? e : {}));
1077
1090
  }));
1078
- a(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
1091
+ o(this, "pkcs7VerifySignature", (e) => l(this, null, function* () {
1079
1092
  return yield this.sendMessage("GZCA_Pkcs7VerifySign", e);
1080
1093
  }));
1081
- a(this, "sm3Hash", (e) => c(this, null, function* () {
1094
+ o(this, "sm3Hash", (e) => l(this, null, function* () {
1082
1095
  return yield this.sendMessage("GZCA_HashData", e);
1083
1096
  }));
1084
- a(this, "sm3HexHash", (e) => c(this, null, function* () {
1097
+ o(this, "sm3HexHash", (e) => l(this, null, function* () {
1085
1098
  return yield this.sendMessage("GZCA_HashDataEx", e);
1086
1099
  }));
1087
- a(this, "sm3FileHash", (e) => c(this, null, function* () {
1100
+ o(this, "sm3FileHash", (e) => l(this, null, function* () {
1088
1101
  return yield this.sendMessage("GZCA_HashFile", e);
1089
1102
  }));
1090
- a(this, "sm3HashEncryption", (e) => c(this, null, function* () {
1103
+ o(this, "sm3HashEncryption", (e) => l(this, null, function* () {
1091
1104
  return yield this.sendMessage("GZCA_HMac", e);
1092
1105
  }));
1093
- a(this, "pkcs7Encryption", (e) => c(this, null, function* () {
1106
+ o(this, "pkcs7Encryption", (e) => l(this, null, function* () {
1094
1107
  return yield this.sendMessage("GZCA_Pkcs7EncryptData", e);
1095
1108
  }));
1096
- a(this, "pkcs7Decryption", (e) => c(this, null, function* () {
1097
- return yield this.sendMessage("GZCA_Pkcs7DecryptData", m({
1109
+ o(this, "pkcs7Decryption", (e) => l(this, null, function* () {
1110
+ return yield this.sendMessage("GZCA_Pkcs7DecryptData", E({
1098
1111
  IsLogin: this.getIsLogin()
1099
1112
  }, e != null ? e : {}));
1100
1113
  }));
1101
- a(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
1114
+ o(this, "pkcs7FileEncryption", (e) => l(this, null, function* () {
1102
1115
  return yield this.sendMessage("GZCA_EnvelopeSealFileEx_qyzc", e);
1103
1116
  }));
1104
- a(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
1105
- return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", m({
1117
+ o(this, "pkcs7FileDecryption", (e) => l(this, null, function* () {
1118
+ return yield this.sendMessage("GZCA_EnvelopeOpenFileEx_qyzc", E({
1106
1119
  IsLogin: this.getIsLogin()
1107
1120
  }, e != null ? e : {}));
1108
1121
  }));
1109
- a(this, "asymmetricEncryption", (e) => c(this, null, function* () {
1122
+ o(this, "asymmetricEncryption", (e) => l(this, null, function* () {
1110
1123
  return yield this.sendMessage("GZCA_AsymEncryptData", e);
1111
1124
  }));
1112
- a(this, "asymmetricDecryption", (e) => c(this, null, function* () {
1113
- return yield this.sendMessage("GZCA_AsymDecryptData", m({
1125
+ o(this, "asymmetricDecryption", (e) => l(this, null, function* () {
1126
+ return yield this.sendMessage("GZCA_AsymDecryptData", E({
1114
1127
  IsLogin: this.getIsLogin()
1115
1128
  }, e != null ? e : {}));
1116
1129
  }));
1117
- a(this, "sm4Encryption", (e) => c(this, null, function* () {
1130
+ o(this, "sm4Encryption", (e) => l(this, null, function* () {
1118
1131
  return yield this.sendMessage("GZCA_EncryptDataEx", e);
1119
1132
  }));
1120
- a(this, "sm4Decryption", (e) => c(this, null, function* () {
1133
+ o(this, "sm4Decryption", (e) => l(this, null, function* () {
1121
1134
  return yield this.sendMessage("GZCA_DecryptDataEx", e);
1122
1135
  }));
1123
- a(this, "getCertInfo", (e) => c(this, null, function* () {
1136
+ o(this, "getCertInfo", (e) => l(this, null, function* () {
1124
1137
  return yield this.sendMessage("GZCA_GetCertInfo", e);
1125
1138
  }));
1126
- a(this, "getCertInfoByOid", (e) => c(this, null, function* () {
1139
+ o(this, "getCertInfoByOid", (e) => l(this, null, function* () {
1127
1140
  return yield this.sendMessage("GZCA_GetCertInfoByOid", e);
1128
1141
  }));
1129
- a(this, "getSealVendor", (e) => c(this, null, function* () {
1142
+ o(this, "getSealVendor", (e) => l(this, null, function* () {
1130
1143
  return yield this.sendMessage(
1131
1144
  "GZCA_GetSealIssuer",
1132
1145
  e,
1133
- I.LEVEL_2
1146
+ v.LEVEL_2
1134
1147
  );
1135
1148
  }));
1136
- a(this, "deleteAllSealByVendor", (e) => c(this, null, function* () {
1149
+ o(this, "deleteAllSealByVendor", (e) => l(this, null, function* () {
1137
1150
  return yield this.sendMessage(
1138
1151
  "GZCA_ClearSeal",
1139
- m({
1152
+ E({
1140
1153
  IsLogin: this.getIsLogin()
1141
1154
  }, e != null ? e : {}),
1142
- I.LEVEL_2
1155
+ v.LEVEL_2
1143
1156
  );
1144
1157
  }));
1145
- a(this, "applyCert", (e) => c(this, null, function* () {
1158
+ o(this, "applyCert", (e) => l(this, null, function* () {
1146
1159
  return yield this.sendMessage(
1147
1160
  "GZCA_ApplyCert",
1148
1161
  {
@@ -1152,32 +1165,32 @@ class It {
1152
1165
  type: e.type,
1153
1166
  url: e.url
1154
1167
  },
1155
- I.LEVEL_3
1168
+ v.LEVEL_3
1156
1169
  );
1157
1170
  }));
1158
- a(this, "resetPin", (e) => c(this, null, function* () {
1171
+ o(this, "resetPin", (e) => l(this, null, function* () {
1159
1172
  return yield this.sendMessage(
1160
1173
  "GZCA_UnblockUserPin",
1161
- m({}, e != null ? e : {}),
1162
- I.LEVEL_3
1174
+ E({}, e != null ? e : {}),
1175
+ v.LEVEL_3
1163
1176
  );
1164
1177
  }));
1165
- a(this, "getUKeyList", () => c(this, null, function* () {
1178
+ o(this, "getUKeyList", () => l(this, null, function* () {
1166
1179
  return yield this.sendMessage(
1167
1180
  "GetUKeyList",
1168
1181
  void 0,
1169
- I.LEVEL_3
1182
+ v.LEVEL_3
1170
1183
  );
1171
1184
  }));
1172
- a(this, "getUKeyInfo", (e) => c(this, null, function* () {
1185
+ o(this, "getUKeyInfo", (e) => l(this, null, function* () {
1173
1186
  return yield this.sendMessage(
1174
1187
  "GetUKeyID",
1175
1188
  e != null ? e : {},
1176
- I.LEVEL_3
1189
+ v.LEVEL_3
1177
1190
  );
1178
1191
  }));
1179
1192
  var t, n, i;
1180
- this.socketConfig = e, this.initSocket(e), this.isRememberPin = (t = e.isRememberPin) != null ? t : !1, this.scene = (n = e.scene) != null ? n : Fe.OPEN, this.pinPolicy = (i = e.pinPolicy) != null ? i : Se.MIN;
1193
+ this.socketConfig = e, this.initSocket(e), this.isRememberPin = (t = e.isRememberPin) != null ? t : !1, this.scene = (n = e.scene) != null ? n : Ze.OPEN, this.pinPolicy = (i = e.pinPolicy) != null ? i : Ie.MIN;
1181
1194
  }
1182
1195
  initSocket(e) {
1183
1196
  this.isConnecting = !0;
@@ -1201,30 +1214,30 @@ class It {
1201
1214
  }
1202
1215
  const $ = class $ {
1203
1216
  constructor(e) {
1204
- a(this, "coreInstance", null);
1205
- a(this, "gwsConfig", {});
1206
- a(this, "createGwsCore", (e) => {
1207
- this.gwsConfig = e != null ? e : {}, this.coreInstance = new It(_(m({}, e != null ? e : {}), {
1208
- url: Me
1217
+ o(this, "coreInstance", null);
1218
+ o(this, "gwsConfig", {});
1219
+ o(this, "createGwsCore", (e) => {
1220
+ this.gwsConfig = e != null ? e : {}, this.coreInstance = new Pt(p(E({}, e != null ? e : {}), {
1221
+ url: Oe
1209
1222
  }));
1210
1223
  });
1211
- a(this, "appendCertBase64", (e, t = !0) => c(this, null, function* () {
1224
+ o(this, "appendCertBase64", (e, t = !0) => l(this, null, function* () {
1212
1225
  if (e.CertB64) return e;
1213
1226
  const n = t ? yield this.getSignatureCert() : yield this.getEncryptionCert();
1214
- return _(m({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
1227
+ return p(E({}, e != null ? e : {}), { CertB64: n == null ? void 0 : n.CertB64 });
1215
1228
  }));
1216
- a(this, "destroy", () => {
1229
+ o(this, "destroy", () => {
1217
1230
  var e;
1218
1231
  (e = this.coreInstance) == null || e.destroy(), this.coreInstance = null;
1219
1232
  });
1220
- a(this, "restart", (e) => {
1233
+ o(this, "restart", (e) => {
1221
1234
  this.coreInstance && this.destroy(), this.gwsConfig = e != null ? e : this.gwsConfig, this.createGwsCore(e);
1222
1235
  });
1223
- a(this, "getSocketReadyState", () => {
1236
+ o(this, "getSocketReadyState", () => {
1224
1237
  var e;
1225
1238
  return (e = this.coreInstance) == null ? void 0 : e.getSocketReadyState();
1226
1239
  });
1227
- a(this, "verifyPin", (e, t) => c(this, null, function* () {
1240
+ o(this, "verifyPin", (e, t) => l(this, null, function* () {
1228
1241
  var i, r;
1229
1242
  const n = yield this.getSignatureCert(t);
1230
1243
  return (r = this.coreInstance) == null ? void 0 : r.verifyPin({
@@ -1232,7 +1245,7 @@ const $ = class $ {
1232
1245
  UserPin: e == null ? void 0 : e.UserPin
1233
1246
  });
1234
1247
  }));
1235
- a(this, "getSignatureCert", (e, t = !0) => c(this, null, function* () {
1248
+ o(this, "getSignatureCert", (e, t = !0) => l(this, null, function* () {
1236
1249
  var i;
1237
1250
  return yield (i = this.coreInstance) == null ? void 0 : i.getCert(
1238
1251
  { CertType: ae },
@@ -1240,13 +1253,13 @@ const $ = class $ {
1240
1253
  t
1241
1254
  );
1242
1255
  }));
1243
- a(this, "getSignatureCertList", () => c(this, null, function* () {
1256
+ o(this, "getSignatureCertList", () => l(this, null, function* () {
1244
1257
  var t;
1245
1258
  return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
1246
1259
  CertType: ae
1247
1260
  });
1248
1261
  }));
1249
- a(this, "getEncryptionCert", (e, t = !0) => c(this, null, function* () {
1262
+ o(this, "getEncryptionCert", (e, t = !0) => l(this, null, function* () {
1250
1263
  var i;
1251
1264
  return yield (i = this.coreInstance) == null ? void 0 : i.getCert(
1252
1265
  { CertType: oe },
@@ -1254,98 +1267,102 @@ const $ = class $ {
1254
1267
  t
1255
1268
  );
1256
1269
  }));
1257
- a(this, "getEncryptionCertList", () => c(this, null, function* () {
1270
+ o(this, "getEncryptionCertList", () => l(this, null, function* () {
1258
1271
  var t;
1259
1272
  return yield (t = this.coreInstance) == null ? void 0 : t.getCertList({
1260
1273
  CertType: oe
1261
1274
  });
1262
1275
  }));
1263
- a(this, "base64Encode", (e) => {
1276
+ o(this, "base64Encode", (e) => {
1264
1277
  var t;
1265
1278
  return (t = this.coreInstance) == null ? void 0 : t.base64Encode(e.Data);
1266
1279
  });
1267
- a(this, "base64Decode", (e) => {
1280
+ o(this, "base64Decode", (e) => {
1268
1281
  var t;
1269
1282
  return (t = this.coreInstance) == null ? void 0 : t.base64Decode(e.DataB64);
1270
1283
  });
1271
- a(this, "changeIsRememberPin", (e) => {
1284
+ o(this, "changeIsRememberPin", (e) => {
1272
1285
  var t;
1273
1286
  (t = this.coreInstance) == null || t.changeIsRememberPin(e);
1274
1287
  });
1275
- a(this, "changePinPolicy", (e) => {
1288
+ o(this, "changePinPolicy", (e) => {
1276
1289
  var t;
1277
1290
  (t = this.coreInstance) == null || t.changePinPolicy(e);
1278
1291
  });
1279
- a(this, "pkcs1Sign", (e, t) => c(this, null, function* () {
1280
- var r, o, l;
1281
- const n = yield this.getSignatureCert(t), i = yield (o = this.coreInstance) == null ? void 0 : o.pkcs1Sign(_(m({}, e != null ? e : {}), {
1292
+ o(this, "pkcs1Sign", (e, t) => l(this, null, function* () {
1293
+ var r, a, c;
1294
+ const n = yield this.getSignatureCert(t), i = yield (a = this.coreInstance) == null ? void 0 : a.pkcs1Sign(p(E({}, e != null ? e : {}), {
1282
1295
  ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
1283
1296
  }));
1284
- return (l = i == null ? void 0 : i[0]) == null ? void 0 : l.SignData;
1297
+ return (c = i == null ? void 0 : i[0]) == null ? void 0 : c.SignData;
1285
1298
  }));
1286
- a(this, "pkcs1VerifySignature", (e) => c(this, null, function* () {
1299
+ o(this, "pkcs1VerifySignature", (e) => l(this, null, function* () {
1287
1300
  var i;
1288
1301
  const t = yield this.appendCertBase64(e), n = yield (i = this.coreInstance) == null ? void 0 : i.pkcs1VerifySignature(t);
1289
1302
  return Array.isArray(n);
1290
1303
  }));
1291
- a(this, "pkcs1Base64Sign", (e, t) => c(this, null, function* () {
1292
- var o, l, d, u, C;
1293
- const n = yield this.getSignatureCert(t), i = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (o = e.Data) != null ? o : "" }), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs1Base64Sign(_(m({}, e != null ? e : {}), {
1294
- ContainerName: (d = n == null ? void 0 : n.ContainerName) != null ? d : "",
1304
+ o(this, "pkcs1Base64Sign", (e, t) => l(this, null, function* () {
1305
+ var a, c, u, d, f;
1306
+ const n = yield this.getSignatureCert(t), i = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), r = yield (d = this.coreInstance) == null ? void 0 : d.pkcs1Base64Sign(p(E({}, e != null ? e : {}), {
1307
+ ContainerName: (u = n == null ? void 0 : n.ContainerName) != null ? u : "",
1295
1308
  DataB64: i
1296
1309
  }));
1297
- return (C = r == null ? void 0 : r[0]) == null ? void 0 : C.SignData;
1298
- }));
1299
- a(this, "batchPkcs1Base64Sign", (e, t) => c(this, null, function* () {
1300
- var C, g, w, h, f, E;
1301
- const n = "|", i = (g = e.DataB64) != null ? g : (C = e.Data) == null ? void 0 : C.map((y) => this.base64Encode({ Data: y })), r = yield this.getSignatureCert(t);
1302
- let o = "";
1303
- o = Array.isArray(i) ? i == null ? void 0 : i.map((y, S) => `${S}:${y}`).join(n) : "";
1304
- const l = yield (h = this.coreInstance) == null ? void 0 : h.batchPkcs1Base64Sign({
1310
+ return (f = r == null ? void 0 : r[0]) == null ? void 0 : f.SignData;
1311
+ }));
1312
+ o(this, "batchPkcs1Base64Sign", (e, t) => l(this, null, function* () {
1313
+ var f, h, w, g, C, m;
1314
+ const n = "|", i = (h = e.DataB64) != null ? h : (f = e.Data) == null ? void 0 : f.map((y) => this.base64Encode({ Data: y })), r = yield this.getSignatureCert(t);
1315
+ let a = "";
1316
+ a = Array.isArray(i) ? i == null ? void 0 : i.map((y, S) => `${S}:${y}`).join(n) : "";
1317
+ const c = yield (g = this.coreInstance) == null ? void 0 : g.batchPkcs1Base64Sign({
1305
1318
  ContainerName: (w = r == null ? void 0 : r.ContainerName) != null ? w : "",
1306
- DataB64: o
1307
- }), d = (E = (f = l == null ? void 0 : l[0]) == null ? void 0 : f.SignData) == null ? void 0 : E.split(n), u = [];
1308
- return d.forEach((y) => {
1309
- const S = y.split(":"), k = Number(S[0]), p = S[1];
1310
- u[k] = p;
1311
- }), u;
1312
- }));
1313
- a(this, "pkcs1Base64VerifySignature", (e) => c(this, null, function* () {
1314
- var r, o, l;
1315
- const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e);
1316
- return !!(yield (l = this.coreInstance) == null ? void 0 : l.pkcs1Base64VerifySignature({
1319
+ DataB64: a
1320
+ }), u = (m = (C = c == null ? void 0 : c[0]) == null ? void 0 : C.SignData) == null ? void 0 : m.split(n), d = [];
1321
+ return u.forEach((y) => {
1322
+ const S = y.split(":"), k = Number(S[0]), _ = S[1];
1323
+ d[k] = _;
1324
+ }), d;
1325
+ }));
1326
+ o(this, "pkcs1Base64VerifySignature", (e) => l(this, null, function* () {
1327
+ var r, a, c;
1328
+ const t = (a = e.DataB64) != null ? a : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e);
1329
+ return !!(yield (c = this.coreInstance) == null ? void 0 : c.pkcs1Base64VerifySignature({
1317
1330
  CertB64: n.CertB64,
1318
1331
  DataB64: t,
1319
1332
  SignData: n.SignData
1320
1333
  }));
1321
1334
  }));
1322
- a(this, "writeSeal", (e, t) => c(this, null, function* () {
1323
- var r, o;
1335
+ o(this, "writeSeal", (e, t) => l(this, null, function* () {
1336
+ var r, a;
1324
1337
  const n = yield this.getSignatureCert(t);
1325
- return !!(yield (o = this.coreInstance) == null ? void 0 : o.writeSeal(_(m({}, e != null ? e : {}), {
1338
+ return !!(yield (a = this.coreInstance) == null ? void 0 : a.writeSeal(p(E({}, e != null ? e : {}), {
1326
1339
  ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : ""
1327
1340
  })));
1328
1341
  }));
1329
- a(this, "deleteSeal", (e) => c(this, null, function* () {
1330
- var r, o, l, d, u;
1331
- const t = yield this.getSealList(e);
1332
- if (!((r = t == null ? void 0 : t.data) != null && r.length))
1342
+ o(this, "deleteSeal", (e, t) => l(this, null, function* () {
1343
+ var a, c, u, d, f;
1344
+ const n = yield this.getSealList(t);
1345
+ if (!((a = n == null ? void 0 : n.data) != null && a.length))
1333
1346
  return Promise.reject({
1334
1347
  errCode: q,
1335
1348
  msg: "暂无印章"
1336
1349
  });
1337
- const n = yield O.open({
1338
- title: "删除印章",
1339
- data: t == null ? void 0 : t.data,
1340
- columns: Ee,
1341
- okText: "删除"
1342
- });
1343
- return !!(yield (u = this.coreInstance) == null ? void 0 : u.deleteSeal({
1344
- ContainerName: (l = (o = t == null ? void 0 : t.cert) == null ? void 0 : o.ContainerName) != null ? l : "",
1345
- SealId: (d = n == null ? void 0 : n.SealId) != null ? d : ""
1350
+ let i = (e == null ? void 0 : e.SealId) || "";
1351
+ if (!i) {
1352
+ const h = yield G.open({
1353
+ title: "删除印章",
1354
+ data: n == null ? void 0 : n.data,
1355
+ columns: Se,
1356
+ okText: "删除"
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 : "",
1362
+ SealId: i
1346
1363
  }));
1347
1364
  }));
1348
- a(this, "getSealList", (e) => c(this, null, function* () {
1365
+ o(this, "getSealList", (e) => l(this, null, function* () {
1349
1366
  var i, r;
1350
1367
  const t = yield this.getSignatureCert(e), n = yield (r = this.coreInstance) == null ? void 0 : r.getSealList({
1351
1368
  ContainerName: (i = t == null ? void 0 : t.ContainerName) != null ? i : "",
@@ -1356,28 +1373,28 @@ const $ = class $ {
1356
1373
  data: n
1357
1374
  };
1358
1375
  }));
1359
- a(this, "getSealInfo", (e) => c(this, null, function* () {
1360
- var r, o, l, d, u, C, g;
1376
+ o(this, "getSealInfo", (e) => l(this, null, function* () {
1377
+ var r, a, c, u, d, f, h;
1361
1378
  const t = yield this.getSealList(e);
1362
1379
  if (!((r = t == null ? void 0 : t.data) != null && r.length))
1363
1380
  return Promise.reject({
1364
1381
  errCode: q,
1365
1382
  msg: "暂无印章"
1366
1383
  });
1367
- const n = ((o = t == null ? void 0 : t.data) == null ? void 0 : o.length) > 1 ? yield O.open({
1384
+ const n = ((a = t == null ? void 0 : t.data) == null ? void 0 : a.length) > 1 ? yield G.open({
1368
1385
  title: "选择印章",
1369
1386
  data: t == null ? void 0 : t.data,
1370
- columns: Ee,
1371
- theme: (l = this.gwsConfig) == null ? void 0 : l.theme
1372
- }) : t == null ? void 0 : t.data[0], i = yield (g = this.coreInstance) == null ? void 0 : g.getSealInfo({
1373
- ContainerName: (u = (d = t == null ? void 0 : t.cert) == null ? void 0 : d.ContainerName) != null ? u : "",
1374
- SealId: (C = n == null ? void 0 : n.SealId) != null ? C : ""
1387
+ columns: Se,
1388
+ theme: (c = this.gwsConfig) == null ? void 0 : c.theme
1389
+ }) : t == null ? void 0 : t.data[0], i = yield (h = this.coreInstance) == null ? void 0 : h.getSealInfo({
1390
+ ContainerName: (d = (u = t == null ? void 0 : t.cert) == null ? void 0 : u.ContainerName) != null ? d : "",
1391
+ SealId: (f = n == null ? void 0 : n.SealId) != null ? f : ""
1375
1392
  });
1376
1393
  return i == null ? void 0 : i[0];
1377
1394
  }));
1378
- a(this, "getTPSealList", (e, t) => c(this, null, function* () {
1379
- var r, o;
1380
- const n = yield this.getSignatureCert(t), i = yield (o = this.coreInstance) == null ? void 0 : o.getTPSealList({
1395
+ o(this, "getTPSealList", (e, t) => l(this, null, function* () {
1396
+ var r, a;
1397
+ const n = yield this.getSignatureCert(t), i = yield (a = this.coreInstance) == null ? void 0 : a.getTPSealList({
1381
1398
  ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : "",
1382
1399
  Vid: e == null ? void 0 : e.Vid
1383
1400
  });
@@ -1386,193 +1403,204 @@ const $ = class $ {
1386
1403
  data: i
1387
1404
  };
1388
1405
  }));
1389
- a(this, "getTPSeal", (e, t) => c(this, null, function* () {
1390
- var r, o, l;
1406
+ o(this, "getTPSeal", (e, t) => l(this, null, function* () {
1407
+ var r, a, c;
1391
1408
  const n = yield this.getTPSealList(e, t);
1392
1409
  if (!((r = n == null ? void 0 : n.data) != null && r.length))
1393
1410
  return Promise.reject({
1394
1411
  errCode: q,
1395
1412
  msg: "暂无印章"
1396
1413
  });
1397
- const i = ((o = n == null ? void 0 : n.data) == null ? void 0 : o.length) === 1 ? n == null ? void 0 : n.data[0] : yield O.open({
1414
+ 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({
1398
1415
  title: "选择印章",
1399
1416
  data: n == null ? void 0 : n.data,
1400
- columns: vt,
1401
- theme: (l = this.gwsConfig) == null ? void 0 : l.theme
1417
+ columns: pt,
1418
+ theme: (c = this.gwsConfig) == null ? void 0 : c.theme
1402
1419
  });
1403
1420
  return {
1404
1421
  cert: n == null ? void 0 : n.cert,
1405
1422
  data: i
1406
1423
  };
1407
1424
  }));
1408
- a(this, "getTPSealPic", (e, t) => c(this, null, function* () {
1409
- var r, o, l, d, u;
1410
- const n = yield this.getTPSeal(e, t), i = yield (u = this.coreInstance) == null ? void 0 : u.getTPSealPic(_(m({
1411
- ContainerName: (o = (r = n == null ? void 0 : n.cert) == null ? void 0 : r.ContainerName) != null ? o : ""
1412
- }, (l = n == null ? void 0 : n.data) != null ? l : {}), {
1413
- FileSize: String((d = n == null ? void 0 : n.data) == null ? void 0 : d.FileSize)
1425
+ o(this, "getTPSealPic", (e, t) => l(this, null, function* () {
1426
+ var r, a, c, u, d;
1427
+ const n = yield this.getTPSeal(e, t), i = yield (d = this.coreInstance) == null ? void 0 : d.getTPSealPic(p(E({
1428
+ ContainerName: (a = (r = n == null ? void 0 : n.cert) == null ? void 0 : r.ContainerName) != null ? a : ""
1429
+ }, (c = n == null ? void 0 : n.data) != null ? c : {}), {
1430
+ FileSize: String((u = n == null ? void 0 : n.data) == null ? void 0 : u.FileSize)
1414
1431
  }));
1415
1432
  return i == null ? void 0 : i[0];
1416
1433
  }));
1417
- a(this, "sm2SignPreprocess1", (e) => c(this, null, function* () {
1434
+ o(this, "sm2SignPreprocess1", (e) => l(this, null, function* () {
1418
1435
  var i, r;
1419
1436
  const t = yield this.appendCertBase64(e), n = yield (i = this.coreInstance) == null ? void 0 : i.sm2SignPreprocess1(t);
1420
1437
  return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.Z;
1421
1438
  }));
1422
- a(this, "sm2SignPreprocess2", (e) => c(this, null, function* () {
1423
- var r, o;
1424
- const t = this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e), i = yield (o = this.coreInstance) == null ? void 0 : o.sm2SignPreprocess2({
1439
+ o(this, "sm2SignPreprocess2", (e) => l(this, null, function* () {
1440
+ var r, a;
1441
+ const t = this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = yield this.appendCertBase64(e), i = yield (a = this.coreInstance) == null ? void 0 : a.sm2SignPreprocess2({
1425
1442
  CertB64: n.CertB64,
1426
1443
  DataB64: t
1427
1444
  });
1428
1445
  return i == null ? void 0 : i[0].H;
1429
1446
  }));
1430
- a(this, "pkcs1HashSign", (e, t) => c(this, null, function* () {
1431
- var r, o, l, d;
1432
- const n = yield this.getSignatureCert(t), i = yield (l = this.coreInstance) == null ? void 0 : l.pkcs1HashSign({
1447
+ o(this, "pkcs1HashSign", (e, t) => l(this, null, function* () {
1448
+ var r, a, c, u;
1449
+ const n = yield this.getSignatureCert(t), i = yield (c = this.coreInstance) == null ? void 0 : c.pkcs1HashSign({
1433
1450
  ContainerName: (r = n == null ? void 0 : n.ContainerName) != null ? r : "",
1434
1451
  DataB64: e.DataB64,
1435
- HashAlg: (o = e.HashAlg) != null ? o : "sm3"
1452
+ HashAlg: (a = e.HashAlg) != null ? a : "sm3"
1436
1453
  });
1437
- return (d = i == null ? void 0 : i[0]) == null ? void 0 : d.SignData;
1454
+ return (u = i == null ? void 0 : i[0]) == null ? void 0 : u.SignData;
1438
1455
  }));
1439
- a(this, "pkcs1HashVerifySignature", (e) => c(this, null, function* () {
1456
+ o(this, "pkcs1HashVerifySignature", (e) => l(this, null, function* () {
1440
1457
  var i, r;
1441
1458
  const t = yield this.appendCertBase64(e);
1442
- return !!(yield (r = this.coreInstance) == null ? void 0 : r.pkcs1HashVerifySignature(_(m({}, t), {
1459
+ return !!(yield (r = this.coreInstance) == null ? void 0 : r.pkcs1HashVerifySignature(p(E({}, t), {
1443
1460
  HashAlg: (i = t.HashAlg) != null ? i : "sm3"
1444
1461
  })));
1445
1462
  }));
1446
- a(this, "pkcs7Sign", (e, t) => c(this, null, function* () {
1447
- var o, l, d, u, C;
1448
- const n = (l = e.DataB64) != null ? l : this.base64Encode({ Data: (o = e.Data) != null ? o : "" }), i = yield this.getSignatureCert(t), r = yield (u = this.coreInstance) == null ? void 0 : u.pkcs7Sign(_(m({}, e != null ? e : {}), {
1449
- ContainerName: (d = i == null ? void 0 : i.ContainerName) != null ? d : "",
1463
+ o(this, "pkcs7Sign", (e, t) => l(this, null, function* () {
1464
+ var a, c, u, d, f;
1465
+ const n = (c = e.DataB64) != null ? c : this.base64Encode({ Data: (a = e.Data) != null ? a : "" }), i = yield this.getSignatureCert(t), r = yield (d = this.coreInstance) == null ? void 0 : d.pkcs7Sign(p(E({}, e != null ? e : {}), {
1466
+ ContainerName: (u = i == null ? void 0 : i.ContainerName) != null ? u : "",
1450
1467
  DataB64: n
1451
1468
  }));
1452
- return (C = r == null ? void 0 : r[0]) == null ? void 0 : C.SignData;
1469
+ return (f = r == null ? void 0 : r[0]) == null ? void 0 : f.SignData;
1453
1470
  }));
1454
- a(this, "pkcs7VerifySignature", (e) => c(this, null, function* () {
1455
- var i, r, o;
1471
+ o(this, "pkcs7VerifySignature", (e) => l(this, null, function* () {
1472
+ var i, r, a;
1456
1473
  const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (i = e.Data) != null ? i : "" });
1457
- return !!(yield (o = this.coreInstance) == null ? void 0 : o.pkcs7VerifySignature({
1474
+ return !!(yield (a = this.coreInstance) == null ? void 0 : a.pkcs7VerifySignature({
1458
1475
  DataB64: t,
1459
1476
  SignData: e.SignData
1460
1477
  }));
1461
1478
  }));
1462
- a(this, "sm3Hash", (e) => c(this, null, function* () {
1479
+ o(this, "sm3Hash", (e) => l(this, null, function* () {
1463
1480
  var n, i;
1464
1481
  const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3Hash(e);
1465
1482
  return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
1466
1483
  }));
1467
- a(this, "sm3HexHash", (e) => c(this, null, function* () {
1484
+ o(this, "sm3HexHash", (e) => l(this, null, function* () {
1468
1485
  var n, i;
1469
1486
  const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3HexHash(e);
1470
1487
  return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
1471
1488
  }));
1472
- a(this, "sm3FileHash", (e) => c(this, null, function* () {
1489
+ o(this, "sm3FileHash", (e) => l(this, null, function* () {
1473
1490
  var n, i;
1474
1491
  const t = yield (n = this.coreInstance) == null ? void 0 : n.sm3FileHash(e);
1475
1492
  return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.HashB64;
1476
1493
  }));
1477
- a(this, "sm3HashEncryption", (e) => c(this, null, function* () {
1478
- var r, o, l, d, u, C;
1479
- const t = (o = e.DataB64) != null ? o : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = (d = e.KeyB64) != null ? d : this.base64Encode({ Data: (l = e.Key) != null ? l : "" }), i = yield (u = this.coreInstance) == null ? void 0 : u.sm3HashEncryption({
1494
+ o(this, "sm3HashEncryption", (e) => l(this, null, function* () {
1495
+ var r, a, c, u, d, f;
1496
+ const t = (a = e.DataB64) != null ? a : this.base64Encode({ Data: (r = e.Data) != null ? r : "" }), n = (u = e.KeyB64) != null ? u : this.base64Encode({ Data: (c = e.Key) != null ? c : "" }), i = yield (d = this.coreInstance) == null ? void 0 : d.sm3HashEncryption({
1480
1497
  dataB64: t,
1481
1498
  keyB64: n,
1482
1499
  alg: "sm3"
1483
1500
  });
1484
- return (C = i == null ? void 0 : i[0]) == null ? void 0 : C.DataB64;
1501
+ return (f = i == null ? void 0 : i[0]) == null ? void 0 : f.DataB64;
1485
1502
  }));
1486
- a(this, "pkcs7Encryption", (e) => c(this, null, function* () {
1487
- var i, r, o, l;
1503
+ o(this, "pkcs7Encryption", (e) => l(this, null, function* () {
1504
+ var i, r, a, c;
1488
1505
  if (!e.CertB64List) {
1489
- const d = yield this.getEncryptionCert();
1490
- e.CertB64List = d == null ? void 0 : d.CertB64;
1506
+ const u = yield this.getEncryptionCert();
1507
+ e.CertB64List = u == null ? void 0 : u.CertB64;
1491
1508
  }
1492
- const t = (r = e.DataB64) != null ? r : this.base64Encode({ Data: (i = e.Data) != null ? i : "" }), n = yield (o = this.coreInstance) == null ? void 0 : o.pkcs7Encryption({
1509
+ 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({
1493
1510
  DataB64: t,
1494
1511
  CertB64List: e.CertB64List
1495
1512
  });
1496
- return (l = n == null ? void 0 : n[0]) == null ? void 0 : l.DataB64;
1513
+ return (c = n == null ? void 0 : n[0]) == null ? void 0 : c.DataB64;
1497
1514
  }));
1498
- a(this, "pkcs7Decryption", (e) => c(this, null, function* () {
1499
- var r, o;
1500
- const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7Decryption(_(m({}, e != null ? e : {}), {
1515
+ o(this, "pkcs7Decryption", (e) => l(this, null, function* () {
1516
+ var r, a;
1517
+ const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7Decryption(p(E({}, e != null ? e : {}), {
1501
1518
  ContainerName: t == null ? void 0 : t.ContainerName
1502
- })), i = (o = n == null ? void 0 : n[0]) == null ? void 0 : o.DataB64;
1519
+ })), i = (a = n == null ? void 0 : n[0]) == null ? void 0 : a.DataB64;
1503
1520
  return e.shouldDecodeBase64 ? this.base64Decode({ DataB64: i }) : i;
1504
1521
  }));
1505
- a(this, "pkcs7FileEncryption", (e) => c(this, null, function* () {
1522
+ o(this, "pkcs7FileEncryption", (e) => l(this, null, function* () {
1506
1523
  var i, r;
1507
1524
  const t = yield this.appendCertBase64(e, !1), n = yield (i = this.coreInstance) == null ? void 0 : i.pkcs7FileEncryption(t);
1508
1525
  return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.DataB64;
1509
1526
  }));
1510
- a(this, "pkcs7FileDecryption", (e) => c(this, null, function* () {
1511
- var i, r, o;
1527
+ o(this, "pkcs7FileDecryption", (e) => l(this, null, function* () {
1528
+ var i, r, a;
1512
1529
  const t = yield this.getEncryptionCert(), n = yield (r = this.coreInstance) == null ? void 0 : r.pkcs7FileDecryption({
1513
1530
  SrcFile: e.SrcFile,
1514
1531
  DstFile: (i = e.DstFile) != null ? i : e.SrcFile.slice(0, -4),
1515
1532
  ContainerName: t == null ? void 0 : t.ContainerName
1516
1533
  });
1517
- return (o = n == null ? void 0 : n[0]) == null ? void 0 : o.DataB64;
1534
+ return (a = n == null ? void 0 : n[0]) == null ? void 0 : a.DataB64;
1518
1535
  }));
1519
- a(this, "asymmetricEncryption", (e) => c(this, null, function* () {
1536
+ o(this, "asymmetricEncryption", (e) => l(this, null, function* () {
1520
1537
  var i, r;
1521
1538
  const t = yield this.appendCertBase64(e, !1), n = yield (i = this.coreInstance) == null ? void 0 : i.asymmetricEncryption(t);
1522
1539
  return (r = n == null ? void 0 : n[0]) == null ? void 0 : r.Data;
1523
1540
  }));
1524
- a(this, "asymmetricDecryption", (e, t) => c(this, null, function* () {
1525
- var r, o;
1526
- const n = yield this.getEncryptionCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.asymmetricDecryption(_(m({}, e != null ? e : {}), {
1541
+ o(this, "asymmetricDecryption", (e, t) => l(this, null, function* () {
1542
+ var r, a;
1543
+ const n = yield this.getEncryptionCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.asymmetricDecryption(p(E({}, e != null ? e : {}), {
1527
1544
  ContainerName: n == null ? void 0 : n.ContainerName
1528
1545
  }));
1529
- return (o = i == null ? void 0 : i[0]) == null ? void 0 : o.Data;
1546
+ return (a = i == null ? void 0 : i[0]) == null ? void 0 : a.Data;
1530
1547
  }));
1531
- a(this, "sm4Encryption", (e) => c(this, null, function* () {
1548
+ o(this, "sm4Encryption", (e) => l(this, null, function* () {
1532
1549
  var n;
1533
1550
  const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Encryption(e);
1534
1551
  return t == null ? void 0 : t[0];
1535
1552
  }));
1536
- a(this, "sm4Decryption", (e) => c(this, null, function* () {
1553
+ o(this, "sm4Decryption", (e) => l(this, null, function* () {
1537
1554
  var n, i;
1538
1555
  const t = yield (n = this.coreInstance) == null ? void 0 : n.sm4Decryption(e);
1539
1556
  return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.Data;
1540
1557
  }));
1541
- a(this, "getCertInfo", (e) => c(this, null, function* () {
1542
- var n, i;
1543
- const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfo(e);
1544
- return m({}, (i = t == null ? void 0 : t[0]) != null ? i : {});
1558
+ o(this, "getCertInfo", (e) => l(this, null, function* () {
1559
+ var i, r, a, c, u;
1560
+ 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 d = 0; d < ce.length; d++) {
1562
+ const f = ce[d];
1563
+ try {
1564
+ const h = yield (a = this.coreInstance) == null ? void 0 : a.getCertInfoByOid({
1565
+ Oid: f.oid,
1566
+ CertB64: e.CertB64
1567
+ });
1568
+ n[f.key] = (u = (c = h == null ? void 0 : h[0]) == null ? void 0 : c.OidValue) == null ? void 0 : u.slice(2);
1569
+ } catch (h) {
1570
+ }
1571
+ }
1572
+ return n != null && n.idCardNo ? n != null && n.CertSubject.includes("O") || n.orgCode ? n.certCate = Ge : n.certCate = Fe : n.certCate = Ve, n;
1545
1573
  }));
1546
- a(this, "getCertInfoByOid", (e) => c(this, null, function* () {
1574
+ o(this, "getCertInfoByOid", (e) => l(this, null, function* () {
1547
1575
  var n, i;
1548
- const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(m({}, e != null ? e : {}));
1576
+ const t = yield (n = this.coreInstance) == null ? void 0 : n.getCertInfoByOid(E({}, e != null ? e : {}));
1549
1577
  return (i = t == null ? void 0 : t[0]) == null ? void 0 : i.OidValue;
1550
1578
  }));
1551
- a(this, "getSealVendor", (e) => c(this, null, function* () {
1579
+ o(this, "getSealVendor", (e) => l(this, null, function* () {
1552
1580
  var i;
1553
1581
  const t = yield this.getSignatureCert(e), n = yield (i = this.coreInstance) == null ? void 0 : i.getSealVendor({
1554
1582
  ContainerName: t == null ? void 0 : t.ContainerName
1555
1583
  });
1556
1584
  return n == null ? void 0 : n[0];
1557
1585
  }));
1558
- a(this, "deleteAllSealByVendor", (e, t) => c(this, null, function* () {
1586
+ o(this, "deleteAllSealByVendor", (e, t) => l(this, null, function* () {
1559
1587
  var r;
1560
- const n = yield this.getSignatureCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.deleteAllSealByVendor(_(m({}, e != null ? e : {}), {
1588
+ const n = yield this.getSignatureCert(t), i = yield (r = this.coreInstance) == null ? void 0 : r.deleteAllSealByVendor(p(E({}, e != null ? e : {}), {
1561
1589
  ContainerName: n == null ? void 0 : n.ContainerName
1562
1590
  }));
1563
1591
  return i == null ? void 0 : i[0];
1564
1592
  }));
1565
- a(this, "getUKeyList", (e) => c(this, null, function* () {
1593
+ o(this, "getUKeyList", (e) => l(this, null, function* () {
1566
1594
  var i;
1567
1595
  if (e) return e;
1568
1596
  const t = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyList();
1569
- return yield O.open({
1597
+ return yield G.open({
1570
1598
  title: "选择介质",
1571
1599
  data: t,
1572
- columns: kt
1600
+ columns: Lt
1573
1601
  });
1574
1602
  }));
1575
- a(this, "getUKeyInfo", (e) => c(this, null, function* () {
1603
+ o(this, "getUKeyInfo", (e) => l(this, null, function* () {
1576
1604
  var i;
1577
1605
  const t = yield this.getUKeyList(e), n = yield (i = this.coreInstance) == null ? void 0 : i.getUKeyInfo({
1578
1606
  manu: t == null ? void 0 : t.manu,
@@ -1580,19 +1608,19 @@ const $ = class $ {
1580
1608
  });
1581
1609
  return n == null ? void 0 : n[0];
1582
1610
  }));
1583
- a(this, "applyCert", (e, t) => c(this, null, function* () {
1584
- var o;
1611
+ o(this, "applyCert", (e, t) => l(this, null, function* () {
1612
+ var a;
1585
1613
  const n = yield this.getUKeyList(t), i = yield this.getUKeyInfo(n);
1586
- return yield (o = this.coreInstance) == null ? void 0 : o.applyCert(_(m({}, e != null ? e : {}), {
1614
+ return yield (a = this.coreInstance) == null ? void 0 : a.applyCert(p(E({}, e != null ? e : {}), {
1587
1615
  manu: i == null ? void 0 : i.manu,
1588
1616
  sn: i == null ? void 0 : i.sn,
1589
1617
  ContainerName: i == null ? void 0 : i.keyid
1590
1618
  }));
1591
1619
  }));
1592
- a(this, "resetPin", (e, t) => c(this, null, function* () {
1620
+ o(this, "resetPin", (e, t) => l(this, null, function* () {
1593
1621
  var r;
1594
1622
  const n = yield this.getSignatureCert(t);
1595
- return yield (r = this.coreInstance) == null ? void 0 : r.resetPin(_(m({}, e != null ? e : {}), {
1623
+ return yield (r = this.coreInstance) == null ? void 0 : r.resetPin(p(E({}, e != null ? e : {}), {
1596
1624
  manu: n == null ? void 0 : n.manu,
1597
1625
  sn: n == null ? void 0 : n.sn,
1598
1626
  ContainerName: n == null ? void 0 : n.ContainerName
@@ -1601,14 +1629,14 @@ const $ = class $ {
1601
1629
  return $.instance && !(e != null && e.isCreateNew) ? $.instance : (this.createGwsCore(e), $.instance = this, this);
1602
1630
  }
1603
1631
  };
1604
- a($, "instance", null);
1632
+ o($, "instance", null);
1605
1633
  let H = $;
1606
- function _t(s) {
1634
+ function Bt(s) {
1607
1635
  return new Promise((e, t) => {
1608
1636
  if (H.instance && !(s != null && s.isCreateNew))
1609
1637
  e(H.instance);
1610
1638
  else {
1611
- const n = new H(_(m({}, s != null ? s : {}), {
1639
+ const n = new H(p(E({}, s != null ? s : {}), {
1612
1640
  onOpen(i) {
1613
1641
  var r;
1614
1642
  e(n), (r = s == null ? void 0 : s.onOpen) == null || r.call(s, i);
@@ -1623,5 +1651,5 @@ function _t(s) {
1623
1651
  }
1624
1652
  export {
1625
1653
  H as GwsService,
1626
- _t as createService
1654
+ Bt as createService
1627
1655
  };