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