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