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