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