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