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