@nano-lib/util 1.1.1 → 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/lib/index.d.ts +2 -1
- package/lib/index.js +1 -1
- package/lib/index.mjs +418 -416
- package/lib/utils/baseUrl.d.ts +15 -0
- package/lib/utils/common.d.ts +0 -13
- package/package.json +1 -1
package/lib/index.mjs
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
1
|
+
const jn = (t, i, o, s) => (t /= s / 2, t < 1 ? o / 2 * t * t + i : (t--, -o / 2 * (t * (t - 2) - 1) + i)), Un = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || ((t) => window.setTimeout(t, 16.666666666666668));
|
|
2
|
+
function Zn(t, i) {
|
|
3
3
|
if (i) {
|
|
4
4
|
document.querySelector(i).scrollTop = t;
|
|
5
5
|
return;
|
|
6
6
|
}
|
|
7
7
|
document.documentElement.scrollTop = t, document.body.parentNode.scrollTop = t, document.body.scrollTop = t;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function Gn(t) {
|
|
10
10
|
return t ? document.querySelector(t).scrollTop : document.documentElement.scrollTop || document.body.parentNode.scrollTop || document.body.scrollTop;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
const { target: i, to: o = 0, duration: s = 500, callback: u } = t ?? {}, f =
|
|
12
|
+
function Wn(t) {
|
|
13
|
+
const { target: i, to: o = 0, duration: s = 500, callback: u } = t ?? {}, f = Gn(i), d = o - f, a = 20;
|
|
14
14
|
let b = 0;
|
|
15
15
|
const m = function() {
|
|
16
16
|
b += a;
|
|
17
|
-
const v =
|
|
18
|
-
|
|
17
|
+
const v = jn(b, f, d, s);
|
|
18
|
+
Zn(v, i), b < s ? Un(m) : u && u();
|
|
19
19
|
};
|
|
20
20
|
m();
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function Jn(t, i) {
|
|
23
23
|
switch (arguments.length) {
|
|
24
24
|
case 1:
|
|
25
25
|
return parseInt((Math.random() * t + 1).toString(), 10);
|
|
@@ -29,7 +29,7 @@ function Wn(t, i) {
|
|
|
29
29
|
return 0;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
|
-
function
|
|
32
|
+
function Xn() {
|
|
33
33
|
let t = "";
|
|
34
34
|
const i = [];
|
|
35
35
|
for (let o = 0; o <= 15; o++)
|
|
@@ -38,7 +38,7 @@ function Jn() {
|
|
|
38
38
|
o === 9 || o === 14 || o === 19 || o === 24 ? t += "-" : o === 15 ? t += 4 : o === 20 ? t += i[Math.random() * 4 | 8] : t += i[Math.random() * 16 | 0];
|
|
39
39
|
return t;
|
|
40
40
|
}
|
|
41
|
-
function
|
|
41
|
+
function mt(t, i) {
|
|
42
42
|
if (!t) return "-";
|
|
43
43
|
t.toString().length === 10 && (t = +t * 1e3), i ?? (i = "YYYY-MM-DD HH:mm:ss");
|
|
44
44
|
const o = new Date(t), s = (d, a, b = " ") => {
|
|
@@ -62,19 +62,19 @@ function xt(t, i) {
|
|
|
62
62
|
u = new RegExp("(" + d + ")").exec(i), u && (i = i.replace(u[1], u[1].length == 1 ? f[d] : s(f[d], u[1].length, "0")));
|
|
63
63
|
return i;
|
|
64
64
|
}
|
|
65
|
-
function
|
|
65
|
+
function Kn(t, i) {
|
|
66
66
|
`${t}`.length === 10 ? t = parseInt(t + "") * 1e3 : t = +t;
|
|
67
67
|
const o = new Date(t), u = (Date.now() - Number(o)) / 1e3;
|
|
68
|
-
return u < 30 ? "刚刚" : u < 3600 ? `${Math.ceil(u / 60)}分钟前` : u < 3600 * 24 ? `${Math.ceil(u / 3600)}小时前` : u < 3600 * 24 * 2 ? "1天前" : i ?
|
|
68
|
+
return u < 30 ? "刚刚" : u < 3600 ? `${Math.ceil(u / 60)}分钟前` : u < 3600 * 24 ? `${Math.ceil(u / 3600)}小时前` : u < 3600 * 24 * 2 ? "1天前" : i ? mt(t, i) : `${o.getMonth() + 1}月${o.getDate()}日${o.getHours()}时${o.getMinutes()}分`;
|
|
69
69
|
}
|
|
70
|
-
function
|
|
70
|
+
function Qn(t) {
|
|
71
71
|
const i = t || /* @__PURE__ */ new Date(), o = new Date(i), s = new Date(i);
|
|
72
72
|
return o.setHours(0, 0, 0), s.setHours(23, 59, 59), {
|
|
73
|
-
dateRange: [
|
|
73
|
+
dateRange: [mt(o), mt(s)],
|
|
74
74
|
timestampRange: [o.getTime(), s.getTime()]
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const oe = {
|
|
78
78
|
set(t, i) {
|
|
79
79
|
sessionStorage && t && i && sessionStorage.setItem(t, i);
|
|
80
80
|
},
|
|
@@ -94,7 +94,7 @@ const ie = {
|
|
|
94
94
|
clear() {
|
|
95
95
|
sessionStorage.clear();
|
|
96
96
|
}
|
|
97
|
-
},
|
|
97
|
+
}, se = {
|
|
98
98
|
set(t, i) {
|
|
99
99
|
localStorage && t && i && localStorage.setItem(t, i);
|
|
100
100
|
},
|
|
@@ -115,26 +115,26 @@ const ie = {
|
|
|
115
115
|
localStorage.clear();
|
|
116
116
|
}
|
|
117
117
|
};
|
|
118
|
-
function
|
|
118
|
+
function tr(t, i) {
|
|
119
119
|
if (!t || !i)
|
|
120
120
|
return;
|
|
121
121
|
let o = t.className;
|
|
122
122
|
const s = o.indexOf(i);
|
|
123
123
|
s === -1 ? o += `${i}` : o = o.substring(0, s) + o.substring(s + i.length), t.className = o;
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Pt(t, i) {
|
|
126
126
|
return t.className.match(new RegExp("(?:\\s|^)" + i + "(?:\\s|$)"));
|
|
127
127
|
}
|
|
128
|
-
function tr(t, i) {
|
|
129
|
-
Ct(t, i) || (t.className += ` ${i}`);
|
|
130
|
-
}
|
|
131
128
|
function er(t, i) {
|
|
132
|
-
|
|
129
|
+
Pt(t, i) || (t.className += ` ${i}`);
|
|
130
|
+
}
|
|
131
|
+
function nr(t, i) {
|
|
132
|
+
if (Pt(t, i)) {
|
|
133
133
|
const o = new RegExp("(?:\\s|^)" + i + "(?:\\s|$)");
|
|
134
134
|
t.className = t.className.replace(o, " ");
|
|
135
135
|
}
|
|
136
136
|
}
|
|
137
|
-
function
|
|
137
|
+
function rr(t) {
|
|
138
138
|
let i = !1;
|
|
139
139
|
return function(...o) {
|
|
140
140
|
i || (i = !0, window.requestAnimationFrame(() => {
|
|
@@ -142,48 +142,48 @@ function nr(t) {
|
|
|
142
142
|
}));
|
|
143
143
|
};
|
|
144
144
|
}
|
|
145
|
-
function
|
|
145
|
+
function ir(t) {
|
|
146
146
|
t && (t.oncontextmenu = () => !1);
|
|
147
147
|
}
|
|
148
|
-
function
|
|
148
|
+
function or(t) {
|
|
149
149
|
return /^(http(s)?:\/\/)/.test(t);
|
|
150
150
|
}
|
|
151
|
-
function
|
|
151
|
+
function sr(t) {
|
|
152
152
|
return /^(https?:|mailto:|tel:)/.test(t);
|
|
153
153
|
}
|
|
154
|
-
function
|
|
154
|
+
function fr(t) {
|
|
155
155
|
return Object.prototype.toString.call(t) === "[object String]";
|
|
156
156
|
}
|
|
157
|
-
function
|
|
157
|
+
function cr(t) {
|
|
158
158
|
return /^[+-]?(0|([1-9]\d*))(\.\d+)?$/g.test(t);
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function ur(t) {
|
|
161
161
|
return !Object.keys(t).length;
|
|
162
162
|
}
|
|
163
|
-
function
|
|
163
|
+
function ar(t) {
|
|
164
164
|
return /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9][0-9]?)(\.(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])){3}|([a-zA-Z0-9-]+\.)*[a-zA-Z0-9-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(:[0-9]+)*(\/($|[a-zA-Z0-9.,?'\\+&%$#=~_-]+))*$/.test(t);
|
|
165
165
|
}
|
|
166
|
-
function
|
|
166
|
+
function hr(t, i = 8) {
|
|
167
167
|
return new RegExp(`^S*(?=S{${i}},})(?=S*d)(?=S*[A-Z])(?=S*[a-z])(?=S*[!@#$%^&*?])S*$`).test(t);
|
|
168
168
|
}
|
|
169
|
-
function
|
|
169
|
+
function lr(t) {
|
|
170
170
|
return /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t);
|
|
171
171
|
}
|
|
172
|
-
function
|
|
172
|
+
function zt(t) {
|
|
173
173
|
return /^\d{6}((((((19|20)\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|(((19|20)\d{2})(0[13578]|1[02])31)|((19|20)\d{2})02(0[1-9]|1\d|2[0-8])|((((19|20)([13579][26]|[2468][048]|0[48]))|(2000))0229))\d{3})|((((\d{2})(0[13-9]|1[012])(0[1-9]|[12]\d|30))|((\d{2})(0[13578]|1[02])31)|((\d{2})02(0[1-9]|1\d|2[0-8]))|(([13579][26]|[2468][048]|0[048])0229))\d{2}))(\d|X|x)$/.test(t);
|
|
174
174
|
}
|
|
175
|
-
function
|
|
175
|
+
function dr(t) {
|
|
176
176
|
return /^0\d{2,3}-?\d{7,8}$/.test(t);
|
|
177
177
|
}
|
|
178
|
-
function
|
|
178
|
+
function pr(t) {
|
|
179
179
|
return /^1[3-9]\d{9}$/.test(t);
|
|
180
180
|
}
|
|
181
|
-
const
|
|
181
|
+
const jt = () => {
|
|
182
182
|
};
|
|
183
|
-
function
|
|
183
|
+
function bi(t) {
|
|
184
184
|
return new Promise((i) => setTimeout(i, t));
|
|
185
185
|
}
|
|
186
|
-
function
|
|
186
|
+
function wi(t, i) {
|
|
187
187
|
return new Promise((o) => {
|
|
188
188
|
const s = setInterval(() => {
|
|
189
189
|
if (t === 0)
|
|
@@ -192,7 +192,7 @@ function bi(t, i) {
|
|
|
192
192
|
}, 1e3);
|
|
193
193
|
});
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Ti(t, i) {
|
|
196
196
|
const o = t.slice(), s = [];
|
|
197
197
|
let u = o.length;
|
|
198
198
|
const f = [];
|
|
@@ -203,7 +203,7 @@ function wi(t, i) {
|
|
|
203
203
|
}
|
|
204
204
|
return s;
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function Fi(t, i) {
|
|
207
207
|
let o = null;
|
|
208
208
|
return function(...s) {
|
|
209
209
|
o !== null && clearTimeout(o), o = setTimeout(() => {
|
|
@@ -211,41 +211,38 @@ function Ti(t, i) {
|
|
|
211
211
|
}, i);
|
|
212
212
|
};
|
|
213
213
|
}
|
|
214
|
-
function
|
|
215
|
-
if (!
|
|
214
|
+
function Si(t) {
|
|
215
|
+
if (!zt(t))
|
|
216
216
|
throw new Error("Please provide a valid ID number!");
|
|
217
217
|
const i = t.length, o = i === 15 ? t[i - 1] : t[i - 2];
|
|
218
218
|
return parseInt(o) % 2 === 1 ? "1" : "2";
|
|
219
219
|
}
|
|
220
|
-
function
|
|
221
|
-
if (!
|
|
220
|
+
function Ei(t) {
|
|
221
|
+
if (!zt(t))
|
|
222
222
|
throw new Error("Please provide a valid ID number!");
|
|
223
223
|
return t.substring(6, 10) + "-" + t.substring(10, 12) + "-" + t.substring(12, 14);
|
|
224
224
|
}
|
|
225
|
-
const
|
|
226
|
-
const {
|
|
227
|
-
return f && typeof s == "function" ? s(f) : f;
|
|
228
|
-
}, Bi = (t = "443", i = "80") => {
|
|
229
|
-
const { protocol: o, hostname: s, port: u, pathname: f } = window.location, d = o.replace(":", ""), a = u || (d === "https" ? t : i), b = pr(f);
|
|
225
|
+
const Bi = (t = "443", i = "80") => {
|
|
226
|
+
const { protocol: o, hostname: s, port: u, pathname: f } = window.location, d = o.replace(":", ""), a = u || (d === "https" ? t : i), b = gr(f);
|
|
230
227
|
return {
|
|
231
228
|
hostname: s,
|
|
232
229
|
protocol: d,
|
|
233
230
|
port: a,
|
|
234
231
|
pathname: b
|
|
235
232
|
};
|
|
236
|
-
},
|
|
233
|
+
}, gr = (t) => {
|
|
237
234
|
const i = "/";
|
|
238
235
|
if (!t || t === i) return i;
|
|
239
236
|
const o = t.endsWith("/") ? t.slice(0, -1) : t, s = o.lastIndexOf("/");
|
|
240
237
|
return s > 0 && o.substring(s + 1).includes(".") ? o.substring(0, s) : o;
|
|
241
|
-
},
|
|
238
|
+
}, xr = (t, i = "") => {
|
|
242
239
|
i || (i = location.origin);
|
|
243
240
|
const o = new RegExp(/^http(s)?:\/\//), s = new RegExp(/^((?:[a-z]+:)?\/\/|data:image\/)(.*)/i);
|
|
244
241
|
return o.test(t) || s.test(t) ? t : i + t;
|
|
245
242
|
}, _i = (t, i = "") => {
|
|
246
243
|
typeof t == "string" && (t = t === "" ? [] : t.split(","));
|
|
247
244
|
for (const o in t)
|
|
248
|
-
t[o] =
|
|
245
|
+
t[o] = xr(t[o], i);
|
|
249
246
|
return t;
|
|
250
247
|
};
|
|
251
248
|
function Ri(t) {
|
|
@@ -262,10 +259,10 @@ function Ri(t) {
|
|
|
262
259
|
o();
|
|
263
260
|
}
|
|
264
261
|
function Di(t) {
|
|
265
|
-
let i =
|
|
262
|
+
let i = jt;
|
|
266
263
|
return (...o) => new Promise((s, u) => {
|
|
267
264
|
i(), i = () => {
|
|
268
|
-
s = u =
|
|
265
|
+
s = u = jt;
|
|
269
266
|
}, t(...o).then(
|
|
270
267
|
(f) => s(f),
|
|
271
268
|
(f) => u(f)
|
|
@@ -276,7 +273,7 @@ function Ai(t, i) {
|
|
|
276
273
|
const o = document.createElement("a");
|
|
277
274
|
o.download = i, o.href = t, o.click();
|
|
278
275
|
}
|
|
279
|
-
function
|
|
276
|
+
function mr(t) {
|
|
280
277
|
const i = [];
|
|
281
278
|
for (let o = 0; o < t.length; o++)
|
|
282
279
|
t[o] && i.push(t[o]);
|
|
@@ -300,7 +297,7 @@ function qi(t, i = 48, o = 48) {
|
|
|
300
297
|
const s = t.replace("#", "");
|
|
301
298
|
return `data:image/svg+xml;utf8,<svg viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" width="${i}" height="${o}"><path d="M787.510356 387.850445c0-152.160515-123.350352-275.511891-275.510868-275.511891S236.487597 235.68993 236.487597 387.850445c0 44.665269 10.640338 86.841857 29.507034 124.151601l-0.010233-0.001023 0.059352 0.100284c5.548366 10.962679 11.812023 21.500687 18.723434 31.56081L511.999488 926.678464l227.234351-383.021463c6.909363-10.057053 13.170974-20.593014 18.71934-31.552623l0.062422-0.104377-0.011256 0.002047C776.870018 474.692303 787.510356 432.515714 787.510356 387.850445zM511.999488 506.802628c-74.596975 0-135.070278-60.47228-135.070278-135.070278 0-74.595952 60.47228-135.069255 135.070278-135.069255 74.595952 0 135.069255 60.473303 135.069255 135.069255C647.068743 446.330348 586.59544 506.802628 511.999488 506.802628z" fill="%23${s}"></path></svg>`;
|
|
302
299
|
}
|
|
303
|
-
const
|
|
300
|
+
const vr = [
|
|
304
301
|
["date", "YYYY-MM-DD"],
|
|
305
302
|
["daterange", "YYYY-MM-DD"],
|
|
306
303
|
["datetime", "YYYY-MM-DD HH:mm:ss"],
|
|
@@ -310,7 +307,7 @@ const mr = [
|
|
|
310
307
|
["year", "YYYY"],
|
|
311
308
|
["yearrange", "YYYY"],
|
|
312
309
|
["time", "HH:mm:ss"]
|
|
313
|
-
],
|
|
310
|
+
], yr = {
|
|
314
311
|
view: "查看",
|
|
315
312
|
add: "添加",
|
|
316
313
|
edit: "编辑",
|
|
@@ -359,7 +356,7 @@ const mr = [
|
|
|
359
356
|
export: "导出",
|
|
360
357
|
import: "导入",
|
|
361
358
|
defaultErrorCode: "系统未知错误,请反馈给管理员"
|
|
362
|
-
},
|
|
359
|
+
}, br = {
|
|
363
360
|
400: "请求失败,请您稍后重试!",
|
|
364
361
|
401: "认证失败,无法访问系统资源!",
|
|
365
362
|
403: "当前操作没有权限!",
|
|
@@ -370,37 +367,37 @@ const mr = [
|
|
|
370
367
|
502: "网关错误!",
|
|
371
368
|
503: "服务不可用!",
|
|
372
369
|
504: "网关超时!"
|
|
373
|
-
},
|
|
374
|
-
function Fr(t) {
|
|
375
|
-
return wr[t] ?? et.defaultErrorCode;
|
|
376
|
-
}
|
|
370
|
+
}, wr = new Map(vr), et = yr, Tr = br, fe = ["jpg", "jpeg", "png", "bmp", "gif"], ce = ["mp3", "mp4", "webm", "ogg", "3gp"], ue = ["doc", "docx", "xls", "xlsx", "ppt", "txt", "pdf", "zip"], Fr = [...fe, ...ce, ...ue];
|
|
377
371
|
function Sr(t) {
|
|
378
|
-
return t
|
|
372
|
+
return Tr[t] ?? et.defaultErrorCode;
|
|
379
373
|
}
|
|
380
374
|
function Er(t) {
|
|
381
|
-
return t == null ? et.unfilled : (t = typeof t == "number" ? `${t}` : t, t === "1" ? et.
|
|
375
|
+
return t == null ? et.unfilled : (t = typeof t == "number" ? `${t}` : t, t === "1" ? et.yes : et.no);
|
|
382
376
|
}
|
|
383
377
|
function Br(t) {
|
|
378
|
+
return t == null ? et.unfilled : (t = typeof t == "number" ? `${t}` : t, t === "1" ? et.have : et.noHave);
|
|
379
|
+
}
|
|
380
|
+
function _r(t) {
|
|
384
381
|
return t ? t.replace(/(\d{3})\d{4}(\d{4})/, "$1****$2") : "";
|
|
385
382
|
}
|
|
386
|
-
function
|
|
383
|
+
function Rr(t, i, o) {
|
|
387
384
|
if (i ?? (i = 4), o ?? (o = 4), t) {
|
|
388
385
|
const s = t.length;
|
|
389
386
|
return t.substring(0, i) + "*".repeat(s - i - o) + t.substring(s - o);
|
|
390
387
|
}
|
|
391
388
|
return "";
|
|
392
389
|
}
|
|
393
|
-
function
|
|
390
|
+
function Dr(t) {
|
|
394
391
|
return t.replace(/( |^)[a-z]/g, (i) => i.toUpperCase());
|
|
395
392
|
}
|
|
396
|
-
function
|
|
393
|
+
function Ar(t) {
|
|
397
394
|
return t.replace(/( |^)[A-Z]/g, (i) => i.toLowerCase());
|
|
398
395
|
}
|
|
399
|
-
function
|
|
396
|
+
function Ir(t, i) {
|
|
400
397
|
const o = t.find((s) => s.value === i);
|
|
401
398
|
return o ? o.label : "";
|
|
402
399
|
}
|
|
403
|
-
function
|
|
400
|
+
function Mr(t, i, o) {
|
|
404
401
|
const s = [], u = i.split(","), f = o.split(",");
|
|
405
402
|
return Array.from(new Set(u)).forEach((a) => {
|
|
406
403
|
const b = t.find((m) => m.value === a);
|
|
@@ -411,13 +408,13 @@ function Ir(t, i, o) {
|
|
|
411
408
|
});
|
|
412
409
|
}), s.map((a) => a.label).join();
|
|
413
410
|
}
|
|
414
|
-
function
|
|
411
|
+
function ae(t, i, o) {
|
|
415
412
|
var f;
|
|
416
413
|
if (!i) return "";
|
|
417
414
|
const s = i.split(","), u = o.find((d) => d.value === s[t]);
|
|
418
|
-
return u ? ((f = u.children) != null && f.length &&
|
|
415
|
+
return u ? ((f = u.children) != null && f.length && ae(t + 1, i, u.children), u.label) : "";
|
|
419
416
|
}
|
|
420
|
-
function
|
|
417
|
+
function Or(t, i, o) {
|
|
421
418
|
if (!t) return "";
|
|
422
419
|
const s = t.split(","), u = [], f = s.length - 1, d = s.findIndex((a) => a === o);
|
|
423
420
|
if (d !== -1) {
|
|
@@ -429,7 +426,7 @@ function Mr(t, i, o) {
|
|
|
429
426
|
b && u.push(b);
|
|
430
427
|
}), u.map((a) => a.label).join();
|
|
431
428
|
}
|
|
432
|
-
function
|
|
429
|
+
function qr(t) {
|
|
433
430
|
let i = "";
|
|
434
431
|
for (const o of Object.keys(t)) {
|
|
435
432
|
const s = t[o], u = `${encodeURIComponent(o)}=`;
|
|
@@ -445,12 +442,12 @@ function Or(t) {
|
|
|
445
442
|
}
|
|
446
443
|
return i;
|
|
447
444
|
}
|
|
448
|
-
function
|
|
449
|
-
return t ?
|
|
445
|
+
function Cr(t) {
|
|
446
|
+
return t ? mr(
|
|
450
447
|
Object.keys(t).map((i) => t[i] === void 0 ? "" : `${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`)
|
|
451
448
|
).join("&") : "";
|
|
452
449
|
}
|
|
453
|
-
function
|
|
450
|
+
function Pr(t) {
|
|
454
451
|
const i = decodeURIComponent(t.split("?")[1]).replace(/\+/g, " ");
|
|
455
452
|
if (!i)
|
|
456
453
|
return {};
|
|
@@ -463,7 +460,7 @@ function Cr(t) {
|
|
|
463
460
|
}
|
|
464
461
|
}), o;
|
|
465
462
|
}
|
|
466
|
-
var
|
|
463
|
+
var he = function() {
|
|
467
464
|
if (typeof Map < "u")
|
|
468
465
|
return Map;
|
|
469
466
|
function t(i, o) {
|
|
@@ -509,27 +506,27 @@ var ae = function() {
|
|
|
509
506
|
}, i;
|
|
510
507
|
}()
|
|
511
508
|
);
|
|
512
|
-
}(),
|
|
509
|
+
}(), Ct = typeof window < "u" && typeof document < "u" && window.document === document, vt = function() {
|
|
513
510
|
return typeof global < "u" && global.Math === Math ? global : typeof self < "u" && self.Math === Math ? self : typeof window < "u" && window.Math === Math ? window : Function("return this")();
|
|
514
|
-
}(),
|
|
515
|
-
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(
|
|
511
|
+
}(), zr = function() {
|
|
512
|
+
return typeof requestAnimationFrame == "function" ? requestAnimationFrame.bind(vt) : function(t) {
|
|
516
513
|
return setTimeout(function() {
|
|
517
514
|
return t(Date.now());
|
|
518
515
|
}, 1e3 / 60);
|
|
519
516
|
};
|
|
520
|
-
}(),
|
|
521
|
-
function
|
|
517
|
+
}(), Lr = 2;
|
|
518
|
+
function Hr(t, i) {
|
|
522
519
|
var o = !1, s = !1, u = 0;
|
|
523
520
|
function f() {
|
|
524
521
|
o && (o = !1, t()), s && a();
|
|
525
522
|
}
|
|
526
523
|
function d() {
|
|
527
|
-
|
|
524
|
+
zr(f);
|
|
528
525
|
}
|
|
529
526
|
function a() {
|
|
530
527
|
var b = Date.now();
|
|
531
528
|
if (o) {
|
|
532
|
-
if (b - u <
|
|
529
|
+
if (b - u < Lr)
|
|
533
530
|
return;
|
|
534
531
|
s = !0;
|
|
535
532
|
} else
|
|
@@ -538,11 +535,11 @@ function Lr(t, i) {
|
|
|
538
535
|
}
|
|
539
536
|
return a;
|
|
540
537
|
}
|
|
541
|
-
var
|
|
538
|
+
var Nr = 20, Yr = ["top", "right", "bottom", "left", "width", "height", "size", "weight"], kr = typeof MutationObserver < "u", Vr = (
|
|
542
539
|
/** @class */
|
|
543
540
|
function() {
|
|
544
541
|
function t() {
|
|
545
|
-
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh =
|
|
542
|
+
this.connected_ = !1, this.mutationEventsAdded_ = !1, this.mutationsObserver_ = null, this.observers_ = [], this.onTransitionEnd_ = this.onTransitionEnd_.bind(this), this.refresh = Hr(this.refresh.bind(this), Nr);
|
|
546
543
|
}
|
|
547
544
|
return t.prototype.addObserver = function(i) {
|
|
548
545
|
~this.observers_.indexOf(i) || this.observers_.push(i), this.connected_ || this.connect_();
|
|
@@ -560,16 +557,16 @@ var Hr = 20, Nr = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
560
557
|
return o.broadcastActive();
|
|
561
558
|
}), i.length > 0;
|
|
562
559
|
}, t.prototype.connect_ = function() {
|
|
563
|
-
!
|
|
560
|
+
!Ct || this.connected_ || (document.addEventListener("transitionend", this.onTransitionEnd_), window.addEventListener("resize", this.refresh), kr ? (this.mutationsObserver_ = new MutationObserver(this.refresh), this.mutationsObserver_.observe(document, {
|
|
564
561
|
attributes: !0,
|
|
565
562
|
childList: !0,
|
|
566
563
|
characterData: !0,
|
|
567
564
|
subtree: !0
|
|
568
565
|
})) : (document.addEventListener("DOMSubtreeModified", this.refresh), this.mutationEventsAdded_ = !0), this.connected_ = !0);
|
|
569
566
|
}, t.prototype.disconnect_ = function() {
|
|
570
|
-
!
|
|
567
|
+
!Ct || !this.connected_ || (document.removeEventListener("transitionend", this.onTransitionEnd_), window.removeEventListener("resize", this.refresh), this.mutationsObserver_ && this.mutationsObserver_.disconnect(), this.mutationEventsAdded_ && document.removeEventListener("DOMSubtreeModified", this.refresh), this.mutationsObserver_ = null, this.mutationEventsAdded_ = !1, this.connected_ = !1);
|
|
571
568
|
}, t.prototype.onTransitionEnd_ = function(i) {
|
|
572
|
-
var o = i.propertyName, s = o === void 0 ? "" : o, u =
|
|
569
|
+
var o = i.propertyName, s = o === void 0 ? "" : o, u = Yr.some(function(f) {
|
|
573
570
|
return !!~s.indexOf(f);
|
|
574
571
|
});
|
|
575
572
|
u && this.refresh();
|
|
@@ -577,7 +574,7 @@ var Hr = 20, Nr = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
577
574
|
return this.instance_ || (this.instance_ = new t()), this.instance_;
|
|
578
575
|
}, t.instance_ = null, t;
|
|
579
576
|
}()
|
|
580
|
-
),
|
|
577
|
+
), le = function(t, i) {
|
|
581
578
|
for (var o = 0, s = Object.keys(i); o < s.length; o++) {
|
|
582
579
|
var u = s[o];
|
|
583
580
|
Object.defineProperty(t, u, {
|
|
@@ -588,59 +585,59 @@ var Hr = 20, Nr = ["top", "right", "bottom", "left", "width", "height", "size",
|
|
|
588
585
|
});
|
|
589
586
|
}
|
|
590
587
|
return t;
|
|
591
|
-
},
|
|
588
|
+
}, st = function(t) {
|
|
592
589
|
var i = t && t.ownerDocument && t.ownerDocument.defaultView;
|
|
593
|
-
return i ||
|
|
594
|
-
},
|
|
595
|
-
function
|
|
590
|
+
return i || vt;
|
|
591
|
+
}, de = bt(0, 0, 0, 0);
|
|
592
|
+
function yt(t) {
|
|
596
593
|
return parseFloat(t) || 0;
|
|
597
594
|
}
|
|
598
|
-
function
|
|
595
|
+
function Ut(t) {
|
|
599
596
|
for (var i = [], o = 1; o < arguments.length; o++)
|
|
600
597
|
i[o - 1] = arguments[o];
|
|
601
598
|
return i.reduce(function(s, u) {
|
|
602
599
|
var f = t["border-" + u + "-width"];
|
|
603
|
-
return s +
|
|
600
|
+
return s + yt(f);
|
|
604
601
|
}, 0);
|
|
605
602
|
}
|
|
606
|
-
function
|
|
603
|
+
function $r(t) {
|
|
607
604
|
for (var i = ["top", "right", "bottom", "left"], o = {}, s = 0, u = i; s < u.length; s++) {
|
|
608
605
|
var f = u[s], d = t["padding-" + f];
|
|
609
|
-
o[f] =
|
|
606
|
+
o[f] = yt(d);
|
|
610
607
|
}
|
|
611
608
|
return o;
|
|
612
609
|
}
|
|
613
|
-
function
|
|
610
|
+
function jr(t) {
|
|
614
611
|
var i = t.getBBox();
|
|
615
|
-
return
|
|
612
|
+
return bt(0, 0, i.width, i.height);
|
|
616
613
|
}
|
|
617
|
-
function
|
|
614
|
+
function Ur(t) {
|
|
618
615
|
var i = t.clientWidth, o = t.clientHeight;
|
|
619
616
|
if (!i && !o)
|
|
620
|
-
return
|
|
621
|
-
var s =
|
|
622
|
-
if (s.boxSizing === "border-box" && (Math.round(a + f) !== i && (a -=
|
|
617
|
+
return de;
|
|
618
|
+
var s = st(t).getComputedStyle(t), u = $r(s), f = u.left + u.right, d = u.top + u.bottom, a = yt(s.width), b = yt(s.height);
|
|
619
|
+
if (s.boxSizing === "border-box" && (Math.round(a + f) !== i && (a -= Ut(s, "left", "right") + f), Math.round(b + d) !== o && (b -= Ut(s, "top", "bottom") + d)), !Gr(t)) {
|
|
623
620
|
var m = Math.round(a + f) - i, v = Math.round(b + d) - o;
|
|
624
621
|
Math.abs(m) !== 1 && (a -= m), Math.abs(v) !== 1 && (b -= v);
|
|
625
622
|
}
|
|
626
|
-
return
|
|
623
|
+
return bt(u.left, u.top, a, b);
|
|
627
624
|
}
|
|
628
|
-
var
|
|
625
|
+
var Zr = /* @__PURE__ */ function() {
|
|
629
626
|
return typeof SVGGraphicsElement < "u" ? function(t) {
|
|
630
|
-
return t instanceof
|
|
627
|
+
return t instanceof st(t).SVGGraphicsElement;
|
|
631
628
|
} : function(t) {
|
|
632
|
-
return t instanceof
|
|
629
|
+
return t instanceof st(t).SVGElement && typeof t.getBBox == "function";
|
|
633
630
|
};
|
|
634
631
|
}();
|
|
635
|
-
function Zr(t) {
|
|
636
|
-
return t === ot(t).document.documentElement;
|
|
637
|
-
}
|
|
638
632
|
function Gr(t) {
|
|
639
|
-
return
|
|
633
|
+
return t === st(t).document.documentElement;
|
|
640
634
|
}
|
|
641
635
|
function Wr(t) {
|
|
636
|
+
return Ct ? Zr(t) ? jr(t) : Ur(t) : de;
|
|
637
|
+
}
|
|
638
|
+
function Jr(t) {
|
|
642
639
|
var i = t.x, o = t.y, s = t.width, u = t.height, f = typeof DOMRectReadOnly < "u" ? DOMRectReadOnly : Object, d = Object.create(f.prototype);
|
|
643
|
-
return
|
|
640
|
+
return le(d, {
|
|
644
641
|
x: i,
|
|
645
642
|
y: o,
|
|
646
643
|
width: s,
|
|
@@ -651,37 +648,37 @@ function Wr(t) {
|
|
|
651
648
|
left: i
|
|
652
649
|
}), d;
|
|
653
650
|
}
|
|
654
|
-
function
|
|
651
|
+
function bt(t, i, o, s) {
|
|
655
652
|
return { x: t, y: i, width: o, height: s };
|
|
656
653
|
}
|
|
657
|
-
var
|
|
654
|
+
var Xr = (
|
|
658
655
|
/** @class */
|
|
659
656
|
function() {
|
|
660
657
|
function t(i) {
|
|
661
|
-
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ =
|
|
658
|
+
this.broadcastWidth = 0, this.broadcastHeight = 0, this.contentRect_ = bt(0, 0, 0, 0), this.target = i;
|
|
662
659
|
}
|
|
663
660
|
return t.prototype.isActive = function() {
|
|
664
|
-
var i =
|
|
661
|
+
var i = Wr(this.target);
|
|
665
662
|
return this.contentRect_ = i, i.width !== this.broadcastWidth || i.height !== this.broadcastHeight;
|
|
666
663
|
}, t.prototype.broadcastRect = function() {
|
|
667
664
|
var i = this.contentRect_;
|
|
668
665
|
return this.broadcastWidth = i.width, this.broadcastHeight = i.height, i;
|
|
669
666
|
}, t;
|
|
670
667
|
}()
|
|
671
|
-
),
|
|
668
|
+
), Kr = (
|
|
672
669
|
/** @class */
|
|
673
670
|
/* @__PURE__ */ function() {
|
|
674
671
|
function t(i, o) {
|
|
675
|
-
var s =
|
|
676
|
-
|
|
672
|
+
var s = Jr(o);
|
|
673
|
+
le(this, { target: i, contentRect: s });
|
|
677
674
|
}
|
|
678
675
|
return t;
|
|
679
676
|
}()
|
|
680
|
-
),
|
|
677
|
+
), Qr = (
|
|
681
678
|
/** @class */
|
|
682
679
|
function() {
|
|
683
680
|
function t(i, o, s) {
|
|
684
|
-
if (this.activeObservations_ = [], this.observations_ = new
|
|
681
|
+
if (this.activeObservations_ = [], this.observations_ = new he(), typeof i != "function")
|
|
685
682
|
throw new TypeError("The callback provided as parameter 1 is not a function.");
|
|
686
683
|
this.callback_ = i, this.controller_ = o, this.callbackCtx_ = s;
|
|
687
684
|
}
|
|
@@ -689,16 +686,16 @@ var Jr = (
|
|
|
689
686
|
if (!arguments.length)
|
|
690
687
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
691
688
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
692
|
-
if (!(i instanceof
|
|
689
|
+
if (!(i instanceof st(i).Element))
|
|
693
690
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
694
691
|
var o = this.observations_;
|
|
695
|
-
o.has(i) || (o.set(i, new
|
|
692
|
+
o.has(i) || (o.set(i, new Xr(i)), this.controller_.addObserver(this), this.controller_.refresh());
|
|
696
693
|
}
|
|
697
694
|
}, t.prototype.unobserve = function(i) {
|
|
698
695
|
if (!arguments.length)
|
|
699
696
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
700
697
|
if (!(typeof Element > "u" || !(Element instanceof Object))) {
|
|
701
|
-
if (!(i instanceof
|
|
698
|
+
if (!(i instanceof st(i).Element))
|
|
702
699
|
throw new TypeError('parameter 1 is not of type "Element".');
|
|
703
700
|
var o = this.observations_;
|
|
704
701
|
o.has(i) && (o.delete(i), o.size || this.controller_.removeObserver(this));
|
|
@@ -713,7 +710,7 @@ var Jr = (
|
|
|
713
710
|
}, t.prototype.broadcastActive = function() {
|
|
714
711
|
if (this.hasActive()) {
|
|
715
712
|
var i = this.callbackCtx_, o = this.activeObservations_.map(function(s) {
|
|
716
|
-
return new
|
|
713
|
+
return new Kr(s.target, s.broadcastRect());
|
|
717
714
|
});
|
|
718
715
|
this.callback_.call(i, o, i), this.clearActive();
|
|
719
716
|
}
|
|
@@ -723,7 +720,7 @@ var Jr = (
|
|
|
723
720
|
return this.activeObservations_.length > 0;
|
|
724
721
|
}, t;
|
|
725
722
|
}()
|
|
726
|
-
),
|
|
723
|
+
), pe = typeof WeakMap < "u" ? /* @__PURE__ */ new WeakMap() : new he(), ge = (
|
|
727
724
|
/** @class */
|
|
728
725
|
/* @__PURE__ */ function() {
|
|
729
726
|
function t(i) {
|
|
@@ -731,8 +728,8 @@ var Jr = (
|
|
|
731
728
|
throw new TypeError("Cannot call a class as a function.");
|
|
732
729
|
if (!arguments.length)
|
|
733
730
|
throw new TypeError("1 argument required, but only 0 present.");
|
|
734
|
-
var o =
|
|
735
|
-
|
|
731
|
+
var o = Vr.getInstance(), s = new Qr(i, o, this);
|
|
732
|
+
pe.set(this, s);
|
|
736
733
|
}
|
|
737
734
|
return t;
|
|
738
735
|
}()
|
|
@@ -742,29 +739,29 @@ var Jr = (
|
|
|
742
739
|
"unobserve",
|
|
743
740
|
"disconnect"
|
|
744
741
|
].forEach(function(t) {
|
|
745
|
-
|
|
742
|
+
ge.prototype[t] = function() {
|
|
746
743
|
var i;
|
|
747
|
-
return (i =
|
|
744
|
+
return (i = pe.get(this))[t].apply(i, arguments);
|
|
748
745
|
};
|
|
749
746
|
});
|
|
750
|
-
var
|
|
751
|
-
return typeof
|
|
747
|
+
var ti = function() {
|
|
748
|
+
return typeof vt.ResizeObserver < "u" ? vt.ResizeObserver : ge;
|
|
752
749
|
}();
|
|
753
|
-
function
|
|
750
|
+
function ei(t) {
|
|
754
751
|
for (const i of t) {
|
|
755
752
|
const o = i.target.__resizeListeners__ || [];
|
|
756
753
|
o.length && o.forEach((s) => s());
|
|
757
754
|
}
|
|
758
755
|
}
|
|
759
756
|
function Ci(t, i) {
|
|
760
|
-
typeof window > "u" || (t.__resizeListeners__ || (t.__resizeListeners__ = [], t.__ro__ = new
|
|
757
|
+
typeof window > "u" || (t.__resizeListeners__ || (t.__resizeListeners__ = [], t.__ro__ = new ti(ei), t.__ro__.observe(t)), t.__resizeListeners__.push(i));
|
|
761
758
|
}
|
|
762
759
|
function Pi(t, i) {
|
|
763
760
|
!t || !t.__resizeListeners__ || (t.__resizeListeners__.splice(t.__resizeListeners__.indexOf(i), 1), t.__resizeListeners__.length || t.__ro__.disconnect());
|
|
764
761
|
}
|
|
765
|
-
var
|
|
766
|
-
function
|
|
767
|
-
return
|
|
762
|
+
var xt = { exports: {} }, ni = xt.exports, Zt;
|
|
763
|
+
function wt() {
|
|
764
|
+
return Zt || (Zt = 1, function(t, i) {
|
|
768
765
|
(function() {
|
|
769
766
|
var o, s = 244837814094590, u = (s & 16777215) == 15715070;
|
|
770
767
|
function f(e, n, r) {
|
|
@@ -927,13 +924,13 @@ function bt() {
|
|
|
927
924
|
}
|
|
928
925
|
n.s = c < 0 ? -1 : 0, c < -1 ? n[r++] = this.DV + c : c > 0 && (n[r++] = c), n.t = r, n.clamp();
|
|
929
926
|
}
|
|
930
|
-
function
|
|
927
|
+
function ot(e, n) {
|
|
931
928
|
var r = this.abs(), c = e.abs(), x = r.t;
|
|
932
929
|
for (n.t = x + c.t; --x >= 0; ) n[x] = 0;
|
|
933
930
|
for (x = 0; x < c.t; ++x) n[x + r.t] = r.am(0, c[x], n, x, 0, r.t);
|
|
934
931
|
n.s = 0, n.clamp(), this.s != e.s && f.ZERO.subTo(n, n);
|
|
935
932
|
}
|
|
936
|
-
function
|
|
933
|
+
function ut(e) {
|
|
937
934
|
for (var n = this.abs(), r = e.t = 2 * n.t; --r >= 0; ) e[r] = 0;
|
|
938
935
|
for (r = 0; r < n.t - 1; ++r) {
|
|
939
936
|
var c = n.am(r, n[r], e, 2 * r, 0, 1);
|
|
@@ -941,7 +938,7 @@ function bt() {
|
|
|
941
938
|
}
|
|
942
939
|
e.t > 0 && (e[e.t - 1] += n.am(r, n[r], e, 2 * r, 0, 1)), e.s = 0, e.clamp();
|
|
943
940
|
}
|
|
944
|
-
function
|
|
941
|
+
function at(e, n, r) {
|
|
945
942
|
var c = e.abs();
|
|
946
943
|
if (!(c.t <= 0)) {
|
|
947
944
|
var x = this.abs();
|
|
@@ -954,41 +951,41 @@ function bt() {
|
|
|
954
951
|
N > 0 ? (c.lShiftTo(N, y), x.lShiftTo(N, r)) : (c.copyTo(y), x.copyTo(r));
|
|
955
952
|
var k = y.t, Z = y[k - 1];
|
|
956
953
|
if (Z != 0) {
|
|
957
|
-
var U = Z * (1 << this.F1) + (k > 1 ? y[k - 2] >> this.F2 : 0), Q = this.FV / U,
|
|
958
|
-
for (y.dlShiftTo(
|
|
959
|
-
for (; --
|
|
960
|
-
var
|
|
961
|
-
if ((r[X] += y.am(0,
|
|
962
|
-
for (y.dlShiftTo(
|
|
954
|
+
var U = Z * (1 << this.F1) + (k > 1 ? y[k - 2] >> this.F2 : 0), Q = this.FV / U, dt = (1 << this.F1) / U, J = 1 << this.F2, X = r.t, pt = X - k, tt = n ?? d();
|
|
955
|
+
for (y.dlShiftTo(pt, tt), r.compareTo(tt) >= 0 && (r[r.t++] = 1, r.subTo(tt, r)), f.ONE.dlShiftTo(k, tt), tt.subTo(y, y); y.t < k; ) y[y.t++] = 0;
|
|
956
|
+
for (; --pt >= 0; ) {
|
|
957
|
+
var Et = r[--X] == Z ? this.DM : Math.floor(r[X] * Q + (r[X - 1] + J) * dt);
|
|
958
|
+
if ((r[X] += y.am(0, Et, r, pt, 0, k)) < Et)
|
|
959
|
+
for (y.dlShiftTo(pt, tt), r.subTo(tt, r); r[X] < --Et; ) r.subTo(tt, r);
|
|
963
960
|
}
|
|
964
961
|
n != null && (r.drShiftTo(k, n), S != E && f.ZERO.subTo(n, n)), r.t = k, r.clamp(), N > 0 && r.rShiftTo(N, r), S < 0 && f.ZERO.subTo(r, r);
|
|
965
962
|
}
|
|
966
963
|
}
|
|
967
964
|
}
|
|
968
|
-
function
|
|
965
|
+
function ht(e) {
|
|
969
966
|
var n = d();
|
|
970
967
|
return this.abs().divRemTo(e, null, n), this.s < 0 && n.compareTo(f.ZERO) > 0 && e.subTo(n, n), n;
|
|
971
968
|
}
|
|
972
969
|
function I(e) {
|
|
973
970
|
this.m = e;
|
|
974
971
|
}
|
|
975
|
-
function
|
|
972
|
+
function be(e) {
|
|
976
973
|
return e.s < 0 || e.compareTo(this.m) >= 0 ? e.mod(this.m) : e;
|
|
977
974
|
}
|
|
978
|
-
function
|
|
975
|
+
function we(e) {
|
|
979
976
|
return e;
|
|
980
977
|
}
|
|
981
|
-
function
|
|
978
|
+
function Te(e) {
|
|
982
979
|
e.divRemTo(this.m, null, e);
|
|
983
980
|
}
|
|
984
|
-
function
|
|
981
|
+
function Fe(e, n, r) {
|
|
985
982
|
e.multiplyTo(n, r), this.reduce(r);
|
|
986
983
|
}
|
|
987
|
-
function
|
|
984
|
+
function Se(e, n) {
|
|
988
985
|
e.squareTo(n), this.reduce(n);
|
|
989
986
|
}
|
|
990
|
-
I.prototype.convert =
|
|
991
|
-
function
|
|
987
|
+
I.prototype.convert = be, I.prototype.revert = we, I.prototype.reduce = Te, I.prototype.mulTo = Fe, I.prototype.sqrTo = Se;
|
|
988
|
+
function Ee() {
|
|
992
989
|
if (this.t < 1) return 0;
|
|
993
990
|
var e = this[0];
|
|
994
991
|
if ((e & 1) == 0) return 0;
|
|
@@ -998,15 +995,15 @@ function bt() {
|
|
|
998
995
|
function nt(e) {
|
|
999
996
|
this.m = e, this.mp = e.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << e.DB - 15) - 1, this.mt2 = 2 * e.t;
|
|
1000
997
|
}
|
|
1001
|
-
function
|
|
998
|
+
function Be(e) {
|
|
1002
999
|
var n = d();
|
|
1003
1000
|
return e.abs().dlShiftTo(this.m.t, n), n.divRemTo(this.m, null, n), e.s < 0 && n.compareTo(f.ZERO) > 0 && this.m.subTo(n, n), n;
|
|
1004
1001
|
}
|
|
1005
|
-
function
|
|
1002
|
+
function _e(e) {
|
|
1006
1003
|
var n = d();
|
|
1007
1004
|
return e.copyTo(n), this.reduce(n), n;
|
|
1008
1005
|
}
|
|
1009
|
-
function
|
|
1006
|
+
function Re(e) {
|
|
1010
1007
|
for (; e.t <= this.mt2; )
|
|
1011
1008
|
e[e.t++] = 0;
|
|
1012
1009
|
for (var n = 0; n < this.m.t; ++n) {
|
|
@@ -1016,17 +1013,17 @@ function bt() {
|
|
|
1016
1013
|
}
|
|
1017
1014
|
e.clamp(), e.drShiftTo(this.m.t, e), e.compareTo(this.m) >= 0 && e.subTo(this.m, e);
|
|
1018
1015
|
}
|
|
1019
|
-
function
|
|
1016
|
+
function De(e, n) {
|
|
1020
1017
|
e.squareTo(n), this.reduce(n);
|
|
1021
1018
|
}
|
|
1022
|
-
function
|
|
1019
|
+
function Ae(e, n, r) {
|
|
1023
1020
|
e.multiplyTo(n, r), this.reduce(r);
|
|
1024
1021
|
}
|
|
1025
|
-
nt.prototype.convert =
|
|
1026
|
-
function
|
|
1022
|
+
nt.prototype.convert = Be, nt.prototype.revert = _e, nt.prototype.reduce = Re, nt.prototype.mulTo = Ae, nt.prototype.sqrTo = De;
|
|
1023
|
+
function Ie() {
|
|
1027
1024
|
return (this.t > 0 ? this[0] & 1 : this.s) == 0;
|
|
1028
1025
|
}
|
|
1029
|
-
function
|
|
1026
|
+
function Me(e, n) {
|
|
1030
1027
|
if (e > 4294967295 || e < 1) return f.ONE;
|
|
1031
1028
|
var r = d(), c = d(), x = n.convert(this), y = D(e) - 1;
|
|
1032
1029
|
for (x.copyTo(r); --y >= 0; )
|
|
@@ -1037,16 +1034,16 @@ function bt() {
|
|
|
1037
1034
|
}
|
|
1038
1035
|
return n.revert(r);
|
|
1039
1036
|
}
|
|
1040
|
-
function
|
|
1037
|
+
function Oe(e, n) {
|
|
1041
1038
|
var r;
|
|
1042
1039
|
return e < 256 || n.isEven() ? r = new I(n) : r = new nt(n), this.exp(e, r);
|
|
1043
1040
|
}
|
|
1044
|
-
f.prototype.copyTo = g, f.prototype.fromInt = l, f.prototype.fromString = h, f.prototype.clamp = F, f.prototype.dlShiftTo = z, f.prototype.drShiftTo = H, f.prototype.lShiftTo = $, f.prototype.rShiftTo = K, f.prototype.subTo = G, f.prototype.multiplyTo =
|
|
1045
|
-
function
|
|
1041
|
+
f.prototype.copyTo = g, f.prototype.fromInt = l, f.prototype.fromString = h, f.prototype.clamp = F, f.prototype.dlShiftTo = z, f.prototype.drShiftTo = H, f.prototype.lShiftTo = $, f.prototype.rShiftTo = K, f.prototype.subTo = G, f.prototype.multiplyTo = ot, f.prototype.squareTo = ut, f.prototype.divRemTo = at, f.prototype.invDigit = Ee, f.prototype.isEven = Ie, f.prototype.exp = Me, f.prototype.toString = A, f.prototype.negate = O, f.prototype.abs = C, f.prototype.compareTo = L, f.prototype.bitLength = P, f.prototype.mod = ht, f.prototype.modPowInt = Oe, f.ZERO = T(0), f.ONE = T(1);
|
|
1042
|
+
function qe() {
|
|
1046
1043
|
var e = d();
|
|
1047
1044
|
return this.copyTo(e), e;
|
|
1048
1045
|
}
|
|
1049
|
-
function
|
|
1046
|
+
function Ce() {
|
|
1050
1047
|
if (this.s < 0) {
|
|
1051
1048
|
if (this.t == 1) return this[0] - this.DV;
|
|
1052
1049
|
if (this.t == 0) return -1;
|
|
@@ -1056,26 +1053,26 @@ function bt() {
|
|
|
1056
1053
|
}
|
|
1057
1054
|
return (this[1] & (1 << 32 - this.DB) - 1) << this.DB | this[0];
|
|
1058
1055
|
}
|
|
1059
|
-
function
|
|
1056
|
+
function Pe() {
|
|
1060
1057
|
return this.t == 0 ? this.s : this[0] << 24 >> 24;
|
|
1061
1058
|
}
|
|
1062
|
-
function
|
|
1059
|
+
function ze() {
|
|
1063
1060
|
return this.t == 0 ? this.s : this[0] << 16 >> 16;
|
|
1064
1061
|
}
|
|
1065
|
-
function
|
|
1062
|
+
function Le(e) {
|
|
1066
1063
|
return Math.floor(Math.LN2 * this.DB / Math.log(e));
|
|
1067
1064
|
}
|
|
1068
|
-
function
|
|
1065
|
+
function He() {
|
|
1069
1066
|
return this.s < 0 ? -1 : this.t <= 0 || this.t == 1 && this[0] <= 0 ? 0 : 1;
|
|
1070
1067
|
}
|
|
1071
|
-
function
|
|
1068
|
+
function Ne(e) {
|
|
1072
1069
|
if (e == null && (e = 10), this.signum() == 0 || e < 2 || e > 36) return "0";
|
|
1073
1070
|
var n = this.chunkSize(e), r = Math.pow(e, n), c = T(r), x = d(), y = d(), S = "";
|
|
1074
1071
|
for (this.divRemTo(c, x, y); x.signum() > 0; )
|
|
1075
1072
|
S = (r + y.intValue()).toString(e).substr(1) + S, x.divRemTo(c, x, y);
|
|
1076
1073
|
return y.intValue().toString(e) + S;
|
|
1077
1074
|
}
|
|
1078
|
-
function
|
|
1075
|
+
function Ye(e, n) {
|
|
1079
1076
|
this.fromInt(0), n == null && (n = 10);
|
|
1080
1077
|
for (var r = this.chunkSize(n), c = Math.pow(n, r), x = !1, y = 0, S = 0, E = 0; E < e.length; ++E) {
|
|
1081
1078
|
var N = w(e, E);
|
|
@@ -1087,18 +1084,18 @@ function bt() {
|
|
|
1087
1084
|
}
|
|
1088
1085
|
y > 0 && (this.dMultiply(Math.pow(n, y)), this.dAddOffset(S, 0)), x && f.ZERO.subTo(this, this);
|
|
1089
1086
|
}
|
|
1090
|
-
function
|
|
1087
|
+
function ke(e, n, r) {
|
|
1091
1088
|
if (typeof n == "number")
|
|
1092
1089
|
if (e < 2) this.fromInt(1);
|
|
1093
1090
|
else
|
|
1094
|
-
for (this.fromNumber(e, r), this.testBit(e - 1) || this.bitwiseTo(f.ONE.shiftLeft(e - 1),
|
|
1091
|
+
for (this.fromNumber(e, r), this.testBit(e - 1) || this.bitwiseTo(f.ONE.shiftLeft(e - 1), Tt, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(n); )
|
|
1095
1092
|
this.dAddOffset(2, 0), this.bitLength() > e && this.subTo(f.ONE.shiftLeft(e - 1), this);
|
|
1096
1093
|
else {
|
|
1097
1094
|
var c = new Array(), x = e & 7;
|
|
1098
1095
|
c.length = (e >> 3) + 1, n.nextBytes(c), x > 0 ? c[0] &= (1 << x) - 1 : c[0] = 0, this.fromString(c, 256);
|
|
1099
1096
|
}
|
|
1100
1097
|
}
|
|
1101
|
-
function
|
|
1098
|
+
function Ve() {
|
|
1102
1099
|
var e = this.t, n = new Array();
|
|
1103
1100
|
n[0] = this.s;
|
|
1104
1101
|
var r = this.DB - e * this.DB % 8, c, x = 0;
|
|
@@ -1107,16 +1104,16 @@ function bt() {
|
|
|
1107
1104
|
r < 8 ? (c = (this[e] & (1 << r) - 1) << 8 - r, c |= this[--e] >> (r += this.DB - 8)) : (c = this[e] >> (r -= 8) & 255, r <= 0 && (r += this.DB, --e)), (c & 128) != 0 && (c |= -256), x == 0 && (this.s & 128) != (c & 128) && ++x, (x > 0 || c != this.s) && (n[x++] = c);
|
|
1108
1105
|
return n;
|
|
1109
1106
|
}
|
|
1110
|
-
function
|
|
1107
|
+
function $e(e) {
|
|
1111
1108
|
return this.compareTo(e) == 0;
|
|
1112
1109
|
}
|
|
1113
|
-
function
|
|
1110
|
+
function je(e) {
|
|
1114
1111
|
return this.compareTo(e) < 0 ? this : e;
|
|
1115
1112
|
}
|
|
1116
|
-
function
|
|
1113
|
+
function Ue(e) {
|
|
1117
1114
|
return this.compareTo(e) > 0 ? this : e;
|
|
1118
1115
|
}
|
|
1119
|
-
function
|
|
1116
|
+
function Ze(e, n, r) {
|
|
1120
1117
|
var c, x, y = Math.min(e.t, this.t);
|
|
1121
1118
|
for (c = 0; c < y; ++c) r[c] = n(this[c], e[c]);
|
|
1122
1119
|
if (e.t < this.t) {
|
|
@@ -1128,83 +1125,83 @@ function bt() {
|
|
|
1128
1125
|
}
|
|
1129
1126
|
r.s = n(this.s, e.s), r.clamp();
|
|
1130
1127
|
}
|
|
1131
|
-
function
|
|
1128
|
+
function Ge(e, n) {
|
|
1132
1129
|
return e & n;
|
|
1133
1130
|
}
|
|
1134
|
-
function
|
|
1131
|
+
function We(e) {
|
|
1135
1132
|
var n = d();
|
|
1136
|
-
return this.bitwiseTo(e,
|
|
1133
|
+
return this.bitwiseTo(e, Ge, n), n;
|
|
1137
1134
|
}
|
|
1138
|
-
function
|
|
1135
|
+
function Tt(e, n) {
|
|
1139
1136
|
return e | n;
|
|
1140
1137
|
}
|
|
1141
|
-
function
|
|
1138
|
+
function Je(e) {
|
|
1142
1139
|
var n = d();
|
|
1143
|
-
return this.bitwiseTo(e,
|
|
1140
|
+
return this.bitwiseTo(e, Tt, n), n;
|
|
1144
1141
|
}
|
|
1145
|
-
function
|
|
1142
|
+
function Lt(e, n) {
|
|
1146
1143
|
return e ^ n;
|
|
1147
1144
|
}
|
|
1148
|
-
function
|
|
1145
|
+
function Xe(e) {
|
|
1149
1146
|
var n = d();
|
|
1150
|
-
return this.bitwiseTo(e,
|
|
1147
|
+
return this.bitwiseTo(e, Lt, n), n;
|
|
1151
1148
|
}
|
|
1152
|
-
function
|
|
1149
|
+
function Ht(e, n) {
|
|
1153
1150
|
return e & ~n;
|
|
1154
1151
|
}
|
|
1155
|
-
function
|
|
1152
|
+
function Ke(e) {
|
|
1156
1153
|
var n = d();
|
|
1157
|
-
return this.bitwiseTo(e,
|
|
1154
|
+
return this.bitwiseTo(e, Ht, n), n;
|
|
1158
1155
|
}
|
|
1159
|
-
function
|
|
1156
|
+
function Qe() {
|
|
1160
1157
|
for (var e = d(), n = 0; n < this.t; ++n) e[n] = this.DM & ~this[n];
|
|
1161
1158
|
return e.t = this.t, e.s = ~this.s, e;
|
|
1162
1159
|
}
|
|
1163
|
-
function
|
|
1160
|
+
function tn(e) {
|
|
1164
1161
|
var n = d();
|
|
1165
1162
|
return e < 0 ? this.rShiftTo(-e, n) : this.lShiftTo(e, n), n;
|
|
1166
1163
|
}
|
|
1167
|
-
function
|
|
1164
|
+
function en(e) {
|
|
1168
1165
|
var n = d();
|
|
1169
1166
|
return e < 0 ? this.lShiftTo(-e, n) : this.rShiftTo(e, n), n;
|
|
1170
1167
|
}
|
|
1171
|
-
function
|
|
1168
|
+
function nn(e) {
|
|
1172
1169
|
if (e == 0) return -1;
|
|
1173
1170
|
var n = 0;
|
|
1174
1171
|
return (e & 65535) == 0 && (e >>= 16, n += 16), (e & 255) == 0 && (e >>= 8, n += 8), (e & 15) == 0 && (e >>= 4, n += 4), (e & 3) == 0 && (e >>= 2, n += 2), (e & 1) == 0 && ++n, n;
|
|
1175
1172
|
}
|
|
1176
|
-
function
|
|
1173
|
+
function rn() {
|
|
1177
1174
|
for (var e = 0; e < this.t; ++e)
|
|
1178
|
-
if (this[e] != 0) return e * this.DB +
|
|
1175
|
+
if (this[e] != 0) return e * this.DB + nn(this[e]);
|
|
1179
1176
|
return this.s < 0 ? this.t * this.DB : -1;
|
|
1180
1177
|
}
|
|
1181
|
-
function
|
|
1178
|
+
function on(e) {
|
|
1182
1179
|
for (var n = 0; e != 0; )
|
|
1183
1180
|
e &= e - 1, ++n;
|
|
1184
1181
|
return n;
|
|
1185
1182
|
}
|
|
1186
|
-
function
|
|
1187
|
-
for (var e = 0, n = this.s & this.DM, r = 0; r < this.t; ++r) e +=
|
|
1183
|
+
function sn() {
|
|
1184
|
+
for (var e = 0, n = this.s & this.DM, r = 0; r < this.t; ++r) e += on(this[r] ^ n);
|
|
1188
1185
|
return e;
|
|
1189
1186
|
}
|
|
1190
|
-
function
|
|
1187
|
+
function fn(e) {
|
|
1191
1188
|
var n = Math.floor(e / this.DB);
|
|
1192
1189
|
return n >= this.t ? this.s != 0 : (this[n] & 1 << e % this.DB) != 0;
|
|
1193
1190
|
}
|
|
1194
|
-
function
|
|
1191
|
+
function cn(e, n) {
|
|
1195
1192
|
var r = f.ONE.shiftLeft(e);
|
|
1196
1193
|
return this.bitwiseTo(r, n, r), r;
|
|
1197
1194
|
}
|
|
1198
|
-
function cn(e) {
|
|
1199
|
-
return this.changeBit(e, wt);
|
|
1200
|
-
}
|
|
1201
1195
|
function un(e) {
|
|
1202
|
-
return this.changeBit(e,
|
|
1196
|
+
return this.changeBit(e, Tt);
|
|
1203
1197
|
}
|
|
1204
1198
|
function an(e) {
|
|
1205
|
-
return this.changeBit(e,
|
|
1199
|
+
return this.changeBit(e, Ht);
|
|
1200
|
+
}
|
|
1201
|
+
function hn(e) {
|
|
1202
|
+
return this.changeBit(e, Lt);
|
|
1206
1203
|
}
|
|
1207
|
-
function
|
|
1204
|
+
function ln(e, n) {
|
|
1208
1205
|
for (var r = 0, c = 0, x = Math.min(e.t, this.t); r < x; )
|
|
1209
1206
|
c += this[r] + e[r], n[r++] = c & this.DM, c >>= this.DB;
|
|
1210
1207
|
if (e.t < this.t) {
|
|
@@ -1218,60 +1215,60 @@ function bt() {
|
|
|
1218
1215
|
}
|
|
1219
1216
|
n.s = c < 0 ? -1 : 0, c > 0 ? n[r++] = c : c < -1 && (n[r++] = this.DV + c), n.t = r, n.clamp();
|
|
1220
1217
|
}
|
|
1221
|
-
function
|
|
1218
|
+
function dn(e) {
|
|
1222
1219
|
var n = d();
|
|
1223
1220
|
return this.addTo(e, n), n;
|
|
1224
1221
|
}
|
|
1225
|
-
function
|
|
1222
|
+
function pn(e) {
|
|
1226
1223
|
var n = d();
|
|
1227
1224
|
return this.subTo(e, n), n;
|
|
1228
1225
|
}
|
|
1229
|
-
function
|
|
1226
|
+
function gn(e) {
|
|
1230
1227
|
var n = d();
|
|
1231
1228
|
return this.multiplyTo(e, n), n;
|
|
1232
1229
|
}
|
|
1233
|
-
function
|
|
1230
|
+
function xn() {
|
|
1234
1231
|
var e = d();
|
|
1235
1232
|
return this.squareTo(e), e;
|
|
1236
1233
|
}
|
|
1237
|
-
function
|
|
1234
|
+
function mn(e) {
|
|
1238
1235
|
var n = d();
|
|
1239
1236
|
return this.divRemTo(e, n, null), n;
|
|
1240
1237
|
}
|
|
1241
|
-
function
|
|
1238
|
+
function vn(e) {
|
|
1242
1239
|
var n = d();
|
|
1243
1240
|
return this.divRemTo(e, null, n), n;
|
|
1244
1241
|
}
|
|
1245
|
-
function
|
|
1242
|
+
function yn(e) {
|
|
1246
1243
|
var n = d(), r = d();
|
|
1247
1244
|
return this.divRemTo(e, n, r), new Array(n, r);
|
|
1248
1245
|
}
|
|
1249
|
-
function
|
|
1246
|
+
function bn(e) {
|
|
1250
1247
|
this[this.t] = this.am(0, e - 1, this, 0, 0, this.t), ++this.t, this.clamp();
|
|
1251
1248
|
}
|
|
1252
|
-
function
|
|
1249
|
+
function wn(e, n) {
|
|
1253
1250
|
if (e != 0) {
|
|
1254
1251
|
for (; this.t <= n; ) this[this.t++] = 0;
|
|
1255
1252
|
for (this[n] += e; this[n] >= this.DV; )
|
|
1256
1253
|
this[n] -= this.DV, ++n >= this.t && (this[this.t++] = 0), ++this[n];
|
|
1257
1254
|
}
|
|
1258
1255
|
}
|
|
1259
|
-
function
|
|
1256
|
+
function ft() {
|
|
1260
1257
|
}
|
|
1261
|
-
function
|
|
1258
|
+
function Nt(e) {
|
|
1262
1259
|
return e;
|
|
1263
1260
|
}
|
|
1264
|
-
function
|
|
1261
|
+
function Tn(e, n, r) {
|
|
1265
1262
|
e.multiplyTo(n, r);
|
|
1266
1263
|
}
|
|
1267
|
-
function
|
|
1264
|
+
function Fn(e, n) {
|
|
1268
1265
|
e.squareTo(n);
|
|
1269
1266
|
}
|
|
1270
|
-
|
|
1271
|
-
function
|
|
1272
|
-
return this.exp(e, new
|
|
1267
|
+
ft.prototype.convert = Nt, ft.prototype.revert = Nt, ft.prototype.mulTo = Tn, ft.prototype.sqrTo = Fn;
|
|
1268
|
+
function Sn(e) {
|
|
1269
|
+
return this.exp(e, new ft());
|
|
1273
1270
|
}
|
|
1274
|
-
function
|
|
1271
|
+
function En(e, n, r) {
|
|
1275
1272
|
var c = Math.min(this.t + e.t, n);
|
|
1276
1273
|
for (r.s = 0, r.t = c; c > 0; ) r[--c] = 0;
|
|
1277
1274
|
var x;
|
|
@@ -1279,7 +1276,7 @@ function bt() {
|
|
|
1279
1276
|
for (x = Math.min(e.t, n); c < x; ++c) this.am(0, e[c], r, c, 0, n - c);
|
|
1280
1277
|
r.clamp();
|
|
1281
1278
|
}
|
|
1282
|
-
function
|
|
1279
|
+
function Bn(e, n, r) {
|
|
1283
1280
|
--n;
|
|
1284
1281
|
var c = r.t = this.t + e.t - n;
|
|
1285
1282
|
for (r.s = 0; --c >= 0; ) r[c] = 0;
|
|
@@ -1290,27 +1287,27 @@ function bt() {
|
|
|
1290
1287
|
function rt(e) {
|
|
1291
1288
|
this.r2 = d(), this.q3 = d(), f.ONE.dlShiftTo(2 * e.t, this.r2), this.mu = this.r2.divide(e), this.m = e;
|
|
1292
1289
|
}
|
|
1293
|
-
function
|
|
1290
|
+
function _n(e) {
|
|
1294
1291
|
if (e.s < 0 || e.t > 2 * this.m.t) return e.mod(this.m);
|
|
1295
1292
|
if (e.compareTo(this.m) < 0) return e;
|
|
1296
1293
|
var n = d();
|
|
1297
1294
|
return e.copyTo(n), this.reduce(n), n;
|
|
1298
1295
|
}
|
|
1299
|
-
function
|
|
1296
|
+
function Rn(e) {
|
|
1300
1297
|
return e;
|
|
1301
1298
|
}
|
|
1302
|
-
function
|
|
1299
|
+
function Dn(e) {
|
|
1303
1300
|
for (e.drShiftTo(this.m.t - 1, this.r2), e.t > this.m.t + 1 && (e.t = this.m.t + 1, e.clamp()), this.mu.multiplyUpperTo(this.r2, this.m.t + 1, this.q3), this.m.multiplyLowerTo(this.q3, this.m.t + 1, this.r2); e.compareTo(this.r2) < 0; ) e.dAddOffset(1, this.m.t + 1);
|
|
1304
1301
|
for (e.subTo(this.r2, e); e.compareTo(this.m) >= 0; ) e.subTo(this.m, e);
|
|
1305
1302
|
}
|
|
1306
|
-
function
|
|
1303
|
+
function An(e, n) {
|
|
1307
1304
|
e.squareTo(n), this.reduce(n);
|
|
1308
1305
|
}
|
|
1309
|
-
function
|
|
1306
|
+
function In(e, n, r) {
|
|
1310
1307
|
e.multiplyTo(n, r), this.reduce(r);
|
|
1311
1308
|
}
|
|
1312
|
-
rt.prototype.convert =
|
|
1313
|
-
function
|
|
1309
|
+
rt.prototype.convert = _n, rt.prototype.revert = Rn, rt.prototype.reduce = Dn, rt.prototype.mulTo = In, rt.prototype.sqrTo = An;
|
|
1310
|
+
function Mn(e, n) {
|
|
1314
1311
|
var r = e.bitLength(), c, x = T(1), y;
|
|
1315
1312
|
if (r <= 0) return x;
|
|
1316
1313
|
r < 18 ? c = 1 : r < 48 ? c = 3 : r < 144 ? c = 4 : r < 768 ? c = 5 : c = 6, r < 8 ? y = new I(n) : n.isEven() ? y = new rt(n) : y = new nt(n);
|
|
@@ -1320,12 +1317,12 @@ function bt() {
|
|
|
1320
1317
|
for (y.sqrTo(S[1], Z); E <= k; )
|
|
1321
1318
|
S[E] = d(), y.mulTo(Z, S[E - 2], S[E]), E += 2;
|
|
1322
1319
|
}
|
|
1323
|
-
var U = e.t - 1, Q,
|
|
1320
|
+
var U = e.t - 1, Q, dt = !0, J = d(), X;
|
|
1324
1321
|
for (r = D(e[U]) - 1; U >= 0; ) {
|
|
1325
1322
|
for (r >= N ? Q = e[U] >> r - N & k : (Q = (e[U] & (1 << r + 1) - 1) << N - r, U > 0 && (Q |= e[U - 1] >> this.DB + r - N)), E = c; (Q & 1) == 0; )
|
|
1326
1323
|
Q >>= 1, --E;
|
|
1327
|
-
if ((r -= E) < 0 && (r += this.DB, --U),
|
|
1328
|
-
S[Q].copyTo(x),
|
|
1324
|
+
if ((r -= E) < 0 && (r += this.DB, --U), dt)
|
|
1325
|
+
S[Q].copyTo(x), dt = !1;
|
|
1329
1326
|
else {
|
|
1330
1327
|
for (; E > 1; )
|
|
1331
1328
|
y.sqrTo(x, J), y.sqrTo(J, x), E -= 2;
|
|
@@ -1336,7 +1333,7 @@ function bt() {
|
|
|
1336
1333
|
}
|
|
1337
1334
|
return y.revert(x);
|
|
1338
1335
|
}
|
|
1339
|
-
function
|
|
1336
|
+
function On(e) {
|
|
1340
1337
|
var n = this.s < 0 ? this.negate() : this.clone(), r = e.s < 0 ? e.negate() : e.clone();
|
|
1341
1338
|
if (n.compareTo(r) < 0) {
|
|
1342
1339
|
var c = n;
|
|
@@ -1348,7 +1345,7 @@ function bt() {
|
|
|
1348
1345
|
(x = n.getLowestSetBit()) > 0 && n.rShiftTo(x, n), (x = r.getLowestSetBit()) > 0 && r.rShiftTo(x, r), n.compareTo(r) >= 0 ? (n.subTo(r, n), n.rShiftTo(1, n)) : (r.subTo(n, r), r.rShiftTo(1, r));
|
|
1349
1346
|
return y > 0 && r.lShiftTo(y, r), r;
|
|
1350
1347
|
}
|
|
1351
|
-
function
|
|
1348
|
+
function qn(e) {
|
|
1352
1349
|
if (e <= 0) return 0;
|
|
1353
1350
|
var n = this.DV % e, r = this.s < 0 ? e - 1 : 0;
|
|
1354
1351
|
if (this.t > 0)
|
|
@@ -1356,7 +1353,7 @@ function bt() {
|
|
|
1356
1353
|
else for (var c = this.t - 1; c >= 0; --c) r = (n * r + this[c]) % e;
|
|
1357
1354
|
return r;
|
|
1358
1355
|
}
|
|
1359
|
-
function
|
|
1356
|
+
function Cn(e) {
|
|
1360
1357
|
var n = e.isEven();
|
|
1361
1358
|
if (this.isEven() && n || e.signum() == 0) return f.ZERO;
|
|
1362
1359
|
for (var r = e.clone(), c = this.clone(), x = T(1), y = T(0), S = T(0), E = T(1); r.signum() != 0; ) {
|
|
@@ -1372,8 +1369,8 @@ function bt() {
|
|
|
1372
1369
|
else return E;
|
|
1373
1370
|
return E.signum() < 0 ? E.add(e) : E;
|
|
1374
1371
|
}
|
|
1375
|
-
var V = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997],
|
|
1376
|
-
function
|
|
1372
|
+
var V = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], Pn = (1 << 26) / V[V.length - 1];
|
|
1373
|
+
function zn(e) {
|
|
1377
1374
|
var n, r = this.abs();
|
|
1378
1375
|
if (r.t == 1 && r[0] <= V[V.length - 1]) {
|
|
1379
1376
|
for (n = 0; n < V.length; ++n)
|
|
@@ -1382,12 +1379,12 @@ function bt() {
|
|
|
1382
1379
|
}
|
|
1383
1380
|
if (r.isEven()) return !1;
|
|
1384
1381
|
for (n = 1; n < V.length; ) {
|
|
1385
|
-
for (var c = V[n], x = n + 1; x < V.length && c <
|
|
1382
|
+
for (var c = V[n], x = n + 1; x < V.length && c < Pn; ) c *= V[x++];
|
|
1386
1383
|
for (c = r.modInt(c); n < x; ) if (c % V[n++] == 0) return !1;
|
|
1387
1384
|
}
|
|
1388
1385
|
return r.millerRabin(e);
|
|
1389
1386
|
}
|
|
1390
|
-
function
|
|
1387
|
+
function Ln(e) {
|
|
1391
1388
|
var n = this.subtract(f.ONE), r = n.getLowestSetBit();
|
|
1392
1389
|
if (r <= 0) return !1;
|
|
1393
1390
|
var c = n.shiftRight(r);
|
|
@@ -1403,51 +1400,51 @@ function bt() {
|
|
|
1403
1400
|
}
|
|
1404
1401
|
return !0;
|
|
1405
1402
|
}
|
|
1406
|
-
f.prototype.chunkSize =
|
|
1407
|
-
var
|
|
1408
|
-
function
|
|
1409
|
-
j[Y++] ^= e & 255, j[Y++] ^= e >> 8 & 255, j[Y++] ^= e >> 16 & 255, j[Y++] ^= e >> 24 & 255, Y >=
|
|
1403
|
+
f.prototype.chunkSize = Le, f.prototype.toRadix = Ne, f.prototype.fromRadix = Ye, f.prototype.fromNumber = ke, f.prototype.bitwiseTo = Ze, f.prototype.changeBit = cn, f.prototype.addTo = ln, f.prototype.dMultiply = bn, f.prototype.dAddOffset = wn, f.prototype.multiplyLowerTo = En, f.prototype.multiplyUpperTo = Bn, f.prototype.modInt = qn, f.prototype.millerRabin = Ln, f.prototype.clone = qe, f.prototype.intValue = Ce, f.prototype.byteValue = Pe, f.prototype.shortValue = ze, f.prototype.signum = He, f.prototype.toByteArray = Ve, f.prototype.equals = $e, f.prototype.min = je, f.prototype.max = Ue, f.prototype.and = We, f.prototype.or = Je, f.prototype.xor = Xe, f.prototype.andNot = Ke, f.prototype.not = Qe, f.prototype.shiftLeft = tn, f.prototype.shiftRight = en, f.prototype.getLowestSetBit = rn, f.prototype.bitCount = sn, f.prototype.testBit = fn, f.prototype.setBit = un, f.prototype.clearBit = an, f.prototype.flipBit = hn, f.prototype.add = dn, f.prototype.subtract = pn, f.prototype.multiply = gn, f.prototype.divide = mn, f.prototype.remainder = vn, f.prototype.divideAndRemainder = yn, f.prototype.modPow = Mn, f.prototype.modInverse = Cn, f.prototype.pow = Sn, f.prototype.gcd = On, f.prototype.isProbablePrime = zn, f.prototype.square = xn, f.prototype.Barrett = rt;
|
|
1404
|
+
var lt, j, Y;
|
|
1405
|
+
function Hn(e) {
|
|
1406
|
+
j[Y++] ^= e & 255, j[Y++] ^= e >> 8 & 255, j[Y++] ^= e >> 16 & 255, j[Y++] ^= e >> 24 & 255, Y >= St && (Y -= St);
|
|
1410
1407
|
}
|
|
1411
|
-
function
|
|
1412
|
-
|
|
1408
|
+
function Yt() {
|
|
1409
|
+
Hn((/* @__PURE__ */ new Date()).getTime());
|
|
1413
1410
|
}
|
|
1414
1411
|
if (j == null) {
|
|
1415
1412
|
j = new Array(), Y = 0;
|
|
1416
1413
|
var W;
|
|
1417
1414
|
if (typeof window < "u" && window.crypto) {
|
|
1418
1415
|
if (window.crypto.getRandomValues) {
|
|
1419
|
-
var
|
|
1420
|
-
for (window.crypto.getRandomValues(
|
|
1421
|
-
j[Y++] =
|
|
1416
|
+
var kt = new Uint8Array(32);
|
|
1417
|
+
for (window.crypto.getRandomValues(kt), W = 0; W < 32; ++W)
|
|
1418
|
+
j[Y++] = kt[W];
|
|
1422
1419
|
} else if (navigator.appName == "Netscape" && navigator.appVersion < "5") {
|
|
1423
|
-
var
|
|
1424
|
-
for (W = 0; W <
|
|
1425
|
-
j[Y++] =
|
|
1420
|
+
var Vt = window.crypto.random(32);
|
|
1421
|
+
for (W = 0; W < Vt.length; ++W)
|
|
1422
|
+
j[Y++] = Vt.charCodeAt(W) & 255;
|
|
1426
1423
|
}
|
|
1427
1424
|
}
|
|
1428
|
-
for (; Y <
|
|
1425
|
+
for (; Y < St; )
|
|
1429
1426
|
W = Math.floor(65536 * Math.random()), j[Y++] = W >>> 8, j[Y++] = W & 255;
|
|
1430
|
-
Y = 0,
|
|
1427
|
+
Y = 0, Yt();
|
|
1431
1428
|
}
|
|
1432
|
-
function
|
|
1433
|
-
if (
|
|
1434
|
-
for (
|
|
1429
|
+
function Nn() {
|
|
1430
|
+
if (lt == null) {
|
|
1431
|
+
for (Yt(), lt = $n(), lt.init(j), Y = 0; Y < j.length; ++Y)
|
|
1435
1432
|
j[Y] = 0;
|
|
1436
1433
|
Y = 0;
|
|
1437
1434
|
}
|
|
1438
|
-
return
|
|
1435
|
+
return lt.next();
|
|
1439
1436
|
}
|
|
1440
|
-
function
|
|
1437
|
+
function Yn(e) {
|
|
1441
1438
|
var n;
|
|
1442
|
-
for (n = 0; n < e.length; ++n) e[n] =
|
|
1439
|
+
for (n = 0; n < e.length; ++n) e[n] = Nn();
|
|
1443
1440
|
}
|
|
1444
|
-
function
|
|
1441
|
+
function $t() {
|
|
1445
1442
|
}
|
|
1446
|
-
|
|
1447
|
-
function
|
|
1443
|
+
$t.prototype.nextBytes = Yn;
|
|
1444
|
+
function Ft() {
|
|
1448
1445
|
this.i = 0, this.j = 0, this.S = new Array();
|
|
1449
1446
|
}
|
|
1450
|
-
function
|
|
1447
|
+
function kn(e) {
|
|
1451
1448
|
var n, r, c;
|
|
1452
1449
|
for (n = 0; n < 256; ++n)
|
|
1453
1450
|
this.S[n] = n;
|
|
@@ -1455,28 +1452,28 @@ function bt() {
|
|
|
1455
1452
|
r = r + this.S[n] + e[n % e.length] & 255, c = this.S[n], this.S[n] = this.S[r], this.S[r] = c;
|
|
1456
1453
|
this.i = 0, this.j = 0;
|
|
1457
1454
|
}
|
|
1458
|
-
function
|
|
1455
|
+
function Vn() {
|
|
1459
1456
|
var e;
|
|
1460
1457
|
return this.i = this.i + 1 & 255, this.j = this.j + this.S[this.i] & 255, e = this.S[this.i], this.S[this.i] = this.S[this.j], this.S[this.j] = e, this.S[e + this.S[this.i] & 255];
|
|
1461
1458
|
}
|
|
1462
|
-
|
|
1463
|
-
function
|
|
1464
|
-
return new
|
|
1459
|
+
Ft.prototype.init = kn, Ft.prototype.next = Vn;
|
|
1460
|
+
function $n() {
|
|
1461
|
+
return new Ft();
|
|
1465
1462
|
}
|
|
1466
|
-
var
|
|
1463
|
+
var St = 256;
|
|
1467
1464
|
t.exports = {
|
|
1468
1465
|
default: f,
|
|
1469
1466
|
BigInteger: f,
|
|
1470
|
-
SecureRandom:
|
|
1467
|
+
SecureRandom: $t
|
|
1471
1468
|
};
|
|
1472
|
-
}).call(
|
|
1473
|
-
}(
|
|
1474
|
-
}
|
|
1475
|
-
var
|
|
1476
|
-
function
|
|
1477
|
-
if (
|
|
1478
|
-
|
|
1479
|
-
const { BigInteger: t } =
|
|
1469
|
+
}).call(ni);
|
|
1470
|
+
}(xt)), xt.exports;
|
|
1471
|
+
}
|
|
1472
|
+
var Bt, Gt;
|
|
1473
|
+
function ri() {
|
|
1474
|
+
if (Gt) return Bt;
|
|
1475
|
+
Gt = 1;
|
|
1476
|
+
const { BigInteger: t } = wt();
|
|
1480
1477
|
function i(b) {
|
|
1481
1478
|
let m = b.toString(16);
|
|
1482
1479
|
if (m[0] !== "-")
|
|
@@ -1537,7 +1534,7 @@ function ni() {
|
|
|
1537
1534
|
const v = f(b, m);
|
|
1538
1535
|
return m + (v + 1) * 2;
|
|
1539
1536
|
}
|
|
1540
|
-
return
|
|
1537
|
+
return Bt = {
|
|
1541
1538
|
/**
|
|
1542
1539
|
* ASN.1 der 编码,针对 sm2 签名
|
|
1543
1540
|
*/
|
|
@@ -1552,13 +1549,13 @@ function ni() {
|
|
|
1552
1549
|
const m = a(b, 0), v = a(b, m), B = d(b, m), _ = b.substr(v, B * 2), M = v + _.length, R = a(b, M), q = d(b, M), p = b.substr(R, q * 2), w = new t(_, 16), g = new t(p, 16);
|
|
1553
1550
|
return { r: w, s: g };
|
|
1554
1551
|
}
|
|
1555
|
-
},
|
|
1552
|
+
}, Bt;
|
|
1556
1553
|
}
|
|
1557
|
-
var
|
|
1558
|
-
function
|
|
1559
|
-
if (
|
|
1560
|
-
|
|
1561
|
-
const { BigInteger: t } =
|
|
1554
|
+
var _t, Wt;
|
|
1555
|
+
function ii() {
|
|
1556
|
+
if (Wt) return _t;
|
|
1557
|
+
Wt = 1;
|
|
1558
|
+
const { BigInteger: t } = wt(), i = new t("2"), o = new t("3");
|
|
1562
1559
|
class s {
|
|
1563
1560
|
constructor(a, b) {
|
|
1564
1561
|
this.x = b, this.q = a;
|
|
@@ -1750,16 +1747,16 @@ function ri() {
|
|
|
1750
1747
|
}
|
|
1751
1748
|
}
|
|
1752
1749
|
}
|
|
1753
|
-
return
|
|
1750
|
+
return _t = {
|
|
1754
1751
|
ECPointFp: u,
|
|
1755
1752
|
ECCurveFp: f
|
|
1756
|
-
},
|
|
1753
|
+
}, _t;
|
|
1757
1754
|
}
|
|
1758
|
-
var
|
|
1759
|
-
function
|
|
1760
|
-
if (
|
|
1761
|
-
|
|
1762
|
-
const { BigInteger: t, SecureRandom: i } =
|
|
1755
|
+
var Rt, Jt;
|
|
1756
|
+
function oi() {
|
|
1757
|
+
if (Jt) return Rt;
|
|
1758
|
+
Jt = 1;
|
|
1759
|
+
const { BigInteger: t, SecureRandom: i } = wt(), { ECCurveFp: o } = ii(), s = new i(), { curve: u, G: f, n: d } = b();
|
|
1763
1760
|
function a() {
|
|
1764
1761
|
return u;
|
|
1765
1762
|
}
|
|
@@ -1831,7 +1828,7 @@ function ii() {
|
|
|
1831
1828
|
const h = u.decodePointHex(l);
|
|
1832
1829
|
return h ? T.equals(h) : !1;
|
|
1833
1830
|
}
|
|
1834
|
-
return
|
|
1831
|
+
return Rt = {
|
|
1835
1832
|
getGlobalCurve: a,
|
|
1836
1833
|
generateEcparam: b,
|
|
1837
1834
|
generateKeyPairHex: m,
|
|
@@ -1843,12 +1840,12 @@ function ii() {
|
|
|
1843
1840
|
hexToArray: q,
|
|
1844
1841
|
verifyPublicKey: p,
|
|
1845
1842
|
comparePublicKeyHex: w
|
|
1846
|
-
},
|
|
1843
|
+
}, Rt;
|
|
1847
1844
|
}
|
|
1848
|
-
var
|
|
1849
|
-
function
|
|
1850
|
-
if (
|
|
1851
|
-
|
|
1845
|
+
var Dt, Xt;
|
|
1846
|
+
function xe() {
|
|
1847
|
+
if (Xt) return Dt;
|
|
1848
|
+
Xt = 1;
|
|
1852
1849
|
const t = new Uint32Array(68), i = new Uint32Array(64);
|
|
1853
1850
|
function o(B, _) {
|
|
1854
1851
|
const M = _ & 31;
|
|
@@ -1888,9 +1885,9 @@ function ge() {
|
|
|
1888
1885
|
for (let I = 0; I < 64; I++)
|
|
1889
1886
|
i[I] = t[I] ^ t[I + 4];
|
|
1890
1887
|
const A = 2043430169, O = 2055708042;
|
|
1891
|
-
let C = l[0], L = l[1], D = l[2], P = l[3], z = l[4], H = l[5], $ = l[6], K = l[7], G,
|
|
1888
|
+
let C = l[0], L = l[1], D = l[2], P = l[3], z = l[4], H = l[5], $ = l[6], K = l[7], G, ot, ut, at, ht;
|
|
1892
1889
|
for (let I = 0; I < 64; I++)
|
|
1893
|
-
|
|
1890
|
+
ht = I >= 0 && I <= 15 ? A : O, G = o(o(C, 12) + z + o(ht, I), 7), ot = G ^ o(C, 12), ut = (I >= 0 && I <= 15 ? C ^ L ^ D : C & L | C & D | L & D) + P + ot + i[I], at = (I >= 0 && I <= 15 ? z ^ H ^ $ : z & H | ~z & $) + K + G + t[I], P = D, D = o(L, 9), L = C, C = ut, K = $, $ = o(H, 19), H = z, z = u(at);
|
|
1894
1891
|
l[0] ^= C, l[1] ^= L, l[2] ^= D, l[3] ^= P, l[4] ^= z, l[5] ^= H, l[6] ^= $, l[7] ^= K;
|
|
1895
1892
|
}
|
|
1896
1893
|
const T = [];
|
|
@@ -1908,16 +1905,16 @@ function ge() {
|
|
|
1908
1905
|
const M = s(_, b), R = s(_, m), q = d([...M, ...B]);
|
|
1909
1906
|
return d([...R, ...q]);
|
|
1910
1907
|
}
|
|
1911
|
-
return
|
|
1908
|
+
return Dt = {
|
|
1912
1909
|
sm3: d,
|
|
1913
1910
|
hmac: v
|
|
1914
|
-
},
|
|
1911
|
+
}, Dt;
|
|
1915
1912
|
}
|
|
1916
|
-
var
|
|
1917
|
-
function
|
|
1918
|
-
if (
|
|
1919
|
-
|
|
1920
|
-
const { BigInteger: t } =
|
|
1913
|
+
var At, Kt;
|
|
1914
|
+
function si() {
|
|
1915
|
+
if (Kt) return At;
|
|
1916
|
+
Kt = 1;
|
|
1917
|
+
const { BigInteger: t } = wt(), { encodeDer: i, decodeDer: o } = ri(), s = oi(), u = xe().sm3, { G: f, curve: d, n: a } = s.generateEcparam(), b = 0;
|
|
1921
1918
|
function m(p, w, g = 1) {
|
|
1922
1919
|
p = typeof p == "string" ? s.hexToArray(s.utf8ToHex(p)) : Array.prototype.slice.call(p), w = s.getGlobalCurve().decodePointHex(w);
|
|
1923
1920
|
const l = s.generateKeyPairHex(), T = new t(l.privateKey, 16);
|
|
@@ -1946,7 +1943,7 @@ function oi() {
|
|
|
1946
1943
|
z = u([...H, D >> 24 & 255, D >> 16 & 255, D >> 8 & 255, D & 255]), D++, P = 0;
|
|
1947
1944
|
};
|
|
1948
1945
|
$();
|
|
1949
|
-
for (let G = 0,
|
|
1946
|
+
for (let G = 0, ot = F.length; G < ot; G++)
|
|
1950
1947
|
P === z.length && $(), F[G] ^= z[P++] & 255;
|
|
1951
1948
|
return s.arrayToHex(u([].concat(C, F, L))) === T.toLowerCase() ? l === "array" ? F : s.arrayToUtf8(F) : l === "array" ? [] : "";
|
|
1952
1949
|
}
|
|
@@ -2007,7 +2004,7 @@ function oi() {
|
|
|
2007
2004
|
const p = s.generateKeyPairHex(), w = d.decodePointHex(p.publicKey);
|
|
2008
2005
|
return p.k = new t(p.privateKey, 16), p.x1 = w.getX().toBigInteger(), p;
|
|
2009
2006
|
}
|
|
2010
|
-
return
|
|
2007
|
+
return At = {
|
|
2011
2008
|
generateKeyPairHex: s.generateKeyPairHex,
|
|
2012
2009
|
compressPublicKeyHex: s.compressPublicKeyHex,
|
|
2013
2010
|
comparePublicKeyHex: s.comparePublicKeyHex,
|
|
@@ -2018,13 +2015,13 @@ function oi() {
|
|
|
2018
2015
|
getPublicKeyFromPrivateKey: R,
|
|
2019
2016
|
getPoint: q,
|
|
2020
2017
|
verifyPublicKey: s.verifyPublicKey
|
|
2021
|
-
},
|
|
2018
|
+
}, At;
|
|
2022
2019
|
}
|
|
2023
|
-
var
|
|
2024
|
-
function
|
|
2025
|
-
if (
|
|
2026
|
-
|
|
2027
|
-
const { sm3: t, hmac: i } =
|
|
2020
|
+
var It, Qt;
|
|
2021
|
+
function fi() {
|
|
2022
|
+
if (Qt) return It;
|
|
2023
|
+
Qt = 1;
|
|
2024
|
+
const { sm3: t, hmac: i } = xe();
|
|
2028
2025
|
function o(d, a) {
|
|
2029
2026
|
return d.length >= a ? d : new Array(a - d.length + 1).join("0") + d;
|
|
2030
2027
|
}
|
|
@@ -2056,7 +2053,7 @@ function si() {
|
|
|
2056
2053
|
}
|
|
2057
2054
|
return a;
|
|
2058
2055
|
}
|
|
2059
|
-
return
|
|
2056
|
+
return It = function(d, a) {
|
|
2060
2057
|
if (d = typeof d == "string" ? f(d) : Array.prototype.slice.call(d), a) {
|
|
2061
2058
|
if ((a.mode || "hmac") !== "hmac") throw new Error("invalid mode");
|
|
2062
2059
|
let m = a.key;
|
|
@@ -2064,12 +2061,12 @@ function si() {
|
|
|
2064
2061
|
return m = typeof m == "string" ? u(m) : Array.prototype.slice.call(m), s(i(d, m));
|
|
2065
2062
|
}
|
|
2066
2063
|
return s(t(d));
|
|
2067
|
-
},
|
|
2064
|
+
}, It;
|
|
2068
2065
|
}
|
|
2069
|
-
var
|
|
2070
|
-
function
|
|
2071
|
-
if (
|
|
2072
|
-
|
|
2066
|
+
var Mt, te;
|
|
2067
|
+
function ci() {
|
|
2068
|
+
if (te) return Mt;
|
|
2069
|
+
te = 1;
|
|
2073
2070
|
const t = 0, i = 32, o = 16, s = [
|
|
2074
2071
|
214,
|
|
2075
2072
|
144,
|
|
@@ -2462,94 +2459,94 @@ function fi() {
|
|
|
2462
2459
|
}
|
|
2463
2460
|
return F !== "array" ? g !== t ? d(O) : b(O) : O;
|
|
2464
2461
|
}
|
|
2465
|
-
return
|
|
2462
|
+
return Mt = {
|
|
2466
2463
|
encrypt(p, w, g) {
|
|
2467
2464
|
return q(p, w, 1, g);
|
|
2468
2465
|
},
|
|
2469
2466
|
decrypt(p, w, g) {
|
|
2470
2467
|
return q(p, w, 0, g);
|
|
2471
2468
|
}
|
|
2472
|
-
},
|
|
2473
|
-
}
|
|
2474
|
-
var
|
|
2475
|
-
function
|
|
2476
|
-
return
|
|
2477
|
-
sm2:
|
|
2478
|
-
sm3:
|
|
2479
|
-
sm4:
|
|
2480
|
-
}),
|
|
2481
|
-
}
|
|
2482
|
-
var
|
|
2483
|
-
const
|
|
2484
|
-
let
|
|
2485
|
-
const
|
|
2486
|
-
["nod", [
|
|
2487
|
-
["shake", [
|
|
2488
|
-
["mouth", [
|
|
2489
|
-
["eye", [
|
|
2469
|
+
}, Mt;
|
|
2470
|
+
}
|
|
2471
|
+
var Ot, ee;
|
|
2472
|
+
function ui() {
|
|
2473
|
+
return ee || (ee = 1, Ot = {
|
|
2474
|
+
sm2: si(),
|
|
2475
|
+
sm3: fi(),
|
|
2476
|
+
sm4: ci()
|
|
2477
|
+
}), Ot;
|
|
2478
|
+
}
|
|
2479
|
+
var me = ui();
|
|
2480
|
+
const ve = me.sm2, ye = me.sm4, zi = (t, i, o = "04") => o + ve.doEncrypt(t, i), Li = (t, i, o = "04") => ve.doDecrypt(t.startsWith(o) ? t.slice(2) : t, i), Hi = (t, i) => ye.encrypt(t, i), Ni = (t, i) => ye.decrypt(t, i);
|
|
2481
|
+
let ct = [], ai = { consecutiveFrames: 0, lastBlinkTime: 0 }, hi = { consecutiveFrames: 0, lastBlinkTime: 0 };
|
|
2482
|
+
const li = /* @__PURE__ */ new Map([
|
|
2483
|
+
["nod", [yi, 30, 100]],
|
|
2484
|
+
["shake", [vi, 7, 100]],
|
|
2485
|
+
["mouth", [mi, 0.35, 100]],
|
|
2486
|
+
["eye", [xi, 0.3, 100]]
|
|
2490
2487
|
]), Yi = ["nod", "shake", "mouth", "eye"], ki = {
|
|
2491
2488
|
nod: "请点点头",
|
|
2492
2489
|
shake: "请摇摇头",
|
|
2493
2490
|
mouth: "请张张嘴",
|
|
2494
2491
|
eye: "请眨眨眼"
|
|
2495
2492
|
};
|
|
2496
|
-
function
|
|
2493
|
+
function ne(t, i) {
|
|
2497
2494
|
if (t.length !== i.length) throw new Error("euclideanDistance: arr1.length !== arr2.length");
|
|
2498
2495
|
const o = Array.from(t), s = Array.from(i);
|
|
2499
2496
|
return Math.sqrt(
|
|
2500
2497
|
o.map((u, f) => u - s[f]).reduce((u, f) => u + Math.pow(f, 2), 0)
|
|
2501
2498
|
);
|
|
2502
2499
|
}
|
|
2503
|
-
function*
|
|
2500
|
+
function* di(t, i, o = 8, s = 0) {
|
|
2504
2501
|
for (let u = o; u > 0; u--)
|
|
2505
2502
|
yield t(i, 0.5, s);
|
|
2506
2503
|
}
|
|
2507
|
-
function
|
|
2504
|
+
function gt(t) {
|
|
2508
2505
|
return [t.x, t.y];
|
|
2509
2506
|
}
|
|
2510
|
-
function
|
|
2507
|
+
function qt(t, i) {
|
|
2511
2508
|
const o = t.x - i.x, s = t.y - i.y;
|
|
2512
2509
|
return Math.sqrt(o * o + s * s);
|
|
2513
2510
|
}
|
|
2514
|
-
function
|
|
2515
|
-
const i =
|
|
2511
|
+
function re(t) {
|
|
2512
|
+
const i = qt(t[1], t[5]), o = qt(t[2], t[4]), s = qt(t[0], t[3]);
|
|
2516
2513
|
return (i + o) / (2 * s);
|
|
2517
2514
|
}
|
|
2518
|
-
function
|
|
2519
|
-
const i =
|
|
2515
|
+
function pi(t) {
|
|
2516
|
+
const i = ne(gt(t[13]), gt(t[19])), o = ne(gt(t[0]), gt(t[6]));
|
|
2520
2517
|
return i / o;
|
|
2521
2518
|
}
|
|
2522
|
-
function
|
|
2519
|
+
function gi(t) {
|
|
2523
2520
|
const i = t.positions[30], o = t.positions[36], s = t.positions[45], u = (o.x + s.x) / 2;
|
|
2524
2521
|
return (i.x - u) / (s.x - o.x) * 30;
|
|
2525
2522
|
}
|
|
2526
|
-
function
|
|
2527
|
-
const o = Date.now(), s = re(
|
|
2523
|
+
function xi(t, i) {
|
|
2524
|
+
const o = Date.now(), s = ie(re(t.getLeftEye()), i, ai, o), u = ie(re(t.getRightEye()), i, hi, o);
|
|
2528
2525
|
return !!(s || u);
|
|
2529
2526
|
}
|
|
2530
|
-
function
|
|
2527
|
+
function ie(t, i, o, s) {
|
|
2531
2528
|
if (t < i)
|
|
2532
2529
|
o.consecutiveFrames++;
|
|
2533
2530
|
else if (o.consecutiveFrames >= 3 && s - o.lastBlinkTime > 500)
|
|
2534
2531
|
return o.lastBlinkTime = s, o.consecutiveFrames = 0, !0;
|
|
2535
2532
|
return !1;
|
|
2536
2533
|
}
|
|
2537
|
-
function xi(t, i) {
|
|
2538
|
-
return di(t.getMouth()) > i;
|
|
2539
|
-
}
|
|
2540
2534
|
function mi(t, i) {
|
|
2541
|
-
|
|
2542
|
-
return Math.abs(o) > i;
|
|
2535
|
+
return pi(t.getMouth()) > i;
|
|
2543
2536
|
}
|
|
2544
2537
|
function vi(t, i) {
|
|
2545
|
-
const o =
|
|
2538
|
+
const o = gi(t);
|
|
2539
|
+
return Math.abs(o) > i;
|
|
2540
|
+
}
|
|
2541
|
+
function yi(t, i) {
|
|
2542
|
+
const o = ct.length, s = t.positions[33];
|
|
2546
2543
|
if (o < 5)
|
|
2547
|
-
|
|
2544
|
+
ct.push(s.y);
|
|
2548
2545
|
else if (o === 5) {
|
|
2549
|
-
const u = Math.min(...
|
|
2550
|
-
if (Math.max(...
|
|
2546
|
+
const u = Math.min(...ct);
|
|
2547
|
+
if (Math.max(...ct) - u > i)
|
|
2551
2548
|
return !0;
|
|
2552
|
-
|
|
2549
|
+
ct = [];
|
|
2553
2550
|
}
|
|
2554
2551
|
return !1;
|
|
2555
2552
|
}
|
|
@@ -2567,9 +2564,9 @@ function Vi(t, i = "blob", o = 1) {
|
|
|
2567
2564
|
});
|
|
2568
2565
|
}
|
|
2569
2566
|
async function $i(t, i, o, s = 5) {
|
|
2570
|
-
const [u, f, d] =
|
|
2567
|
+
const [u, f, d] = li.get(o);
|
|
2571
2568
|
if (!u) return !1;
|
|
2572
|
-
const a = [], b =
|
|
2569
|
+
const a = [], b = di(t, i, s, d);
|
|
2573
2570
|
for (const m of b) {
|
|
2574
2571
|
const v = await m;
|
|
2575
2572
|
if (!v) continue;
|
|
@@ -2578,72 +2575,77 @@ async function $i(t, i, o, s = 5) {
|
|
|
2578
2575
|
}
|
|
2579
2576
|
return a.includes(!0);
|
|
2580
2577
|
}
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2578
|
+
let it = null;
|
|
2579
|
+
function ji(t) {
|
|
2580
|
+
const { cacheKey: i, cacheMode: o = "session", saveState: s = !0, handler: u } = t;
|
|
2581
|
+
return s && it || (it = o === "local" ? se.get(i) : oe.get(i), it && typeof u == "function" && (it = u(it))), it;
|
|
2582
|
+
}
|
|
2583
|
+
const Ui = { DATE_VALUE_FORMAT: wr, COMMON_TEXT: et, IMAGE_TYPE: fe, MEDIA_TYPE: ce, DOC_TYPE: ue, FILE_TYPE: Fr }, Zi = {
|
|
2584
|
+
encodeURIToParams: qr,
|
|
2585
|
+
paramsToQueryString: Cr,
|
|
2586
|
+
queryStringToParams: Pr,
|
|
2587
|
+
errorCodeToString: Sr,
|
|
2588
|
+
YNToString: Er,
|
|
2589
|
+
HNToString: Br,
|
|
2590
|
+
valueToLabel: Ir,
|
|
2591
|
+
chargeToLabel: Mr,
|
|
2592
|
+
cascaderToLabel: ae,
|
|
2593
|
+
multipleSelectToLabel: Or,
|
|
2594
|
+
phoneToAsterisk: _r,
|
|
2595
|
+
idNumberToAsterisk: Rr,
|
|
2596
|
+
firstLetterToUpperCase: Dr,
|
|
2597
|
+
firstLetterToLowerCase: Ar
|
|
2598
|
+
}, Gi = {
|
|
2599
|
+
validHttp: or,
|
|
2600
|
+
validExternal: sr,
|
|
2601
|
+
validString: fr,
|
|
2602
|
+
validNumberStr: cr,
|
|
2603
|
+
validEmptyObject: ur,
|
|
2604
|
+
validURL: ar,
|
|
2605
|
+
validPassword: hr,
|
|
2606
|
+
validEmail: lr,
|
|
2607
|
+
validIdNumber: zt,
|
|
2608
|
+
validPhone: pr,
|
|
2609
|
+
validTel: dr
|
|
2610
|
+
}, Wi = { scrollTo: Wn, addClass: er, removeClass: nr, hasClass: Pt, toggleClass: tr, noContextmenu: ir, useRafThrottle: rr }, Ji = { parseTime: mt, getTimeDistance: Kn, getDayRange: Qn }, Xi = { local: se, session: oe }, Ki = { uuid: Xn, randomNum: Jn };
|
|
2609
2611
|
export {
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
+
Ui as CONSTANTS,
|
|
2613
|
+
jt as NOOP,
|
|
2612
2614
|
Ci as addResizeListener,
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
+
Xi as cacheUtil,
|
|
2616
|
+
wi as countdownTimer,
|
|
2615
2617
|
Di as creatCancelTask,
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
+
Ji as dateUtil,
|
|
2619
|
+
Fi as debounce,
|
|
2618
2620
|
Ai as downloadFile,
|
|
2619
|
-
|
|
2621
|
+
Wi as elementUtil,
|
|
2620
2622
|
Yi as faceLivingEvent,
|
|
2621
2623
|
ki as faceLivingEventHint,
|
|
2622
2624
|
_i as getArrayFullUrl,
|
|
2623
|
-
|
|
2625
|
+
Ei as getBirthdayByIdNumber,
|
|
2624
2626
|
$i as getFaceGestureResult,
|
|
2625
2627
|
Vi as getFaceVideoFrame,
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
+
xr as getFullUrl,
|
|
2629
|
+
Si as getGenderByIdNumber,
|
|
2628
2630
|
Bi as getLocationConfig,
|
|
2629
2631
|
qi as getMapLocationIcon,
|
|
2630
2632
|
Ii as getPercentage,
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
+
Ti as getRandomItemInArray,
|
|
2634
|
+
ji as getRequestBaseUrl,
|
|
2633
2635
|
Mi as loadCss,
|
|
2634
2636
|
Oi as loadJs,
|
|
2635
|
-
|
|
2637
|
+
Ki as randomUtil,
|
|
2636
2638
|
Pi as removeResizeListener,
|
|
2637
2639
|
Ri as ricTask,
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
+
bi as sleep,
|
|
2641
|
+
ve as sm2Crypto,
|
|
2640
2642
|
Li as sm2Decrypt,
|
|
2641
2643
|
zi as sm2Encrypt,
|
|
2642
|
-
|
|
2644
|
+
ye as sm4Crypto,
|
|
2643
2645
|
Ni as sm4Decrypt,
|
|
2644
2646
|
Hi as sm4Encrypt,
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2647
|
+
Zi as toUtil,
|
|
2648
|
+
gr as transformPathName,
|
|
2649
|
+
mr as trimArray,
|
|
2650
|
+
Gi as validUtil
|
|
2649
2651
|
};
|