module-develop-kit 0.5.8 → 0.5.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.es.js +651 -651
- package/dist/vite-plugins/index.d.ts +9 -1
- package/dist/vite-plugins/index.es.js +27 -24
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -213,26 +213,26 @@ function Tt() {
|
|
|
213
213
|
Bi = 1;
|
|
214
214
|
function O(g) {
|
|
215
215
|
"@babel/helpers - typeof";
|
|
216
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? O = function(
|
|
217
|
-
return typeof
|
|
218
|
-
} : O = function(
|
|
219
|
-
return
|
|
216
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? O = function(v) {
|
|
217
|
+
return typeof v;
|
|
218
|
+
} : O = function(v) {
|
|
219
|
+
return v && typeof Symbol == "function" && v.constructor === Symbol && v !== Symbol.prototype ? "symbol" : typeof v;
|
|
220
220
|
}, O(g);
|
|
221
221
|
}
|
|
222
|
-
function L(g,
|
|
223
|
-
if (!(g instanceof
|
|
222
|
+
function L(g, x) {
|
|
223
|
+
if (!(g instanceof x))
|
|
224
224
|
throw new TypeError("Cannot call a class as a function");
|
|
225
225
|
}
|
|
226
|
-
function F(g,
|
|
227
|
-
if (typeof
|
|
226
|
+
function F(g, x) {
|
|
227
|
+
if (typeof x != "function" && x !== null)
|
|
228
228
|
throw new TypeError("Super expression must either be null or a function");
|
|
229
|
-
g.prototype = Object.create(
|
|
229
|
+
g.prototype = Object.create(x && x.prototype, { constructor: { value: g, writable: !0, configurable: !0 } }), x && a(g, x);
|
|
230
230
|
}
|
|
231
231
|
function i(g) {
|
|
232
|
-
var
|
|
232
|
+
var x = y();
|
|
233
233
|
return function() {
|
|
234
234
|
var p = l(g), _;
|
|
235
|
-
if (
|
|
235
|
+
if (x) {
|
|
236
236
|
var d = l(this).constructor;
|
|
237
237
|
_ = Reflect.construct(p, arguments, d);
|
|
238
238
|
} else
|
|
@@ -240,8 +240,8 @@ function Tt() {
|
|
|
240
240
|
return P(this, _);
|
|
241
241
|
};
|
|
242
242
|
}
|
|
243
|
-
function P(g,
|
|
244
|
-
return
|
|
243
|
+
function P(g, x) {
|
|
244
|
+
return x && (O(x) === "object" || typeof x == "function") ? x : E(g);
|
|
245
245
|
}
|
|
246
246
|
function E(g) {
|
|
247
247
|
if (g === void 0)
|
|
@@ -249,14 +249,14 @@ function Tt() {
|
|
|
249
249
|
return g;
|
|
250
250
|
}
|
|
251
251
|
function t(g) {
|
|
252
|
-
var
|
|
252
|
+
var x = typeof Map == "function" ? /* @__PURE__ */ new Map() : void 0;
|
|
253
253
|
return t = function(p) {
|
|
254
254
|
if (p === null || !n(p)) return p;
|
|
255
255
|
if (typeof p != "function")
|
|
256
256
|
throw new TypeError("Super expression must either be null or a function");
|
|
257
|
-
if (typeof
|
|
258
|
-
if (
|
|
259
|
-
|
|
257
|
+
if (typeof x < "u") {
|
|
258
|
+
if (x.has(p)) return x.get(p);
|
|
259
|
+
x.set(p, _);
|
|
260
260
|
}
|
|
261
261
|
function _() {
|
|
262
262
|
return h(p, arguments, l(this).constructor);
|
|
@@ -264,7 +264,7 @@ function Tt() {
|
|
|
264
264
|
return _.prototype = Object.create(p.prototype, { constructor: { value: _, enumerable: !1, writable: !0, configurable: !0 } }), a(_, p);
|
|
265
265
|
}, t(g);
|
|
266
266
|
}
|
|
267
|
-
function h(g,
|
|
267
|
+
function h(g, x, v) {
|
|
268
268
|
return y() ? h = Reflect.construct : h = function(_, d, T) {
|
|
269
269
|
var B = [null];
|
|
270
270
|
B.push.apply(B, d);
|
|
@@ -285,48 +285,48 @@ function Tt() {
|
|
|
285
285
|
function n(g) {
|
|
286
286
|
return Function.toString.call(g).indexOf("[native code]") !== -1;
|
|
287
287
|
}
|
|
288
|
-
function a(g,
|
|
288
|
+
function a(g, x) {
|
|
289
289
|
return a = Object.setPrototypeOf || function(p, _) {
|
|
290
290
|
return p.__proto__ = _, p;
|
|
291
|
-
}, a(g,
|
|
291
|
+
}, a(g, x);
|
|
292
292
|
}
|
|
293
293
|
function l(g) {
|
|
294
|
-
return l = Object.setPrototypeOf ? Object.getPrototypeOf : function(
|
|
295
|
-
return
|
|
294
|
+
return l = Object.setPrototypeOf ? Object.getPrototypeOf : function(v) {
|
|
295
|
+
return v.__proto__ || Object.getPrototypeOf(v);
|
|
296
296
|
}, l(g);
|
|
297
297
|
}
|
|
298
298
|
var u = /* @__PURE__ */ function(g) {
|
|
299
|
-
F(
|
|
300
|
-
var
|
|
301
|
-
function
|
|
299
|
+
F(v, g);
|
|
300
|
+
var x = i(v);
|
|
301
|
+
function v(p, _) {
|
|
302
302
|
var d;
|
|
303
|
-
return L(this,
|
|
303
|
+
return L(this, v), d = x.call(this), d.code = 1, d.name = "CONFIGURATION_ERROR", d.parameter = p, d.value = _, d.message = d.value ? "Invalid value ".concat(JSON.stringify(d.value), ' for parameter "').concat(d.parameter, '"') : "Missing parameter: ".concat(d.parameter), d;
|
|
304
304
|
}
|
|
305
|
-
return
|
|
305
|
+
return v;
|
|
306
306
|
}(/* @__PURE__ */ t(Error)), c = /* @__PURE__ */ function(g) {
|
|
307
|
-
F(
|
|
308
|
-
var
|
|
309
|
-
function
|
|
307
|
+
F(v, g);
|
|
308
|
+
var x = i(v);
|
|
309
|
+
function v(p) {
|
|
310
310
|
var _;
|
|
311
|
-
return L(this,
|
|
311
|
+
return L(this, v), _ = x.call(this), _.code = 2, _.name = "INVALID_STATE_ERROR", _.status = p, _.message = "Invalid status: ".concat(p), _;
|
|
312
312
|
}
|
|
313
|
-
return
|
|
313
|
+
return v;
|
|
314
314
|
}(/* @__PURE__ */ t(Error)), S = /* @__PURE__ */ function(g) {
|
|
315
|
-
F(
|
|
316
|
-
var
|
|
317
|
-
function
|
|
315
|
+
F(v, g);
|
|
316
|
+
var x = i(v);
|
|
317
|
+
function v(p) {
|
|
318
318
|
var _;
|
|
319
|
-
return L(this,
|
|
319
|
+
return L(this, v), _ = x.call(this), _.code = 3, _.name = "NOT_SUPPORTED_ERROR", _.message = p, _;
|
|
320
320
|
}
|
|
321
|
-
return
|
|
321
|
+
return v;
|
|
322
322
|
}(/* @__PURE__ */ t(Error)), R = /* @__PURE__ */ function(g) {
|
|
323
|
-
F(
|
|
324
|
-
var
|
|
325
|
-
function
|
|
323
|
+
F(v, g);
|
|
324
|
+
var x = i(v);
|
|
325
|
+
function v(p) {
|
|
326
326
|
var _;
|
|
327
|
-
return L(this,
|
|
327
|
+
return L(this, v), _ = x.call(this), _.code = 4, _.name = "NOT_READY_ERROR", _.message = p, _;
|
|
328
328
|
}
|
|
329
|
-
return
|
|
329
|
+
return v;
|
|
330
330
|
}(/* @__PURE__ */ t(Error));
|
|
331
331
|
return Vn = {
|
|
332
332
|
ConfigurationError: u,
|
|
@@ -459,8 +459,8 @@ function ct() {
|
|
|
459
459
|
WSP: S,
|
|
460
460
|
OCTET: R,
|
|
461
461
|
DQUOTE: g,
|
|
462
|
-
SP:
|
|
463
|
-
HTAB:
|
|
462
|
+
SP: x,
|
|
463
|
+
HTAB: v,
|
|
464
464
|
alphanum: p,
|
|
465
465
|
reserved: _,
|
|
466
466
|
unreserved: d,
|
|
@@ -708,7 +708,7 @@ function ct() {
|
|
|
708
708
|
}
|
|
709
709
|
function S() {
|
|
710
710
|
var e;
|
|
711
|
-
return e =
|
|
711
|
+
return e = x(), e === null && (e = v()), e;
|
|
712
712
|
}
|
|
713
713
|
function R() {
|
|
714
714
|
var e;
|
|
@@ -718,11 +718,11 @@ function ct() {
|
|
|
718
718
|
var e;
|
|
719
719
|
return /^["]/.test(i.charAt(t)) ? (e = i.charAt(t), t++) : (e = null, n('["]')), e;
|
|
720
720
|
}
|
|
721
|
-
function
|
|
721
|
+
function x() {
|
|
722
722
|
var e;
|
|
723
723
|
return i.charCodeAt(t) === 32 ? (e = " ", t++) : (e = null, n('" "')), e;
|
|
724
724
|
}
|
|
725
|
-
function
|
|
725
|
+
function v() {
|
|
726
726
|
var e;
|
|
727
727
|
return i.charCodeAt(t) === 9 ? (e = " ", t++) : (e = null, n('"\\t"')), e;
|
|
728
728
|
}
|
|
@@ -771,8 +771,8 @@ function ct() {
|
|
|
771
771
|
}
|
|
772
772
|
function H() {
|
|
773
773
|
var e, r, s, o, m;
|
|
774
|
-
for (o = t, m = t, e = [], r =
|
|
775
|
-
e.push(r), r =
|
|
774
|
+
for (o = t, m = t, e = [], r = x(), r === null && (r = v()); r !== null; )
|
|
775
|
+
e.push(r), r = x(), r === null && (r = v());
|
|
776
776
|
return e !== null ? (i.charCodeAt(t) === 58 ? (r = ":", t++) : (r = null, n('":"')), r !== null ? (s = U(), s !== null ? e = [e, r, s] : (e = null, t = m)) : (e = null, t = m)) : (e = null, t = m), e !== null && (e = /* @__PURE__ */ function(b) {
|
|
777
777
|
return ":";
|
|
778
778
|
}()), e === null && (t = o), e;
|
|
@@ -839,7 +839,7 @@ function ct() {
|
|
|
839
839
|
}
|
|
840
840
|
function Y() {
|
|
841
841
|
var e;
|
|
842
|
-
return i.charCodeAt(t) === 40 ? (e = "(", t++) : (e = null, n('"("')), e === null && (i.charCodeAt(t) === 41 ? (e = ")", t++) : (e = null, n('")"')), e === null && (i.charCodeAt(t) === 60 ? (e = "<", t++) : (e = null, n('"<"')), e === null && (i.charCodeAt(t) === 62 ? (e = ">", t++) : (e = null, n('">"')), e === null && (i.charCodeAt(t) === 64 ? (e = "@", t++) : (e = null, n('"@"')), e === null && (i.charCodeAt(t) === 44 ? (e = ",", t++) : (e = null, n('","')), e === null && (i.charCodeAt(t) === 59 ? (e = ";", t++) : (e = null, n('";"')), e === null && (i.charCodeAt(t) === 58 ? (e = ":", t++) : (e = null, n('":"')), e === null && (i.charCodeAt(t) === 92 ? (e = "\\", t++) : (e = null, n('"\\\\"')), e === null && (e = g(), e === null && (i.charCodeAt(t) === 47 ? (e = "/", t++) : (e = null, n('"/"')), e === null && (i.charCodeAt(t) === 91 ? (e = "[", t++) : (e = null, n('"["')), e === null && (i.charCodeAt(t) === 93 ? (e = "]", t++) : (e = null, n('"]"')), e === null && (i.charCodeAt(t) === 63 ? (e = "?", t++) : (e = null, n('"?"')), e === null && (i.charCodeAt(t) === 61 ? (e = "=", t++) : (e = null, n('"="')), e === null && (i.charCodeAt(t) === 123 ? (e = "{", t++) : (e = null, n('"{"')), e === null && (i.charCodeAt(t) === 125 ? (e = "}", t++) : (e = null, n('"}"')), e === null && (e =
|
|
842
|
+
return i.charCodeAt(t) === 40 ? (e = "(", t++) : (e = null, n('"("')), e === null && (i.charCodeAt(t) === 41 ? (e = ")", t++) : (e = null, n('")"')), e === null && (i.charCodeAt(t) === 60 ? (e = "<", t++) : (e = null, n('"<"')), e === null && (i.charCodeAt(t) === 62 ? (e = ">", t++) : (e = null, n('">"')), e === null && (i.charCodeAt(t) === 64 ? (e = "@", t++) : (e = null, n('"@"')), e === null && (i.charCodeAt(t) === 44 ? (e = ",", t++) : (e = null, n('","')), e === null && (i.charCodeAt(t) === 59 ? (e = ";", t++) : (e = null, n('";"')), e === null && (i.charCodeAt(t) === 58 ? (e = ":", t++) : (e = null, n('":"')), e === null && (i.charCodeAt(t) === 92 ? (e = "\\", t++) : (e = null, n('"\\\\"')), e === null && (e = g(), e === null && (i.charCodeAt(t) === 47 ? (e = "/", t++) : (e = null, n('"/"')), e === null && (i.charCodeAt(t) === 91 ? (e = "[", t++) : (e = null, n('"["')), e === null && (i.charCodeAt(t) === 93 ? (e = "]", t++) : (e = null, n('"]"')), e === null && (i.charCodeAt(t) === 63 ? (e = "?", t++) : (e = null, n('"?"')), e === null && (i.charCodeAt(t) === 61 ? (e = "=", t++) : (e = null, n('"="')), e === null && (i.charCodeAt(t) === 123 ? (e = "{", t++) : (e = null, n('"{"')), e === null && (i.charCodeAt(t) === 125 ? (e = "}", t++) : (e = null, n('"}"')), e === null && (e = x(), e === null && (e = v())))))))))))))))))), e;
|
|
843
843
|
}
|
|
844
844
|
function Q() {
|
|
845
845
|
var e, r, s;
|
|
@@ -1240,7 +1240,7 @@ function ct() {
|
|
|
1240
1240
|
}
|
|
1241
1241
|
function _r() {
|
|
1242
1242
|
var e, r, s, o, m, b;
|
|
1243
|
-
return b = t, e = Qt(), e !== null ? (r =
|
|
1243
|
+
return b = t, e = Qt(), e !== null ? (r = x(), r !== null ? (s = xr(), s !== null ? (o = x(), o !== null ? (m = sr(), m !== null ? e = [e, r, s, o, m] : (e = null, t = b)) : (e = null, t = b)) : (e = null, t = b)) : (e = null, t = b)) : (e = null, t = b), e;
|
|
1244
1244
|
}
|
|
1245
1245
|
function xr() {
|
|
1246
1246
|
var e;
|
|
@@ -1420,7 +1420,7 @@ function ct() {
|
|
|
1420
1420
|
}
|
|
1421
1421
|
function ir() {
|
|
1422
1422
|
var e, r, s, o, m, b;
|
|
1423
|
-
return b = t, e = sr(), e !== null ? (r =
|
|
1423
|
+
return b = t, e = sr(), e !== null ? (r = x(), r !== null ? (s = Ye(), s !== null ? (o = x(), o !== null ? (m = or(), m !== null ? e = [e, r, s, o, m] : (e = null, t = b)) : (e = null, t = b)) : (e = null, t = b)) : (e = null, t = b)) : (e = null, t = b), e;
|
|
1424
1424
|
}
|
|
1425
1425
|
function Ye() {
|
|
1426
1426
|
var e, r;
|
|
@@ -1434,8 +1434,8 @@ function ct() {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
function or() {
|
|
1436
1436
|
var e, r, s;
|
|
1437
|
-
for (s = t, e = [], r = _(), r === null && (r = d(), r === null && (r = B(), r === null && (r = W(), r === null && (r = C(), r === null && (r =
|
|
1438
|
-
e.push(r), r = _(), r === null && (r = d(), r === null && (r = B(), r === null && (r = W(), r === null && (r = C(), r === null && (r =
|
|
1437
|
+
for (s = t, e = [], r = _(), r === null && (r = d(), r === null && (r = B(), r === null && (r = W(), r === null && (r = C(), r === null && (r = x(), r === null && (r = v())))))); r !== null; )
|
|
1438
|
+
e.push(r), r = _(), r === null && (r = d(), r === null && (r = B(), r === null && (r = W(), r === null && (r = C(), r === null && (r = x(), r === null && (r = v()))))));
|
|
1439
1439
|
return e !== null && (e = function(o) {
|
|
1440
1440
|
Z.reason_phrase = i.substring(t, o);
|
|
1441
1441
|
}(s)), e === null && (t = s), e;
|
|
@@ -1830,15 +1830,15 @@ function ct() {
|
|
|
1830
1830
|
if (r = A(), r !== null)
|
|
1831
1831
|
if (s = fe(), s !== null)
|
|
1832
1832
|
if (o = Br(), o !== null) {
|
|
1833
|
-
if (m = [], le = t, G =
|
|
1833
|
+
if (m = [], le = t, G = x(), G !== null)
|
|
1834
1834
|
for (b = []; G !== null; )
|
|
1835
|
-
b.push(G), G =
|
|
1835
|
+
b.push(G), G = x();
|
|
1836
1836
|
else
|
|
1837
1837
|
b = null;
|
|
1838
1838
|
for (b !== null ? (G = Br(), G !== null ? b = [b, G] : (b = null, t = le)) : (b = null, t = le); b !== null; ) {
|
|
1839
|
-
if (m.push(b), le = t, G =
|
|
1839
|
+
if (m.push(b), le = t, G = x(), G !== null)
|
|
1840
1840
|
for (b = []; G !== null; )
|
|
1841
|
-
b.push(G), G =
|
|
1841
|
+
b.push(G), G = x();
|
|
1842
1842
|
else
|
|
1843
1843
|
b = null;
|
|
1844
1844
|
b !== null ? (G = Br(), G !== null ? b = [b, G] : (b = null, t = le)) : (b = null, t = le);
|
|
@@ -2382,8 +2382,8 @@ function bt() {
|
|
|
2382
2382
|
};
|
|
2383
2383
|
return { s: c, n: function() {
|
|
2384
2384
|
return u >= n.length ? { done: !0 } : { done: !1, value: n[u++] };
|
|
2385
|
-
}, e: function(
|
|
2386
|
-
throw
|
|
2385
|
+
}, e: function(v) {
|
|
2386
|
+
throw v;
|
|
2387
2387
|
}, f: c };
|
|
2388
2388
|
}
|
|
2389
2389
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
@@ -2393,10 +2393,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2393
2393
|
return { s: function() {
|
|
2394
2394
|
l = n[Symbol.iterator]();
|
|
2395
2395
|
}, n: function() {
|
|
2396
|
-
var
|
|
2397
|
-
return S =
|
|
2398
|
-
}, e: function(
|
|
2399
|
-
R = !0, g =
|
|
2396
|
+
var v = l.next();
|
|
2397
|
+
return S = v.done, v;
|
|
2398
|
+
}, e: function(v) {
|
|
2399
|
+
R = !0, g = v;
|
|
2400
2400
|
}, f: function() {
|
|
2401
2401
|
try {
|
|
2402
2402
|
!S && l.return != null && l.return();
|
|
@@ -2452,8 +2452,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2452
2452
|
this._parameters = {}, this._headers = {}, this._scheme = a || t.SIP, this._user = l, this._host = u, this._port = c;
|
|
2453
2453
|
for (var g in S)
|
|
2454
2454
|
Object.prototype.hasOwnProperty.call(S, g) && this.setParam(g, S[g]);
|
|
2455
|
-
for (var
|
|
2456
|
-
Object.prototype.hasOwnProperty.call(R,
|
|
2455
|
+
for (var x in R)
|
|
2456
|
+
Object.prototype.hasOwnProperty.call(R, x) && this.setHeader(x, R[x]);
|
|
2457
2457
|
}
|
|
2458
2458
|
return E(n, [{
|
|
2459
2459
|
key: "setParam",
|
|
@@ -2532,11 +2532,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2532
2532
|
var R = O(this._headers[S]), g;
|
|
2533
2533
|
try {
|
|
2534
2534
|
for (R.s(); !(g = R.n()).done; ) {
|
|
2535
|
-
var
|
|
2536
|
-
l.push("".concat(S, "=").concat(
|
|
2535
|
+
var x = g.value;
|
|
2536
|
+
l.push("".concat(S, "=").concat(x));
|
|
2537
2537
|
}
|
|
2538
|
-
} catch (
|
|
2539
|
-
R.e(
|
|
2538
|
+
} catch (v) {
|
|
2539
|
+
R.e(v);
|
|
2540
2540
|
} finally {
|
|
2541
2541
|
R.f();
|
|
2542
2542
|
}
|
|
@@ -2612,19 +2612,19 @@ function Ve() {
|
|
|
2612
2612
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
2613
2613
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
2614
2614
|
}
|
|
2615
|
-
var R = !0, g = !1,
|
|
2615
|
+
var R = !0, g = !1, x;
|
|
2616
2616
|
return { s: function() {
|
|
2617
2617
|
u = a[Symbol.iterator]();
|
|
2618
2618
|
}, n: function() {
|
|
2619
2619
|
var p = u.next();
|
|
2620
2620
|
return R = p.done, p;
|
|
2621
2621
|
}, e: function(p) {
|
|
2622
|
-
g = !0,
|
|
2622
|
+
g = !0, x = p;
|
|
2623
2623
|
}, f: function() {
|
|
2624
2624
|
try {
|
|
2625
2625
|
!R && u.return != null && u.return();
|
|
2626
2626
|
} finally {
|
|
2627
|
-
if (g) throw
|
|
2627
|
+
if (g) throw x;
|
|
2628
2628
|
}
|
|
2629
2629
|
} };
|
|
2630
2630
|
}
|
|
@@ -2752,10 +2752,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2752
2752
|
function g(ve, _e, pe) {
|
|
2753
2753
|
return _e ^ (ve | ~pe);
|
|
2754
2754
|
}
|
|
2755
|
-
function
|
|
2755
|
+
function x(ve, _e, pe, Ee, be, De, Ce) {
|
|
2756
2756
|
return ve = u(ve, u(u(c(_e, pe, Ee), be), Ce)), u(l(ve, De), _e);
|
|
2757
2757
|
}
|
|
2758
|
-
function
|
|
2758
|
+
function v(ve, _e, pe, Ee, be, De, Ce) {
|
|
2759
2759
|
return ve = u(ve, u(u(S(_e, pe, Ee), be), Ce)), u(l(ve, De), _e);
|
|
2760
2760
|
}
|
|
2761
2761
|
function p(ve, _e, pe, Ee, be, De, Ce) {
|
|
@@ -2784,7 +2784,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2784
2784
|
}
|
|
2785
2785
|
var w = [], U, H, q, N, W, C, D, j, z, Y = 7, Q = 12, K = 17, f = 22, A = 5, V = 9, $ = 14, ee = 20, J = 4, ne = 11, te = 16, ae = 23, fe = 6, ue = 10, me = 15, ye = 21;
|
|
2786
2786
|
for (a = B(a), w = d(a), C = 1732584193, D = 4023233417, j = 2562383102, z = 271733878, U = 0; U < w.length; U += 16)
|
|
2787
|
-
H = C, q = D, N = j, W = z, C =
|
|
2787
|
+
H = C, q = D, N = j, W = z, C = x(C, D, j, z, w[U + 0], Y, 3614090360), z = x(z, C, D, j, w[U + 1], Q, 3905402710), j = x(j, z, C, D, w[U + 2], K, 606105819), D = x(D, j, z, C, w[U + 3], f, 3250441966), C = x(C, D, j, z, w[U + 4], Y, 4118548399), z = x(z, C, D, j, w[U + 5], Q, 1200080426), j = x(j, z, C, D, w[U + 6], K, 2821735955), D = x(D, j, z, C, w[U + 7], f, 4249261313), C = x(C, D, j, z, w[U + 8], Y, 1770035416), z = x(z, C, D, j, w[U + 9], Q, 2336552879), j = x(j, z, C, D, w[U + 10], K, 4294925233), D = x(D, j, z, C, w[U + 11], f, 2304563134), C = x(C, D, j, z, w[U + 12], Y, 1804603682), z = x(z, C, D, j, w[U + 13], Q, 4254626195), j = x(j, z, C, D, w[U + 14], K, 2792965006), D = x(D, j, z, C, w[U + 15], f, 1236535329), C = v(C, D, j, z, w[U + 1], A, 4129170786), z = v(z, C, D, j, w[U + 6], V, 3225465664), j = v(j, z, C, D, w[U + 11], $, 643717713), D = v(D, j, z, C, w[U + 0], ee, 3921069994), C = v(C, D, j, z, w[U + 5], A, 3593408605), z = v(z, C, D, j, w[U + 10], V, 38016083), j = v(j, z, C, D, w[U + 15], $, 3634488961), D = v(D, j, z, C, w[U + 4], ee, 3889429448), C = v(C, D, j, z, w[U + 9], A, 568446438), z = v(z, C, D, j, w[U + 14], V, 3275163606), j = v(j, z, C, D, w[U + 3], $, 4107603335), D = v(D, j, z, C, w[U + 8], ee, 1163531501), C = v(C, D, j, z, w[U + 13], A, 2850285829), z = v(z, C, D, j, w[U + 2], V, 4243563512), j = v(j, z, C, D, w[U + 7], $, 1735328473), D = v(D, j, z, C, w[U + 12], ee, 2368359562), C = p(C, D, j, z, w[U + 5], J, 4294588738), z = p(z, C, D, j, w[U + 8], ne, 2272392833), j = p(j, z, C, D, w[U + 11], te, 1839030562), D = p(D, j, z, C, w[U + 14], ae, 4259657740), C = p(C, D, j, z, w[U + 1], J, 2763975236), z = p(z, C, D, j, w[U + 4], ne, 1272893353), j = p(j, z, C, D, w[U + 7], te, 4139469664), D = p(D, j, z, C, w[U + 10], ae, 3200236656), C = p(C, D, j, z, w[U + 13], J, 681279174), z = p(z, C, D, j, w[U + 0], ne, 3936430074), j = p(j, z, C, D, w[U + 3], te, 3572445317), D = p(D, j, z, C, w[U + 6], ae, 76029189), C = p(C, D, j, z, w[U + 9], J, 3654602809), z = p(z, C, D, j, w[U + 12], ne, 3873151461), j = p(j, z, C, D, w[U + 15], te, 530742520), D = p(D, j, z, C, w[U + 2], ae, 3299628645), C = _(C, D, j, z, w[U + 0], fe, 4096336452), z = _(z, C, D, j, w[U + 7], ue, 1126891415), j = _(j, z, C, D, w[U + 14], me, 2878612391), D = _(D, j, z, C, w[U + 5], ye, 4237533241), C = _(C, D, j, z, w[U + 12], fe, 1700485571), z = _(z, C, D, j, w[U + 3], ue, 2399980690), j = _(j, z, C, D, w[U + 10], me, 4293915773), D = _(D, j, z, C, w[U + 1], ye, 2240044497), C = _(C, D, j, z, w[U + 8], fe, 1873313359), z = _(z, C, D, j, w[U + 15], ue, 4264355552), j = _(j, z, C, D, w[U + 6], me, 2734768916), D = _(D, j, z, C, w[U + 13], ye, 1309151649), C = _(C, D, j, z, w[U + 4], fe, 4149444226), z = _(z, C, D, j, w[U + 11], ue, 3174756917), j = _(j, z, C, D, w[U + 2], me, 718787259), D = _(D, j, z, C, w[U + 9], ye, 3951481745), C = u(C, H), D = u(D, q), j = u(j, N), z = u(z, W);
|
|
2788
2788
|
var Ae = T(C) + T(D) + T(j) + T(z);
|
|
2789
2789
|
return Ae.toLowerCase();
|
|
2790
2790
|
}, Pe.closeMediaStream = function(a) {
|
|
@@ -2809,8 +2809,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2809
2809
|
var R = L(l), g;
|
|
2810
2810
|
try {
|
|
2811
2811
|
for (R.s(); !(g = R.n()).done; ) {
|
|
2812
|
-
var
|
|
2813
|
-
|
|
2812
|
+
var x = g.value;
|
|
2813
|
+
x.stop();
|
|
2814
2814
|
}
|
|
2815
2815
|
} catch (d) {
|
|
2816
2816
|
R.e(d);
|
|
@@ -2818,16 +2818,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2818
2818
|
R.f();
|
|
2819
2819
|
}
|
|
2820
2820
|
l = a.getVideoTracks();
|
|
2821
|
-
var
|
|
2821
|
+
var v = L(l), p;
|
|
2822
2822
|
try {
|
|
2823
|
-
for (
|
|
2823
|
+
for (v.s(); !(p = v.n()).done; ) {
|
|
2824
2824
|
var _ = p.value;
|
|
2825
2825
|
_.stop();
|
|
2826
2826
|
}
|
|
2827
2827
|
} catch (d) {
|
|
2828
|
-
|
|
2828
|
+
v.e(d);
|
|
2829
2829
|
} finally {
|
|
2830
|
-
|
|
2830
|
+
v.f();
|
|
2831
2831
|
}
|
|
2832
2832
|
}
|
|
2833
2833
|
} catch {
|
|
@@ -2861,7 +2861,7 @@ function St() {
|
|
|
2861
2861
|
function E() {
|
|
2862
2862
|
E.init.call(this);
|
|
2863
2863
|
}
|
|
2864
|
-
Hr.exports = E, Hr.exports.once =
|
|
2864
|
+
Hr.exports = E, Hr.exports.once = x, E.EventEmitter = E, E.prototype._events = void 0, E.prototype._eventsCount = 0, E.prototype._maxListeners = void 0;
|
|
2865
2865
|
var t = 10;
|
|
2866
2866
|
function h(_) {
|
|
2867
2867
|
if (typeof _ != "function")
|
|
@@ -3026,7 +3026,7 @@ function St() {
|
|
|
3026
3026
|
d[T] = _[T].listener || _[T];
|
|
3027
3027
|
return d;
|
|
3028
3028
|
}
|
|
3029
|
-
function
|
|
3029
|
+
function x(_, d) {
|
|
3030
3030
|
return new Promise(function(T, B) {
|
|
3031
3031
|
function w(H) {
|
|
3032
3032
|
_.removeListener(d, U), B(H);
|
|
@@ -3034,10 +3034,10 @@ function St() {
|
|
|
3034
3034
|
function U() {
|
|
3035
3035
|
typeof _.removeListener == "function" && _.removeListener("error", w), T([].slice.call(arguments));
|
|
3036
3036
|
}
|
|
3037
|
-
p(_, d, U, { once: !0 }), d !== "error" &&
|
|
3037
|
+
p(_, d, U, { once: !0 }), d !== "error" && v(_, w, { once: !0 });
|
|
3038
3038
|
});
|
|
3039
3039
|
}
|
|
3040
|
-
function
|
|
3040
|
+
function v(_, d, T) {
|
|
3041
3041
|
typeof _.on == "function" && p(_, "error", d, T);
|
|
3042
3042
|
}
|
|
3043
3043
|
function p(_, d, T, B) {
|
|
@@ -3151,30 +3151,30 @@ function na() {
|
|
|
3151
3151
|
i.selectColor = F;
|
|
3152
3152
|
function i(l) {
|
|
3153
3153
|
let u, c = null, S, R;
|
|
3154
|
-
function g(...
|
|
3154
|
+
function g(...x) {
|
|
3155
3155
|
if (!g.enabled)
|
|
3156
3156
|
return;
|
|
3157
|
-
const
|
|
3158
|
-
|
|
3157
|
+
const v = g, p = Number(/* @__PURE__ */ new Date()), _ = p - (u || p);
|
|
3158
|
+
v.diff = _, v.prev = u, v.curr = p, u = p, x[0] = i.coerce(x[0]), typeof x[0] != "string" && x.unshift("%O");
|
|
3159
3159
|
let d = 0;
|
|
3160
|
-
|
|
3160
|
+
x[0] = x[0].replace(/%([a-zA-Z%])/g, (B, w) => {
|
|
3161
3161
|
if (B === "%%")
|
|
3162
3162
|
return "%";
|
|
3163
3163
|
d++;
|
|
3164
3164
|
const U = i.formatters[w];
|
|
3165
3165
|
if (typeof U == "function") {
|
|
3166
|
-
const H =
|
|
3167
|
-
B = U.call(
|
|
3166
|
+
const H = x[d];
|
|
3167
|
+
B = U.call(v, H), x.splice(d, 1), d--;
|
|
3168
3168
|
}
|
|
3169
3169
|
return B;
|
|
3170
|
-
}), i.formatArgs.call(
|
|
3170
|
+
}), i.formatArgs.call(v, x), (v.log || i.log).apply(v, x);
|
|
3171
3171
|
}
|
|
3172
3172
|
return g.namespace = l, g.useColors = i.useColors(), g.color = i.selectColor(l), g.extend = P, g.destroy = i.destroy, Object.defineProperty(g, "enabled", {
|
|
3173
3173
|
enumerable: !0,
|
|
3174
3174
|
configurable: !1,
|
|
3175
3175
|
get: () => c !== null ? c : (S !== i.namespaces && (S = i.namespaces, R = i.enabled(l)), R),
|
|
3176
|
-
set: (
|
|
3177
|
-
c =
|
|
3176
|
+
set: (x) => {
|
|
3177
|
+
c = x;
|
|
3178
3178
|
}
|
|
3179
3179
|
}), typeof i.init == "function" && i.init(g), g;
|
|
3180
3180
|
}
|
|
@@ -4111,20 +4111,20 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4111
4111
|
function c(H, q, N) {
|
|
4112
4112
|
return q && u(H.prototype, q), H;
|
|
4113
4113
|
}
|
|
4114
|
-
var S = zs(), R = ze(), g = He(),
|
|
4114
|
+
var S = zs(), R = ze(), g = He(), x = Ve(), v = qs(), p = ct(), _ = new R("SIPMessage"), d = /* @__PURE__ */ function() {
|
|
4115
4115
|
function H(q, N, W, C, D, j) {
|
|
4116
4116
|
if (l(this, H), !q || !N || !W)
|
|
4117
4117
|
return null;
|
|
4118
|
-
C = C || {}, this.ua = W, this.headers = {}, this.method = q, this.ruri = N, this.body = j, this.extraHeaders =
|
|
4118
|
+
C = C || {}, this.ua = W, this.headers = {}, this.method = q, this.ruri = N, this.body = j, this.extraHeaders = x.cloneArray(D), this.ua.configuration.extra_headers && (this.extraHeaders = this.extraHeaders.concat(this.ua.configuration.extra_headers)), C.route_set ? this.setHeader("route", C.route_set) : W.configuration.use_preloaded_route && this.setHeader("route", "<".concat(W.transport.sip_uri, ";lr>")), this.setHeader("via", ""), this.setHeader("max-forwards", g.MAX_FORWARDS);
|
|
4119
4119
|
var z = C.to_uri || N, Y = C.to_tag ? {
|
|
4120
4120
|
tag: C.to_tag
|
|
4121
4121
|
} : null, Q = typeof C.to_display_name < "u" ? C.to_display_name : null;
|
|
4122
|
-
this.to = new
|
|
4122
|
+
this.to = new v(z, Q, Y), this.setHeader("to", this.to.toString());
|
|
4123
4123
|
var K = C.from_uri || W.configuration.uri, f = {
|
|
4124
|
-
tag: C.from_tag ||
|
|
4124
|
+
tag: C.from_tag || x.newTag()
|
|
4125
4125
|
}, A;
|
|
4126
|
-
typeof C.from_display_name < "u" ? A = C.from_display_name : W.configuration.display_name ? A = W.configuration.display_name : A = null, this.from = new
|
|
4127
|
-
var V = C.call_id || W.configuration.jssip_id +
|
|
4126
|
+
typeof C.from_display_name < "u" ? A = C.from_display_name : W.configuration.display_name ? A = W.configuration.display_name : A = null, this.from = new v(K, A, f), this.setHeader("from", this.from.toString());
|
|
4127
|
+
var V = C.call_id || W.configuration.jssip_id + x.createRandomToken(15);
|
|
4128
4128
|
this.call_id = V, this.setHeader("call-id", V);
|
|
4129
4129
|
var $ = C.cseq || Math.floor(Math.random() * 1e4);
|
|
4130
4130
|
this.cseq = $, this.setHeader("cseq", "".concat($, " ").concat(q));
|
|
@@ -4134,7 +4134,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4134
4134
|
value: function(N, W) {
|
|
4135
4135
|
for (var C = new RegExp("^\\s*".concat(N, "\\s*:"), "i"), D = 0; D < this.extraHeaders.length; D++)
|
|
4136
4136
|
C.test(this.extraHeaders[D]) && this.extraHeaders.splice(D, 1);
|
|
4137
|
-
this.headers[
|
|
4137
|
+
this.headers[x.headerize(N)] = Array.isArray(W) ? W : [W];
|
|
4138
4138
|
}
|
|
4139
4139
|
/**
|
|
4140
4140
|
* Get the value of the given header name at the given position.
|
|
@@ -4144,7 +4144,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4144
4144
|
}, {
|
|
4145
4145
|
key: "getHeader",
|
|
4146
4146
|
value: function(N) {
|
|
4147
|
-
var W = this.headers[
|
|
4147
|
+
var W = this.headers[x.headerize(N)];
|
|
4148
4148
|
if (W) {
|
|
4149
4149
|
if (W[0])
|
|
4150
4150
|
return W[0];
|
|
@@ -4171,7 +4171,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4171
4171
|
}, {
|
|
4172
4172
|
key: "getHeaders",
|
|
4173
4173
|
value: function(N) {
|
|
4174
|
-
var W = this.headers[
|
|
4174
|
+
var W = this.headers[x.headerize(N)], C = [];
|
|
4175
4175
|
if (W) {
|
|
4176
4176
|
var D = y(W), j;
|
|
4177
4177
|
try {
|
|
@@ -4208,7 +4208,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4208
4208
|
}, {
|
|
4209
4209
|
key: "hasHeader",
|
|
4210
4210
|
value: function(N) {
|
|
4211
|
-
if (this.headers[
|
|
4211
|
+
if (this.headers[x.headerize(N)])
|
|
4212
4212
|
return !0;
|
|
4213
4213
|
var W = new RegExp("^\\s*".concat(N, "\\s*:"), "i"), C = y(this.extraHeaders), D;
|
|
4214
4214
|
try {
|
|
@@ -4286,7 +4286,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4286
4286
|
`), N += "Supported: ".concat(K, `\r
|
|
4287
4287
|
`), N += "User-Agent: ".concat(f, `\r
|
|
4288
4288
|
`), this.body) {
|
|
4289
|
-
var A =
|
|
4289
|
+
var A = x.str_utf8_length(this.body);
|
|
4290
4290
|
N += "Content-Length: ".concat(A, `\r
|
|
4291
4291
|
\r
|
|
4292
4292
|
`), N += this.body;
|
|
@@ -4302,7 +4302,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4302
4302
|
var N = new H(this.method, this.ruri, this.ua);
|
|
4303
4303
|
return Object.keys(this.headers).forEach(function(W) {
|
|
4304
4304
|
N.headers[W] = this.headers[W].slice();
|
|
4305
|
-
}, this), N.body = this.body, N.extraHeaders =
|
|
4305
|
+
}, this), N.body = this.body, N.extraHeaders = x.cloneArray(this.extraHeaders), N.to = this.to, N.from = this.from, N.call_id = this.call_id, N.cseq = this.cseq, N;
|
|
4306
4306
|
}
|
|
4307
4307
|
}]), H;
|
|
4308
4308
|
}(), T = /* @__PURE__ */ function(H) {
|
|
@@ -4323,7 +4323,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4323
4323
|
var C = new N(this.ruri, this.ua);
|
|
4324
4324
|
return Object.keys(this.headers).forEach(function(D) {
|
|
4325
4325
|
C.headers[D] = this.headers[D].slice();
|
|
4326
|
-
}, this), C.body = this.body, C.extraHeaders =
|
|
4326
|
+
}, this), C.body = this.body, C.extraHeaders = x.cloneArray(this.extraHeaders), C.to = this.to, C.from = this.from, C.call_id = this.call_id, C.cseq = this.cseq, C.transaction = this.transaction, C;
|
|
4327
4327
|
}
|
|
4328
4328
|
}]), N;
|
|
4329
4329
|
}(d), B = /* @__PURE__ */ function() {
|
|
@@ -4336,7 +4336,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4336
4336
|
var C = {
|
|
4337
4337
|
raw: W
|
|
4338
4338
|
};
|
|
4339
|
-
N =
|
|
4339
|
+
N = x.headerize(N), this.headers[N] ? this.headers[N].push(C) : this.headers[N] = [C];
|
|
4340
4340
|
}
|
|
4341
4341
|
/**
|
|
4342
4342
|
* Get the value of the given header name at the given position.
|
|
@@ -4344,7 +4344,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4344
4344
|
}, {
|
|
4345
4345
|
key: "getHeader",
|
|
4346
4346
|
value: function(N) {
|
|
4347
|
-
var W = this.headers[
|
|
4347
|
+
var W = this.headers[x.headerize(N)];
|
|
4348
4348
|
if (W) {
|
|
4349
4349
|
if (W[0])
|
|
4350
4350
|
return W[0].raw;
|
|
@@ -4357,7 +4357,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4357
4357
|
}, {
|
|
4358
4358
|
key: "getHeaders",
|
|
4359
4359
|
value: function(N) {
|
|
4360
|
-
var W = this.headers[
|
|
4360
|
+
var W = this.headers[x.headerize(N)], C = [];
|
|
4361
4361
|
if (!W)
|
|
4362
4362
|
return [];
|
|
4363
4363
|
var D = y(W), j;
|
|
@@ -4379,7 +4379,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4379
4379
|
}, {
|
|
4380
4380
|
key: "hasHeader",
|
|
4381
4381
|
value: function(N) {
|
|
4382
|
-
return !!this.headers[
|
|
4382
|
+
return !!this.headers[x.headerize(N)];
|
|
4383
4383
|
}
|
|
4384
4384
|
/**
|
|
4385
4385
|
* Parse the given header on the given index.
|
|
@@ -4392,7 +4392,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4392
4392
|
key: "parseHeader",
|
|
4393
4393
|
value: function(N) {
|
|
4394
4394
|
var W = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 0;
|
|
4395
|
-
if (N =
|
|
4395
|
+
if (N = x.headerize(N), this.headers[N]) {
|
|
4396
4396
|
if (W >= this.headers[N].length) {
|
|
4397
4397
|
_.debug('not so many "'.concat(N, '" headers present'));
|
|
4398
4398
|
return;
|
|
@@ -4437,7 +4437,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4437
4437
|
var C = {
|
|
4438
4438
|
raw: W
|
|
4439
4439
|
};
|
|
4440
|
-
this.headers[
|
|
4440
|
+
this.headers[x.headerize(N)] = [C];
|
|
4441
4441
|
}
|
|
4442
4442
|
/**
|
|
4443
4443
|
* Parse the current body as a SDP and store the resulting object
|
|
@@ -4472,7 +4472,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4472
4472
|
throw new TypeError("Invalid status_code: ".concat(C));
|
|
4473
4473
|
if (D && typeof D != "string" && !(D instanceof String))
|
|
4474
4474
|
throw new TypeError("Invalid reason_phrase: ".concat(D));
|
|
4475
|
-
D = D || g.REASON_PHRASE[C] || "", j =
|
|
4475
|
+
D = D || g.REASON_PHRASE[C] || "", j = x.cloneArray(j), this.ua.configuration.extra_headers && (j = j.concat(this.ua.configuration.extra_headers));
|
|
4476
4476
|
var A = "SIP/2.0 ".concat(C, " ").concat(D, `\r
|
|
4477
4477
|
`);
|
|
4478
4478
|
if (this.method === g.INVITE && C > 100 && C <= 200) {
|
|
@@ -4501,7 +4501,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4501
4501
|
} finally {
|
|
4502
4502
|
te.f();
|
|
4503
4503
|
}
|
|
4504
|
-
!this.to_tag && C > 100 ? f += ";tag=".concat(
|
|
4504
|
+
!this.to_tag && C > 100 ? f += ";tag=".concat(x.newTag()) : this.to_tag && !this.s("to").hasParam("tag") && (f += ";tag=".concat(this.to_tag)), A += "To: ".concat(f, `\r
|
|
4505
4505
|
`), A += "From: ".concat(this.getHeader("From"), `\r
|
|
4506
4506
|
`), A += "Call-ID: ".concat(this.call_id, `\r
|
|
4507
4507
|
`), A += "CSeq: ".concat(this.cseq, " ").concat(this.method, `\r
|
|
@@ -4531,7 +4531,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4531
4531
|
`) : C === 415 && (A += "Accept: ".concat(g.ACCEPTED_BODY_TYPES, `\r
|
|
4532
4532
|
`)), A += "Supported: ".concat(K, `\r
|
|
4533
4533
|
`), z) {
|
|
4534
|
-
var Ae =
|
|
4534
|
+
var Ae = x.str_utf8_length(z);
|
|
4535
4535
|
A += `Content-Type: application/sdp\r
|
|
4536
4536
|
`, A += "Content-Length: ".concat(Ae, `\r
|
|
4537
4537
|
\r
|
|
@@ -4570,7 +4570,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
4570
4570
|
Y.f();
|
|
4571
4571
|
}
|
|
4572
4572
|
var f = this.getHeader("To");
|
|
4573
|
-
if (!this.to_tag && C > 100 ? f += ";tag=".concat(
|
|
4573
|
+
if (!this.to_tag && C > 100 ? f += ";tag=".concat(x.newTag()) : this.to_tag && !this.s("to").hasParam("tag") && (f += ";tag=".concat(this.to_tag)), z += "To: ".concat(f, `\r
|
|
4574
4574
|
`), z += "From: ".concat(this.getHeader("From"), `\r
|
|
4575
4575
|
`), z += "Call-ID: ".concat(this.call_id, `\r
|
|
4576
4576
|
`), z += "CSeq: ".concat(this.cseq, " ").concat(this.method, `\r
|
|
@@ -4789,7 +4789,7 @@ function hr() {
|
|
|
4789
4789
|
return C.__proto__ || Object.getPrototypeOf(C);
|
|
4790
4790
|
}, a(N);
|
|
4791
4791
|
}
|
|
4792
|
-
var l = St().EventEmitter, u = ze(), c = He(), S = pt(), R = vo(), g = new u("NonInviteClientTransaction"),
|
|
4792
|
+
var l = St().EventEmitter, u = ze(), c = He(), S = pt(), R = vo(), g = new u("NonInviteClientTransaction"), x = new u("InviteClientTransaction"), v = new u("AckClientTransaction"), p = new u("NonInviteServerTransaction"), _ = new u("InviteServerTransaction"), d = {
|
|
4793
4793
|
// Transaction states.
|
|
4794
4794
|
STATUS_TRYING: 1,
|
|
4795
4795
|
STATUS_PROCEEDING: 2,
|
|
@@ -4894,24 +4894,24 @@ function hr() {
|
|
|
4894
4894
|
}, {
|
|
4895
4895
|
key: "onTransportError",
|
|
4896
4896
|
value: function() {
|
|
4897
|
-
clearTimeout(this.B), clearTimeout(this.D), clearTimeout(this.M), this.state !== d.STATUS_ACCEPTED && (
|
|
4897
|
+
clearTimeout(this.B), clearTimeout(this.D), clearTimeout(this.M), this.state !== d.STATUS_ACCEPTED && (x.debug("transport error occurred, deleting transaction ".concat(this.id)), this.eventHandlers.onTransportError()), this.stateChanged(d.STATUS_TERMINATED), this.ua.destroyTransaction(this);
|
|
4898
4898
|
}
|
|
4899
4899
|
// RFC 6026 7.2.
|
|
4900
4900
|
}, {
|
|
4901
4901
|
key: "timer_M",
|
|
4902
4902
|
value: function() {
|
|
4903
|
-
|
|
4903
|
+
x.debug("Timer M expired for transaction ".concat(this.id)), this.state === d.STATUS_ACCEPTED && (clearTimeout(this.B), this.stateChanged(d.STATUS_TERMINATED), this.ua.destroyTransaction(this));
|
|
4904
4904
|
}
|
|
4905
4905
|
// RFC 3261 17.1.1.
|
|
4906
4906
|
}, {
|
|
4907
4907
|
key: "timer_B",
|
|
4908
4908
|
value: function() {
|
|
4909
|
-
|
|
4909
|
+
x.debug("Timer B expired for transaction ".concat(this.id)), this.state === d.STATUS_CALLING && (this.stateChanged(d.STATUS_TERMINATED), this.ua.destroyTransaction(this), this.eventHandlers.onRequestTimeout());
|
|
4910
4910
|
}
|
|
4911
4911
|
}, {
|
|
4912
4912
|
key: "timer_D",
|
|
4913
4913
|
value: function() {
|
|
4914
|
-
|
|
4914
|
+
x.debug("Timer D expired for transaction ".concat(this.id)), clearTimeout(this.B), this.stateChanged(d.STATUS_TERMINATED), this.ua.destroyTransaction(this);
|
|
4915
4915
|
}
|
|
4916
4916
|
}, {
|
|
4917
4917
|
key: "sendACK",
|
|
@@ -4996,7 +4996,7 @@ function hr() {
|
|
|
4996
4996
|
}, {
|
|
4997
4997
|
key: "onTransportError",
|
|
4998
4998
|
value: function() {
|
|
4999
|
-
|
|
4999
|
+
v.debug("transport error occurred for transaction ".concat(this.id)), this.eventHandlers.onTransportError();
|
|
5000
5000
|
}
|
|
5001
5001
|
}, {
|
|
5002
5002
|
key: "C",
|
|
@@ -5346,45 +5346,45 @@ function oa() {
|
|
|
5346
5346
|
onAuthenticated: function() {
|
|
5347
5347
|
u._cseq += 1;
|
|
5348
5348
|
},
|
|
5349
|
-
onReceiveResponse: function(
|
|
5350
|
-
if (
|
|
5349
|
+
onReceiveResponse: function(x) {
|
|
5350
|
+
if (x.cseq === u._cseq)
|
|
5351
5351
|
switch (u._registrationTimer !== null && (clearTimeout(u._registrationTimer), u._registrationTimer = null), !0) {
|
|
5352
|
-
case /^1[0-9]{2}$/.test(
|
|
5352
|
+
case /^1[0-9]{2}$/.test(x.status_code):
|
|
5353
5353
|
break;
|
|
5354
|
-
case /^2[0-9]{2}$/.test(
|
|
5355
|
-
if (u._registering = !1, !
|
|
5354
|
+
case /^2[0-9]{2}$/.test(x.status_code): {
|
|
5355
|
+
if (u._registering = !1, !x.hasHeader("Contact")) {
|
|
5356
5356
|
y.debug("no Contact header in response to REGISTER, response ignored");
|
|
5357
5357
|
break;
|
|
5358
5358
|
}
|
|
5359
|
-
var
|
|
5359
|
+
var v = x.headers.Contact.reduce(function(B, w) {
|
|
5360
5360
|
return B.concat(w.parsed);
|
|
5361
|
-
}, []), p =
|
|
5361
|
+
}, []), p = v.find(function(B) {
|
|
5362
5362
|
return u._sipInstance === B.getParam("+sip.instance") && u._reg_id === parseInt(B.getParam("reg-id"));
|
|
5363
5363
|
});
|
|
5364
|
-
if (p || (p =
|
|
5364
|
+
if (p || (p = v.find(function(B) {
|
|
5365
5365
|
return B.uri.user === u._ua.contact.uri.user;
|
|
5366
5366
|
})), !p) {
|
|
5367
5367
|
y.debug("no Contact header pointing to us, response ignored");
|
|
5368
5368
|
break;
|
|
5369
5369
|
}
|
|
5370
5370
|
var _ = p.getParam("expires");
|
|
5371
|
-
!_ &&
|
|
5371
|
+
!_ && x.hasHeader("expires") && (_ = x.getHeader("expires")), _ || (_ = u._expires), _ = Number(_), _ < n && (_ = n);
|
|
5372
5372
|
var d = _ > 64 ? _ * 1e3 / 2 + Math.floor((_ / 2 - 32) * 1e3 * Math.random()) : _ * 1e3 - 5e3;
|
|
5373
5373
|
u._registrationTimer = setTimeout(function() {
|
|
5374
5374
|
u._registrationTimer = null, u._ua.listeners("registrationExpiring").length === 0 ? u.register() : u._ua.emit("registrationExpiring");
|
|
5375
5375
|
}, d), p.hasParam("temp-gruu") && (u._ua.contact.temp_gruu = p.getParam("temp-gruu").replace(/"/g, "")), p.hasParam("pub-gruu") && (u._ua.contact.pub_gruu = p.getParam("pub-gruu").replace(/"/g, "")), u._registered || (u._registered = !0, u._ua.registered({
|
|
5376
|
-
response:
|
|
5376
|
+
response: x
|
|
5377
5377
|
}));
|
|
5378
5378
|
break;
|
|
5379
5379
|
}
|
|
5380
5380
|
// Interval too brief RFC3261 10.2.8.
|
|
5381
|
-
case /^423$/.test(
|
|
5382
|
-
|
|
5381
|
+
case /^423$/.test(x.status_code): {
|
|
5382
|
+
x.hasHeader("min-expires") ? (u._expires = Number(x.getHeader("min-expires")), u._expires < n && (u._expires = n), u.register()) : (y.debug("423 response received for REGISTER without Min-Expires"), u._registrationFailure(x, E.causes.SIP_FAILURE_CODE));
|
|
5383
5383
|
break;
|
|
5384
5384
|
}
|
|
5385
5385
|
default: {
|
|
5386
|
-
var T = P.sipErrorCause(
|
|
5387
|
-
u._registrationFailure(
|
|
5386
|
+
var T = P.sipErrorCause(x.status_code);
|
|
5387
|
+
u._registrationFailure(x, T);
|
|
5388
5388
|
}
|
|
5389
5389
|
}
|
|
5390
5390
|
}
|
|
@@ -5417,16 +5417,16 @@ function oa() {
|
|
|
5417
5417
|
onAuthenticated: function() {
|
|
5418
5418
|
u._cseq += 1;
|
|
5419
5419
|
},
|
|
5420
|
-
onReceiveResponse: function(
|
|
5420
|
+
onReceiveResponse: function(v) {
|
|
5421
5421
|
switch (!0) {
|
|
5422
|
-
case /^1[0-9]{2}$/.test(
|
|
5422
|
+
case /^1[0-9]{2}$/.test(v.status_code):
|
|
5423
5423
|
break;
|
|
5424
|
-
case /^2[0-9]{2}$/.test(
|
|
5425
|
-
u._unregistered(
|
|
5424
|
+
case /^2[0-9]{2}$/.test(v.status_code):
|
|
5425
|
+
u._unregistered(v);
|
|
5426
5426
|
break;
|
|
5427
5427
|
default: {
|
|
5428
|
-
var p = P.sipErrorCause(
|
|
5429
|
-
u._unregistered(
|
|
5428
|
+
var p = P.sipErrorCause(v.status_code);
|
|
5429
|
+
u._unregistered(v, p);
|
|
5430
5430
|
}
|
|
5431
5431
|
}
|
|
5432
5432
|
}
|
|
@@ -5621,11 +5621,11 @@ function ua() {
|
|
|
5621
5621
|
}, {
|
|
5622
5622
|
key: "sendRequest",
|
|
5623
5623
|
value: function(c) {
|
|
5624
|
-
var S = this, R = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = y.cloneArray(R.extraHeaders),
|
|
5625
|
-
|
|
5624
|
+
var S = this, R = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, g = y.cloneArray(R.extraHeaders), x = y.cloneObject(R.eventHandlers), v = R.body || null, p = this._createRequest(c, g, v);
|
|
5625
|
+
x.onAuthenticated = function() {
|
|
5626
5626
|
S._local_seqnum += 1;
|
|
5627
5627
|
};
|
|
5628
|
-
var _ = new h(this, p,
|
|
5628
|
+
var _ = new h(this, p, x);
|
|
5629
5629
|
return _.send(), p;
|
|
5630
5630
|
}
|
|
5631
5631
|
}, {
|
|
@@ -5638,7 +5638,7 @@ function ua() {
|
|
|
5638
5638
|
key: "_createRequest",
|
|
5639
5639
|
value: function(c, S, R) {
|
|
5640
5640
|
S = y.cloneArray(S), this._local_seqnum || (this._local_seqnum = Math.floor(Math.random() * 1e4));
|
|
5641
|
-
var g = c === E.CANCEL || c === E.ACK ? this._local_seqnum : this._local_seqnum += 1,
|
|
5641
|
+
var g = c === E.CANCEL || c === E.ACK ? this._local_seqnum : this._local_seqnum += 1, x = new P.OutgoingRequest(c, this._remote_target, this._ua, {
|
|
5642
5642
|
cseq: g,
|
|
5643
5643
|
call_id: this._id.call_id,
|
|
5644
5644
|
from_uri: this._local_uri,
|
|
@@ -5647,7 +5647,7 @@ function ua() {
|
|
|
5647
5647
|
to_tag: this._id.remote_tag,
|
|
5648
5648
|
route_set: this._route_set
|
|
5649
5649
|
}, S, R);
|
|
5650
|
-
return
|
|
5650
|
+
return x;
|
|
5651
5651
|
}
|
|
5652
5652
|
// RFC 3261 12.2.2.
|
|
5653
5653
|
}, {
|
|
@@ -5671,8 +5671,8 @@ function ua() {
|
|
|
5671
5671
|
return c.reply(500, null, ["Retry-After:".concat(R)]), !1;
|
|
5672
5672
|
} else {
|
|
5673
5673
|
this._uas_pending_reply = !0;
|
|
5674
|
-
var g = function
|
|
5675
|
-
(c.server_transaction.state === t.C.STATUS_ACCEPTED || c.server_transaction.state === t.C.STATUS_COMPLETED || c.server_transaction.state === t.C.STATUS_TERMINATED) && (c.server_transaction.removeListener("stateChanged",
|
|
5674
|
+
var g = function x() {
|
|
5675
|
+
(c.server_transaction.state === t.C.STATUS_ACCEPTED || c.server_transaction.state === t.C.STATUS_COMPLETED || c.server_transaction.state === t.C.STATUS_TERMINATED) && (c.server_transaction.removeListener("stateChanged", x), S._uas_pending_reply = !1);
|
|
5676
5676
|
};
|
|
5677
5677
|
c.server_transaction.on("stateChanged", g);
|
|
5678
5678
|
}
|
|
@@ -5722,41 +5722,41 @@ var qr = { exports: {} }, el;
|
|
|
5722
5722
|
function fa() {
|
|
5723
5723
|
if (el) return qr.exports;
|
|
5724
5724
|
el = 1;
|
|
5725
|
-
function O(
|
|
5725
|
+
function O(v) {
|
|
5726
5726
|
"@babel/helpers - typeof";
|
|
5727
5727
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? O = function(_) {
|
|
5728
5728
|
return typeof _;
|
|
5729
5729
|
} : O = function(_) {
|
|
5730
5730
|
return _ && typeof Symbol == "function" && _.constructor === Symbol && _ !== Symbol.prototype ? "symbol" : typeof _;
|
|
5731
|
-
}, O(
|
|
5731
|
+
}, O(v);
|
|
5732
5732
|
}
|
|
5733
|
-
function L(
|
|
5734
|
-
if (!(
|
|
5733
|
+
function L(v, p) {
|
|
5734
|
+
if (!(v instanceof p))
|
|
5735
5735
|
throw new TypeError("Cannot call a class as a function");
|
|
5736
5736
|
}
|
|
5737
|
-
function F(
|
|
5737
|
+
function F(v, p) {
|
|
5738
5738
|
for (var _ = 0; _ < p.length; _++) {
|
|
5739
5739
|
var d = p[_];
|
|
5740
|
-
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(
|
|
5740
|
+
d.enumerable = d.enumerable || !1, d.configurable = !0, "value" in d && (d.writable = !0), Object.defineProperty(v, d.key, d);
|
|
5741
5741
|
}
|
|
5742
5742
|
}
|
|
5743
|
-
function i(
|
|
5744
|
-
return p && F(
|
|
5743
|
+
function i(v, p, _) {
|
|
5744
|
+
return p && F(v.prototype, p), v;
|
|
5745
5745
|
}
|
|
5746
|
-
function P(
|
|
5746
|
+
function P(v, p) {
|
|
5747
5747
|
if (typeof p != "function" && p !== null)
|
|
5748
5748
|
throw new TypeError("Super expression must either be null or a function");
|
|
5749
|
-
|
|
5749
|
+
v.prototype = Object.create(p && p.prototype, { constructor: { value: v, writable: !0, configurable: !0 } }), p && E(v, p);
|
|
5750
5750
|
}
|
|
5751
|
-
function E(
|
|
5751
|
+
function E(v, p) {
|
|
5752
5752
|
return E = Object.setPrototypeOf || function(d, T) {
|
|
5753
5753
|
return d.__proto__ = T, d;
|
|
5754
|
-
}, E(
|
|
5754
|
+
}, E(v, p);
|
|
5755
5755
|
}
|
|
5756
|
-
function t(
|
|
5756
|
+
function t(v) {
|
|
5757
5757
|
var p = n();
|
|
5758
5758
|
return function() {
|
|
5759
|
-
var d = a(
|
|
5759
|
+
var d = a(v), T;
|
|
5760
5760
|
if (p) {
|
|
5761
5761
|
var B = a(this).constructor;
|
|
5762
5762
|
T = Reflect.construct(d, arguments, B);
|
|
@@ -5765,13 +5765,13 @@ function fa() {
|
|
|
5765
5765
|
return h(this, T);
|
|
5766
5766
|
};
|
|
5767
5767
|
}
|
|
5768
|
-
function h(
|
|
5769
|
-
return p && (O(p) === "object" || typeof p == "function") ? p : y(
|
|
5768
|
+
function h(v, p) {
|
|
5769
|
+
return p && (O(p) === "object" || typeof p == "function") ? p : y(v);
|
|
5770
5770
|
}
|
|
5771
|
-
function y(
|
|
5772
|
-
if (
|
|
5771
|
+
function y(v) {
|
|
5772
|
+
if (v === void 0)
|
|
5773
5773
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
5774
|
-
return
|
|
5774
|
+
return v;
|
|
5775
5775
|
}
|
|
5776
5776
|
function n() {
|
|
5777
5777
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
@@ -5783,20 +5783,20 @@ function fa() {
|
|
|
5783
5783
|
return !1;
|
|
5784
5784
|
}
|
|
5785
5785
|
}
|
|
5786
|
-
function a(
|
|
5786
|
+
function a(v) {
|
|
5787
5787
|
return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(_) {
|
|
5788
5788
|
return _.__proto__ || Object.getPrototypeOf(_);
|
|
5789
|
-
}, a(
|
|
5789
|
+
}, a(v);
|
|
5790
5790
|
}
|
|
5791
|
-
var l = St().EventEmitter, u = ze(), c = He(), S = Tt(), R = Ve(), g = new u("RTCSession:DTMF"),
|
|
5791
|
+
var l = St().EventEmitter, u = ze(), c = He(), S = Tt(), R = Ve(), g = new u("RTCSession:DTMF"), x = {
|
|
5792
5792
|
MIN_DURATION: 70,
|
|
5793
5793
|
MAX_DURATION: 6e3,
|
|
5794
5794
|
DEFAULT_DURATION: 100,
|
|
5795
5795
|
MIN_INTER_TONE_GAP: 50,
|
|
5796
5796
|
DEFAULT_INTER_TONE_GAP: 500
|
|
5797
5797
|
};
|
|
5798
|
-
return qr.exports = /* @__PURE__ */ function(
|
|
5799
|
-
P(_,
|
|
5798
|
+
return qr.exports = /* @__PURE__ */ function(v) {
|
|
5799
|
+
P(_, v);
|
|
5800
5800
|
var p = t(_);
|
|
5801
5801
|
function _(d) {
|
|
5802
5802
|
var T;
|
|
@@ -5865,7 +5865,7 @@ function fa() {
|
|
|
5865
5865
|
`);
|
|
5866
5866
|
U.length >= 1 && B.test(U[0]) && (this._tone = U[0].replace(B, "$2")), U.length >= 2 && w.test(U[1]) && (this._duration = parseInt(U[1].replace(w, "$2"), 10));
|
|
5867
5867
|
}
|
|
5868
|
-
this._duration || (this._duration =
|
|
5868
|
+
this._duration || (this._duration = x.DEFAULT_DURATION), this._tone ? this._session.newDTMF({
|
|
5869
5869
|
originator: "remote",
|
|
5870
5870
|
dtmf: this,
|
|
5871
5871
|
request: T
|
|
@@ -5882,7 +5882,7 @@ function fa() {
|
|
|
5882
5882
|
return this._duration;
|
|
5883
5883
|
}
|
|
5884
5884
|
}]), _;
|
|
5885
|
-
}(l), qr.exports.C =
|
|
5885
|
+
}(l), qr.exports.C = x, qr.exports;
|
|
5886
5886
|
}
|
|
5887
5887
|
var fs, tl;
|
|
5888
5888
|
function ca() {
|
|
@@ -5890,10 +5890,10 @@ function ca() {
|
|
|
5890
5890
|
tl = 1;
|
|
5891
5891
|
function O(R) {
|
|
5892
5892
|
"@babel/helpers - typeof";
|
|
5893
|
-
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? O = function(
|
|
5894
|
-
return typeof
|
|
5895
|
-
} : O = function(
|
|
5896
|
-
return
|
|
5893
|
+
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? O = function(x) {
|
|
5894
|
+
return typeof x;
|
|
5895
|
+
} : O = function(x) {
|
|
5896
|
+
return x && typeof Symbol == "function" && x.constructor === Symbol && x !== Symbol.prototype ? "symbol" : typeof x;
|
|
5897
5897
|
}, O(R);
|
|
5898
5898
|
}
|
|
5899
5899
|
function L(R, g) {
|
|
@@ -5901,12 +5901,12 @@ function ca() {
|
|
|
5901
5901
|
throw new TypeError("Cannot call a class as a function");
|
|
5902
5902
|
}
|
|
5903
5903
|
function F(R, g) {
|
|
5904
|
-
for (var
|
|
5905
|
-
var
|
|
5906
|
-
|
|
5904
|
+
for (var x = 0; x < g.length; x++) {
|
|
5905
|
+
var v = g[x];
|
|
5906
|
+
v.enumerable = v.enumerable || !1, v.configurable = !0, "value" in v && (v.writable = !0), Object.defineProperty(R, v.key, v);
|
|
5907
5907
|
}
|
|
5908
5908
|
}
|
|
5909
|
-
function i(R, g,
|
|
5909
|
+
function i(R, g, x) {
|
|
5910
5910
|
return g && F(R.prototype, g), R;
|
|
5911
5911
|
}
|
|
5912
5912
|
function P(R, g) {
|
|
@@ -5915,19 +5915,19 @@ function ca() {
|
|
|
5915
5915
|
R.prototype = Object.create(g && g.prototype, { constructor: { value: R, writable: !0, configurable: !0 } }), g && E(R, g);
|
|
5916
5916
|
}
|
|
5917
5917
|
function E(R, g) {
|
|
5918
|
-
return E = Object.setPrototypeOf || function(
|
|
5919
|
-
return
|
|
5918
|
+
return E = Object.setPrototypeOf || function(v, p) {
|
|
5919
|
+
return v.__proto__ = p, v;
|
|
5920
5920
|
}, E(R, g);
|
|
5921
5921
|
}
|
|
5922
5922
|
function t(R) {
|
|
5923
5923
|
var g = n();
|
|
5924
5924
|
return function() {
|
|
5925
|
-
var
|
|
5925
|
+
var v = a(R), p;
|
|
5926
5926
|
if (g) {
|
|
5927
5927
|
var _ = a(this).constructor;
|
|
5928
|
-
p = Reflect.construct(
|
|
5928
|
+
p = Reflect.construct(v, arguments, _);
|
|
5929
5929
|
} else
|
|
5930
|
-
p =
|
|
5930
|
+
p = v.apply(this, arguments);
|
|
5931
5931
|
return h(this, p);
|
|
5932
5932
|
};
|
|
5933
5933
|
}
|
|
@@ -5950,19 +5950,19 @@ function ca() {
|
|
|
5950
5950
|
}
|
|
5951
5951
|
}
|
|
5952
5952
|
function a(R) {
|
|
5953
|
-
return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(
|
|
5954
|
-
return
|
|
5953
|
+
return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(x) {
|
|
5954
|
+
return x.__proto__ || Object.getPrototypeOf(x);
|
|
5955
5955
|
}, a(R);
|
|
5956
5956
|
}
|
|
5957
5957
|
var l = St().EventEmitter, u = He(), c = Tt(), S = Ve();
|
|
5958
5958
|
return fs = /* @__PURE__ */ function(R) {
|
|
5959
|
-
P(
|
|
5960
|
-
var g = t(
|
|
5961
|
-
function v
|
|
5959
|
+
P(x, R);
|
|
5960
|
+
var g = t(x);
|
|
5961
|
+
function x(v) {
|
|
5962
5962
|
var p;
|
|
5963
|
-
return L(this,
|
|
5963
|
+
return L(this, x), p = g.call(this), p._session = v, p._direction = null, p._contentType = null, p._body = null, p;
|
|
5964
5964
|
}
|
|
5965
|
-
return i(
|
|
5965
|
+
return i(x, [{
|
|
5966
5966
|
key: "send",
|
|
5967
5967
|
value: function(p, _) {
|
|
5968
5968
|
var d = this, T = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
@@ -6023,7 +6023,7 @@ function ca() {
|
|
|
6023
6023
|
get: function() {
|
|
6024
6024
|
return this._body;
|
|
6025
6025
|
}
|
|
6026
|
-
}]),
|
|
6026
|
+
}]), x;
|
|
6027
6027
|
}(l), fs;
|
|
6028
6028
|
}
|
|
6029
6029
|
var cs, rl;
|
|
@@ -6077,42 +6077,42 @@ var hs, nl;
|
|
|
6077
6077
|
function da() {
|
|
6078
6078
|
if (nl) return hs;
|
|
6079
6079
|
nl = 1;
|
|
6080
|
-
function O(
|
|
6080
|
+
function O(x) {
|
|
6081
6081
|
"@babel/helpers - typeof";
|
|
6082
6082
|
return typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? O = function(p) {
|
|
6083
6083
|
return typeof p;
|
|
6084
6084
|
} : O = function(p) {
|
|
6085
6085
|
return p && typeof Symbol == "function" && p.constructor === Symbol && p !== Symbol.prototype ? "symbol" : typeof p;
|
|
6086
|
-
}, O(
|
|
6086
|
+
}, O(x);
|
|
6087
6087
|
}
|
|
6088
|
-
function L(
|
|
6089
|
-
if (!(
|
|
6088
|
+
function L(x, v) {
|
|
6089
|
+
if (!(x instanceof v))
|
|
6090
6090
|
throw new TypeError("Cannot call a class as a function");
|
|
6091
6091
|
}
|
|
6092
|
-
function F(
|
|
6093
|
-
for (var p = 0; p <
|
|
6094
|
-
var _ =
|
|
6095
|
-
_.enumerable = _.enumerable || !1, _.configurable = !0, "value" in _ && (_.writable = !0), Object.defineProperty(
|
|
6092
|
+
function F(x, v) {
|
|
6093
|
+
for (var p = 0; p < v.length; p++) {
|
|
6094
|
+
var _ = v[p];
|
|
6095
|
+
_.enumerable = _.enumerable || !1, _.configurable = !0, "value" in _ && (_.writable = !0), Object.defineProperty(x, _.key, _);
|
|
6096
6096
|
}
|
|
6097
6097
|
}
|
|
6098
|
-
function i(
|
|
6099
|
-
return
|
|
6098
|
+
function i(x, v, p) {
|
|
6099
|
+
return v && F(x.prototype, v), x;
|
|
6100
6100
|
}
|
|
6101
|
-
function P(
|
|
6102
|
-
if (typeof
|
|
6101
|
+
function P(x, v) {
|
|
6102
|
+
if (typeof v != "function" && v !== null)
|
|
6103
6103
|
throw new TypeError("Super expression must either be null or a function");
|
|
6104
|
-
|
|
6104
|
+
x.prototype = Object.create(v && v.prototype, { constructor: { value: x, writable: !0, configurable: !0 } }), v && E(x, v);
|
|
6105
6105
|
}
|
|
6106
|
-
function E(
|
|
6106
|
+
function E(x, v) {
|
|
6107
6107
|
return E = Object.setPrototypeOf || function(_, d) {
|
|
6108
6108
|
return _.__proto__ = d, _;
|
|
6109
|
-
}, E(
|
|
6109
|
+
}, E(x, v);
|
|
6110
6110
|
}
|
|
6111
|
-
function t(
|
|
6112
|
-
var
|
|
6111
|
+
function t(x) {
|
|
6112
|
+
var v = n();
|
|
6113
6113
|
return function() {
|
|
6114
|
-
var _ = a(
|
|
6115
|
-
if (
|
|
6114
|
+
var _ = a(x), d;
|
|
6115
|
+
if (v) {
|
|
6116
6116
|
var T = a(this).constructor;
|
|
6117
6117
|
d = Reflect.construct(_, arguments, T);
|
|
6118
6118
|
} else
|
|
@@ -6120,13 +6120,13 @@ function da() {
|
|
|
6120
6120
|
return h(this, d);
|
|
6121
6121
|
};
|
|
6122
6122
|
}
|
|
6123
|
-
function h(
|
|
6124
|
-
return
|
|
6123
|
+
function h(x, v) {
|
|
6124
|
+
return v && (O(v) === "object" || typeof v == "function") ? v : y(x);
|
|
6125
6125
|
}
|
|
6126
|
-
function y(
|
|
6127
|
-
if (
|
|
6126
|
+
function y(x) {
|
|
6127
|
+
if (x === void 0)
|
|
6128
6128
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
6129
|
-
return
|
|
6129
|
+
return x;
|
|
6130
6130
|
}
|
|
6131
6131
|
function n() {
|
|
6132
6132
|
if (typeof Reflect > "u" || !Reflect.construct || Reflect.construct.sham) return !1;
|
|
@@ -6138,18 +6138,18 @@ function da() {
|
|
|
6138
6138
|
return !1;
|
|
6139
6139
|
}
|
|
6140
6140
|
}
|
|
6141
|
-
function a(
|
|
6141
|
+
function a(x) {
|
|
6142
6142
|
return a = Object.setPrototypeOf ? Object.getPrototypeOf : function(p) {
|
|
6143
6143
|
return p.__proto__ || Object.getPrototypeOf(p);
|
|
6144
|
-
}, a(
|
|
6144
|
+
}, a(x);
|
|
6145
6145
|
}
|
|
6146
6146
|
var l = St().EventEmitter, u = ze(), c = He(), S = ct(), R = Ve(), g = new u("RTCSession:ReferSubscriber");
|
|
6147
|
-
return hs = /* @__PURE__ */ function(
|
|
6148
|
-
P(p,
|
|
6149
|
-
var
|
|
6147
|
+
return hs = /* @__PURE__ */ function(x) {
|
|
6148
|
+
P(p, x);
|
|
6149
|
+
var v = t(p);
|
|
6150
6150
|
function p(_) {
|
|
6151
6151
|
var d;
|
|
6152
|
-
return L(this, p), d =
|
|
6152
|
+
return L(this, p), d = v.call(this), d._id = null, d._session = _, d;
|
|
6153
6153
|
}
|
|
6154
6154
|
return i(p, [{
|
|
6155
6155
|
key: "sendRefer",
|
|
@@ -6368,7 +6368,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6368
6368
|
return Q.__proto__ || Object.getPrototypeOf(Q);
|
|
6369
6369
|
}, c(z);
|
|
6370
6370
|
}
|
|
6371
|
-
var S = St().EventEmitter, R = zs(), g = ze(),
|
|
6371
|
+
var S = St().EventEmitter, R = zs(), g = ze(), x = He(), v = Tt(), p = hr(), _ = Ve(), d = vo(), T = pt(), B = ua(), w = dr(), U = fa(), H = ca(), q = ha(), N = da(), W = bt(), C = new g("RTCSession"), D = {
|
|
6372
6372
|
// RTCSession states.
|
|
6373
6373
|
STATUS_NULL: 0,
|
|
6374
6374
|
STATUS_INVITE_SENT: 1,
|
|
@@ -6403,7 +6403,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6403
6403
|
}, f._direction = null, f._local_identity = null, f._remote_identity = null, f._start_time = null, f._end_time = null, f._tones = null, f._audioMuted = !1, f._videoMuted = !1, f._localHold = !1, f._remoteHold = !1, f._sessionTimers = {
|
|
6404
6404
|
enabled: f._ua.configuration.session_timers,
|
|
6405
6405
|
refreshMethod: f._ua.configuration.session_timers_refresh_method,
|
|
6406
|
-
defaultExpires:
|
|
6406
|
+
defaultExpires: x.SESSION_EXPIRES,
|
|
6407
6407
|
currentExpires: null,
|
|
6408
6408
|
running: !1,
|
|
6409
6409
|
refresher: !1,
|
|
@@ -6478,12 +6478,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6478
6478
|
if (this._rtcOfferConstraints = ue, this._rtcAnswerConstraints = A.rtcAnswerConstraints || null, this._data = A.data || this._data, f === void 0)
|
|
6479
6479
|
throw new TypeError("Not enough arguments");
|
|
6480
6480
|
if (this._status !== D.STATUS_NULL)
|
|
6481
|
-
throw new
|
|
6481
|
+
throw new v.InvalidStateError(this._status);
|
|
6482
6482
|
if (!window.RTCPeerConnection)
|
|
6483
|
-
throw new
|
|
6483
|
+
throw new v.NotSupportedError("WebRTC not supported");
|
|
6484
6484
|
if (f = this._ua.normalizeTarget(f), !f)
|
|
6485
6485
|
throw new TypeError("Invalid target: ".concat($));
|
|
6486
|
-
this._sessionTimers.enabled && _.isDecimal(A.sessionTimersExpires) && (A.sessionTimersExpires >=
|
|
6486
|
+
this._sessionTimers.enabled && _.isDecimal(A.sessionTimersExpires) && (A.sessionTimersExpires >= x.MIN_SESSION_EXPIRES ? this._sessionTimers.defaultExpires = A.sessionTimersExpires : this._sessionTimers.defaultExpires = x.SESSION_EXPIRES);
|
|
6487
6487
|
for (var me in ee)
|
|
6488
6488
|
Object.prototype.hasOwnProperty.call(ee, me) && this.on(me, ee[me]);
|
|
6489
6489
|
this._from_tag = _.newTag();
|
|
@@ -6510,9 +6510,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6510
6510
|
return;
|
|
6511
6511
|
}
|
|
6512
6512
|
f.body ? this._late_sdp = !1 : this._late_sdp = !0, this._status = D.STATUS_WAITING_FOR_ANSWER, this._timers.userNoAnswerTimer = setTimeout(function() {
|
|
6513
|
-
f.reply(408), V._failed("local", null,
|
|
6513
|
+
f.reply(408), V._failed("local", null, x.causes.NO_ANSWER);
|
|
6514
6514
|
}, this._ua.configuration.no_answer_timeout), $ && (this._timers.expiresTimer = setTimeout(function() {
|
|
6515
|
-
V._status === D.STATUS_WAITING_FOR_ANSWER && (f.reply(487), V._failed("system", null,
|
|
6515
|
+
V._status === D.STATUS_WAITING_FOR_ANSWER && (f.reply(487), V._failed("system", null, x.causes.EXPIRES));
|
|
6516
6516
|
}, $)), this._direction = "incoming", this._local_identity = f.to, this._remote_identity = f.from, A && A(this), this._newRTCSession("remote", f), this._status !== D.STATUS_TERMINATED && (f.reply(180, null, ["Contact: ".concat(this._contact)]), this._progress("local", null));
|
|
6517
6517
|
}
|
|
6518
6518
|
/**
|
|
@@ -6527,10 +6527,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6527
6527
|
iceServers: []
|
|
6528
6528
|
}), te = A.rtcConstraints || null, ae = A.rtcAnswerConstraints || null, fe = _.cloneObject(A.rtcOfferConstraints), ue, me = !1, ye = !1, Ae = !1, ve = !1;
|
|
6529
6529
|
if (this._rtcAnswerConstraints = ae, this._rtcOfferConstraints = A.rtcOfferConstraints || null, this._data = A.data || this._data, this._direction !== "incoming")
|
|
6530
|
-
throw new
|
|
6530
|
+
throw new v.NotSupportedError('"answer" not supported for outgoing RTCSession');
|
|
6531
6531
|
if (this._status !== D.STATUS_WAITING_FOR_ANSWER)
|
|
6532
|
-
throw new
|
|
6533
|
-
if (this._sessionTimers.enabled && _.isDecimal(A.sessionTimersExpires) && (A.sessionTimersExpires >=
|
|
6532
|
+
throw new v.InvalidStateError(this._status);
|
|
6533
|
+
if (this._sessionTimers.enabled && _.isDecimal(A.sessionTimersExpires) && (A.sessionTimersExpires >= x.MIN_SESSION_EXPIRES ? this._sessionTimers.defaultExpires = A.sessionTimersExpires : this._sessionTimers.defaultExpires = x.SESSION_EXPIRES), this._status = D.STATUS_ANSWERED, !this._createDialog(V, "UAS")) {
|
|
6534
6534
|
V.reply(500, "Error creating dialog");
|
|
6535
6535
|
return;
|
|
6536
6536
|
}
|
|
@@ -6581,7 +6581,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6581
6581
|
return J;
|
|
6582
6582
|
if (ee.audio || ee.video)
|
|
6583
6583
|
return f._localMediaStreamLocallyGenerated = !0, navigator.mediaDevices.getUserMedia(ee).catch(function(we) {
|
|
6584
|
-
throw f._status === D.STATUS_TERMINATED ? new Error("terminated") : (V.reply(480), f._failed("local", null,
|
|
6584
|
+
throw f._status === D.STATUS_TERMINATED ? new Error("terminated") : (V.reply(480), f._failed("local", null, x.causes.USER_DENIED_MEDIA_ACCESS), C.warn('emit "getusermediafailed" [error:%o]', we), f.emit("getusermediafailed", we), new Error("getUserMedia() failed"));
|
|
6585
6585
|
});
|
|
6586
6586
|
}).then(function(we) {
|
|
6587
6587
|
if (f._status === D.STATUS_TERMINATED)
|
|
@@ -6604,7 +6604,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6604
6604
|
return f._connectionPromiseQueue = f._connectionPromiseQueue.then(function() {
|
|
6605
6605
|
return f._connection.setRemoteDescription(je);
|
|
6606
6606
|
}).catch(function(et) {
|
|
6607
|
-
throw V.reply(488), f._failed("system", null,
|
|
6607
|
+
throw V.reply(488), f._failed("system", null, x.causes.WEBRTC_ERROR), C.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]', et), f.emit("peerconnection:setremotedescriptionfailed", et), new Error("peerconnection.setRemoteDescription() failed");
|
|
6608
6608
|
}), f._connectionPromiseQueue;
|
|
6609
6609
|
}
|
|
6610
6610
|
}).then(function() {
|
|
@@ -6621,7 +6621,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6621
6621
|
f._handleSessionTimersInIncomingRequest(V, $), V.reply(200, null, $, we, function() {
|
|
6622
6622
|
f._status = D.STATUS_WAITING_FOR_ACK, f._setInvite2xxTimer(V, we), f._setACKTimer(), f._accepted("local");
|
|
6623
6623
|
}, function() {
|
|
6624
|
-
f._failed("system", null,
|
|
6624
|
+
f._failed("system", null, x.causes.CONNECTION_ERROR);
|
|
6625
6625
|
});
|
|
6626
6626
|
}).catch(function(we) {
|
|
6627
6627
|
f._status !== D.STATUS_TERMINATED && C.warn(we);
|
|
@@ -6635,9 +6635,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6635
6635
|
value: function() {
|
|
6636
6636
|
var f = this, A = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
6637
6637
|
C.debug("terminate()");
|
|
6638
|
-
var V = A.cause ||
|
|
6638
|
+
var V = A.cause || x.causes.BYE, $ = _.cloneArray(A.extraHeaders), ee = A.body, J, ne = A.status_code, te = A.reason_phrase;
|
|
6639
6639
|
if (this._status === D.STATUS_TERMINATED)
|
|
6640
|
-
throw new
|
|
6640
|
+
throw new v.InvalidStateError(this._status);
|
|
6641
6641
|
switch (this._status) {
|
|
6642
6642
|
// - UAC -
|
|
6643
6643
|
case D.STATUS_NULL:
|
|
@@ -6645,35 +6645,35 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6645
6645
|
case D.STATUS_1XX_RECEIVED:
|
|
6646
6646
|
if (C.debug("canceling session"), ne && (ne < 200 || ne >= 700))
|
|
6647
6647
|
throw new TypeError("Invalid status_code: ".concat(ne));
|
|
6648
|
-
ne && (te = te ||
|
|
6648
|
+
ne && (te = te || x.REASON_PHRASE[ne] || "", J = "SIP ;cause=".concat(ne, ' ;text="').concat(te, '"')), this._status === D.STATUS_NULL || this._status === D.STATUS_INVITE_SENT ? (this._is_canceled = !0, this._cancel_reason = J) : this._status === D.STATUS_1XX_RECEIVED && this._request.cancel(J), this._status = D.STATUS_CANCELED, this._failed("local", null, x.causes.CANCELED);
|
|
6649
6649
|
break;
|
|
6650
6650
|
// - UAS -
|
|
6651
6651
|
case D.STATUS_WAITING_FOR_ANSWER:
|
|
6652
6652
|
case D.STATUS_ANSWERED:
|
|
6653
6653
|
if (C.debug("rejecting session"), ne = ne || 480, ne < 300 || ne >= 700)
|
|
6654
6654
|
throw new TypeError("Invalid status_code: ".concat(ne));
|
|
6655
|
-
this._request.reply(ne, te, $, ee), this._failed("local", null,
|
|
6655
|
+
this._request.reply(ne, te, $, ee), this._failed("local", null, x.causes.REJECTED);
|
|
6656
6656
|
break;
|
|
6657
6657
|
case D.STATUS_WAITING_FOR_ACK:
|
|
6658
6658
|
case D.STATUS_CONFIRMED:
|
|
6659
|
-
if (C.debug("terminating session"), te = A.reason_phrase ||
|
|
6659
|
+
if (C.debug("terminating session"), te = A.reason_phrase || x.REASON_PHRASE[ne] || "", ne && (ne < 200 || ne >= 700))
|
|
6660
6660
|
throw new TypeError("Invalid status_code: ".concat(ne));
|
|
6661
6661
|
if (ne && $.push("Reason: SIP ;cause=".concat(ne, '; text="').concat(te, '"')), this._status === D.STATUS_WAITING_FOR_ACK && this._direction === "incoming" && this._request.server_transaction.state !== p.C.STATUS_TERMINATED) {
|
|
6662
6662
|
var ae = this._dialog;
|
|
6663
6663
|
this.receiveRequest = function(fe) {
|
|
6664
6664
|
var ue = fe.method;
|
|
6665
|
-
ue ===
|
|
6665
|
+
ue === x.ACK && (f.sendRequest(x.BYE, {
|
|
6666
6666
|
extraHeaders: $,
|
|
6667
6667
|
body: ee
|
|
6668
6668
|
}), ae.terminate());
|
|
6669
6669
|
}, this._request.server_transaction.on("stateChanged", function() {
|
|
6670
|
-
f._request.server_transaction.state === p.C.STATUS_TERMINATED && (f.sendRequest(
|
|
6670
|
+
f._request.server_transaction.state === p.C.STATUS_TERMINATED && (f.sendRequest(x.BYE, {
|
|
6671
6671
|
extraHeaders: $,
|
|
6672
6672
|
body: ee
|
|
6673
6673
|
}), ae.terminate());
|
|
6674
6674
|
}), this._ended("local", null, V), this._dialog = ae, this._ua.newDialog(ae);
|
|
6675
6675
|
} else
|
|
6676
|
-
this.sendRequest(
|
|
6676
|
+
this.sendRequest(x.BYE, {
|
|
6677
6677
|
extraHeaders: $,
|
|
6678
6678
|
body: ee
|
|
6679
6679
|
}), this._ended("local", null, V);
|
|
@@ -6684,12 +6684,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6684
6684
|
value: function(f) {
|
|
6685
6685
|
var A = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
6686
6686
|
C.debug("sendDTMF() | tones: %s", f);
|
|
6687
|
-
var V = 0, $ = A.duration || null, ee = A.interToneGap || null, J = A.transportType ||
|
|
6687
|
+
var V = 0, $ = A.duration || null, ee = A.interToneGap || null, J = A.transportType || x.DTMF_TRANSPORT.INFO;
|
|
6688
6688
|
if (f === void 0)
|
|
6689
6689
|
throw new TypeError("Not enough arguments");
|
|
6690
6690
|
if (this._status !== D.STATUS_CONFIRMED && this._status !== D.STATUS_WAITING_FOR_ACK && this._status !== D.STATUS_1XX_RECEIVED)
|
|
6691
|
-
throw new
|
|
6692
|
-
if (J !==
|
|
6691
|
+
throw new v.InvalidStateError(this._status);
|
|
6692
|
+
if (J !== x.DTMF_TRANSPORT.INFO && J !== x.DTMF_TRANSPORT.RFC2833)
|
|
6693
6693
|
throw new TypeError("invalid transportType: ".concat(J));
|
|
6694
6694
|
if (typeof f == "number" && (f = f.toString()), !f || typeof f != "string" || !f.match(/^[0-9A-DR#*,]+$/i))
|
|
6695
6695
|
throw new TypeError("Invalid tones: ".concat(f));
|
|
@@ -6697,7 +6697,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6697
6697
|
throw new TypeError("Invalid tone duration: ".concat($));
|
|
6698
6698
|
if ($ ? $ < U.C.MIN_DURATION ? (C.debug('"duration" value is lower than the minimum allowed, setting it to '.concat(U.C.MIN_DURATION, " milliseconds")), $ = U.C.MIN_DURATION) : $ > U.C.MAX_DURATION ? (C.debug('"duration" value is greater than the maximum allowed, setting it to '.concat(U.C.MAX_DURATION, " milliseconds")), $ = U.C.MAX_DURATION) : $ = Math.abs($) : $ = U.C.DEFAULT_DURATION, A.duration = $, ee && !_.isDecimal(ee))
|
|
6699
6699
|
throw new TypeError("Invalid interToneGap: ".concat(ee));
|
|
6700
|
-
if (ee ? ee < U.C.MIN_INTER_TONE_GAP ? (C.debug('"interToneGap" value is lower than the minimum allowed, setting it to '.concat(U.C.MIN_INTER_TONE_GAP, " milliseconds")), ee = U.C.MIN_INTER_TONE_GAP) : ee = Math.abs(ee) : ee = U.C.DEFAULT_INTER_TONE_GAP, J ===
|
|
6700
|
+
if (ee ? ee < U.C.MIN_INTER_TONE_GAP ? (C.debug('"interToneGap" value is lower than the minimum allowed, setting it to '.concat(U.C.MIN_INTER_TONE_GAP, " milliseconds")), ee = U.C.MIN_INTER_TONE_GAP) : ee = Math.abs(ee) : ee = U.C.DEFAULT_INTER_TONE_GAP, J === x.DTMF_TRANSPORT.RFC2833) {
|
|
6701
6701
|
var ne = this._getDTMFRTPSender();
|
|
6702
6702
|
ne && (f = ne.toneBuffer + f, ne.insertDTMF(f, $, ee));
|
|
6703
6703
|
return;
|
|
@@ -6732,7 +6732,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6732
6732
|
value: function(f, A) {
|
|
6733
6733
|
var V = arguments.length > 2 && arguments[2] !== void 0 ? arguments[2] : {};
|
|
6734
6734
|
if (C.debug("sendInfo()"), this._status !== D.STATUS_CONFIRMED && this._status !== D.STATUS_WAITING_FOR_ACK && this._status !== D.STATUS_1XX_RECEIVED)
|
|
6735
|
-
throw new
|
|
6735
|
+
throw new v.InvalidStateError(this._status);
|
|
6736
6736
|
var $ = new H(this);
|
|
6737
6737
|
$.send(f, A, V);
|
|
6738
6738
|
}
|
|
@@ -6786,7 +6786,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6786
6786
|
},
|
|
6787
6787
|
failed: function() {
|
|
6788
6788
|
f.terminate({
|
|
6789
|
-
cause:
|
|
6789
|
+
cause: x.causes.WEBRTC_ERROR,
|
|
6790
6790
|
status_code: 500,
|
|
6791
6791
|
reason_phrase: "Hold Failed"
|
|
6792
6792
|
});
|
|
@@ -6814,7 +6814,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6814
6814
|
},
|
|
6815
6815
|
failed: function() {
|
|
6816
6816
|
f.terminate({
|
|
6817
|
-
cause:
|
|
6817
|
+
cause: x.causes.WEBRTC_ERROR,
|
|
6818
6818
|
status_code: 500,
|
|
6819
6819
|
reason_phrase: "Unhold Failed"
|
|
6820
6820
|
});
|
|
@@ -6843,7 +6843,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6843
6843
|
},
|
|
6844
6844
|
failed: function() {
|
|
6845
6845
|
f.terminate({
|
|
6846
|
-
cause:
|
|
6846
|
+
cause: x.causes.WEBRTC_ERROR,
|
|
6847
6847
|
status_code: 500,
|
|
6848
6848
|
reason_phrase: "Media Renegotiation Failed"
|
|
6849
6849
|
});
|
|
@@ -6899,17 +6899,17 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6899
6899
|
key: "receiveRequest",
|
|
6900
6900
|
value: function(f) {
|
|
6901
6901
|
var A = this;
|
|
6902
|
-
if (C.debug("receiveRequest()"), f.method ===
|
|
6903
|
-
(this._status === D.STATUS_WAITING_FOR_ANSWER || this._status === D.STATUS_ANSWERED) && (this._status = D.STATUS_CANCELED, this._request.reply(487), this._failed("remote", f,
|
|
6902
|
+
if (C.debug("receiveRequest()"), f.method === x.CANCEL)
|
|
6903
|
+
(this._status === D.STATUS_WAITING_FOR_ANSWER || this._status === D.STATUS_ANSWERED) && (this._status = D.STATUS_CANCELED, this._request.reply(487), this._failed("remote", f, x.causes.CANCELED));
|
|
6904
6904
|
else
|
|
6905
6905
|
switch (f.method) {
|
|
6906
|
-
case
|
|
6906
|
+
case x.ACK:
|
|
6907
6907
|
if (this._status !== D.STATUS_WAITING_FOR_ACK)
|
|
6908
6908
|
return;
|
|
6909
6909
|
if (this._status = D.STATUS_CONFIRMED, clearTimeout(this._timers.ackTimer), clearTimeout(this._timers.invite2xxTimer), this._late_sdp) {
|
|
6910
6910
|
if (!f.body) {
|
|
6911
6911
|
this.terminate({
|
|
6912
|
-
cause:
|
|
6912
|
+
cause: x.causes.MISSING_SDP,
|
|
6913
6913
|
status_code: 400
|
|
6914
6914
|
});
|
|
6915
6915
|
break;
|
|
@@ -6930,32 +6930,32 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6930
6930
|
A._is_confirmed || A._confirmed("remote", f);
|
|
6931
6931
|
}).catch(function(J) {
|
|
6932
6932
|
A.terminate({
|
|
6933
|
-
cause:
|
|
6933
|
+
cause: x.causes.BAD_MEDIA_DESCRIPTION,
|
|
6934
6934
|
status_code: 488
|
|
6935
6935
|
}), C.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]', J), A.emit("peerconnection:setremotedescriptionfailed", J);
|
|
6936
6936
|
});
|
|
6937
6937
|
} else this._is_confirmed || this._confirmed("remote", f);
|
|
6938
6938
|
break;
|
|
6939
|
-
case
|
|
6940
|
-
this._status === D.STATUS_CONFIRMED || this._status === D.STATUS_WAITING_FOR_ACK ? (f.reply(200), this._ended("remote", f,
|
|
6939
|
+
case x.BYE:
|
|
6940
|
+
this._status === D.STATUS_CONFIRMED || this._status === D.STATUS_WAITING_FOR_ACK ? (f.reply(200), this._ended("remote", f, x.causes.BYE)) : this._status === D.STATUS_INVITE_RECEIVED || this._status === D.STATUS_WAITING_FOR_ANSWER ? (f.reply(200), this._request.reply(487, "BYE Received"), this._ended("remote", f, x.causes.BYE)) : f.reply(403, "Wrong Status");
|
|
6941
6941
|
break;
|
|
6942
|
-
case
|
|
6942
|
+
case x.INVITE:
|
|
6943
6943
|
this._status === D.STATUS_CONFIRMED ? f.hasHeader("replaces") ? this._receiveReplaces(f) : this._receiveReinvite(f) : f.reply(403, "Wrong Status");
|
|
6944
6944
|
break;
|
|
6945
|
-
case
|
|
6945
|
+
case x.INFO:
|
|
6946
6946
|
if (this._status === D.STATUS_1XX_RECEIVED || this._status === D.STATUS_WAITING_FOR_ANSWER || this._status === D.STATUS_ANSWERED || this._status === D.STATUS_WAITING_FOR_ACK || this._status === D.STATUS_CONFIRMED) {
|
|
6947
6947
|
var ee = f.hasHeader("Content-Type") ? f.getHeader("Content-Type").toLowerCase() : void 0;
|
|
6948
6948
|
ee && ee.match(/^application\/dtmf-relay/i) ? new U(this).init_incoming(f) : ee !== void 0 ? new H(this).init_incoming(f) : f.reply(415);
|
|
6949
6949
|
} else
|
|
6950
6950
|
f.reply(403, "Wrong Status");
|
|
6951
6951
|
break;
|
|
6952
|
-
case
|
|
6952
|
+
case x.UPDATE:
|
|
6953
6953
|
this._status === D.STATUS_CONFIRMED ? this._receiveUpdate(f) : f.reply(403, "Wrong Status");
|
|
6954
6954
|
break;
|
|
6955
|
-
case
|
|
6955
|
+
case x.REFER:
|
|
6956
6956
|
this._status === D.STATUS_CONFIRMED ? this._receiveRefer(f) : f.reply(403, "Wrong Status");
|
|
6957
6957
|
break;
|
|
6958
|
-
case
|
|
6958
|
+
case x.NOTIFY:
|
|
6959
6959
|
this._status === D.STATUS_CONFIRMED ? this._receiveNotify(f) : f.reply(403, "Wrong Status");
|
|
6960
6960
|
break;
|
|
6961
6961
|
default:
|
|
@@ -6970,8 +6970,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6970
6970
|
value: function() {
|
|
6971
6971
|
C.warn("onTransportError()"), this._status !== D.STATUS_TERMINATED && this.terminate({
|
|
6972
6972
|
status_code: 500,
|
|
6973
|
-
reason_phrase:
|
|
6974
|
-
cause:
|
|
6973
|
+
reason_phrase: x.causes.CONNECTION_ERROR,
|
|
6974
|
+
cause: x.causes.CONNECTION_ERROR
|
|
6975
6975
|
});
|
|
6976
6976
|
}
|
|
6977
6977
|
}, {
|
|
@@ -6979,8 +6979,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6979
6979
|
value: function() {
|
|
6980
6980
|
C.warn("onRequestTimeout()"), this._status !== D.STATUS_TERMINATED && this.terminate({
|
|
6981
6981
|
status_code: 408,
|
|
6982
|
-
reason_phrase:
|
|
6983
|
-
cause:
|
|
6982
|
+
reason_phrase: x.causes.REQUEST_TIMEOUT,
|
|
6983
|
+
cause: x.causes.REQUEST_TIMEOUT
|
|
6984
6984
|
});
|
|
6985
6985
|
}
|
|
6986
6986
|
}, {
|
|
@@ -6988,8 +6988,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
6988
6988
|
value: function() {
|
|
6989
6989
|
C.warn("onDialogError()"), this._status !== D.STATUS_TERMINATED && this.terminate({
|
|
6990
6990
|
status_code: 500,
|
|
6991
|
-
reason_phrase:
|
|
6992
|
-
cause:
|
|
6991
|
+
reason_phrase: x.causes.DIALOG_ERROR,
|
|
6992
|
+
cause: x.causes.DIALOG_ERROR
|
|
6993
6993
|
});
|
|
6994
6994
|
}
|
|
6995
6995
|
// Called from DTMF handler.
|
|
@@ -7059,7 +7059,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7059
7059
|
value: function() {
|
|
7060
7060
|
var f = this;
|
|
7061
7061
|
this._timers.ackTimer = setTimeout(function() {
|
|
7062
|
-
f._status === D.STATUS_WAITING_FOR_ACK && (C.debug("no ACK received, terminating the session"), clearTimeout(f._timers.invite2xxTimer), f.sendRequest(
|
|
7062
|
+
f._status === D.STATUS_WAITING_FOR_ACK && (C.debug("no ACK received, terminating the session"), clearTimeout(f._timers.invite2xxTimer), f.sendRequest(x.BYE), f._ended("remote", null, x.causes.NO_ACK));
|
|
7063
7063
|
}, d.TIMER_H);
|
|
7064
7064
|
}
|
|
7065
7065
|
}, {
|
|
@@ -7069,9 +7069,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7069
7069
|
this._connection = new RTCPeerConnection(f, A), this._connection.addEventListener("iceconnectionstatechange", function() {
|
|
7070
7070
|
var $ = V._connection.iceConnectionState;
|
|
7071
7071
|
$ === "failed" && V.terminate({
|
|
7072
|
-
cause:
|
|
7072
|
+
cause: x.causes.RTP_TIMEOUT,
|
|
7073
7073
|
status_code: 408,
|
|
7074
|
-
reason_phrase:
|
|
7074
|
+
reason_phrase: x.causes.RTP_TIMEOUT
|
|
7075
7075
|
});
|
|
7076
7076
|
}), C.debug('emit "peerconnection"'), this.emit("peerconnection", {
|
|
7077
7077
|
peerconnection: this._connection
|
|
@@ -7138,11 +7138,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7138
7138
|
value: function(f, A, V) {
|
|
7139
7139
|
var $ = A === "UAS" ? f.to_tag : f.from_tag, ee = A === "UAS" ? f.from_tag : f.to_tag, J = f.call_id + $ + ee, ne = this._earlyDialogs[J];
|
|
7140
7140
|
if (V)
|
|
7141
|
-
return ne ? !0 : (ne = new B(this, f, A, B.C.STATUS_EARLY), ne.error ? (C.debug(ne.error), this._failed("remote", f,
|
|
7141
|
+
return ne ? !0 : (ne = new B(this, f, A, B.C.STATUS_EARLY), ne.error ? (C.debug(ne.error), this._failed("remote", f, x.causes.INTERNAL_ERROR), !1) : (this._earlyDialogs[J] = ne, !0));
|
|
7142
7142
|
if (this._from_tag = f.from_tag, this._to_tag = f.to_tag, ne)
|
|
7143
7143
|
return ne.update(f, A), this._dialog = ne, delete this._earlyDialogs[J], !0;
|
|
7144
7144
|
var te = new B(this, f, A);
|
|
7145
|
-
return te.error ? (C.debug(te.error), this._failed("remote", f,
|
|
7145
|
+
return te.error ? (C.debug(te.error), this._failed("remote", f, x.causes.INTERNAL_ERROR), !1) : (this._dialog = te, !0);
|
|
7146
7146
|
}
|
|
7147
7147
|
/**
|
|
7148
7148
|
* In dialog INVITE Reception
|
|
@@ -7303,7 +7303,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7303
7303
|
C.debug("no Refer-To header field present in REFER"), f.reply(400);
|
|
7304
7304
|
return;
|
|
7305
7305
|
}
|
|
7306
|
-
if (f.refer_to.uri.scheme !==
|
|
7306
|
+
if (f.refer_to.uri.scheme !== x.SIP) {
|
|
7307
7307
|
C.debug("Refer-To header field points to a non-SIP URI scheme"), f.reply(416);
|
|
7308
7308
|
return;
|
|
7309
7309
|
}
|
|
@@ -7426,7 +7426,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7426
7426
|
return V;
|
|
7427
7427
|
if (f.audio || f.video)
|
|
7428
7428
|
return $._localMediaStreamLocallyGenerated = !0, navigator.mediaDevices.getUserMedia(f).catch(function(J) {
|
|
7429
|
-
throw $._status === D.STATUS_TERMINATED ? new Error("terminated") : ($._failed("local", null,
|
|
7429
|
+
throw $._status === D.STATUS_TERMINATED ? new Error("terminated") : ($._failed("local", null, x.causes.USER_DENIED_MEDIA_ACCESS), C.warn('emit "getusermediafailed" [error:%o]', J), $.emit("getusermediafailed", J), J);
|
|
7430
7430
|
});
|
|
7431
7431
|
}).then(function(J) {
|
|
7432
7432
|
if ($._status === D.STATUS_TERMINATED)
|
|
@@ -7434,7 +7434,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7434
7434
|
return $._localMediaStream = J, J && J.getTracks().forEach(function(ne) {
|
|
7435
7435
|
$._connection.addTrack(ne, J);
|
|
7436
7436
|
}), $._connecting($._request), $._createLocalDescription("offer", A).catch(function(ne) {
|
|
7437
|
-
throw $._failed("local", null,
|
|
7437
|
+
throw $._failed("local", null, x.causes.WEBRTC_ERROR), ne;
|
|
7438
7438
|
});
|
|
7439
7439
|
}).then(function(J) {
|
|
7440
7440
|
if ($._is_canceled || $._status === D.STATUS_TERMINATED)
|
|
@@ -7470,7 +7470,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7470
7470
|
var A = this;
|
|
7471
7471
|
if (C.debug("receiveInviteResponse()"), this._dialog && f.status_code >= 200 && f.status_code <= 299)
|
|
7472
7472
|
if (this._dialog.id.call_id === f.call_id && this._dialog.id.local_tag === f.from_tag && this._dialog.id.remote_tag === f.to_tag) {
|
|
7473
|
-
this.sendRequest(
|
|
7473
|
+
this.sendRequest(x.ACK);
|
|
7474
7474
|
return;
|
|
7475
7475
|
} else {
|
|
7476
7476
|
var V = new B(this, f, "UAC");
|
|
@@ -7478,7 +7478,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7478
7478
|
C.debug(V.error);
|
|
7479
7479
|
return;
|
|
7480
7480
|
}
|
|
7481
|
-
this.sendRequest(
|
|
7481
|
+
this.sendRequest(x.ACK), this.sendRequest(x.BYE);
|
|
7482
7482
|
return;
|
|
7483
7483
|
}
|
|
7484
7484
|
if (this._is_canceled) {
|
|
@@ -7522,7 +7522,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7522
7522
|
}
|
|
7523
7523
|
case /^2[0-9]{2}$/.test(f.status_code): {
|
|
7524
7524
|
if (this._status = D.STATUS_CONFIRMED, !f.body) {
|
|
7525
|
-
this._acceptAndTerminate(f, 400,
|
|
7525
|
+
this._acceptAndTerminate(f, 400, x.causes.MISSING_SDP), this._failed("remote", f, x.causes.BAD_MEDIA_DESCRIPTION);
|
|
7526
7526
|
break;
|
|
7527
7527
|
}
|
|
7528
7528
|
if (!this._createDialog(f, "UAC"))
|
|
@@ -7542,13 +7542,13 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7542
7542
|
return A._connection.createOffer(A._rtcOfferConstraints).then(function(ae) {
|
|
7543
7543
|
return A._connection.setLocalDescription(ae);
|
|
7544
7544
|
}).catch(function(ae) {
|
|
7545
|
-
A._acceptAndTerminate(f, 500, ae.toString()), A._failed("local", f,
|
|
7545
|
+
A._acceptAndTerminate(f, 500, ae.toString()), A._failed("local", f, x.causes.WEBRTC_ERROR);
|
|
7546
7546
|
});
|
|
7547
7547
|
}).then(function() {
|
|
7548
7548
|
A._connection.setRemoteDescription(ne).then(function() {
|
|
7549
|
-
A._handleSessionTimersInIncomingResponse(f), A._accepted("remote", f), A.sendRequest(
|
|
7549
|
+
A._handleSessionTimersInIncomingResponse(f), A._accepted("remote", f), A.sendRequest(x.ACK), A._confirmed("local", null);
|
|
7550
7550
|
}).catch(function(ae) {
|
|
7551
|
-
A._acceptAndTerminate(f, 488, "Not Acceptable Here"), A._failed("remote", f,
|
|
7551
|
+
A._acceptAndTerminate(f, 488, "Not Acceptable Here"), A._failed("remote", f, x.causes.BAD_MEDIA_DESCRIPTION), C.warn('emit "peerconnection:setremotedescriptionfailed" [error:%o]', ae), A.emit("peerconnection:setremotedescriptionfailed", ae);
|
|
7552
7552
|
});
|
|
7553
7553
|
});
|
|
7554
7554
|
break;
|
|
@@ -7577,7 +7577,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7577
7577
|
type: "offer",
|
|
7578
7578
|
sdp: ae
|
|
7579
7579
|
};
|
|
7580
|
-
C.debug('emit "sdp"'), f.emit("sdp", fe), f.sendRequest(
|
|
7580
|
+
C.debug('emit "sdp"'), f.emit("sdp", fe), f.sendRequest(x.INVITE, {
|
|
7581
7581
|
extraHeaders: V,
|
|
7582
7582
|
body: ae,
|
|
7583
7583
|
eventHandlers: {
|
|
@@ -7603,7 +7603,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7603
7603
|
});
|
|
7604
7604
|
function ne(ae) {
|
|
7605
7605
|
var fe = this;
|
|
7606
|
-
if (this._status !== D.STATUS_TERMINATED && (this.sendRequest(
|
|
7606
|
+
if (this._status !== D.STATUS_TERMINATED && (this.sendRequest(x.ACK), !J)) {
|
|
7607
7607
|
if (this._handleSessionTimersInIncomingResponse(ae), ae.body) {
|
|
7608
7608
|
if (!ae.hasHeader("Content-Type") || ae.getHeader("Content-Type").toLowerCase() !== "application/sdp") {
|
|
7609
7609
|
te.call(this);
|
|
@@ -7654,7 +7654,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7654
7654
|
type: "offer",
|
|
7655
7655
|
sdp: fe
|
|
7656
7656
|
};
|
|
7657
|
-
C.debug('emit "sdp"'), f.emit("sdp", ue), f.sendRequest(
|
|
7657
|
+
C.debug('emit "sdp"'), f.emit("sdp", ue), f.sendRequest(x.UPDATE, {
|
|
7658
7658
|
extraHeaders: V,
|
|
7659
7659
|
body: fe,
|
|
7660
7660
|
eventHandlers: {
|
|
@@ -7677,7 +7677,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7677
7677
|
});
|
|
7678
7678
|
}).catch(function() {
|
|
7679
7679
|
ae.call(f);
|
|
7680
|
-
})) : this.sendRequest(
|
|
7680
|
+
})) : this.sendRequest(x.UPDATE, {
|
|
7681
7681
|
extraHeaders: V,
|
|
7682
7682
|
eventHandlers: {
|
|
7683
7683
|
onSuccessResponse: function(ue) {
|
|
@@ -7738,7 +7738,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7738
7738
|
value: function(f, A, V) {
|
|
7739
7739
|
C.debug("acceptAndTerminate()");
|
|
7740
7740
|
var $ = [];
|
|
7741
|
-
A && (V = V ||
|
|
7741
|
+
A && (V = V || x.REASON_PHRASE[A] || "", $.push("Reason: SIP ;cause=".concat(A, '; text="').concat(V, '"'))), (this._dialog || this._createDialog(f, "UAC")) && (this.sendRequest(x.ACK), this.sendRequest(x.BYE, {
|
|
7742
7742
|
extraHeaders: $
|
|
7743
7743
|
})), this._status = D.STATUS_TERMINATED;
|
|
7744
7744
|
}
|
|
@@ -7808,7 +7808,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7808
7808
|
value: function(f, A) {
|
|
7809
7809
|
if (this._sessionTimers.enabled) {
|
|
7810
7810
|
var V;
|
|
7811
|
-
f.session_expires && f.session_expires >=
|
|
7811
|
+
f.session_expires && f.session_expires >= x.MIN_SESSION_EXPIRES ? (this._sessionTimers.currentExpires = f.session_expires, V = f.session_expires_refresher || "uas") : (this._sessionTimers.currentExpires = this._sessionTimers.defaultExpires, V = "uas"), A.push("Session-Expires: ".concat(this._sessionTimers.currentExpires, ";refresher=").concat(V)), this._sessionTimers.refresher = V === "uas", this._runSessionTimer();
|
|
7812
7812
|
}
|
|
7813
7813
|
}
|
|
7814
7814
|
/**
|
|
@@ -7820,7 +7820,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7820
7820
|
value: function(f) {
|
|
7821
7821
|
if (this._sessionTimers.enabled) {
|
|
7822
7822
|
var A;
|
|
7823
|
-
f.session_expires && f.session_expires >=
|
|
7823
|
+
f.session_expires && f.session_expires >= x.MIN_SESSION_EXPIRES ? (this._sessionTimers.currentExpires = f.session_expires, A = f.session_expires_refresher || "uac") : (this._sessionTimers.currentExpires = this._sessionTimers.defaultExpires, A = "uac"), this._sessionTimers.refresher = A === "uac", this._runSessionTimer();
|
|
7824
7824
|
}
|
|
7825
7825
|
}
|
|
7826
7826
|
}, {
|
|
@@ -7828,10 +7828,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7828
7828
|
value: function() {
|
|
7829
7829
|
var f = this, A = this._sessionTimers.currentExpires;
|
|
7830
7830
|
this._sessionTimers.running = !0, clearTimeout(this._sessionTimers.timer), this._sessionTimers.refresher ? this._sessionTimers.timer = setTimeout(function() {
|
|
7831
|
-
f._status !== D.STATUS_TERMINATED && f._isReadyToReOffer() && (C.debug("runSessionTimer() | sending session refresh request"), f._sessionTimers.refreshMethod ===
|
|
7831
|
+
f._status !== D.STATUS_TERMINATED && f._isReadyToReOffer() && (C.debug("runSessionTimer() | sending session refresh request"), f._sessionTimers.refreshMethod === x.UPDATE ? f._sendUpdate() : f._sendReinvite());
|
|
7832
7832
|
}, A * 500) : this._sessionTimers.timer = setTimeout(function() {
|
|
7833
7833
|
f._status !== D.STATUS_TERMINATED && (C.warn("runSessionTimer() | timer expired, terminating the session"), f.terminate({
|
|
7834
|
-
cause:
|
|
7834
|
+
cause: x.causes.REQUEST_TIMEOUT,
|
|
7835
7835
|
status_code: 408,
|
|
7836
7836
|
reason_phrase: "Session Timer Expired"
|
|
7837
7837
|
}));
|
|
@@ -7974,7 +7974,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
7974
7974
|
}, {
|
|
7975
7975
|
key: "causes",
|
|
7976
7976
|
get: function() {
|
|
7977
|
-
return
|
|
7977
|
+
return x.causes;
|
|
7978
7978
|
}
|
|
7979
7979
|
}, {
|
|
7980
7980
|
key: "id",
|
|
@@ -8102,7 +8102,7 @@ function xa() {
|
|
|
8102
8102
|
return T.__proto__ || Object.getPrototypeOf(T);
|
|
8103
8103
|
}, a(_);
|
|
8104
8104
|
}
|
|
8105
|
-
var l = St().EventEmitter, u = ze(), c = He(), S = pt(), R = Ve(), g = dr(),
|
|
8105
|
+
var l = St().EventEmitter, u = ze(), c = He(), S = pt(), R = Ve(), g = dr(), x = Tt(), v = bt(), p = new u("Message");
|
|
8106
8106
|
return _s = /* @__PURE__ */ function(_) {
|
|
8107
8107
|
P(T, _);
|
|
8108
8108
|
var d = t(T);
|
|
@@ -8119,7 +8119,7 @@ function xa() {
|
|
|
8119
8119
|
if (w = this._ua.normalizeTarget(w), !w)
|
|
8120
8120
|
throw new TypeError("Invalid target: ".concat(N));
|
|
8121
8121
|
var W = R.cloneArray(q.extraHeaders), C = R.cloneObject(q.eventHandlers), D = q.contentType || "text/plain", j = {};
|
|
8122
|
-
q.fromUserName && (j.from_uri = new
|
|
8122
|
+
q.fromUserName && (j.from_uri = new v("sip", q.fromUserName, this._ua.configuration.uri.host), W.push("P-Preferred-Identity: ".concat(this._ua.configuration.uri.toString()))), q.fromDisplayName && (j.from_display_name = q.fromDisplayName);
|
|
8123
8123
|
for (var z in C)
|
|
8124
8124
|
Object.prototype.hasOwnProperty.call(C, z) && this.on(z, C[z]);
|
|
8125
8125
|
W.push("Content-Type: ".concat(D)), this._request = new S.OutgoingRequest(c.MESSAGE, w, this._ua, j, W), U && (this._request.body = U);
|
|
@@ -8150,7 +8150,7 @@ function xa() {
|
|
|
8150
8150
|
value: function() {
|
|
8151
8151
|
var w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, U = R.cloneArray(w.extraHeaders), H = w.body;
|
|
8152
8152
|
if (this._direction !== "incoming")
|
|
8153
|
-
throw new
|
|
8153
|
+
throw new x.NotSupportedError('"accept" not supported for outgoing Message');
|
|
8154
8154
|
if (this._is_replied)
|
|
8155
8155
|
throw new Error("incoming Message already replied");
|
|
8156
8156
|
this._is_replied = !0, this._request.reply(200, null, U, H);
|
|
@@ -8164,7 +8164,7 @@ function xa() {
|
|
|
8164
8164
|
value: function() {
|
|
8165
8165
|
var w = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, U = w.status_code || 480, H = w.reason_phrase, q = R.cloneArray(w.extraHeaders), N = w.body;
|
|
8166
8166
|
if (this._direction !== "incoming")
|
|
8167
|
-
throw new
|
|
8167
|
+
throw new x.NotSupportedError('"reject" not supported for outgoing Message');
|
|
8168
8168
|
if (this._is_replied)
|
|
8169
8169
|
throw new Error("incoming Message already replied");
|
|
8170
8170
|
if (U < 300 || U >= 700)
|
|
@@ -8320,7 +8320,7 @@ function va() {
|
|
|
8320
8320
|
return d.__proto__ || Object.getPrototypeOf(d);
|
|
8321
8321
|
}, a(p);
|
|
8322
8322
|
}
|
|
8323
|
-
var l = St().EventEmitter, u = ze(), c = He(), S = pt(), R = Ve(), g = dr(),
|
|
8323
|
+
var l = St().EventEmitter, u = ze(), c = He(), S = pt(), R = Ve(), g = dr(), x = Tt(), v = new u("Options");
|
|
8324
8324
|
return xs = /* @__PURE__ */ function(p) {
|
|
8325
8325
|
P(d, p);
|
|
8326
8326
|
var _ = t(d);
|
|
@@ -8367,7 +8367,7 @@ function va() {
|
|
|
8367
8367
|
value: function() {
|
|
8368
8368
|
var B = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, w = R.cloneArray(B.extraHeaders), U = B.body;
|
|
8369
8369
|
if (this._direction !== "incoming")
|
|
8370
|
-
throw new
|
|
8370
|
+
throw new x.NotSupportedError('"accept" not supported for outgoing Options');
|
|
8371
8371
|
if (this._is_replied)
|
|
8372
8372
|
throw new Error("incoming Options already replied");
|
|
8373
8373
|
this._is_replied = !0, this._request.reply(200, null, w, U);
|
|
@@ -8381,7 +8381,7 @@ function va() {
|
|
|
8381
8381
|
value: function() {
|
|
8382
8382
|
var B = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}, w = B.status_code || 480, U = B.reason_phrase, H = R.cloneArray(B.extraHeaders), q = B.body;
|
|
8383
8383
|
if (this._direction !== "incoming")
|
|
8384
|
-
throw new
|
|
8384
|
+
throw new x.NotSupportedError('"reject" not supported for outgoing Options');
|
|
8385
8385
|
if (this._is_replied)
|
|
8386
8386
|
throw new Error("incoming Options already replied");
|
|
8387
8387
|
if (w < 300 || w >= 700)
|
|
@@ -8435,7 +8435,7 @@ function va() {
|
|
|
8435
8435
|
}, {
|
|
8436
8436
|
key: "_failed",
|
|
8437
8437
|
value: function(B, w, U) {
|
|
8438
|
-
|
|
8438
|
+
v.debug("OPTIONS failed"), this._close(), v.debug('emit "failed"'), this.emit("failed", {
|
|
8439
8439
|
originator: B,
|
|
8440
8440
|
response: w || null,
|
|
8441
8441
|
cause: U
|
|
@@ -8444,7 +8444,7 @@ function va() {
|
|
|
8444
8444
|
}, {
|
|
8445
8445
|
key: "_succeeded",
|
|
8446
8446
|
value: function(B, w) {
|
|
8447
|
-
|
|
8447
|
+
v.debug("OPTIONS succeeded"), this._close(), v.debug('emit "succeeded"'), this.emit("succeeded", {
|
|
8448
8448
|
originator: B,
|
|
8449
8449
|
response: w
|
|
8450
8450
|
});
|
|
@@ -8725,8 +8725,8 @@ function ga() {
|
|
|
8725
8725
|
};
|
|
8726
8726
|
return { s: c, n: function() {
|
|
8727
8727
|
return u >= n.length ? { done: !0 } : { done: !1, value: n[u++] };
|
|
8728
|
-
}, e: function(
|
|
8729
|
-
throw
|
|
8728
|
+
}, e: function(v) {
|
|
8729
|
+
throw v;
|
|
8730
8730
|
}, f: c };
|
|
8731
8731
|
}
|
|
8732
8732
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
@@ -8736,10 +8736,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8736
8736
|
return { s: function() {
|
|
8737
8737
|
l = n[Symbol.iterator]();
|
|
8738
8738
|
}, n: function() {
|
|
8739
|
-
var
|
|
8740
|
-
return S =
|
|
8741
|
-
}, e: function(
|
|
8742
|
-
R = !0, g =
|
|
8739
|
+
var v = l.next();
|
|
8740
|
+
return S = v.done, v;
|
|
8741
|
+
}, e: function(v) {
|
|
8742
|
+
R = !0, g = v;
|
|
8743
8743
|
}, f: function() {
|
|
8744
8744
|
try {
|
|
8745
8745
|
!S && l.return != null && l.return();
|
|
@@ -8791,8 +8791,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8791
8791
|
g = c + 2;
|
|
8792
8792
|
}
|
|
8793
8793
|
if (l.hasHeader("content-length")) {
|
|
8794
|
-
var
|
|
8795
|
-
l.body = n.substr(u,
|
|
8794
|
+
var x = l.getHeader("content-length");
|
|
8795
|
+
l.body = n.substr(u, x);
|
|
8796
8796
|
} else
|
|
8797
8797
|
l.body = n.substring(u);
|
|
8798
8798
|
return l;
|
|
@@ -8828,16 +8828,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8828
8828
|
if (c = P.parse(g, "Record_Route"), c === -1)
|
|
8829
8829
|
c = void 0;
|
|
8830
8830
|
else {
|
|
8831
|
-
var
|
|
8831
|
+
var x = O(c), v;
|
|
8832
8832
|
try {
|
|
8833
|
-
for (
|
|
8834
|
-
var p =
|
|
8833
|
+
for (x.s(); !(v = x.n()).done; ) {
|
|
8834
|
+
var p = v.value;
|
|
8835
8835
|
n.addHeader("record-route", g.substring(p.possition, p.offset)), n.headers["Record-Route"][n.getHeaders("record-route").length - 1].parsed = p.parsed;
|
|
8836
8836
|
}
|
|
8837
8837
|
} catch (B) {
|
|
8838
|
-
|
|
8838
|
+
x.e(B);
|
|
8839
8839
|
} finally {
|
|
8840
|
-
|
|
8840
|
+
x.f();
|
|
8841
8841
|
}
|
|
8842
8842
|
}
|
|
8843
8843
|
break;
|
|
@@ -8957,7 +8957,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
8957
8957
|
U[w] = T[w];
|
|
8958
8958
|
return U;
|
|
8959
8959
|
}
|
|
8960
|
-
var i = ze(), P = He(), E = pt(), t = Ve(), h = new i("sanityCheck"), y = [_], n = [S, R, g,
|
|
8960
|
+
var i = ze(), P = He(), E = pt(), t = Ve(), h = new i("sanityCheck"), y = [_], n = [S, R, g, x], a = [v, p], l, u, c;
|
|
8961
8961
|
ms = function(T, B, w) {
|
|
8962
8962
|
l = T, u = B, c = w;
|
|
8963
8963
|
var U = O(y), H;
|
|
@@ -9014,7 +9014,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9014
9014
|
if (T < B)
|
|
9015
9015
|
return d(400), !1;
|
|
9016
9016
|
}
|
|
9017
|
-
function
|
|
9017
|
+
function x() {
|
|
9018
9018
|
var T = l.from_tag, B = l.call_id, w = l.cseq, U;
|
|
9019
9019
|
if (!l.to_tag)
|
|
9020
9020
|
if (l.method === P.INVITE) {
|
|
@@ -9031,7 +9031,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9031
9031
|
return d(482), !1;
|
|
9032
9032
|
}
|
|
9033
9033
|
}
|
|
9034
|
-
function
|
|
9034
|
+
function v() {
|
|
9035
9035
|
if (l.getHeaders("via").length > 1)
|
|
9036
9036
|
return h.debug("more than one Via header field present in the response, dropping the response"), !1;
|
|
9037
9037
|
}
|
|
@@ -9090,19 +9090,19 @@ function ya() {
|
|
|
9090
9090
|
throw new TypeError(`Invalid attempt to iterate non-iterable instance.
|
|
9091
9091
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
9092
9092
|
}
|
|
9093
|
-
var R = !0, g = !1,
|
|
9093
|
+
var R = !0, g = !1, x;
|
|
9094
9094
|
return { s: function() {
|
|
9095
9095
|
u = a[Symbol.iterator]();
|
|
9096
9096
|
}, n: function() {
|
|
9097
9097
|
var p = u.next();
|
|
9098
9098
|
return R = p.done, p;
|
|
9099
9099
|
}, e: function(p) {
|
|
9100
|
-
g = !0,
|
|
9100
|
+
g = !0, x = p;
|
|
9101
9101
|
}, f: function() {
|
|
9102
9102
|
try {
|
|
9103
9103
|
!R && u.return != null && u.return();
|
|
9104
9104
|
} finally {
|
|
9105
|
-
if (g) throw
|
|
9105
|
+
if (g) throw x;
|
|
9106
9106
|
}
|
|
9107
9107
|
} };
|
|
9108
9108
|
}
|
|
@@ -9315,9 +9315,9 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
9315
9315
|
var g = l[R];
|
|
9316
9316
|
if (i.isEmpty(g))
|
|
9317
9317
|
continue;
|
|
9318
|
-
var
|
|
9319
|
-
if (
|
|
9320
|
-
a[R] =
|
|
9318
|
+
var x = n.optional[R](g);
|
|
9319
|
+
if (x !== void 0)
|
|
9320
|
+
a[R] = x;
|
|
9321
9321
|
else
|
|
9322
9322
|
throw new y.ConfigurationError(R, g);
|
|
9323
9323
|
}
|
|
@@ -9393,7 +9393,7 @@ function Ea() {
|
|
|
9393
9393
|
return Q.__proto__ || Object.getPrototypeOf(Q);
|
|
9394
9394
|
}, a(z);
|
|
9395
9395
|
}
|
|
9396
|
-
var l = St().EventEmitter, u = ze(), c = He(), S = oa(), R = _a(), g = xa(),
|
|
9396
|
+
var l = St().EventEmitter, u = ze(), c = He(), S = oa(), R = _a(), g = xa(), x = va(), v = hr(), p = pa(), _ = Ve(), d = Tt(), T = bt(), B = ga(), w = pt(), U = ma(), H = ya(), q = new u("UA"), N = {
|
|
9397
9397
|
// UA status codes.
|
|
9398
9398
|
STATUS_INIT: 0,
|
|
9399
9399
|
STATUS_READY: 1,
|
|
@@ -9530,7 +9530,7 @@ function Ea() {
|
|
|
9530
9530
|
key: "sendOptions",
|
|
9531
9531
|
value: function(f, A, V) {
|
|
9532
9532
|
q.debug("sendOptions()");
|
|
9533
|
-
var $ = new
|
|
9533
|
+
var $ = new x(this);
|
|
9534
9534
|
return $.send(f, A, V), $;
|
|
9535
9535
|
}
|
|
9536
9536
|
/**
|
|
@@ -9768,13 +9768,13 @@ function Ea() {
|
|
|
9768
9768
|
f.reply_sl(416);
|
|
9769
9769
|
return;
|
|
9770
9770
|
}
|
|
9771
|
-
if (!
|
|
9772
|
-
if (A === c.INVITE ? new
|
|
9771
|
+
if (!v.checkTransaction(this, f)) {
|
|
9772
|
+
if (A === c.INVITE ? new v.InviteServerTransaction(this, this._transport, f) : A !== c.ACK && A !== c.CANCEL && new v.NonInviteServerTransaction(this, this._transport, f), A === c.OPTIONS) {
|
|
9773
9773
|
if (this.listeners("newOptions").length === 0) {
|
|
9774
9774
|
f.reply(200);
|
|
9775
9775
|
return;
|
|
9776
9776
|
}
|
|
9777
|
-
var V = new
|
|
9777
|
+
var V = new x(this);
|
|
9778
9778
|
V.init_incoming(f);
|
|
9779
9779
|
} else if (A === c.MESSAGE) {
|
|
9780
9780
|
if (this.listeners("newMessage").length === 0) {
|
|
@@ -10663,8 +10663,8 @@ const o0 = (O) => {
|
|
|
10663
10663
|
let t = null;
|
|
10664
10664
|
const h = (c, S) => {
|
|
10665
10665
|
try {
|
|
10666
|
-
t?.destroy(), Te.log("================================ 开始初始化 ====================================="), t = new Fa(c, S), i.value = S.extension, t.onStatusUpdate((R, g,
|
|
10667
|
-
L.value = R, P.value = g || "", E.value = String(
|
|
10666
|
+
t?.destroy(), Te.log("================================ 开始初始化 ====================================="), t = new Fa(c, S), i.value = S.extension, t.onStatusUpdate((R, g, x) => {
|
|
10667
|
+
L.value = R, P.value = g || "", E.value = x ? String(x) : "", Re.ANSWERED === R && (F.value = Date.now());
|
|
10668
10668
|
});
|
|
10669
10669
|
} catch (R) {
|
|
10670
10670
|
L.value = Re.FAILED, Te.error("callManagement 初始化失败:", R, c, S);
|
|
@@ -10675,16 +10675,16 @@ const o0 = (O) => {
|
|
|
10675
10675
|
t && t.destroy(), t = null;
|
|
10676
10676
|
}, a = rr(""), l = (c, S, R = 1) => {
|
|
10677
10677
|
let g = null;
|
|
10678
|
-
const
|
|
10678
|
+
const x = (v) => {
|
|
10679
10679
|
if (S !== L.value || !t) {
|
|
10680
10680
|
g && clearTimeout(g);
|
|
10681
10681
|
return;
|
|
10682
10682
|
}
|
|
10683
|
-
a.value = `${c}${".".repeat(
|
|
10684
|
-
v
|
|
10683
|
+
a.value = `${c}${".".repeat(v)}`, g = setTimeout(() => {
|
|
10684
|
+
x(v < 3 ? v + 1 : 1);
|
|
10685
10685
|
}, 500);
|
|
10686
10686
|
};
|
|
10687
|
-
|
|
10687
|
+
x(R);
|
|
10688
10688
|
};
|
|
10689
10689
|
return Qo(() => {
|
|
10690
10690
|
if (Re.PENDING === L.value)
|
|
@@ -10743,27 +10743,27 @@ function Ba() {
|
|
|
10743
10743
|
return (S + R) * 3 / 4 - R;
|
|
10744
10744
|
}
|
|
10745
10745
|
function n(c) {
|
|
10746
|
-
var S, R = t(c), g = R[0],
|
|
10746
|
+
var S, R = t(c), g = R[0], x = R[1], v = new F(y(c, g, x)), p = 0, _ = x > 0 ? g - 4 : g, d;
|
|
10747
10747
|
for (d = 0; d < _; d += 4)
|
|
10748
|
-
S = L[c.charCodeAt(d)] << 18 | L[c.charCodeAt(d + 1)] << 12 | L[c.charCodeAt(d + 2)] << 6 | L[c.charCodeAt(d + 3)],
|
|
10749
|
-
return
|
|
10748
|
+
S = L[c.charCodeAt(d)] << 18 | L[c.charCodeAt(d + 1)] << 12 | L[c.charCodeAt(d + 2)] << 6 | L[c.charCodeAt(d + 3)], v[p++] = S >> 16 & 255, v[p++] = S >> 8 & 255, v[p++] = S & 255;
|
|
10749
|
+
return x === 2 && (S = L[c.charCodeAt(d)] << 2 | L[c.charCodeAt(d + 1)] >> 4, v[p++] = S & 255), x === 1 && (S = L[c.charCodeAt(d)] << 10 | L[c.charCodeAt(d + 1)] << 4 | L[c.charCodeAt(d + 2)] >> 2, v[p++] = S >> 8 & 255, v[p++] = S & 255), v;
|
|
10750
10750
|
}
|
|
10751
10751
|
function a(c) {
|
|
10752
10752
|
return O[c >> 18 & 63] + O[c >> 12 & 63] + O[c >> 6 & 63] + O[c & 63];
|
|
10753
10753
|
}
|
|
10754
10754
|
function l(c, S, R) {
|
|
10755
|
-
for (var g,
|
|
10756
|
-
g = (c[
|
|
10757
|
-
return
|
|
10755
|
+
for (var g, x = [], v = S; v < R; v += 3)
|
|
10756
|
+
g = (c[v] << 16 & 16711680) + (c[v + 1] << 8 & 65280) + (c[v + 2] & 255), x.push(a(g));
|
|
10757
|
+
return x.join("");
|
|
10758
10758
|
}
|
|
10759
10759
|
function u(c) {
|
|
10760
|
-
for (var S, R = c.length, g = R % 3,
|
|
10761
|
-
|
|
10762
|
-
return g === 1 ? (S = c[R - 1],
|
|
10760
|
+
for (var S, R = c.length, g = R % 3, x = [], v = 16383, p = 0, _ = R - g; p < _; p += v)
|
|
10761
|
+
x.push(l(c, p, p + v > _ ? _ : p + v));
|
|
10762
|
+
return g === 1 ? (S = c[R - 1], x.push(
|
|
10763
10763
|
O[S >> 2] + O[S << 4 & 63] + "=="
|
|
10764
|
-
)) : g === 2 && (S = (c[R - 2] << 8) + c[R - 1],
|
|
10764
|
+
)) : g === 2 && (S = (c[R - 2] << 8) + c[R - 1], x.push(
|
|
10765
10765
|
O[S >> 10] + O[S >> 4 & 63] + O[S << 2 & 63] + "="
|
|
10766
|
-
)),
|
|
10766
|
+
)), x.join("");
|
|
10767
10767
|
}
|
|
10768
10768
|
return cr;
|
|
10769
10769
|
}
|
|
@@ -11292,8 +11292,8 @@ function Pa() {
|
|
|
11292
11292
|
u[0] = u[0] ^ R[0], u[1] = u[1] ^ R[1], u[2] = u[2] ^ R[2], u[3] = u[3] ^ R[3];
|
|
11293
11293
|
let g = this.doBlockCrypt(u, this.encryptRoundKeys);
|
|
11294
11294
|
u = g;
|
|
11295
|
-
for (let
|
|
11296
|
-
l[S +
|
|
11295
|
+
for (let x = 0; x < L; x++)
|
|
11296
|
+
l[S + x] = g[parseInt(x / 4)] >> (3 - x) % 4 * 8 & 255;
|
|
11297
11297
|
}
|
|
11298
11298
|
} else
|
|
11299
11299
|
for (let u = 0; u < a; u++) {
|
|
@@ -11318,10 +11318,10 @@ function Pa() {
|
|
|
11318
11318
|
throw new Error("iv error");
|
|
11319
11319
|
let u = this.uint8ToUint32Block(this.iv);
|
|
11320
11320
|
for (let c = 0; c < n; c++) {
|
|
11321
|
-
let S = c * L, R = this.uint8ToUint32Block(y, S), g = this.doBlockCrypt(R, this.decryptRoundKeys),
|
|
11322
|
-
|
|
11323
|
-
for (let
|
|
11324
|
-
a[S +
|
|
11321
|
+
let S = c * L, R = this.uint8ToUint32Block(y, S), g = this.doBlockCrypt(R, this.decryptRoundKeys), x = new Uint32Array(4);
|
|
11322
|
+
x[0] = u[0] ^ g[0], x[1] = u[1] ^ g[1], x[2] = u[2] ^ g[2], x[3] = u[3] ^ g[3], u = R;
|
|
11323
|
+
for (let v = 0; v < L; v++)
|
|
11324
|
+
a[S + v] = x[parseInt(v / 4)] >> (3 - v) % 4 * 8 & 255;
|
|
11325
11325
|
}
|
|
11326
11326
|
} else
|
|
11327
11327
|
for (let u = 0; u < n; u++) {
|
|
@@ -11384,11 +11384,11 @@ function Sn() {
|
|
|
11384
11384
|
function g(I) {
|
|
11385
11385
|
return u.charAt(I);
|
|
11386
11386
|
}
|
|
11387
|
-
function
|
|
11387
|
+
function x(I, k) {
|
|
11388
11388
|
var M = c[I.charCodeAt(k)];
|
|
11389
11389
|
return M ?? -1;
|
|
11390
11390
|
}
|
|
11391
|
-
function
|
|
11391
|
+
function v(I) {
|
|
11392
11392
|
for (var k = this.t - 1; k >= 0; --k) I[k] = this[k];
|
|
11393
11393
|
I.t = this.t, I.s = this.s;
|
|
11394
11394
|
}
|
|
@@ -11413,7 +11413,7 @@ function Sn() {
|
|
|
11413
11413
|
}
|
|
11414
11414
|
this.t = 0, this.s = 0;
|
|
11415
11415
|
for (var X = I.length, ie = !1, oe = 0; --X >= 0; ) {
|
|
11416
|
-
var ce = M == 8 ? I[X] & 255 :
|
|
11416
|
+
var ce = M == 8 ? I[X] & 255 : x(I, X);
|
|
11417
11417
|
if (ce < 0) {
|
|
11418
11418
|
I.charAt(X) == "-" && (ie = !0);
|
|
11419
11419
|
continue;
|
|
@@ -11620,7 +11620,7 @@ function Sn() {
|
|
|
11620
11620
|
var M;
|
|
11621
11621
|
return I < 256 || k.isEven() ? M = new A(k) : M = new ae(k), this.exp(I, M);
|
|
11622
11622
|
}
|
|
11623
|
-
E.prototype.copyTo =
|
|
11623
|
+
E.prototype.copyTo = v, E.prototype.fromInt = p, E.prototype.fromString = d, E.prototype.clamp = T, E.prototype.dlShiftTo = W, E.prototype.drShiftTo = C, E.prototype.lShiftTo = D, E.prototype.rShiftTo = j, E.prototype.subTo = z, E.prototype.multiplyTo = Y, E.prototype.squareTo = Q, E.prototype.divRemTo = K, E.prototype.invDigit = te, E.prototype.isEven = ve, E.prototype.exp = _e, E.prototype.toString = B, E.prototype.negate = w, E.prototype.abs = U, E.prototype.compareTo = H, E.prototype.bitLength = N, E.prototype.mod = f, E.prototype.modPowInt = pe, E.ZERO = _(0), E.ONE = _(1);
|
|
11624
11624
|
function Ee() {
|
|
11625
11625
|
var I = t();
|
|
11626
11626
|
return this.copyTo(I), I;
|
|
@@ -11657,7 +11657,7 @@ function Sn() {
|
|
|
11657
11657
|
function at(I, k) {
|
|
11658
11658
|
this.fromInt(0), k == null && (k = 10);
|
|
11659
11659
|
for (var M = this.chunkSize(k), X = Math.pow(k, M), ie = !1, oe = 0, ce = 0, he = 0; he < I.length; ++he) {
|
|
11660
|
-
var Fe =
|
|
11660
|
+
var Fe = x(I, he);
|
|
11661
11661
|
if (Fe < 0) {
|
|
11662
11662
|
I.charAt(he) == "-" && this.signum() == 0 && (ie = !0);
|
|
11663
11663
|
continue;
|
|
@@ -12128,8 +12128,8 @@ function La() {
|
|
|
12128
12128
|
* 解析 ASN.1 der,针对 sm2 验签
|
|
12129
12129
|
*/
|
|
12130
12130
|
decodeDer(y) {
|
|
12131
|
-
const n = h(y, 0), a = h(y, n), l = t(y, n), u = y.substr(a, l * 2), c = a + u.length, S = h(y, c), R = t(y, c), g = y.substr(S, R * 2),
|
|
12132
|
-
return { r:
|
|
12131
|
+
const n = h(y, 0), a = h(y, n), l = t(y, n), u = y.substr(a, l * 2), c = a + u.length, S = h(y, c), R = t(y, c), g = y.substr(S, R * 2), x = new O(u, 16), v = new O(g, 16);
|
|
12132
|
+
return { r: x, s: v };
|
|
12133
12133
|
}
|
|
12134
12134
|
}, ws;
|
|
12135
12135
|
}
|
|
@@ -12242,10 +12242,10 @@ function qa() {
|
|
|
12242
12242
|
add(h) {
|
|
12243
12243
|
if (this.isInfinity()) return h;
|
|
12244
12244
|
if (h.isInfinity()) return this;
|
|
12245
|
-
const y = this.x.toBigInteger(), n = this.y.toBigInteger(), a = this.z, l = h.x.toBigInteger(), u = h.y.toBigInteger(), c = h.z, S = this.curve.q, R = y.multiply(c).mod(S), g = l.multiply(a).mod(S),
|
|
12246
|
-
if (O.ZERO.equals(
|
|
12245
|
+
const y = this.x.toBigInteger(), n = this.y.toBigInteger(), a = this.z, l = h.x.toBigInteger(), u = h.y.toBigInteger(), c = h.z, S = this.curve.q, R = y.multiply(c).mod(S), g = l.multiply(a).mod(S), x = R.subtract(g), v = n.multiply(c).mod(S), p = u.multiply(a).mod(S), _ = v.subtract(p);
|
|
12246
|
+
if (O.ZERO.equals(x))
|
|
12247
12247
|
return O.ZERO.equals(_) ? this.twice() : this.curve.infinity;
|
|
12248
|
-
const d = R.add(g), T = a.multiply(c).mod(S), B =
|
|
12248
|
+
const d = R.add(g), T = a.multiply(c).mod(S), B = x.square().mod(S), w = x.multiply(B).mod(S), U = T.multiply(_.square()).subtract(d.multiply(B)).mod(S), H = x.multiply(U).mod(S), q = _.multiply(B.multiply(R).subtract(U)).subtract(v.multiply(w)).mod(S), N = w.multiply(T).mod(S);
|
|
12249
12249
|
return new P(this.curve, this.curve.fromBigInteger(H), this.curve.fromBigInteger(q), N);
|
|
12250
12250
|
}
|
|
12251
12251
|
/**
|
|
@@ -12266,8 +12266,8 @@ function qa() {
|
|
|
12266
12266
|
twice() {
|
|
12267
12267
|
if (this.isInfinity()) return this;
|
|
12268
12268
|
if (!this.y.toBigInteger().signum()) return this.curve.infinity;
|
|
12269
|
-
const h = this.x.toBigInteger(), y = this.y.toBigInteger(), n = this.z, a = this.curve.q, l = this.curve.a.toBigInteger(), u = h.square().multiply(F).add(l.multiply(n.square())).mod(a), c = y.shiftLeft(1).multiply(n).mod(a), S = y.square().mod(a), R = S.multiply(h).multiply(n).mod(a), g = c.square().mod(a),
|
|
12270
|
-
return new P(this.curve, this.curve.fromBigInteger(
|
|
12269
|
+
const h = this.x.toBigInteger(), y = this.y.toBigInteger(), n = this.z, a = this.curve.q, l = this.curve.a.toBigInteger(), u = h.square().multiply(F).add(l.multiply(n.square())).mod(a), c = y.shiftLeft(1).multiply(n).mod(a), S = y.square().mod(a), R = S.multiply(h).multiply(n).mod(a), g = c.square().mod(a), x = u.square().subtract(R.shiftLeft(3)).mod(a), v = c.multiply(x).mod(a), p = u.multiply(R.shiftLeft(2).subtract(x)).subtract(g.shiftLeft(1).multiply(S)).mod(a), _ = c.multiply(g).mod(a);
|
|
12270
|
+
return new P(this.curve, this.curve.fromBigInteger(v), this.curve.fromBigInteger(p), _);
|
|
12271
12271
|
}
|
|
12272
12272
|
/**
|
|
12273
12273
|
* 倍点计算
|
|
@@ -12343,24 +12343,24 @@ function Ma() {
|
|
|
12343
12343
|
return P;
|
|
12344
12344
|
}
|
|
12345
12345
|
function y() {
|
|
12346
|
-
const
|
|
12346
|
+
const v = new O("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFF", 16), p = new O("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000FFFFFFFFFFFFFFFC", 16), _ = new O("28E9FA9E9D9F5E344D5A9E4BCF6509A7F39789F515AB8F92DDBCBD414D940E93", 16), d = new F(v, p, _), w = d.decodePointHex("04" + "32C4AE2C1F1981195F9904466A39C9948FE30BBFF2660BE1715A4589334C74C7" + "BC3736A2F4F6779C59BDCEE36B692153D0A9877CC62A474002DF32E52139F0A0"), U = new O("FFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFF7203DF6B21C6052B53BBF40939D54123", 16);
|
|
12347
12347
|
return { curve: d, G: w, n: U };
|
|
12348
12348
|
}
|
|
12349
|
-
function n(
|
|
12350
|
-
const T = (
|
|
12349
|
+
function n(v, p, _) {
|
|
12350
|
+
const T = (v ? new O(v, p, _) : new O(t.bitLength(), i)).mod(t.subtract(O.ONE)).add(O.ONE), B = u(T.toString(16), 64), w = E.multiply(T), U = u(w.getX().toBigInteger().toString(16), 64), H = u(w.getY().toBigInteger().toString(16), 64), q = "04" + U + H;
|
|
12351
12351
|
return { privateKey: B, publicKey: q };
|
|
12352
12352
|
}
|
|
12353
|
-
function a(
|
|
12354
|
-
if (
|
|
12355
|
-
const p = (
|
|
12353
|
+
function a(v) {
|
|
12354
|
+
if (v.length !== 130) throw new Error("Invalid public key to compress");
|
|
12355
|
+
const p = (v.length - 2) / 2, _ = v.substr(2, p), d = new O(v.substr(p + 2, p), 16);
|
|
12356
12356
|
let T = "03";
|
|
12357
12357
|
return d.mod(new O("2")).equals(O.ZERO) && (T = "02"), T + _;
|
|
12358
12358
|
}
|
|
12359
|
-
function l(
|
|
12360
|
-
|
|
12361
|
-
const p =
|
|
12359
|
+
function l(v) {
|
|
12360
|
+
v = unescape(encodeURIComponent(v));
|
|
12361
|
+
const p = v.length, _ = [];
|
|
12362
12362
|
for (let T = 0; T < p; T++)
|
|
12363
|
-
_[T >>> 2] |= (
|
|
12363
|
+
_[T >>> 2] |= (v.charCodeAt(T) & 255) << 24 - T % 4 * 8;
|
|
12364
12364
|
const d = [];
|
|
12365
12365
|
for (let T = 0; T < p; T++) {
|
|
12366
12366
|
const B = _[T >>> 2] >>> 24 - T % 4 * 8 & 255;
|
|
@@ -12368,20 +12368,20 @@ function Ma() {
|
|
|
12368
12368
|
}
|
|
12369
12369
|
return d.join("");
|
|
12370
12370
|
}
|
|
12371
|
-
function u(
|
|
12372
|
-
return
|
|
12371
|
+
function u(v, p) {
|
|
12372
|
+
return v.length >= p ? v : new Array(p - v.length + 1).join("0") + v;
|
|
12373
12373
|
}
|
|
12374
|
-
function c(
|
|
12375
|
-
return
|
|
12374
|
+
function c(v) {
|
|
12375
|
+
return v.map((p) => (p = p.toString(16), p.length === 1 ? "0" + p : p)).join("");
|
|
12376
12376
|
}
|
|
12377
|
-
function S(
|
|
12377
|
+
function S(v) {
|
|
12378
12378
|
const p = [];
|
|
12379
12379
|
let _ = 0;
|
|
12380
|
-
for (let d = 0; d <
|
|
12381
|
-
p[d >>> 3] |= parseInt(
|
|
12380
|
+
for (let d = 0; d < v.length * 2; d += 2)
|
|
12381
|
+
p[d >>> 3] |= parseInt(v[_], 10) << 24 - d % 8 * 4, _++;
|
|
12382
12382
|
try {
|
|
12383
12383
|
const d = [];
|
|
12384
|
-
for (let T = 0; T <
|
|
12384
|
+
for (let T = 0; T < v.length; T++) {
|
|
12385
12385
|
const B = p[T >>> 2] >>> 24 - T % 4 * 8 & 255;
|
|
12386
12386
|
d.push(String.fromCharCode(B));
|
|
12387
12387
|
}
|
|
@@ -12390,22 +12390,22 @@ function Ma() {
|
|
|
12390
12390
|
throw new Error("Malformed UTF-8 data");
|
|
12391
12391
|
}
|
|
12392
12392
|
}
|
|
12393
|
-
function R(
|
|
12393
|
+
function R(v) {
|
|
12394
12394
|
const p = [];
|
|
12395
|
-
let _ =
|
|
12396
|
-
_ % 2 !== 0 && (
|
|
12395
|
+
let _ = v.length;
|
|
12396
|
+
_ % 2 !== 0 && (v = u(v, _ + 1)), _ = v.length;
|
|
12397
12397
|
for (let d = 0; d < _; d += 2)
|
|
12398
|
-
p.push(parseInt(
|
|
12398
|
+
p.push(parseInt(v.substr(d, 2), 16));
|
|
12399
12399
|
return p;
|
|
12400
12400
|
}
|
|
12401
|
-
function g(
|
|
12402
|
-
const p = P.decodePointHex(
|
|
12401
|
+
function g(v) {
|
|
12402
|
+
const p = P.decodePointHex(v);
|
|
12403
12403
|
if (!p) return !1;
|
|
12404
12404
|
const _ = p.getX();
|
|
12405
12405
|
return p.getY().square().equals(_.multiply(_.square()).add(_.multiply(P.a)).add(P.b));
|
|
12406
12406
|
}
|
|
12407
|
-
function v
|
|
12408
|
-
const _ = P.decodePointHex(
|
|
12407
|
+
function x(v, p) {
|
|
12408
|
+
const _ = P.decodePointHex(v);
|
|
12409
12409
|
if (!_) return !1;
|
|
12410
12410
|
const d = P.decodePointHex(p);
|
|
12411
12411
|
return d ? _.equals(d) : !1;
|
|
@@ -12421,7 +12421,7 @@ function Ma() {
|
|
|
12421
12421
|
arrayToUtf8: S,
|
|
12422
12422
|
hexToArray: R,
|
|
12423
12423
|
verifyPublicKey: g,
|
|
12424
|
-
comparePublicKeyHex:
|
|
12424
|
+
comparePublicKeyHex: x
|
|
12425
12425
|
}, Is;
|
|
12426
12426
|
}
|
|
12427
12427
|
var Fs, Rl;
|
|
@@ -12456,12 +12456,12 @@ function go() {
|
|
|
12456
12456
|
const T = u.length - 8;
|
|
12457
12457
|
R[d] = parseInt(u.substr(T), 2), u = u.substr(0, T);
|
|
12458
12458
|
} else u.length > 0 && (R[d] = parseInt(u, 2), u = "");
|
|
12459
|
-
const g = new Uint8Array([...l, 128, ...S, ...R]),
|
|
12460
|
-
for (let d = 0; d <
|
|
12459
|
+
const g = new Uint8Array([...l, 128, ...S, ...R]), x = new DataView(g.buffer, 0), v = g.length / 64, p = new Uint32Array([1937774191, 1226093241, 388252375, 3666478592, 2842636476, 372324522, 3817729613, 2969243214]);
|
|
12460
|
+
for (let d = 0; d < v; d++) {
|
|
12461
12461
|
O.fill(0), L.fill(0);
|
|
12462
12462
|
const T = 16 * d;
|
|
12463
12463
|
for (let A = 0; A < 16; A++)
|
|
12464
|
-
O[A] =
|
|
12464
|
+
O[A] = x.getUint32((T + A) * 4, !1);
|
|
12465
12465
|
for (let A = 16; A < 68; A++)
|
|
12466
12466
|
O[A] = E(O[A - 16] ^ O[A - 9] ^ F(O[A - 3], 15)) ^ F(O[A - 13], 7) ^ O[A - 6];
|
|
12467
12467
|
for (let A = 0; A < 64; A++)
|
|
@@ -12497,12 +12497,12 @@ function za() {
|
|
|
12497
12497
|
if (wl) return Bs;
|
|
12498
12498
|
wl = 1;
|
|
12499
12499
|
const { BigInteger: O } = Sn(), { encodeDer: L, decodeDer: F } = La(), i = Ma(), P = go().sm3, { G: E, curve: t, n: h } = i.generateEcparam(), y = 0;
|
|
12500
|
-
function n(g,
|
|
12501
|
-
g = typeof g == "string" ? i.hexToArray(i.utf8ToHex(g)) : Array.prototype.slice.call(g),
|
|
12500
|
+
function n(g, x, v = 1) {
|
|
12501
|
+
g = typeof g == "string" ? i.hexToArray(i.utf8ToHex(g)) : Array.prototype.slice.call(g), x = i.getGlobalCurve().decodePointHex(x);
|
|
12502
12502
|
const p = i.generateKeyPairHex(), _ = new O(p.privateKey, 16);
|
|
12503
12503
|
let d = p.publicKey;
|
|
12504
12504
|
d.length > 128 && (d = d.substr(d.length - 128));
|
|
12505
|
-
const T =
|
|
12505
|
+
const T = x.multiply(_), B = i.hexToArray(i.leftPad(T.getX().toBigInteger().toRadix(16), 64)), w = i.hexToArray(i.leftPad(T.getY().toBigInteger().toRadix(16), 64)), U = i.arrayToHex(P([].concat(B, g, w)));
|
|
12506
12506
|
let H = 1, q = 0, N = [];
|
|
12507
12507
|
const W = [].concat(B, w), C = () => {
|
|
12508
12508
|
N = P([...W, H >> 24 & 255, H >> 16 & 255, H >> 8 & 255, H & 255]), H++, q = 0;
|
|
@@ -12511,15 +12511,15 @@ function za() {
|
|
|
12511
12511
|
for (let j = 0, z = g.length; j < z; j++)
|
|
12512
12512
|
q === N.length && C(), g[j] ^= N[q++] & 255;
|
|
12513
12513
|
const D = i.arrayToHex(g);
|
|
12514
|
-
return
|
|
12514
|
+
return v === y ? d + D + U : d + U + D;
|
|
12515
12515
|
}
|
|
12516
|
-
function a(g,
|
|
12516
|
+
function a(g, x, v = 1, {
|
|
12517
12517
|
output: p = "string"
|
|
12518
12518
|
} = {}) {
|
|
12519
|
-
|
|
12519
|
+
x = new O(x, 16);
|
|
12520
12520
|
let _ = g.substr(128, 64), d = g.substr(192);
|
|
12521
|
-
|
|
12522
|
-
const T = i.hexToArray(d), w = i.getGlobalCurve().decodePointHex("04" + g.substr(0, 128)).multiply(
|
|
12521
|
+
v === y && (_ = g.substr(g.length - 64), d = g.substr(128, g.length - 128 - 64));
|
|
12522
|
+
const T = i.hexToArray(d), w = i.getGlobalCurve().decodePointHex("04" + g.substr(0, 128)).multiply(x), U = i.hexToArray(i.leftPad(w.getX().toBigInteger().toRadix(16), 64)), H = i.hexToArray(i.leftPad(w.getY().toBigInteger().toRadix(16), 64));
|
|
12523
12523
|
let q = 1, N = 0, W = [];
|
|
12524
12524
|
const C = [].concat(U, H), D = () => {
|
|
12525
12525
|
W = P([...C, q >> 24 & 255, q >> 16 & 255, q >> 8 & 255, q & 255]), q++, N = 0;
|
|
@@ -12529,62 +12529,62 @@ function za() {
|
|
|
12529
12529
|
N === W.length && D(), T[z] ^= W[N++] & 255;
|
|
12530
12530
|
return i.arrayToHex(P([].concat(U, T, H))) === _.toLowerCase() ? p === "array" ? T : i.arrayToUtf8(T) : p === "array" ? [] : "";
|
|
12531
12531
|
}
|
|
12532
|
-
function l(g,
|
|
12533
|
-
pointPool:
|
|
12532
|
+
function l(g, x, {
|
|
12533
|
+
pointPool: v,
|
|
12534
12534
|
der: p,
|
|
12535
12535
|
hash: _,
|
|
12536
12536
|
publicKey: d,
|
|
12537
12537
|
userId: T
|
|
12538
12538
|
} = {}) {
|
|
12539
12539
|
let B = typeof g == "string" ? i.utf8ToHex(g) : i.arrayToHex(g);
|
|
12540
|
-
_ && (d = d || S(
|
|
12541
|
-
const w = new O(
|
|
12540
|
+
_ && (d = d || S(x), B = c(B, d, T));
|
|
12541
|
+
const w = new O(x, 16), U = new O(B, 16);
|
|
12542
12542
|
let H = null, q = null, N = null;
|
|
12543
12543
|
do {
|
|
12544
12544
|
do {
|
|
12545
12545
|
let W;
|
|
12546
|
-
|
|
12546
|
+
v && v.length ? W = v.pop() : W = R(), H = W.k, q = U.add(W.x1).mod(h);
|
|
12547
12547
|
} while (q.equals(O.ZERO) || q.add(H).equals(h));
|
|
12548
12548
|
N = w.add(O.ONE).modInverse(h).multiply(H.subtract(q.multiply(w))).mod(h);
|
|
12549
12549
|
} while (N.equals(O.ZERO));
|
|
12550
12550
|
return p ? L(q, N) : i.leftPad(q.toString(16), 64) + i.leftPad(N.toString(16), 64);
|
|
12551
12551
|
}
|
|
12552
|
-
function u(g,
|
|
12552
|
+
function u(g, x, v, { der: p, hash: _, userId: d } = {}) {
|
|
12553
12553
|
let T = typeof g == "string" ? i.utf8ToHex(g) : i.arrayToHex(g);
|
|
12554
|
-
_ && (T = c(T,
|
|
12554
|
+
_ && (T = c(T, v, d));
|
|
12555
12555
|
let B, w;
|
|
12556
12556
|
if (p) {
|
|
12557
|
-
const C = F(
|
|
12557
|
+
const C = F(x);
|
|
12558
12558
|
B = C.r, w = C.s;
|
|
12559
12559
|
} else
|
|
12560
|
-
B = new O(
|
|
12561
|
-
const U = t.decodePointHex(
|
|
12560
|
+
B = new O(x.substring(0, 64), 16), w = new O(x.substring(64), 16);
|
|
12561
|
+
const U = t.decodePointHex(v), H = new O(T, 16), q = B.add(w).mod(h);
|
|
12562
12562
|
if (q.equals(O.ZERO)) return !1;
|
|
12563
12563
|
const N = E.multiply(w).add(U.multiply(q)), W = H.add(N.getX().toBigInteger()).mod(h);
|
|
12564
12564
|
return B.equals(W);
|
|
12565
12565
|
}
|
|
12566
|
-
function c(g,
|
|
12567
|
-
|
|
12566
|
+
function c(g, x, v = "1234567812345678") {
|
|
12567
|
+
v = i.utf8ToHex(v);
|
|
12568
12568
|
const p = i.leftPad(E.curve.a.toBigInteger().toRadix(16), 64), _ = i.leftPad(E.curve.b.toBigInteger().toRadix(16), 64), d = i.leftPad(E.getX().toBigInteger().toRadix(16), 64), T = i.leftPad(E.getY().toBigInteger().toRadix(16), 64);
|
|
12569
12569
|
let B, w;
|
|
12570
|
-
if (
|
|
12571
|
-
B =
|
|
12570
|
+
if (x.length === 128)
|
|
12571
|
+
B = x.substr(0, 64), w = x.substr(64, 64);
|
|
12572
12572
|
else {
|
|
12573
|
-
const N = E.curve.decodePointHex(
|
|
12573
|
+
const N = E.curve.decodePointHex(x);
|
|
12574
12574
|
B = i.leftPad(N.getX().toBigInteger().toRadix(16), 64), w = i.leftPad(N.getY().toBigInteger().toRadix(16), 64);
|
|
12575
12575
|
}
|
|
12576
|
-
const U = i.hexToArray(
|
|
12576
|
+
const U = i.hexToArray(v + p + _ + d + T + B + w), H = v.length * 4;
|
|
12577
12577
|
U.unshift(H & 255), U.unshift(H >> 8 & 255);
|
|
12578
12578
|
const q = P(U);
|
|
12579
12579
|
return i.arrayToHex(P(q.concat(i.hexToArray(g))));
|
|
12580
12580
|
}
|
|
12581
12581
|
function S(g) {
|
|
12582
|
-
const
|
|
12583
|
-
return "04" +
|
|
12582
|
+
const x = E.multiply(new O(g, 16)), v = i.leftPad(x.getX().toBigInteger().toString(16), 64), p = i.leftPad(x.getY().toBigInteger().toString(16), 64);
|
|
12583
|
+
return "04" + v + p;
|
|
12584
12584
|
}
|
|
12585
12585
|
function R() {
|
|
12586
|
-
const g = i.generateKeyPairHex(),
|
|
12587
|
-
return g.k = new O(g.privateKey, 16), g.x1 =
|
|
12586
|
+
const g = i.generateKeyPairHex(), x = t.decodePointHex(g.publicKey);
|
|
12587
|
+
return g.k = new O(g.privateKey, 16), g.x1 = x.getX().toBigInteger(), g;
|
|
12588
12588
|
}
|
|
12589
12589
|
return Bs = {
|
|
12590
12590
|
generateKeyPairHex: i.generateKeyPairHex,
|
|
@@ -12941,40 +12941,40 @@ function ja() {
|
|
|
12941
12941
|
1684763257
|
|
12942
12942
|
];
|
|
12943
12943
|
function E(g) {
|
|
12944
|
-
const
|
|
12945
|
-
for (let
|
|
12946
|
-
|
|
12947
|
-
return
|
|
12944
|
+
const x = [];
|
|
12945
|
+
for (let v = 0, p = g.length; v < p; v += 2)
|
|
12946
|
+
x.push(parseInt(g.substr(v, 2), 16));
|
|
12947
|
+
return x;
|
|
12948
12948
|
}
|
|
12949
12949
|
function t(g) {
|
|
12950
|
-
return g.map((
|
|
12950
|
+
return g.map((x) => (x = x.toString(16), x.length === 1 ? "0" + x : x)).join("");
|
|
12951
12951
|
}
|
|
12952
12952
|
function h(g) {
|
|
12953
|
-
const
|
|
12954
|
-
for (let
|
|
12955
|
-
const _ = g.codePointAt(
|
|
12953
|
+
const x = [];
|
|
12954
|
+
for (let v = 0, p = g.length; v < p; v++) {
|
|
12955
|
+
const _ = g.codePointAt(v);
|
|
12956
12956
|
if (_ <= 127)
|
|
12957
|
-
|
|
12957
|
+
x.push(_);
|
|
12958
12958
|
else if (_ <= 2047)
|
|
12959
|
-
|
|
12959
|
+
x.push(192 | _ >>> 6), x.push(128 | _ & 63);
|
|
12960
12960
|
else if (_ <= 55295 || _ >= 57344 && _ <= 65535)
|
|
12961
|
-
|
|
12961
|
+
x.push(224 | _ >>> 12), x.push(128 | _ >>> 6 & 63), x.push(128 | _ & 63);
|
|
12962
12962
|
else if (_ >= 65536 && _ <= 1114111)
|
|
12963
|
-
|
|
12963
|
+
v++, x.push(240 | _ >>> 18 & 28), x.push(128 | _ >>> 12 & 63), x.push(128 | _ >>> 6 & 63), x.push(128 | _ & 63);
|
|
12964
12964
|
else
|
|
12965
|
-
throw
|
|
12965
|
+
throw x.push(_), new Error("input is not supported");
|
|
12966
12966
|
}
|
|
12967
|
-
return
|
|
12967
|
+
return x;
|
|
12968
12968
|
}
|
|
12969
12969
|
function y(g) {
|
|
12970
|
-
const
|
|
12971
|
-
for (let
|
|
12972
|
-
g[
|
|
12973
|
-
return
|
|
12970
|
+
const x = [];
|
|
12971
|
+
for (let v = 0, p = g.length; v < p; v++)
|
|
12972
|
+
g[v] >= 240 && g[v] <= 247 ? (x.push(String.fromCodePoint(((g[v] & 7) << 18) + ((g[v + 1] & 63) << 12) + ((g[v + 2] & 63) << 6) + (g[v + 3] & 63))), v += 3) : g[v] >= 224 && g[v] <= 239 ? (x.push(String.fromCodePoint(((g[v] & 15) << 12) + ((g[v + 1] & 63) << 6) + (g[v + 2] & 63))), v += 2) : g[v] >= 192 && g[v] <= 223 ? (x.push(String.fromCodePoint(((g[v] & 31) << 6) + (g[v + 1] & 63))), v++) : x.push(String.fromCodePoint(g[v]));
|
|
12973
|
+
return x.join("");
|
|
12974
12974
|
}
|
|
12975
|
-
function n(g,
|
|
12976
|
-
const
|
|
12977
|
-
return g <<
|
|
12975
|
+
function n(g, x) {
|
|
12976
|
+
const v = x & 31;
|
|
12977
|
+
return g << v | g >>> 32 - v;
|
|
12978
12978
|
}
|
|
12979
12979
|
function a(g) {
|
|
12980
12980
|
return (i[g >>> 24 & 255] & 255) << 24 | (i[g >>> 16 & 255] & 255) << 16 | (i[g >>> 8 & 255] & 255) << 8 | i[g & 255] & 255;
|
|
@@ -12985,27 +12985,27 @@ function ja() {
|
|
|
12985
12985
|
function u(g) {
|
|
12986
12986
|
return g ^ n(g, 13) ^ n(g, 23);
|
|
12987
12987
|
}
|
|
12988
|
-
function c(g,
|
|
12988
|
+
function c(g, x, v) {
|
|
12989
12989
|
const p = new Array(4), _ = new Array(4);
|
|
12990
12990
|
for (let d = 0; d < 4; d++)
|
|
12991
12991
|
_[0] = g[4 * d] & 255, _[1] = g[4 * d + 1] & 255, _[2] = g[4 * d + 2] & 255, _[3] = g[4 * d + 3] & 255, p[d] = _[0] << 24 | _[1] << 16 | _[2] << 8 | _[3];
|
|
12992
12992
|
for (let d = 0, T; d < 32; d += 4)
|
|
12993
|
-
T = p[1] ^ p[2] ^ p[3] ^
|
|
12993
|
+
T = p[1] ^ p[2] ^ p[3] ^ v[d + 0], p[0] ^= l(a(T)), T = p[2] ^ p[3] ^ p[0] ^ v[d + 1], p[1] ^= l(a(T)), T = p[3] ^ p[0] ^ p[1] ^ v[d + 2], p[2] ^= l(a(T)), T = p[0] ^ p[1] ^ p[2] ^ v[d + 3], p[3] ^= l(a(T));
|
|
12994
12994
|
for (let d = 0; d < 16; d += 4)
|
|
12995
|
-
|
|
12995
|
+
x[d] = p[3 - d / 4] >>> 24 & 255, x[d + 1] = p[3 - d / 4] >>> 16 & 255, x[d + 2] = p[3 - d / 4] >>> 8 & 255, x[d + 3] = p[3 - d / 4] & 255;
|
|
12996
12996
|
}
|
|
12997
|
-
function S(g,
|
|
12997
|
+
function S(g, x, v) {
|
|
12998
12998
|
const p = new Array(4), _ = new Array(4);
|
|
12999
12999
|
for (let d = 0; d < 4; d++)
|
|
13000
13000
|
_[0] = g[0 + 4 * d] & 255, _[1] = g[1 + 4 * d] & 255, _[2] = g[2 + 4 * d] & 255, _[3] = g[3 + 4 * d] & 255, p[d] = _[0] << 24 | _[1] << 16 | _[2] << 8 | _[3];
|
|
13001
13001
|
p[0] ^= 2746333894, p[1] ^= 1453994832, p[2] ^= 1736282519, p[3] ^= 2993693404;
|
|
13002
13002
|
for (let d = 0, T; d < 32; d += 4)
|
|
13003
|
-
T = p[1] ^ p[2] ^ p[3] ^ P[d + 0],
|
|
13004
|
-
if (
|
|
13003
|
+
T = p[1] ^ p[2] ^ p[3] ^ P[d + 0], x[d + 0] = p[0] ^= u(a(T)), T = p[2] ^ p[3] ^ p[0] ^ P[d + 1], x[d + 1] = p[1] ^= u(a(T)), T = p[3] ^ p[0] ^ p[1] ^ P[d + 2], x[d + 2] = p[2] ^= u(a(T)), T = p[0] ^ p[1] ^ p[2] ^ P[d + 3], x[d + 3] = p[3] ^= u(a(T));
|
|
13004
|
+
if (v === O)
|
|
13005
13005
|
for (let d = 0, T; d < 16; d++)
|
|
13006
|
-
T =
|
|
13006
|
+
T = x[d], x[d] = x[31 - d], x[31 - d] = T;
|
|
13007
13007
|
}
|
|
13008
|
-
function R(g,
|
|
13008
|
+
function R(g, x, v, {
|
|
13009
13009
|
padding: p = "pkcs#7",
|
|
13010
13010
|
mode: _,
|
|
13011
13011
|
iv: d = [],
|
|
@@ -13013,40 +13013,40 @@ function ja() {
|
|
|
13013
13013
|
} = {}) {
|
|
13014
13014
|
if (_ === "cbc" && (typeof d == "string" && (d = E(d)), d.length !== 128 / 8))
|
|
13015
13015
|
throw new Error("iv is invalid");
|
|
13016
|
-
if (typeof
|
|
13016
|
+
if (typeof x == "string" && (x = E(x)), x.length !== 128 / 8)
|
|
13017
13017
|
throw new Error("key is invalid");
|
|
13018
|
-
if (typeof g == "string" ?
|
|
13018
|
+
if (typeof g == "string" ? v !== O ? g = h(g) : g = E(g) : g = [...g], (p === "pkcs#5" || p === "pkcs#7") && v !== O) {
|
|
13019
13019
|
const N = F - g.length % F;
|
|
13020
13020
|
for (let W = 0; W < N; W++) g.push(N);
|
|
13021
13021
|
}
|
|
13022
13022
|
const B = new Array(L);
|
|
13023
|
-
S(
|
|
13023
|
+
S(x, B, v);
|
|
13024
13024
|
const w = [];
|
|
13025
13025
|
let U = d, H = g.length, q = 0;
|
|
13026
13026
|
for (; H >= F; ) {
|
|
13027
13027
|
const N = g.slice(q, q + 16), W = new Array(16);
|
|
13028
13028
|
if (_ === "cbc")
|
|
13029
13029
|
for (let C = 0; C < F; C++)
|
|
13030
|
-
|
|
13030
|
+
v !== O && (N[C] ^= U[C]);
|
|
13031
13031
|
c(N, W, B);
|
|
13032
13032
|
for (let C = 0; C < F; C++)
|
|
13033
|
-
_ === "cbc" &&
|
|
13034
|
-
_ === "cbc" && (
|
|
13033
|
+
_ === "cbc" && v === O && (W[C] ^= U[C]), w[q + C] = W[C];
|
|
13034
|
+
_ === "cbc" && (v !== O ? U = W : U = N), H -= F, q += F;
|
|
13035
13035
|
}
|
|
13036
|
-
if ((p === "pkcs#5" || p === "pkcs#7") &&
|
|
13036
|
+
if ((p === "pkcs#5" || p === "pkcs#7") && v === O) {
|
|
13037
13037
|
const N = w.length, W = w[N - 1];
|
|
13038
13038
|
for (let C = 1; C <= W; C++)
|
|
13039
13039
|
if (w[N - C] !== W) throw new Error("padding is invalid");
|
|
13040
13040
|
w.splice(N - W, W);
|
|
13041
13041
|
}
|
|
13042
|
-
return T !== "array" ?
|
|
13042
|
+
return T !== "array" ? v !== O ? t(w) : y(w) : w;
|
|
13043
13043
|
}
|
|
13044
13044
|
return ks = {
|
|
13045
|
-
encrypt(g,
|
|
13046
|
-
return R(g,
|
|
13045
|
+
encrypt(g, x, v) {
|
|
13046
|
+
return R(g, x, 1, v);
|
|
13047
13047
|
},
|
|
13048
|
-
decrypt(g,
|
|
13049
|
-
return R(g,
|
|
13048
|
+
decrypt(g, x, v) {
|
|
13049
|
+
return R(g, x, 0, v);
|
|
13050
13050
|
}
|
|
13051
13051
|
}, ks;
|
|
13052
13052
|
}
|
|
@@ -13090,11 +13090,11 @@ function Se() {
|
|
|
13090
13090
|
}
|
|
13091
13091
|
throw new Error("Native crypto module could not be used to get secure random number.");
|
|
13092
13092
|
}, h = Object.create || /* @__PURE__ */ function() {
|
|
13093
|
-
function
|
|
13093
|
+
function v() {
|
|
13094
13094
|
}
|
|
13095
13095
|
return function(p) {
|
|
13096
13096
|
var _;
|
|
13097
|
-
return
|
|
13097
|
+
return v.prototype = p, _ = new v(), v.prototype = null, _;
|
|
13098
13098
|
};
|
|
13099
13099
|
}(), y = {}, n = y.lib = {}, a = n.Base = /* @__PURE__ */ function() {
|
|
13100
13100
|
return {
|
|
@@ -13116,9 +13116,9 @@ function Se() {
|
|
|
13116
13116
|
* }
|
|
13117
13117
|
* });
|
|
13118
13118
|
*/
|
|
13119
|
-
extend: function(
|
|
13119
|
+
extend: function(v) {
|
|
13120
13120
|
var p = h(this);
|
|
13121
|
-
return
|
|
13121
|
+
return v && p.mixIn(v), (!p.hasOwnProperty("init") || this.init === p.init) && (p.init = function() {
|
|
13122
13122
|
p.$super.init.apply(this, arguments);
|
|
13123
13123
|
}), p.init.prototype = p, p.$super = this, p;
|
|
13124
13124
|
},
|
|
@@ -13135,8 +13135,8 @@ function Se() {
|
|
|
13135
13135
|
* var instance = MyType.create();
|
|
13136
13136
|
*/
|
|
13137
13137
|
create: function() {
|
|
13138
|
-
var
|
|
13139
|
-
return
|
|
13138
|
+
var v = this.extend();
|
|
13139
|
+
return v.init.apply(v, arguments), v;
|
|
13140
13140
|
},
|
|
13141
13141
|
/**
|
|
13142
13142
|
* Initializes a newly created object.
|
|
@@ -13163,10 +13163,10 @@ function Se() {
|
|
|
13163
13163
|
* field: 'value'
|
|
13164
13164
|
* });
|
|
13165
13165
|
*/
|
|
13166
|
-
mixIn: function(
|
|
13167
|
-
for (var p in
|
|
13168
|
-
|
|
13169
|
-
|
|
13166
|
+
mixIn: function(v) {
|
|
13167
|
+
for (var p in v)
|
|
13168
|
+
v.hasOwnProperty(p) && (this[p] = v[p]);
|
|
13169
|
+
v.hasOwnProperty("toString") && (this.toString = v.toString);
|
|
13170
13170
|
},
|
|
13171
13171
|
/**
|
|
13172
13172
|
* Creates a copy of this object.
|
|
@@ -13194,8 +13194,8 @@ function Se() {
|
|
|
13194
13194
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]);
|
|
13195
13195
|
* var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6);
|
|
13196
13196
|
*/
|
|
13197
|
-
init: function(
|
|
13198
|
-
|
|
13197
|
+
init: function(v, p) {
|
|
13198
|
+
v = this.words = v || [], p != P ? this.sigBytes = p : this.sigBytes = v.length * 4;
|
|
13199
13199
|
},
|
|
13200
13200
|
/**
|
|
13201
13201
|
* Converts this word array to a string.
|
|
@@ -13210,8 +13210,8 @@ function Se() {
|
|
|
13210
13210
|
* var string = wordArray.toString();
|
|
13211
13211
|
* var string = wordArray.toString(CryptoJS.enc.Utf8);
|
|
13212
13212
|
*/
|
|
13213
|
-
toString: function(
|
|
13214
|
-
return (
|
|
13213
|
+
toString: function(v) {
|
|
13214
|
+
return (v || c).stringify(this);
|
|
13215
13215
|
},
|
|
13216
13216
|
/**
|
|
13217
13217
|
* Concatenates a word array to this word array.
|
|
@@ -13224,8 +13224,8 @@ function Se() {
|
|
|
13224
13224
|
*
|
|
13225
13225
|
* wordArray1.concat(wordArray2);
|
|
13226
13226
|
*/
|
|
13227
|
-
concat: function(
|
|
13228
|
-
var p = this.words, _ =
|
|
13227
|
+
concat: function(v) {
|
|
13228
|
+
var p = this.words, _ = v.words, d = this.sigBytes, T = v.sigBytes;
|
|
13229
13229
|
if (this.clamp(), d % 4)
|
|
13230
13230
|
for (var B = 0; B < T; B++) {
|
|
13231
13231
|
var w = _[B >>> 2] >>> 24 - B % 4 * 8 & 255;
|
|
@@ -13244,8 +13244,8 @@ function Se() {
|
|
|
13244
13244
|
* wordArray.clamp();
|
|
13245
13245
|
*/
|
|
13246
13246
|
clamp: function() {
|
|
13247
|
-
var
|
|
13248
|
-
|
|
13247
|
+
var v = this.words, p = this.sigBytes;
|
|
13248
|
+
v[p >>> 2] &= 4294967295 << 32 - p % 4 * 8, v.length = i.ceil(p / 4);
|
|
13249
13249
|
},
|
|
13250
13250
|
/**
|
|
13251
13251
|
* Creates a copy of this word array.
|
|
@@ -13257,8 +13257,8 @@ function Se() {
|
|
|
13257
13257
|
* var clone = wordArray.clone();
|
|
13258
13258
|
*/
|
|
13259
13259
|
clone: function() {
|
|
13260
|
-
var
|
|
13261
|
-
return
|
|
13260
|
+
var v = a.clone.call(this);
|
|
13261
|
+
return v.words = this.words.slice(0), v;
|
|
13262
13262
|
},
|
|
13263
13263
|
/**
|
|
13264
13264
|
* Creates a word array filled with random bytes.
|
|
@@ -13273,10 +13273,10 @@ function Se() {
|
|
|
13273
13273
|
*
|
|
13274
13274
|
* var wordArray = CryptoJS.lib.WordArray.random(16);
|
|
13275
13275
|
*/
|
|
13276
|
-
random: function(
|
|
13277
|
-
for (var p = [], _ = 0; _ <
|
|
13276
|
+
random: function(v) {
|
|
13277
|
+
for (var p = [], _ = 0; _ < v; _ += 4)
|
|
13278
13278
|
p.push(t());
|
|
13279
|
-
return new l.init(p,
|
|
13279
|
+
return new l.init(p, v);
|
|
13280
13280
|
}
|
|
13281
13281
|
}), u = y.enc = {}, c = u.Hex = {
|
|
13282
13282
|
/**
|
|
@@ -13292,8 +13292,8 @@ function Se() {
|
|
|
13292
13292
|
*
|
|
13293
13293
|
* var hexString = CryptoJS.enc.Hex.stringify(wordArray);
|
|
13294
13294
|
*/
|
|
13295
|
-
stringify: function(
|
|
13296
|
-
for (var p =
|
|
13295
|
+
stringify: function(v) {
|
|
13296
|
+
for (var p = v.words, _ = v.sigBytes, d = [], T = 0; T < _; T++) {
|
|
13297
13297
|
var B = p[T >>> 2] >>> 24 - T % 4 * 8 & 255;
|
|
13298
13298
|
d.push((B >>> 4).toString(16)), d.push((B & 15).toString(16));
|
|
13299
13299
|
}
|
|
@@ -13312,9 +13312,9 @@ function Se() {
|
|
|
13312
13312
|
*
|
|
13313
13313
|
* var wordArray = CryptoJS.enc.Hex.parse(hexString);
|
|
13314
13314
|
*/
|
|
13315
|
-
parse: function(
|
|
13316
|
-
for (var p =
|
|
13317
|
-
_[d >>> 3] |= parseInt(
|
|
13315
|
+
parse: function(v) {
|
|
13316
|
+
for (var p = v.length, _ = [], d = 0; d < p; d += 2)
|
|
13317
|
+
_[d >>> 3] |= parseInt(v.substr(d, 2), 16) << 24 - d % 8 * 4;
|
|
13318
13318
|
return new l.init(_, p / 2);
|
|
13319
13319
|
}
|
|
13320
13320
|
}, S = u.Latin1 = {
|
|
@@ -13331,8 +13331,8 @@ function Se() {
|
|
|
13331
13331
|
*
|
|
13332
13332
|
* var latin1String = CryptoJS.enc.Latin1.stringify(wordArray);
|
|
13333
13333
|
*/
|
|
13334
|
-
stringify: function(
|
|
13335
|
-
for (var p =
|
|
13334
|
+
stringify: function(v) {
|
|
13335
|
+
for (var p = v.words, _ = v.sigBytes, d = [], T = 0; T < _; T++) {
|
|
13336
13336
|
var B = p[T >>> 2] >>> 24 - T % 4 * 8 & 255;
|
|
13337
13337
|
d.push(String.fromCharCode(B));
|
|
13338
13338
|
}
|
|
@@ -13351,9 +13351,9 @@ function Se() {
|
|
|
13351
13351
|
*
|
|
13352
13352
|
* var wordArray = CryptoJS.enc.Latin1.parse(latin1String);
|
|
13353
13353
|
*/
|
|
13354
|
-
parse: function(
|
|
13355
|
-
for (var p =
|
|
13356
|
-
_[d >>> 2] |= (
|
|
13354
|
+
parse: function(v) {
|
|
13355
|
+
for (var p = v.length, _ = [], d = 0; d < p; d++)
|
|
13356
|
+
_[d >>> 2] |= (v.charCodeAt(d) & 255) << 24 - d % 4 * 8;
|
|
13357
13357
|
return new l.init(_, p);
|
|
13358
13358
|
}
|
|
13359
13359
|
}, R = u.Utf8 = {
|
|
@@ -13370,9 +13370,9 @@ function Se() {
|
|
|
13370
13370
|
*
|
|
13371
13371
|
* var utf8String = CryptoJS.enc.Utf8.stringify(wordArray);
|
|
13372
13372
|
*/
|
|
13373
|
-
stringify: function(
|
|
13373
|
+
stringify: function(v) {
|
|
13374
13374
|
try {
|
|
13375
|
-
return decodeURIComponent(escape(S.stringify(
|
|
13375
|
+
return decodeURIComponent(escape(S.stringify(v)));
|
|
13376
13376
|
} catch {
|
|
13377
13377
|
throw new Error("Malformed UTF-8 data");
|
|
13378
13378
|
}
|
|
@@ -13390,8 +13390,8 @@ function Se() {
|
|
|
13390
13390
|
*
|
|
13391
13391
|
* var wordArray = CryptoJS.enc.Utf8.parse(utf8String);
|
|
13392
13392
|
*/
|
|
13393
|
-
parse: function(
|
|
13394
|
-
return S.parse(unescape(encodeURIComponent(
|
|
13393
|
+
parse: function(v) {
|
|
13394
|
+
return S.parse(unescape(encodeURIComponent(v)));
|
|
13395
13395
|
}
|
|
13396
13396
|
}, g = n.BufferedBlockAlgorithm = a.extend({
|
|
13397
13397
|
/**
|
|
@@ -13414,8 +13414,8 @@ function Se() {
|
|
|
13414
13414
|
* bufferedBlockAlgorithm._append('data');
|
|
13415
13415
|
* bufferedBlockAlgorithm._append(wordArray);
|
|
13416
13416
|
*/
|
|
13417
|
-
_append: function(
|
|
13418
|
-
typeof
|
|
13417
|
+
_append: function(v) {
|
|
13418
|
+
typeof v == "string" && (v = R.parse(v)), this._data.concat(v), this._nDataBytes += v.sigBytes;
|
|
13419
13419
|
},
|
|
13420
13420
|
/**
|
|
13421
13421
|
* Processes available data blocks.
|
|
@@ -13431,9 +13431,9 @@ function Se() {
|
|
|
13431
13431
|
* var processedData = bufferedBlockAlgorithm._process();
|
|
13432
13432
|
* var processedData = bufferedBlockAlgorithm._process(!!'flush');
|
|
13433
13433
|
*/
|
|
13434
|
-
_process: function(
|
|
13434
|
+
_process: function(v) {
|
|
13435
13435
|
var p, _ = this._data, d = _.words, T = _.sigBytes, B = this.blockSize, w = B * 4, U = T / w;
|
|
13436
|
-
|
|
13436
|
+
v ? U = i.ceil(U) : U = i.max((U | 0) - this._minBufferSize, 0);
|
|
13437
13437
|
var H = U * B, q = i.min(H * 4, T);
|
|
13438
13438
|
if (H) {
|
|
13439
13439
|
for (var N = 0; N < H; N += B)
|
|
@@ -13452,8 +13452,8 @@ function Se() {
|
|
|
13452
13452
|
* var clone = bufferedBlockAlgorithm.clone();
|
|
13453
13453
|
*/
|
|
13454
13454
|
clone: function() {
|
|
13455
|
-
var
|
|
13456
|
-
return
|
|
13455
|
+
var v = a.clone.call(this);
|
|
13456
|
+
return v._data = this._data.clone(), v;
|
|
13457
13457
|
},
|
|
13458
13458
|
_minBufferSize: 0
|
|
13459
13459
|
});
|
|
@@ -13471,8 +13471,8 @@ function Se() {
|
|
|
13471
13471
|
*
|
|
13472
13472
|
* var hasher = CryptoJS.algo.SHA256.create();
|
|
13473
13473
|
*/
|
|
13474
|
-
init: function(
|
|
13475
|
-
this.cfg = this.cfg.extend(
|
|
13474
|
+
init: function(v) {
|
|
13475
|
+
this.cfg = this.cfg.extend(v), this.reset();
|
|
13476
13476
|
},
|
|
13477
13477
|
/**
|
|
13478
13478
|
* Resets this hasher to its initial state.
|
|
@@ -13496,8 +13496,8 @@ function Se() {
|
|
|
13496
13496
|
* hasher.update('message');
|
|
13497
13497
|
* hasher.update(wordArray);
|
|
13498
13498
|
*/
|
|
13499
|
-
update: function(
|
|
13500
|
-
return this._append(
|
|
13499
|
+
update: function(v) {
|
|
13500
|
+
return this._append(v), this._process(), this;
|
|
13501
13501
|
},
|
|
13502
13502
|
/**
|
|
13503
13503
|
* Finalizes the hash computation.
|
|
@@ -13513,8 +13513,8 @@ function Se() {
|
|
|
13513
13513
|
* var hash = hasher.finalize('message');
|
|
13514
13514
|
* var hash = hasher.finalize(wordArray);
|
|
13515
13515
|
*/
|
|
13516
|
-
finalize: function(
|
|
13517
|
-
|
|
13516
|
+
finalize: function(v) {
|
|
13517
|
+
v && this._append(v);
|
|
13518
13518
|
var p = this._doFinalize();
|
|
13519
13519
|
return p;
|
|
13520
13520
|
},
|
|
@@ -13532,9 +13532,9 @@ function Se() {
|
|
|
13532
13532
|
*
|
|
13533
13533
|
* var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256);
|
|
13534
13534
|
*/
|
|
13535
|
-
_createHelper: function(
|
|
13535
|
+
_createHelper: function(v) {
|
|
13536
13536
|
return function(p, _) {
|
|
13537
|
-
return new
|
|
13537
|
+
return new v.init(_).finalize(p);
|
|
13538
13538
|
};
|
|
13539
13539
|
},
|
|
13540
13540
|
/**
|
|
@@ -13550,13 +13550,13 @@ function Se() {
|
|
|
13550
13550
|
*
|
|
13551
13551
|
* var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256);
|
|
13552
13552
|
*/
|
|
13553
|
-
_createHmacHelper: function(
|
|
13553
|
+
_createHmacHelper: function(v) {
|
|
13554
13554
|
return function(p, _) {
|
|
13555
|
-
return new
|
|
13555
|
+
return new x.HMAC.init(v, _).finalize(p);
|
|
13556
13556
|
};
|
|
13557
13557
|
}
|
|
13558
13558
|
});
|
|
13559
|
-
var
|
|
13559
|
+
var x = y.algo = {};
|
|
13560
13560
|
return y;
|
|
13561
13561
|
}(Math);
|
|
13562
13562
|
return F;
|
|
@@ -13935,8 +13935,8 @@ function qt() {
|
|
|
13935
13935
|
var n = y.words, a = y.sigBytes, l = this._map;
|
|
13936
13936
|
y.clamp();
|
|
13937
13937
|
for (var u = [], c = 0; c < a; c += 3)
|
|
13938
|
-
for (var S = n[c >>> 2] >>> 24 - c % 4 * 8 & 255, R = n[c + 1 >>> 2] >>> 24 - (c + 1) % 4 * 8 & 255, g = n[c + 2 >>> 2] >>> 24 - (c + 2) % 4 * 8 & 255,
|
|
13939
|
-
u.push(l.charAt(
|
|
13938
|
+
for (var S = n[c >>> 2] >>> 24 - c % 4 * 8 & 255, R = n[c + 1 >>> 2] >>> 24 - (c + 1) % 4 * 8 & 255, g = n[c + 2 >>> 2] >>> 24 - (c + 2) % 4 * 8 & 255, x = S << 16 | R << 8 | g, v = 0; v < 4 && c + v * 0.75 < a; v++)
|
|
13939
|
+
u.push(l.charAt(x >>> 6 * (3 - v) & 63));
|
|
13940
13940
|
var p = l.charAt(64);
|
|
13941
13941
|
if (p)
|
|
13942
13942
|
for (; u.length % 4; )
|
|
@@ -14013,8 +14013,8 @@ function ru() {
|
|
|
14013
14013
|
var a = y.words, l = y.sigBytes, u = n ? this._safe_map : this._map;
|
|
14014
14014
|
y.clamp();
|
|
14015
14015
|
for (var c = [], S = 0; S < l; S += 3)
|
|
14016
|
-
for (var R = a[S >>> 2] >>> 24 - S % 4 * 8 & 255, g = a[S + 1 >>> 2] >>> 24 - (S + 1) % 4 * 8 & 255,
|
|
14017
|
-
c.push(u.charAt(
|
|
14016
|
+
for (var R = a[S >>> 2] >>> 24 - S % 4 * 8 & 255, g = a[S + 1 >>> 2] >>> 24 - (S + 1) % 4 * 8 & 255, x = a[S + 2 >>> 2] >>> 24 - (S + 2) % 4 * 8 & 255, v = R << 16 | g << 8 | x, p = 0; p < 4 && S + p * 0.75 < l; p++)
|
|
14017
|
+
c.push(u.charAt(v >>> 6 * (3 - p) & 63));
|
|
14018
14018
|
var _ = u.charAt(64);
|
|
14019
14019
|
if (_)
|
|
14020
14020
|
for (; c.length % 4; )
|
|
@@ -14088,18 +14088,18 @@ function Mt() {
|
|
|
14088
14088
|
]);
|
|
14089
14089
|
},
|
|
14090
14090
|
_doProcessBlock: function(R, g) {
|
|
14091
|
-
for (var
|
|
14092
|
-
var
|
|
14093
|
-
R[
|
|
14091
|
+
for (var x = 0; x < 16; x++) {
|
|
14092
|
+
var v = g + x, p = R[v];
|
|
14093
|
+
R[v] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360;
|
|
14094
14094
|
}
|
|
14095
14095
|
var _ = this._hash.words, d = R[g + 0], T = R[g + 1], B = R[g + 2], w = R[g + 3], U = R[g + 4], H = R[g + 5], q = R[g + 6], N = R[g + 7], W = R[g + 8], C = R[g + 9], D = R[g + 10], j = R[g + 11], z = R[g + 12], Y = R[g + 13], Q = R[g + 14], K = R[g + 15], f = _[0], A = _[1], V = _[2], $ = _[3];
|
|
14096
14096
|
f = l(f, A, V, $, d, 7, n[0]), $ = l($, f, A, V, T, 12, n[1]), V = l(V, $, f, A, B, 17, n[2]), A = l(A, V, $, f, w, 22, n[3]), f = l(f, A, V, $, U, 7, n[4]), $ = l($, f, A, V, H, 12, n[5]), V = l(V, $, f, A, q, 17, n[6]), A = l(A, V, $, f, N, 22, n[7]), f = l(f, A, V, $, W, 7, n[8]), $ = l($, f, A, V, C, 12, n[9]), V = l(V, $, f, A, D, 17, n[10]), A = l(A, V, $, f, j, 22, n[11]), f = l(f, A, V, $, z, 7, n[12]), $ = l($, f, A, V, Y, 12, n[13]), V = l(V, $, f, A, Q, 17, n[14]), A = l(A, V, $, f, K, 22, n[15]), f = u(f, A, V, $, T, 5, n[16]), $ = u($, f, A, V, q, 9, n[17]), V = u(V, $, f, A, j, 14, n[18]), A = u(A, V, $, f, d, 20, n[19]), f = u(f, A, V, $, H, 5, n[20]), $ = u($, f, A, V, D, 9, n[21]), V = u(V, $, f, A, K, 14, n[22]), A = u(A, V, $, f, U, 20, n[23]), f = u(f, A, V, $, C, 5, n[24]), $ = u($, f, A, V, Q, 9, n[25]), V = u(V, $, f, A, w, 14, n[26]), A = u(A, V, $, f, W, 20, n[27]), f = u(f, A, V, $, Y, 5, n[28]), $ = u($, f, A, V, B, 9, n[29]), V = u(V, $, f, A, N, 14, n[30]), A = u(A, V, $, f, z, 20, n[31]), f = c(f, A, V, $, H, 4, n[32]), $ = c($, f, A, V, W, 11, n[33]), V = c(V, $, f, A, j, 16, n[34]), A = c(A, V, $, f, Q, 23, n[35]), f = c(f, A, V, $, T, 4, n[36]), $ = c($, f, A, V, U, 11, n[37]), V = c(V, $, f, A, N, 16, n[38]), A = c(A, V, $, f, D, 23, n[39]), f = c(f, A, V, $, Y, 4, n[40]), $ = c($, f, A, V, d, 11, n[41]), V = c(V, $, f, A, w, 16, n[42]), A = c(A, V, $, f, q, 23, n[43]), f = c(f, A, V, $, C, 4, n[44]), $ = c($, f, A, V, z, 11, n[45]), V = c(V, $, f, A, K, 16, n[46]), A = c(A, V, $, f, B, 23, n[47]), f = S(f, A, V, $, d, 6, n[48]), $ = S($, f, A, V, N, 10, n[49]), V = S(V, $, f, A, Q, 15, n[50]), A = S(A, V, $, f, H, 21, n[51]), f = S(f, A, V, $, z, 6, n[52]), $ = S($, f, A, V, w, 10, n[53]), V = S(V, $, f, A, D, 15, n[54]), A = S(A, V, $, f, T, 21, n[55]), f = S(f, A, V, $, W, 6, n[56]), $ = S($, f, A, V, K, 10, n[57]), V = S(V, $, f, A, q, 15, n[58]), A = S(A, V, $, f, Y, 21, n[59]), f = S(f, A, V, $, U, 6, n[60]), $ = S($, f, A, V, j, 10, n[61]), V = S(V, $, f, A, B, 15, n[62]), A = S(A, V, $, f, C, 21, n[63]), _[0] = _[0] + f | 0, _[1] = _[1] + A | 0, _[2] = _[2] + V | 0, _[3] = _[3] + $ | 0;
|
|
14097
14097
|
},
|
|
14098
14098
|
_doFinalize: function() {
|
|
14099
|
-
var R = this._data, g = R.words,
|
|
14100
|
-
g[
|
|
14101
|
-
var p = i.floor(
|
|
14102
|
-
g[(
|
|
14099
|
+
var R = this._data, g = R.words, x = this._nDataBytes * 8, v = R.sigBytes * 8;
|
|
14100
|
+
g[v >>> 5] |= 128 << 24 - v % 32;
|
|
14101
|
+
var p = i.floor(x / 4294967296), _ = x;
|
|
14102
|
+
g[(v + 64 >>> 9 << 4) + 15] = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360, g[(v + 64 >>> 9 << 4) + 14] = (_ << 8 | _ >>> 24) & 16711935 | (_ << 24 | _ >>> 8) & 4278255360, R.sigBytes = (g.length + 1) * 4, this._process();
|
|
14103
14103
|
for (var d = this._hash, T = d.words, B = 0; B < 4; B++) {
|
|
14104
14104
|
var w = T[B];
|
|
14105
14105
|
T[B] = (w << 8 | w >>> 24) & 16711935 | (w << 24 | w >>> 8) & 4278255360;
|
|
@@ -14111,20 +14111,20 @@ function Mt() {
|
|
|
14111
14111
|
return R._hash = this._hash.clone(), R;
|
|
14112
14112
|
}
|
|
14113
14113
|
});
|
|
14114
|
-
function l(R, g,
|
|
14115
|
-
var T = R + (g &
|
|
14114
|
+
function l(R, g, x, v, p, _, d) {
|
|
14115
|
+
var T = R + (g & x | ~g & v) + p + d;
|
|
14116
14116
|
return (T << _ | T >>> 32 - _) + g;
|
|
14117
14117
|
}
|
|
14118
|
-
function u(R, g,
|
|
14119
|
-
var T = R + (g &
|
|
14118
|
+
function u(R, g, x, v, p, _, d) {
|
|
14119
|
+
var T = R + (g & v | x & ~v) + p + d;
|
|
14120
14120
|
return (T << _ | T >>> 32 - _) + g;
|
|
14121
14121
|
}
|
|
14122
|
-
function c(R, g,
|
|
14123
|
-
var T = R + (g ^
|
|
14122
|
+
function c(R, g, x, v, p, _, d) {
|
|
14123
|
+
var T = R + (g ^ x ^ v) + p + d;
|
|
14124
14124
|
return (T << _ | T >>> 32 - _) + g;
|
|
14125
14125
|
}
|
|
14126
|
-
function S(R, g,
|
|
14127
|
-
var T = R + (
|
|
14126
|
+
function S(R, g, x, v, p, _, d) {
|
|
14127
|
+
var T = R + (x ^ (g | ~v)) + p + d;
|
|
14128
14128
|
return (T << _ | T >>> 32 - _) + g;
|
|
14129
14129
|
}
|
|
14130
14130
|
P.MD5 = h._createHelper(a), P.HmacMD5 = h._createHmacHelper(a);
|
|
@@ -14150,17 +14150,17 @@ function mo() {
|
|
|
14150
14150
|
]);
|
|
14151
14151
|
},
|
|
14152
14152
|
_doProcessBlock: function(a, l) {
|
|
14153
|
-
for (var u = this._hash.words, c = u[0], S = u[1], R = u[2], g = u[3],
|
|
14154
|
-
if (
|
|
14155
|
-
y[
|
|
14153
|
+
for (var u = this._hash.words, c = u[0], S = u[1], R = u[2], g = u[3], x = u[4], v = 0; v < 80; v++) {
|
|
14154
|
+
if (v < 16)
|
|
14155
|
+
y[v] = a[l + v] | 0;
|
|
14156
14156
|
else {
|
|
14157
|
-
var p = y[
|
|
14158
|
-
y[
|
|
14157
|
+
var p = y[v - 3] ^ y[v - 8] ^ y[v - 14] ^ y[v - 16];
|
|
14158
|
+
y[v] = p << 1 | p >>> 31;
|
|
14159
14159
|
}
|
|
14160
|
-
var _ = (c << 5 | c >>> 27) +
|
|
14161
|
-
|
|
14160
|
+
var _ = (c << 5 | c >>> 27) + x + y[v];
|
|
14161
|
+
v < 20 ? _ += (S & R | ~S & g) + 1518500249 : v < 40 ? _ += (S ^ R ^ g) + 1859775393 : v < 60 ? _ += (S & R | S & g | R & g) - 1894007588 : _ += (S ^ R ^ g) - 899497514, x = g, g = R, R = S << 30 | S >>> 2, S = c, c = _;
|
|
14162
14162
|
}
|
|
14163
|
-
u[0] = u[0] + c | 0, u[1] = u[1] + S | 0, u[2] = u[2] + R | 0, u[3] = u[3] + g | 0, u[4] = u[4] +
|
|
14163
|
+
u[0] = u[0] + c | 0, u[1] = u[1] + S | 0, u[2] = u[2] + R | 0, u[3] = u[3] + g | 0, u[4] = u[4] + x | 0;
|
|
14164
14164
|
},
|
|
14165
14165
|
_doFinalize: function() {
|
|
14166
14166
|
var a = this._data, l = a.words, u = this._nDataBytes * 8, c = a.sigBytes * 8;
|
|
@@ -14185,14 +14185,14 @@ function js() {
|
|
|
14185
14185
|
return function(i) {
|
|
14186
14186
|
var P = F, E = P.lib, t = E.WordArray, h = E.Hasher, y = P.algo, n = [], a = [];
|
|
14187
14187
|
(function() {
|
|
14188
|
-
function c(
|
|
14189
|
-
for (var
|
|
14190
|
-
if (!(
|
|
14188
|
+
function c(x) {
|
|
14189
|
+
for (var v = i.sqrt(x), p = 2; p <= v; p++)
|
|
14190
|
+
if (!(x % p))
|
|
14191
14191
|
return !1;
|
|
14192
14192
|
return !0;
|
|
14193
14193
|
}
|
|
14194
|
-
function S(
|
|
14195
|
-
return (
|
|
14194
|
+
function S(x) {
|
|
14195
|
+
return (x - (x | 0)) * 4294967296 | 0;
|
|
14196
14196
|
}
|
|
14197
14197
|
for (var R = 2, g = 0; g < 64; )
|
|
14198
14198
|
c(R) && (g < 8 && (n[g] = S(i.pow(R, 1 / 2))), a[g] = S(i.pow(R, 1 / 3)), g++), R++;
|
|
@@ -14202,17 +14202,17 @@ function js() {
|
|
|
14202
14202
|
this._hash = new t.init(n.slice(0));
|
|
14203
14203
|
},
|
|
14204
14204
|
_doProcessBlock: function(c, S) {
|
|
14205
|
-
for (var R = this._hash.words, g = R[0],
|
|
14205
|
+
for (var R = this._hash.words, g = R[0], x = R[1], v = R[2], p = R[3], _ = R[4], d = R[5], T = R[6], B = R[7], w = 0; w < 64; w++) {
|
|
14206
14206
|
if (w < 16)
|
|
14207
14207
|
l[w] = c[S + w] | 0;
|
|
14208
14208
|
else {
|
|
14209
14209
|
var U = l[w - 15], H = (U << 25 | U >>> 7) ^ (U << 14 | U >>> 18) ^ U >>> 3, q = l[w - 2], N = (q << 15 | q >>> 17) ^ (q << 13 | q >>> 19) ^ q >>> 10;
|
|
14210
14210
|
l[w] = H + l[w - 7] + N + l[w - 16];
|
|
14211
14211
|
}
|
|
14212
|
-
var W = _ & d ^ ~_ & T, C = g &
|
|
14213
|
-
B = T, T = d, d = _, _ = p + z | 0, p =
|
|
14212
|
+
var W = _ & d ^ ~_ & T, C = g & x ^ g & v ^ x & v, D = (g << 30 | g >>> 2) ^ (g << 19 | g >>> 13) ^ (g << 10 | g >>> 22), j = (_ << 26 | _ >>> 6) ^ (_ << 21 | _ >>> 11) ^ (_ << 7 | _ >>> 25), z = B + j + W + a[w] + l[w], Y = D + C;
|
|
14213
|
+
B = T, T = d, d = _, _ = p + z | 0, p = v, v = x, x = g, g = z + Y | 0;
|
|
14214
14214
|
}
|
|
14215
|
-
R[0] = R[0] + g | 0, R[1] = R[1] +
|
|
14215
|
+
R[0] = R[0] + g | 0, R[1] = R[1] + x | 0, R[2] = R[2] + v | 0, R[3] = R[3] + p | 0, R[4] = R[4] + _ | 0, R[5] = R[5] + d | 0, R[6] = R[6] + T | 0, R[7] = R[7] + B | 0;
|
|
14216
14216
|
},
|
|
14217
14217
|
_doFinalize: function() {
|
|
14218
14218
|
var c = this._data, S = c.words, R = this._nDataBytes * 8, g = c.sigBytes * 8;
|
|
@@ -14369,7 +14369,7 @@ function yo() {
|
|
|
14369
14369
|
]);
|
|
14370
14370
|
},
|
|
14371
14371
|
_doProcessBlock: function(S, R) {
|
|
14372
|
-
for (var g = this._hash.words,
|
|
14372
|
+
for (var g = this._hash.words, x = g[0], v = g[1], p = g[2], _ = g[3], d = g[4], T = g[5], B = g[6], w = g[7], U = x.high, H = x.low, q = v.high, N = v.low, W = p.high, C = p.low, D = _.high, j = _.low, z = d.high, Y = d.low, Q = T.high, K = T.low, f = B.high, A = B.low, V = w.high, $ = w.low, ee = U, J = H, ne = q, te = N, ae = W, fe = C, ue = D, me = j, ye = z, Ae = Y, ve = Q, _e = K, pe = f, Ee = A, be = V, De = $, Ce = 0; Ce < 80; Ce++) {
|
|
14373
14373
|
var Oe, Ie, Je = u[Ce];
|
|
14374
14374
|
if (Ce < 16)
|
|
14375
14375
|
Ie = Je.high = S[R + Ce * 2] | 0, Oe = Je.low = S[R + Ce * 2 + 1] | 0;
|
|
@@ -14380,13 +14380,13 @@ function yo() {
|
|
|
14380
14380
|
var Wt = ye & ve ^ ~ye & pe, Dt = Ae & _e ^ ~Ae & Ee, jt = ee & ne ^ ee & ae ^ ne & ae, Gt = J & te ^ J & fe ^ te & fe, Vt = (ee >>> 28 | J << 4) ^ (ee << 30 | J >>> 2) ^ (ee << 25 | J >>> 7), It = (J >>> 28 | ee << 4) ^ (J << 30 | ee >>> 2) ^ (J << 25 | ee >>> 7), $t = (ye >>> 14 | Ae << 18) ^ (ye >>> 18 | Ae << 14) ^ (ye << 23 | Ae >>> 9), Kt = (Ae >>> 14 | ye << 18) ^ (Ae >>> 18 | ye << 14) ^ (Ae << 23 | ye >>> 9), Ft = l[Ce], dt = Ft.high, Bt = Ft.low, qe = De + Kt, $e = be + $t + (qe >>> 0 < De >>> 0 ? 1 : 0), qe = qe + Dt, $e = $e + Wt + (qe >>> 0 < Dt >>> 0 ? 1 : 0), qe = qe + Bt, $e = $e + dt + (qe >>> 0 < Bt >>> 0 ? 1 : 0), qe = qe + Oe, $e = $e + Ie + (qe >>> 0 < Oe >>> 0 ? 1 : 0), Ot = It + Gt, Yt = Vt + jt + (Ot >>> 0 < It >>> 0 ? 1 : 0);
|
|
14381
14381
|
be = pe, De = Ee, pe = ve, Ee = _e, ve = ye, _e = Ae, Ae = me + qe | 0, ye = ue + $e + (Ae >>> 0 < me >>> 0 ? 1 : 0) | 0, ue = ae, me = fe, ae = ne, fe = te, ne = ee, te = J, J = qe + Ot | 0, ee = $e + Yt + (J >>> 0 < qe >>> 0 ? 1 : 0) | 0;
|
|
14382
14382
|
}
|
|
14383
|
-
H =
|
|
14383
|
+
H = x.low = H + J, x.high = U + ee + (H >>> 0 < J >>> 0 ? 1 : 0), N = v.low = N + te, v.high = q + ne + (N >>> 0 < te >>> 0 ? 1 : 0), C = p.low = C + fe, p.high = W + ae + (C >>> 0 < fe >>> 0 ? 1 : 0), j = _.low = j + me, _.high = D + ue + (j >>> 0 < me >>> 0 ? 1 : 0), Y = d.low = Y + Ae, d.high = z + ye + (Y >>> 0 < Ae >>> 0 ? 1 : 0), K = T.low = K + _e, T.high = Q + ve + (K >>> 0 < _e >>> 0 ? 1 : 0), A = B.low = A + Ee, B.high = f + pe + (A >>> 0 < Ee >>> 0 ? 1 : 0), $ = w.low = $ + De, w.high = V + be + ($ >>> 0 < De >>> 0 ? 1 : 0);
|
|
14384
14384
|
},
|
|
14385
14385
|
_doFinalize: function() {
|
|
14386
|
-
var S = this._data, R = S.words, g = this._nDataBytes * 8,
|
|
14387
|
-
R[
|
|
14388
|
-
var
|
|
14389
|
-
return
|
|
14386
|
+
var S = this._data, R = S.words, g = this._nDataBytes * 8, x = S.sigBytes * 8;
|
|
14387
|
+
R[x >>> 5] |= 128 << 24 - x % 32, R[(x + 128 >>> 10 << 5) + 30] = Math.floor(g / 4294967296), R[(x + 128 >>> 10 << 5) + 31] = g, S.sigBytes = R.length * 4, this._process();
|
|
14388
|
+
var v = this._hash.toX32();
|
|
14389
|
+
return v;
|
|
14390
14390
|
},
|
|
14391
14391
|
clone: function() {
|
|
14392
14392
|
var S = E.clone.call(this);
|
|
@@ -14438,14 +14438,14 @@ function hu() {
|
|
|
14438
14438
|
return function(i) {
|
|
14439
14439
|
var P = F, E = P.lib, t = E.WordArray, h = E.Hasher, y = P.x64, n = y.Word, a = P.algo, l = [], u = [], c = [];
|
|
14440
14440
|
(function() {
|
|
14441
|
-
for (var g = 1,
|
|
14442
|
-
l[g + 5 *
|
|
14443
|
-
var p =
|
|
14444
|
-
g = p,
|
|
14441
|
+
for (var g = 1, x = 0, v = 0; v < 24; v++) {
|
|
14442
|
+
l[g + 5 * x] = (v + 1) * (v + 2) / 2 % 64;
|
|
14443
|
+
var p = x % 5, _ = (2 * g + 3 * x) % 5;
|
|
14444
|
+
g = p, x = _;
|
|
14445
14445
|
}
|
|
14446
14446
|
for (var g = 0; g < 5; g++)
|
|
14447
|
-
for (var
|
|
14448
|
-
u[g + 5 *
|
|
14447
|
+
for (var x = 0; x < 5; x++)
|
|
14448
|
+
u[g + 5 * x] = x + (2 * g + 3 * x) % 5 * 5;
|
|
14449
14449
|
for (var d = 1, T = 0; T < 24; T++) {
|
|
14450
14450
|
for (var B = 0, w = 0, U = 0; U < 7; U++) {
|
|
14451
14451
|
if (d & 1) {
|
|
@@ -14475,21 +14475,21 @@ function hu() {
|
|
|
14475
14475
|
outputLength: 512
|
|
14476
14476
|
}),
|
|
14477
14477
|
_doReset: function() {
|
|
14478
|
-
for (var g = this._state = [],
|
|
14479
|
-
g[
|
|
14478
|
+
for (var g = this._state = [], x = 0; x < 25; x++)
|
|
14479
|
+
g[x] = new n.init();
|
|
14480
14480
|
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
14481
14481
|
},
|
|
14482
|
-
_doProcessBlock: function(g,
|
|
14483
|
-
for (var
|
|
14484
|
-
var d = g[
|
|
14482
|
+
_doProcessBlock: function(g, x) {
|
|
14483
|
+
for (var v = this._state, p = this.blockSize / 2, _ = 0; _ < p; _++) {
|
|
14484
|
+
var d = g[x + 2 * _], T = g[x + 2 * _ + 1];
|
|
14485
14485
|
d = (d << 8 | d >>> 24) & 16711935 | (d << 24 | d >>> 8) & 4278255360, T = (T << 8 | T >>> 24) & 16711935 | (T << 24 | T >>> 8) & 4278255360;
|
|
14486
|
-
var B =
|
|
14486
|
+
var B = v[_];
|
|
14487
14487
|
B.high ^= T, B.low ^= d;
|
|
14488
14488
|
}
|
|
14489
14489
|
for (var w = 0; w < 24; w++) {
|
|
14490
14490
|
for (var U = 0; U < 5; U++) {
|
|
14491
14491
|
for (var H = 0, q = 0, N = 0; N < 5; N++) {
|
|
14492
|
-
var B =
|
|
14492
|
+
var B = v[U + 5 * N];
|
|
14493
14493
|
H ^= B.high, q ^= B.low;
|
|
14494
14494
|
}
|
|
14495
14495
|
var W = S[U];
|
|
@@ -14497,31 +14497,31 @@ function hu() {
|
|
|
14497
14497
|
}
|
|
14498
14498
|
for (var U = 0; U < 5; U++)
|
|
14499
14499
|
for (var C = S[(U + 4) % 5], D = S[(U + 1) % 5], j = D.high, z = D.low, H = C.high ^ (j << 1 | z >>> 31), q = C.low ^ (z << 1 | j >>> 31), N = 0; N < 5; N++) {
|
|
14500
|
-
var B =
|
|
14500
|
+
var B = v[U + 5 * N];
|
|
14501
14501
|
B.high ^= H, B.low ^= q;
|
|
14502
14502
|
}
|
|
14503
14503
|
for (var Y = 1; Y < 25; Y++) {
|
|
14504
|
-
var H, q, B =
|
|
14504
|
+
var H, q, B = v[Y], Q = B.high, K = B.low, f = l[Y];
|
|
14505
14505
|
f < 32 ? (H = Q << f | K >>> 32 - f, q = K << f | Q >>> 32 - f) : (H = K << f - 32 | Q >>> 64 - f, q = Q << f - 32 | K >>> 64 - f);
|
|
14506
14506
|
var A = S[u[Y]];
|
|
14507
14507
|
A.high = H, A.low = q;
|
|
14508
14508
|
}
|
|
14509
|
-
var V = S[0], $ =
|
|
14509
|
+
var V = S[0], $ = v[0];
|
|
14510
14510
|
V.high = $.high, V.low = $.low;
|
|
14511
14511
|
for (var U = 0; U < 5; U++)
|
|
14512
14512
|
for (var N = 0; N < 5; N++) {
|
|
14513
|
-
var Y = U + 5 * N, B =
|
|
14513
|
+
var Y = U + 5 * N, B = v[Y], ee = S[Y], J = S[(U + 1) % 5 + 5 * N], ne = S[(U + 2) % 5 + 5 * N];
|
|
14514
14514
|
B.high = ee.high ^ ~J.high & ne.high, B.low = ee.low ^ ~J.low & ne.low;
|
|
14515
14515
|
}
|
|
14516
|
-
var B =
|
|
14516
|
+
var B = v[0], te = c[w];
|
|
14517
14517
|
B.high ^= te.high, B.low ^= te.low;
|
|
14518
14518
|
}
|
|
14519
14519
|
},
|
|
14520
14520
|
_doFinalize: function() {
|
|
14521
|
-
var g = this._data,
|
|
14521
|
+
var g = this._data, x = g.words;
|
|
14522
14522
|
this._nDataBytes * 8;
|
|
14523
|
-
var
|
|
14524
|
-
v
|
|
14523
|
+
var v = g.sigBytes * 8, p = this.blockSize * 32;
|
|
14524
|
+
x[v >>> 5] |= 1 << 24 - v % 32, x[(i.ceil((v + 1) / p) * p >>> 5) - 1] |= 128, g.sigBytes = x.length * 4, this._process();
|
|
14525
14525
|
for (var _ = this._state, d = this.cfg.outputLength / 8, T = d / 8, B = [], w = 0; w < T; w++) {
|
|
14526
14526
|
var U = _[w], H = U.high, q = U.low;
|
|
14527
14527
|
H = (H << 8 | H >>> 24) & 16711935 | (H << 24 | H >>> 8) & 4278255360, q = (q << 8 | q >>> 24) & 16711935 | (q << 24 | q >>> 8) & 4278255360, B.push(q), B.push(H);
|
|
@@ -14529,8 +14529,8 @@ function hu() {
|
|
|
14529
14529
|
return new t.init(B, d);
|
|
14530
14530
|
},
|
|
14531
14531
|
clone: function() {
|
|
14532
|
-
for (var g = h.clone.call(this),
|
|
14533
|
-
v
|
|
14532
|
+
for (var g = h.clone.call(this), x = g._state = this._state.slice(0), v = 0; v < 25; v++)
|
|
14533
|
+
x[v] = x[v].clone();
|
|
14534
14534
|
return g;
|
|
14535
14535
|
}
|
|
14536
14536
|
});
|
|
@@ -14892,7 +14892,7 @@ function _u() {
|
|
|
14892
14892
|
var q = this._hash.words, N = c.words, W = S.words, C = n.words, D = a.words, j = l.words, z = u.words, Y, Q, K, f, A, V, $, ee, J, ne;
|
|
14893
14893
|
V = Y = q[0], $ = Q = q[1], ee = K = q[2], J = f = q[3], ne = A = q[4];
|
|
14894
14894
|
for (var te, w = 0; w < 80; w += 1)
|
|
14895
|
-
te = Y + T[B + C[w]] | 0, w < 16 ? te += g(Q, K, f) + N[0] : w < 32 ? te +=
|
|
14895
|
+
te = Y + T[B + C[w]] | 0, w < 16 ? te += g(Q, K, f) + N[0] : w < 32 ? te += x(Q, K, f) + N[1] : w < 48 ? te += v(Q, K, f) + N[2] : w < 64 ? te += p(Q, K, f) + N[3] : te += _(Q, K, f) + N[4], te = te | 0, te = d(te, j[w]), te = te + A | 0, Y = A, A = f, f = d(K, 10), K = Q, Q = te, te = V + T[B + D[w]] | 0, w < 16 ? te += _($, ee, J) + W[0] : w < 32 ? te += p($, ee, J) + W[1] : w < 48 ? te += v($, ee, J) + W[2] : w < 64 ? te += x($, ee, J) + W[3] : te += g($, ee, J) + W[4], te = te | 0, te = d(te, z[w]), te = te + ne | 0, V = ne, ne = J, J = d(ee, 10), ee = $, $ = te;
|
|
14896
14896
|
te = q[1] + K + J | 0, q[1] = q[2] + f + ne | 0, q[2] = q[3] + A + V | 0, q[3] = q[4] + Y + $ | 0, q[4] = q[0] + Q + ee | 0, q[0] = te;
|
|
14897
14897
|
},
|
|
14898
14898
|
_doFinalize: function() {
|
|
@@ -14912,10 +14912,10 @@ function _u() {
|
|
|
14912
14912
|
function g(T, B, w) {
|
|
14913
14913
|
return T ^ B ^ w;
|
|
14914
14914
|
}
|
|
14915
|
-
function
|
|
14915
|
+
function x(T, B, w) {
|
|
14916
14916
|
return T & B | ~T & w;
|
|
14917
14917
|
}
|
|
14918
|
-
function
|
|
14918
|
+
function v(T, B, w) {
|
|
14919
14919
|
return (T | ~B) ^ w;
|
|
14920
14920
|
}
|
|
14921
14921
|
function p(T, B, w) {
|
|
@@ -14955,8 +14955,8 @@ function Gs() {
|
|
|
14955
14955
|
n = this._hasher = new n.init(), typeof a == "string" && (a = h.parse(a));
|
|
14956
14956
|
var l = n.blockSize, u = l * 4;
|
|
14957
14957
|
a.sigBytes > u && (a = n.finalize(a)), a.clamp();
|
|
14958
|
-
for (var c = this._oKey = a.clone(), S = this._iKey = a.clone(), R = c.words, g = S.words,
|
|
14959
|
-
R[
|
|
14958
|
+
for (var c = this._oKey = a.clone(), S = this._iKey = a.clone(), R = c.words, g = S.words, x = 0; x < l; x++)
|
|
14959
|
+
R[x] ^= 1549556828, g[x] ^= 909522486;
|
|
14960
14960
|
c.sigBytes = S.sigBytes = u, this.reset();
|
|
14961
14961
|
},
|
|
14962
14962
|
/**
|
|
@@ -15057,7 +15057,7 @@ function pu() {
|
|
|
15057
15057
|
* var key = kdf.compute(password, salt);
|
|
15058
15058
|
*/
|
|
15059
15059
|
compute: function(l, u) {
|
|
15060
|
-
for (var c = this.cfg, S = n.create(c.hasher, l), R = t.create(), g = t.create([1]),
|
|
15060
|
+
for (var c = this.cfg, S = n.create(c.hasher, l), R = t.create(), g = t.create([1]), x = R.words, v = g.words, p = c.keySize, _ = c.iterations; x.length < p; ) {
|
|
15061
15061
|
var d = S.update(u).finalize(g);
|
|
15062
15062
|
S.reset();
|
|
15063
15063
|
for (var T = d.words, B = T.length, w = d, U = 1; U < _; U++) {
|
|
@@ -15065,7 +15065,7 @@ function pu() {
|
|
|
15065
15065
|
for (var H = w.words, q = 0; q < B; q++)
|
|
15066
15066
|
T[q] ^= H[q];
|
|
15067
15067
|
}
|
|
15068
|
-
R.concat(d),
|
|
15068
|
+
R.concat(d), v[0]++;
|
|
15069
15069
|
}
|
|
15070
15070
|
return R.sigBytes = p * 4, R;
|
|
15071
15071
|
}
|
|
@@ -15124,13 +15124,13 @@ function Rt() {
|
|
|
15124
15124
|
* var key = kdf.compute(password, salt);
|
|
15125
15125
|
*/
|
|
15126
15126
|
compute: function(a, l) {
|
|
15127
|
-
for (var u, c = this.cfg, S = c.hasher.create(), R = t.create(), g = R.words,
|
|
15127
|
+
for (var u, c = this.cfg, S = c.hasher.create(), R = t.create(), g = R.words, x = c.keySize, v = c.iterations; g.length < x; ) {
|
|
15128
15128
|
u && S.update(u), u = S.update(a).finalize(l), S.reset();
|
|
15129
|
-
for (var p = 1; p <
|
|
15129
|
+
for (var p = 1; p < v; p++)
|
|
15130
15130
|
u = S.finalize(u), S.reset();
|
|
15131
15131
|
R.concat(u);
|
|
15132
15132
|
}
|
|
15133
|
-
return R.sigBytes =
|
|
15133
|
+
return R.sigBytes = x * 4, R;
|
|
15134
15134
|
}
|
|
15135
15135
|
});
|
|
15136
15136
|
i.EvpKDF = function(a, l, u) {
|
|
@@ -15372,7 +15372,7 @@ function We() {
|
|
|
15372
15372
|
N[W + z] ^= D[z];
|
|
15373
15373
|
}
|
|
15374
15374
|
return H;
|
|
15375
|
-
}(),
|
|
15375
|
+
}(), x = P.pad = {}, v = x.Pkcs7 = {
|
|
15376
15376
|
/**
|
|
15377
15377
|
* Pads data using the algorithm defined in PKCS #5/7.
|
|
15378
15378
|
*
|
|
@@ -15416,7 +15416,7 @@ function We() {
|
|
|
15416
15416
|
*/
|
|
15417
15417
|
cfg: c.cfg.extend({
|
|
15418
15418
|
mode: g,
|
|
15419
|
-
padding:
|
|
15419
|
+
padding: v
|
|
15420
15420
|
}),
|
|
15421
15421
|
reset: function() {
|
|
15422
15422
|
var H;
|
|
@@ -15969,12 +15969,12 @@ function Wu() {
|
|
|
15969
15969
|
c[B] = q << 24 | q >>> 8, S[B] = q << 16 | q >>> 16, R[B] = q << 8 | q >>> 24, g[B] = q, d ? (d = w ^ p[p[p[H ^ w]]], T ^= p[p[T]]) : d = T = 1;
|
|
15970
15970
|
}
|
|
15971
15971
|
})();
|
|
15972
|
-
var
|
|
15972
|
+
var x = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], v = t.AES = E.extend({
|
|
15973
15973
|
_doReset: function() {
|
|
15974
15974
|
var p;
|
|
15975
15975
|
if (!(this._nRounds && this._keyPriorReset === this._key)) {
|
|
15976
15976
|
for (var _ = this._keyPriorReset = this._key, d = _.words, T = _.sigBytes / 4, B = this._nRounds = T + 6, w = (B + 1) * 4, U = this._keySchedule = [], H = 0; H < w; H++)
|
|
15977
|
-
H < T ? U[H] = d[H] : (p = U[H - 1], H % T ? T > 6 && H % T == 4 && (p = h[p >>> 24] << 24 | h[p >>> 16 & 255] << 16 | h[p >>> 8 & 255] << 8 | h[p & 255]) : (p = p << 8 | p >>> 24, p = h[p >>> 24] << 24 | h[p >>> 16 & 255] << 16 | h[p >>> 8 & 255] << 8 | h[p & 255], p ^=
|
|
15977
|
+
H < T ? U[H] = d[H] : (p = U[H - 1], H % T ? T > 6 && H % T == 4 && (p = h[p >>> 24] << 24 | h[p >>> 16 & 255] << 16 | h[p >>> 8 & 255] << 8 | h[p & 255]) : (p = p << 8 | p >>> 24, p = h[p >>> 24] << 24 | h[p >>> 16 & 255] << 16 | h[p >>> 8 & 255] << 8 | h[p & 255], p ^= x[H / T | 0] << 24), U[H] = U[H - T] ^ p);
|
|
15978
15978
|
for (var q = this._invKeySchedule = [], N = 0; N < w; N++) {
|
|
15979
15979
|
var H = w - N;
|
|
15980
15980
|
if (N % 4)
|
|
@@ -16004,7 +16004,7 @@ function Wu() {
|
|
|
16004
16004
|
},
|
|
16005
16005
|
keySize: 256 / 32
|
|
16006
16006
|
});
|
|
16007
|
-
i.AES = E._createHelper(
|
|
16007
|
+
i.AES = E._createHelper(v);
|
|
16008
16008
|
}(), F.AES;
|
|
16009
16009
|
});
|
|
16010
16010
|
}(yn)), yn.exports;
|
|
@@ -16662,9 +16662,9 @@ function Gu() {
|
|
|
16662
16662
|
2147483679
|
|
16663
16663
|
], c = h.DES = t.extend({
|
|
16664
16664
|
_doReset: function() {
|
|
16665
|
-
for (var
|
|
16665
|
+
for (var x = this._key, v = x.words, p = [], _ = 0; _ < 56; _++) {
|
|
16666
16666
|
var d = y[_] - 1;
|
|
16667
|
-
p[_] =
|
|
16667
|
+
p[_] = v[d >>> 5] >>> 31 - d % 32 & 1;
|
|
16668
16668
|
}
|
|
16669
16669
|
for (var T = this._subKeys = [], B = 0; B < 16; B++) {
|
|
16670
16670
|
for (var w = T[B] = [], U = a[B], _ = 0; _ < 24; _++)
|
|
@@ -16677,48 +16677,48 @@ function Gu() {
|
|
|
16677
16677
|
for (var H = this._invSubKeys = [], _ = 0; _ < 16; _++)
|
|
16678
16678
|
H[_] = T[15 - _];
|
|
16679
16679
|
},
|
|
16680
|
-
encryptBlock: function(
|
|
16681
|
-
this._doCryptBlock(
|
|
16680
|
+
encryptBlock: function(x, v) {
|
|
16681
|
+
this._doCryptBlock(x, v, this._subKeys);
|
|
16682
16682
|
},
|
|
16683
|
-
decryptBlock: function(
|
|
16684
|
-
this._doCryptBlock(
|
|
16683
|
+
decryptBlock: function(x, v) {
|
|
16684
|
+
this._doCryptBlock(x, v, this._invSubKeys);
|
|
16685
16685
|
},
|
|
16686
|
-
_doCryptBlock: function(
|
|
16687
|
-
this._lBlock = v
|
|
16686
|
+
_doCryptBlock: function(x, v, p) {
|
|
16687
|
+
this._lBlock = x[v], this._rBlock = x[v + 1], S.call(this, 4, 252645135), S.call(this, 16, 65535), R.call(this, 2, 858993459), R.call(this, 8, 16711935), S.call(this, 1, 1431655765);
|
|
16688
16688
|
for (var _ = 0; _ < 16; _++) {
|
|
16689
16689
|
for (var d = p[_], T = this._lBlock, B = this._rBlock, w = 0, U = 0; U < 8; U++)
|
|
16690
16690
|
w |= l[U][((B ^ d[U]) & u[U]) >>> 0];
|
|
16691
16691
|
this._lBlock = B, this._rBlock = T ^ w;
|
|
16692
16692
|
}
|
|
16693
16693
|
var H = this._lBlock;
|
|
16694
|
-
this._lBlock = this._rBlock, this._rBlock = H, S.call(this, 1, 1431655765), R.call(this, 8, 16711935), R.call(this, 2, 858993459), S.call(this, 16, 65535), S.call(this, 4, 252645135), v
|
|
16694
|
+
this._lBlock = this._rBlock, this._rBlock = H, S.call(this, 1, 1431655765), R.call(this, 8, 16711935), R.call(this, 2, 858993459), S.call(this, 16, 65535), S.call(this, 4, 252645135), x[v] = this._lBlock, x[v + 1] = this._rBlock;
|
|
16695
16695
|
},
|
|
16696
16696
|
keySize: 64 / 32,
|
|
16697
16697
|
ivSize: 64 / 32,
|
|
16698
16698
|
blockSize: 64 / 32
|
|
16699
16699
|
});
|
|
16700
|
-
function S(
|
|
16701
|
-
var p = (this._lBlock >>>
|
|
16702
|
-
this._rBlock ^= p, this._lBlock ^= p <<
|
|
16700
|
+
function S(x, v) {
|
|
16701
|
+
var p = (this._lBlock >>> x ^ this._rBlock) & v;
|
|
16702
|
+
this._rBlock ^= p, this._lBlock ^= p << x;
|
|
16703
16703
|
}
|
|
16704
|
-
function R(
|
|
16705
|
-
var p = (this._rBlock >>>
|
|
16706
|
-
this._lBlock ^= p, this._rBlock ^= p <<
|
|
16704
|
+
function R(x, v) {
|
|
16705
|
+
var p = (this._rBlock >>> x ^ this._lBlock) & v;
|
|
16706
|
+
this._lBlock ^= p, this._rBlock ^= p << x;
|
|
16707
16707
|
}
|
|
16708
16708
|
i.DES = t._createHelper(c);
|
|
16709
16709
|
var g = h.TripleDES = t.extend({
|
|
16710
16710
|
_doReset: function() {
|
|
16711
|
-
var
|
|
16712
|
-
if (
|
|
16711
|
+
var x = this._key, v = x.words;
|
|
16712
|
+
if (v.length !== 2 && v.length !== 4 && v.length < 6)
|
|
16713
16713
|
throw new Error("Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.");
|
|
16714
|
-
var p =
|
|
16714
|
+
var p = v.slice(0, 2), _ = v.length < 4 ? v.slice(0, 2) : v.slice(2, 4), d = v.length < 6 ? v.slice(0, 2) : v.slice(4, 6);
|
|
16715
16715
|
this._des1 = c.createEncryptor(E.create(p)), this._des2 = c.createEncryptor(E.create(_)), this._des3 = c.createEncryptor(E.create(d));
|
|
16716
16716
|
},
|
|
16717
|
-
encryptBlock: function(
|
|
16718
|
-
this._des1.encryptBlock(
|
|
16717
|
+
encryptBlock: function(x, v) {
|
|
16718
|
+
this._des1.encryptBlock(x, v), this._des2.decryptBlock(x, v), this._des3.encryptBlock(x, v);
|
|
16719
16719
|
},
|
|
16720
|
-
decryptBlock: function(
|
|
16721
|
-
this._des3.decryptBlock(
|
|
16720
|
+
decryptBlock: function(x, v) {
|
|
16721
|
+
this._des3.decryptBlock(x, v), this._des2.encryptBlock(x, v), this._des1.decryptBlock(x, v);
|
|
16722
16722
|
},
|
|
16723
16723
|
keySize: 192 / 32,
|
|
16724
16724
|
ivSize: 64 / 32,
|
|
@@ -16741,10 +16741,10 @@ function $u() {
|
|
|
16741
16741
|
for (var a = this._key, l = a.words, u = a.sigBytes, c = this._S = [], S = 0; S < 256; S++)
|
|
16742
16742
|
c[S] = S;
|
|
16743
16743
|
for (var S = 0, R = 0; S < 256; S++) {
|
|
16744
|
-
var g = S % u,
|
|
16745
|
-
R = (R + c[S] +
|
|
16746
|
-
var
|
|
16747
|
-
c[S] = c[R], c[R] =
|
|
16744
|
+
var g = S % u, x = l[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
16745
|
+
R = (R + c[S] + x) % 256;
|
|
16746
|
+
var v = c[S];
|
|
16747
|
+
c[S] = c[R], c[R] = v;
|
|
16748
16748
|
}
|
|
16749
16749
|
this._i = this._j = 0;
|
|
16750
16750
|
},
|
|
@@ -16819,7 +16819,7 @@ function Yu() {
|
|
|
16819
16819
|
for (var S = 0; S < 8; S++)
|
|
16820
16820
|
g[S] ^= R[S + 4 & 7];
|
|
16821
16821
|
if (c) {
|
|
16822
|
-
var
|
|
16822
|
+
var x = c.words, v = x[0], p = x[1], _ = (v << 8 | v >>> 24) & 16711935 | (v << 24 | v >>> 8) & 4278255360, d = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360, T = _ >>> 16 | d & 4294901760, B = d << 16 | _ & 65535;
|
|
16823
16823
|
g[0] ^= _, g[1] ^= T, g[2] ^= d, g[3] ^= B, g[4] ^= _, g[5] ^= T, g[6] ^= d, g[7] ^= B;
|
|
16824
16824
|
for (var S = 0; S < 4; S++)
|
|
16825
16825
|
l.call(this);
|
|
@@ -16839,8 +16839,8 @@ function Yu() {
|
|
|
16839
16839
|
y[S] = c[S];
|
|
16840
16840
|
c[0] = c[0] + 1295307597 + this._b | 0, c[1] = c[1] + 3545052371 + (c[0] >>> 0 < y[0] >>> 0 ? 1 : 0) | 0, c[2] = c[2] + 886263092 + (c[1] >>> 0 < y[1] >>> 0 ? 1 : 0) | 0, c[3] = c[3] + 1295307597 + (c[2] >>> 0 < y[2] >>> 0 ? 1 : 0) | 0, c[4] = c[4] + 3545052371 + (c[3] >>> 0 < y[3] >>> 0 ? 1 : 0) | 0, c[5] = c[5] + 886263092 + (c[4] >>> 0 < y[4] >>> 0 ? 1 : 0) | 0, c[6] = c[6] + 1295307597 + (c[5] >>> 0 < y[5] >>> 0 ? 1 : 0) | 0, c[7] = c[7] + 3545052371 + (c[6] >>> 0 < y[6] >>> 0 ? 1 : 0) | 0, this._b = c[7] >>> 0 < y[7] >>> 0 ? 1 : 0;
|
|
16841
16841
|
for (var S = 0; S < 8; S++) {
|
|
16842
|
-
var R = u[S] + c[S], g = R & 65535,
|
|
16843
|
-
n[S] =
|
|
16842
|
+
var R = u[S] + c[S], g = R & 65535, x = R >>> 16, v = ((g * g >>> 17) + g * x >>> 15) + x * x, p = ((R & 4294901760) * R | 0) + ((R & 65535) * R | 0);
|
|
16843
|
+
n[S] = v ^ p;
|
|
16844
16844
|
}
|
|
16845
16845
|
u[0] = n[0] + (n[7] << 16 | n[7] >>> 16) + (n[6] << 16 | n[6] >>> 16) | 0, u[1] = n[1] + (n[0] << 8 | n[0] >>> 24) + n[7] | 0, u[2] = n[2] + (n[1] << 16 | n[1] >>> 16) + (n[0] << 16 | n[0] >>> 16) | 0, u[3] = n[3] + (n[2] << 8 | n[2] >>> 24) + n[1] | 0, u[4] = n[4] + (n[3] << 16 | n[3] >>> 16) + (n[2] << 16 | n[2] >>> 16) | 0, u[5] = n[5] + (n[4] << 8 | n[4] >>> 24) + n[3] | 0, u[6] = n[6] + (n[5] << 16 | n[5] >>> 16) + (n[4] << 16 | n[4] >>> 16) | 0, u[7] = n[7] + (n[6] << 8 | n[6] >>> 24) + n[5] | 0;
|
|
16846
16846
|
}
|
|
@@ -16883,7 +16883,7 @@ function Qu() {
|
|
|
16883
16883
|
for (var g = 0; g < 8; g++)
|
|
16884
16884
|
R[g] ^= S[g + 4 & 7];
|
|
16885
16885
|
if (c) {
|
|
16886
|
-
var
|
|
16886
|
+
var x = c.words, v = x[0], p = x[1], _ = (v << 8 | v >>> 24) & 16711935 | (v << 24 | v >>> 8) & 4278255360, d = (p << 8 | p >>> 24) & 16711935 | (p << 24 | p >>> 8) & 4278255360, T = _ >>> 16 | d & 4294901760, B = d << 16 | _ & 65535;
|
|
16887
16887
|
R[0] ^= _, R[1] ^= T, R[2] ^= d, R[3] ^= B, R[4] ^= _, R[5] ^= T, R[6] ^= d, R[7] ^= B;
|
|
16888
16888
|
for (var g = 0; g < 4; g++)
|
|
16889
16889
|
l.call(this);
|
|
@@ -16903,8 +16903,8 @@ function Qu() {
|
|
|
16903
16903
|
y[S] = c[S];
|
|
16904
16904
|
c[0] = c[0] + 1295307597 + this._b | 0, c[1] = c[1] + 3545052371 + (c[0] >>> 0 < y[0] >>> 0 ? 1 : 0) | 0, c[2] = c[2] + 886263092 + (c[1] >>> 0 < y[1] >>> 0 ? 1 : 0) | 0, c[3] = c[3] + 1295307597 + (c[2] >>> 0 < y[2] >>> 0 ? 1 : 0) | 0, c[4] = c[4] + 3545052371 + (c[3] >>> 0 < y[3] >>> 0 ? 1 : 0) | 0, c[5] = c[5] + 886263092 + (c[4] >>> 0 < y[4] >>> 0 ? 1 : 0) | 0, c[6] = c[6] + 1295307597 + (c[5] >>> 0 < y[5] >>> 0 ? 1 : 0) | 0, c[7] = c[7] + 3545052371 + (c[6] >>> 0 < y[6] >>> 0 ? 1 : 0) | 0, this._b = c[7] >>> 0 < y[7] >>> 0 ? 1 : 0;
|
|
16905
16905
|
for (var S = 0; S < 8; S++) {
|
|
16906
|
-
var R = u[S] + c[S], g = R & 65535,
|
|
16907
|
-
n[S] =
|
|
16906
|
+
var R = u[S] + c[S], g = R & 65535, x = R >>> 16, v = ((g * g >>> 17) + g * x >>> 15) + x * x, p = ((R & 4294901760) * R | 0) + ((R & 65535) * R | 0);
|
|
16907
|
+
n[S] = v ^ p;
|
|
16908
16908
|
}
|
|
16909
16909
|
u[0] = n[0] + (n[7] << 16 | n[7] >>> 16) + (n[6] << 16 | n[6] >>> 16) | 0, u[1] = n[1] + (n[0] << 8 | n[0] >>> 24) + n[7] | 0, u[2] = n[2] + (n[1] << 16 | n[1] >>> 16) + (n[0] << 16 | n[0] >>> 16) | 0, u[3] = n[3] + (n[2] << 8 | n[2] >>> 24) + n[1] | 0, u[4] = n[4] + (n[3] << 16 | n[3] >>> 16) + (n[2] << 16 | n[2] >>> 16) | 0, u[5] = n[5] + (n[4] << 8 | n[4] >>> 24) + n[3] | 0, u[6] = n[6] + (n[5] << 16 | n[5] >>> 16) + (n[4] << 16 | n[4] >>> 16) | 0, u[7] = n[7] + (n[6] << 8 | n[6] >>> 24) + n[5] | 0;
|
|
16910
16910
|
}
|
|
@@ -17978,23 +17978,23 @@ function Ju() {
|
|
|
17978
17978
|
pbox: [],
|
|
17979
17979
|
sbox: []
|
|
17980
17980
|
};
|
|
17981
|
-
function l(g,
|
|
17982
|
-
let
|
|
17981
|
+
function l(g, x) {
|
|
17982
|
+
let v = x >> 24 & 255, p = x >> 16 & 255, _ = x >> 8 & 255, d = x & 255, T = g.sbox[0][v] + g.sbox[1][p];
|
|
17983
17983
|
return T = T ^ g.sbox[2][_], T = T + g.sbox[3][d], T;
|
|
17984
17984
|
}
|
|
17985
|
-
function u(g,
|
|
17986
|
-
let p =
|
|
17985
|
+
function u(g, x, v) {
|
|
17986
|
+
let p = x, _ = v, d;
|
|
17987
17987
|
for (let T = 0; T < h; ++T)
|
|
17988
17988
|
p = p ^ g.pbox[T], _ = l(g, p) ^ _, d = p, p = _, _ = d;
|
|
17989
17989
|
return d = p, p = _, _ = d, _ = _ ^ g.pbox[h], p = p ^ g.pbox[h + 1], { left: p, right: _ };
|
|
17990
17990
|
}
|
|
17991
|
-
function c(g,
|
|
17992
|
-
let p =
|
|
17991
|
+
function c(g, x, v) {
|
|
17992
|
+
let p = x, _ = v, d;
|
|
17993
17993
|
for (let T = h + 1; T > 1; --T)
|
|
17994
17994
|
p = p ^ g.pbox[T], _ = l(g, p) ^ _, d = p, p = _, _ = d;
|
|
17995
17995
|
return d = p, p = _, _ = d, _ = _ ^ g.pbox[1], p = p ^ g.pbox[0], { left: p, right: _ };
|
|
17996
17996
|
}
|
|
17997
|
-
function S(g,
|
|
17997
|
+
function S(g, x, v) {
|
|
17998
17998
|
for (let B = 0; B < 4; B++) {
|
|
17999
17999
|
g.sbox[B] = [];
|
|
18000
18000
|
for (let w = 0; w < 256; w++)
|
|
@@ -18002,7 +18002,7 @@ function Ju() {
|
|
|
18002
18002
|
}
|
|
18003
18003
|
let p = 0;
|
|
18004
18004
|
for (let B = 0; B < h + 2; B++)
|
|
18005
|
-
g.pbox[B] = y[B] ^
|
|
18005
|
+
g.pbox[B] = y[B] ^ x[p], p++, p >= v && (p = 0);
|
|
18006
18006
|
let _ = 0, d = 0, T = 0;
|
|
18007
18007
|
for (let B = 0; B < h + 2; B += 2)
|
|
18008
18008
|
T = u(g, _, d), _ = T.left, d = T.right, g.pbox[B] = _, g.pbox[B + 1] = d;
|
|
@@ -18014,17 +18014,17 @@ function Ju() {
|
|
|
18014
18014
|
var R = t.Blowfish = E.extend({
|
|
18015
18015
|
_doReset: function() {
|
|
18016
18016
|
if (this._keyPriorReset !== this._key) {
|
|
18017
|
-
var g = this._keyPriorReset = this._key,
|
|
18018
|
-
S(a,
|
|
18017
|
+
var g = this._keyPriorReset = this._key, x = g.words, v = g.sigBytes / 4;
|
|
18018
|
+
S(a, x, v);
|
|
18019
18019
|
}
|
|
18020
18020
|
},
|
|
18021
|
-
encryptBlock: function(g,
|
|
18022
|
-
var
|
|
18023
|
-
g[
|
|
18021
|
+
encryptBlock: function(g, x) {
|
|
18022
|
+
var v = u(a, g[x], g[x + 1]);
|
|
18023
|
+
g[x] = v.left, g[x + 1] = v.right;
|
|
18024
18024
|
},
|
|
18025
|
-
decryptBlock: function(g,
|
|
18026
|
-
var
|
|
18027
|
-
g[
|
|
18025
|
+
decryptBlock: function(g, x) {
|
|
18026
|
+
var v = c(a, g[x], g[x + 1]);
|
|
18027
|
+
g[x] = v.left, g[x + 1] = v.right;
|
|
18028
18028
|
},
|
|
18029
18029
|
blockSize: 64 / 32,
|
|
18030
18030
|
keySize: 128 / 32,
|