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