Meta Shit
Meta Shit
Meta Shit
txt */
(self.webpackChunkfrontend = self.webpackChunkfrontend || []).push([[6344], {
16344: function(e, t, n) {
!function(e) {
"use strict";
var t = "undefined" != typeof n.g ? n.g : "undefined" != typeof self ? self :
"undefined" != typeof window ? window : {}
, r = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof
window ? window : "undefined" != typeof n.g ? n.g : "undefined" != typeof self ? self : {};
function i(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e,
"default") ? e.default : e
}
function o(e) {
if (e.__esModule)
return e;
var t = e.default;
if ("function" == typeof t) {
var n = function e() {
return this instanceof e ? Reflect.construct(t, arguments,
this.constructor) : t.apply(this, arguments)
};
n.prototype = t.prototype
} else
n = {};
return Object.defineProperty(n, "__esModule", {
value: !0
}),
Object.keys(e).forEach((function(t) {
var r = Object.getOwnPropertyDescriptor(e, t);
Object.defineProperty(n, t, r.get ? r : {
enumerable: !0,
get: function() {
return e[t]
}
})
}
)),
n
}
var a = {
exports: {}
};
!function(e, t) {
var n = "undefined" != typeof globalThis && globalThis || "undefined" !=
typeof self && self || void 0 !== r && r
, i = function() {
function e() {
this.fetch = !1,
this.DOMException = n.DOMException
}
return e.prototype = n,
new e
}();
!function(e) {
!function(t) {
var n = void 0 !== e && e || "undefined" != typeof self && self ||
void 0 !== n && n
, r = "URLSearchParams"in n
, i = "Symbol"in n && "iterator"in Symbol
, o = "FileReader"in n && "Blob"in n && function() {
try {
return new Blob,
!0
} catch (e) {
return !1
}
}()
, a = "FormData"in n
, s = "ArrayBuffer"in n;
if (s)
var u = ["[object Int8Array]", "[object Uint8Array]", "[object
Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]",
"[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"]
, l = ArrayBuffer.isView || function(e) {
return e && u.indexOf(Object.prototype.toString.call(e))
> -1
}
;
function c(e) {
if ("string" != typeof e && (e = String(e)),
/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e) || "" === e)
throw new TypeError('Invalid character in header field
name: "' + e + '"');
return e.toLowerCase()
}
function d(e) {
return "string" != typeof e && (e = String(e)),
e
}
function f(e) {
var t = {
next: function() {
var t = e.shift();
return {
done: void 0 === t,
value: t
}
}
};
return i && (t[Symbol.iterator] = function() {
return t
}
),
t
}
function h(e) {
this.map = {},
e instanceof h ? e.forEach((function(e, t) {
this.append(t, e)
}
), this) : Array.isArray(e) ? e.forEach((function(e) {
this.append(e[0], e[1])
}
), this) : e &&
Object.getOwnPropertyNames(e).forEach((function(t) {
this.append(t, e[t])
}
), this)
}
function p(e) {
if (e.bodyUsed)
return Promise.reject(new TypeError("Already read"));
e.bodyUsed = !0
}
function m(e) {
return new Promise((function(t, n) {
e.onload = function() {
t(e.result)
}
,
e.onerror = function() {
n(e.error)
}
}
))
}
function g(e) {
var t = new FileReader
, n = m(t);
return t.readAsArrayBuffer(e),
n
}
function v(e) {
if (e.slice)
return e.slice(0);
var t = new Uint8Array(e.byteLength);
return t.set(new Uint8Array(e)),
t.buffer
}
function b() {
return this.bodyUsed = !1,
this._initBody = function(e) {
var t;
this.bodyUsed = this.bodyUsed,
this._bodyInit = e,
e ? "string" == typeof e ? this._bodyText = e : o &&
Blob.prototype.isPrototypeOf(e) ? this._bodyBlob = e : a &&
FormData.prototype.isPrototypeOf(e) ? this._bodyFormData = e : r &&
URLSearchParams.prototype.isPrototypeOf(e) ? this._bodyText = e.toString() : s && o
&& (t = e) && DataView.prototype.isPrototypeOf(t) ? (this._bodyArrayBuffer =
v(e.buffer),
this._bodyInit = new Blob([this._bodyArrayBuffer])) : s
&& (ArrayBuffer.prototype.isPrototypeOf(e) || l(e)) ? this._bodyArrayBuffer = v(e) :
this._bodyText = e = Object.prototype.toString.call(e) : this._bodyText = "",
this.headers.get("content-type") || ("string" == typeof e ?
this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob &&
this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : r &&
URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type",
"application/x-www-form-urlencoded;charset=UTF-8"))
}
,
o && (this.blob = function() {
var e = p(this);
if (e)
return e;
if (this._bodyBlob)
return Promise.resolve(this._bodyBlob);
if (this._bodyArrayBuffer)
return Promise.resolve(new
Blob([this._bodyArrayBuffer]));
if (this._bodyFormData)
throw new Error("could not read FormData body as
blob");
return Promise.resolve(new Blob([this._bodyText]))
}
,
this.arrayBuffer = function() {
return this._bodyArrayBuffer ? p(this) ||
(ArrayBuffer.isView(this._bodyArrayBuffer) ?
Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength)) :
Promise.resolve(this._bodyArrayBuffer)) : this.blob().then(g)
}
),
this.text = function() {
var e, t, n, r = p(this);
if (r)
return r;
if (this._bodyBlob)
return e = this._bodyBlob,
n = m(t = new FileReader),
t.readAsText(e),
n;
if (this._bodyArrayBuffer)
return Promise.resolve(function(e) {
for (var t = new Uint8Array(e), n = new
Array(t.length), r = 0; r < t.length; r++)
n[r] = String.fromCharCode(t[r]);
return n.join("")
}(this._bodyArrayBuffer));
if (this._bodyFormData)
throw new Error("could not read FormData body as
text");
return Promise.resolve(this._bodyText)
}
,
a && (this.formData = function() {
return this.text().then(w)
}
),
this.json = function() {
return this.text().then(JSON.parse)
}
,
this
}
h.prototype.append = function(e, t) {
e = c(e),
t = d(t);
var n = this.map[e];
this.map[e] = n ? n + ", " + t : t
}
,
h.prototype.delete = function(e) {
delete this.map[c(e)]
}
,
h.prototype.get = function(e) {
return e = c(e),
this.has(e) ? this.map[e] : null
}
,
h.prototype.has = function(e) {
return this.map.hasOwnProperty(c(e))
}
,
h.prototype.set = function(e, t) {
this.map[c(e)] = d(t)
}
,
h.prototype.forEach = function(e, t) {
for (var n in this.map)
this.map.hasOwnProperty(n) && e.call(t, this.map[n], n,
this)
}
,
h.prototype.keys = function() {
var e = [];
return this.forEach((function(t, n) {
e.push(n)
}
)),
f(e)
}
,
h.prototype.values = function() {
var e = [];
return this.forEach((function(t) {
e.push(t)
}
)),
f(e)
}
,
h.prototype.entries = function() {
var e = [];
return this.forEach((function(t, n) {
e.push([n, t])
}
)),
f(e)
}
,
i && (h.prototype[Symbol.iterator] = h.prototype.entries);
var y = ["DELETE", "GET", "HEAD", "OPTIONS", "POST",
"PUT"];
function A(e, t) {
if (!(this instanceof A))
throw new TypeError('Please use the "new" operator,
this DOM object constructor cannot be called as a function.');
var n = (t = t || {}).body;
if (e instanceof A) {
if (e.bodyUsed)
throw new TypeError("Already read");
this.url = e.url,
this.credentials = e.credentials,
t.headers || (this.headers = new h(e.headers)),
this.method = e.method,
this.mode = e.mode,
this.signal = e.signal,
n || null == e._bodyInit || (n = e._bodyInit,
e.bodyUsed = !0)
} else
this.url = String(e);
if (this.credentials = t.credentials || this.credentials || "same-
origin",
!t.headers && this.headers || (this.headers = new
h(t.headers)),
this.method = function(e) {
var t = e.toUpperCase();
return y.indexOf(t) > -1 ? t : e
}(t.method || this.method || "GET"),
this.mode = t.mode || this.mode || null,
this.signal = t.signal || this.signal,
this.referrer = null,
("GET" === this.method || "HEAD" === this.method) && n)
throw new TypeError("Body not allowed for GET or
HEAD requests");
if (this._initBody(n),
!("GET" !== this.method && "HEAD" !== this.method || "no-
store" !== t.cache && "no-cache" !== t.cache)) {
var r = /([?&])_=[^&]*/;
r.test(this.url) ? this.url = this.url.replace(r, "$1_=" +
(new Date).getTime()) : this.url += (/\?/.test(this.url) ? "&" : "?") + "_=" + (new
Date).getTime()
}
}
function w(e) {
var t = new FormData;
return e.trim().split("&").forEach((function(e) {
if (e) {
var n = e.split("=")
, r = n.shift().replace(/\+/g, " ")
, i = n.join("=").replace(/\+/g, " ");
t.append(decodeURIComponent(r),
decodeURIComponent(i))
}
}
)),
t
}
function _(e, t) {
if (!(this instanceof _))
throw new TypeError('Please use the "new" operator,
this DOM object constructor cannot be called as a function.');
t || (t = {}),
this.type = "default",
this.status = void 0 === t.status ? 200 : t.status,
this.ok = this.status >= 200 && this.status < 300,
this.statusText = void 0 === t.statusText ? "" : "" +
t.statusText,
this.headers = new h(t.headers),
this.url = t.url || "",
this._initBody(e)
}
A.prototype.clone = function() {
return new A(this,{
body: this._bodyInit
})
}
,
b.call(A.prototype),
b.call(_.prototype),
_.prototype.clone = function() {
return new _(this._bodyInit,{
status: this.status,
statusText: this.statusText,
headers: new h(this.headers),
url: this.url
})
}
,
_.error = function() {
var e = new _(null,{
status: 0,
statusText: ""
});
return e.type = "error",
e
}
;
var E = [301, 302, 303, 307, 308];
_.redirect = function(e, t) {
if (-1 === E.indexOf(t))
throw new RangeError("Invalid status code");
return new _(null,{
status: t,
headers: {
location: e
}
})
}
,
t.DOMException = n.DOMException;
try {
new t.DOMException
} catch (e) {
t.DOMException = function(e, t) {
this.message = e,
this.name = t;
var n = Error(e);
this.stack = n.stack
}
,
t.DOMException.prototype = Object.create(Error.prototype),
t.DOMException.prototype.constructor = t.DOMException
}
function S(e, r) {
return new Promise((function(i, a) {
var u = new A(e,r);
if (u.signal && u.signal.aborted)
return a(new
t.DOMException("Aborted","AbortError"));
var l = new XMLHttpRequest;
function c() {
l.abort()
}
l.onload = function() {
var e, t, n = {
status: l.status,
statusText: l.statusText,
headers: (e = l.getAllResponseHeaders() || "",
t = new h,
e.replace(/\r?\n[\t ]+/g, " ").split("\
r").map((function(e) {
return 0 === e.indexOf("\n") ? e.substr(1,
e.length) : e
}
)).forEach((function(e) {
var n = e.split(":")
, r = n.shift().trim();
if (r) {
var i = n.join(":").trim();
t.append(r, i)
}
}
)),
t)
};
n.url = "responseURL"in l ? l.responseURL :
n.headers.get("X-Request-URL");
var r = "response"in l ? l.response : l.responseText;
setTimeout((function() {
i(new _(r,n))
}
), 0)
}
,
l.onerror = function() {
setTimeout((function() {
a(new TypeError("Network request failed"))
}
), 0)
}
,
l.ontimeout = function() {
setTimeout((function() {
a(new TypeError("Network request failed"))
}
), 0)
}
,
l.onabort = function() {
setTimeout((function() {
a(new t.DOMException("Aborted","AbortError"))
}
), 0)
}
,
l.open(u.method, function(e) {
try {
return "" === e && n.location.href ?
n.location.href : e
} catch (t) {
return e
}
}(u.url), !0),
"include" === u.credentials ? l.withCredentials = !0 :
"omit" === u.credentials && (l.withCredentials = !1),
"responseType"in l && (o ? l.responseType = "blob" : s
&& u.headers.get("Content-Type") && -1 !== u.headers.get("Content-
Type").indexOf("application/octet-stream") && (l.responseType = "arraybuffer")),
!r || "object" != typeof r.headers || r.headers instanceof h
? u.headers.forEach((function(e, t) {
l.setRequestHeader(t, e)
}
)) :
Object.getOwnPropertyNames(r.headers).forEach((function(e) {
l.setRequestHeader(e, d(r.headers[e]))
}
)),
u.signal && (u.signal.addEventListener("abort", c),
l.onreadystatechange = function() {
4 === l.readyState &&
u.signal.removeEventListener("abort", c)
}
),
l.send(void 0 === u._bodyInit ? null : u._bodyInit)
}
))
}
S.polyfill = !0,
n.fetch || (n.fetch = S,
n.Headers = h,
n.Request = A,
n.Response = _),
t.Headers = h,
t.Request = A,
t.Response = _,
t.fetch = S
}({})
}(i),
i.fetch.ponyfill = !0,
delete i.fetch.polyfill;
var o = n.fetch ? n : i;
(t = o.fetch).default = o.fetch,
t.fetch = o.fetch,
t.Headers = o.Headers,
t.Request = o.Request,
t.Response = o.Response,
e.exports = t
}(a, a.exports);
var s = i(a.exports)
, u = []
, l = []
, c = "undefined" != typeof Uint8Array ? Uint8Array : Array
, d = !1;
function f() {
d = !0;
for (var e =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t
= 0; t < 64; ++t)
u[t] = e[t],
l[e.charCodeAt(t)] = t;
l["-".charCodeAt(0)] = 62,
l["_".charCodeAt(0)] = 63
}
function h(e, t, n) {
for (var r, i, o = [], a = t; a < n; a += 3)
r = (e[a] << 16) + (e[a + 1] << 8) + e[a + 2],
o.push(u[(i = r) >> 18 & 63] + u[i >> 12 & 63] + u[i >> 6 & 63] + u[63
& i]);
return o.join("")
}
function p(e) {
var t;
d || f();
for (var n = e.length, r = n % 3, i = "", o = [], a = 16383, s = 0, l = n - r; s
< l; s += a)
o.push(h(e, s, s + a > l ? l : s + a));
return 1 === r ? (t = e[n - 1],
i += u[t >> 2],
i += u[t << 4 & 63],
i += "==") : 2 === r && (t = (e[n - 2] << 8) + e[n - 1],
i += u[t >> 10],
i += u[t >> 4 & 63],
i += u[t << 2 & 63],
i += "="),
o.push(i),
o.join("")
}
function m(e, t, n, r, i) {
var o, a, s = 8 * i - r - 1, u = (1 << s) - 1, l = u >> 1, c = -7, d = n ? i - 1 :
0, f = n ? -1 : 1, h = e[t + d];
for (d += f,
o = h & (1 << -c) - 1,
h >>= -c,
c += s; c > 0; o = 256 * o + e[t + d],
d += f,
c -= 8)
;
for (a = o & (1 << -c) - 1,
o >>= -c,
c += r; c > 0; a = 256 * a + e[t + d],
d += f,
c -= 8)
;
if (0 === o)
o = 1 - l;
else {
if (o === u)
return a ? NaN : 1 / 0 * (h ? -1 : 1);
a += Math.pow(2, r),
o -= l
}
return (h ? -1 : 1) * a * Math.pow(2, o - r)
}
function g(e, t, n, r, i, o) {
var a, s, u, l = 8 * o - i - 1, c = (1 << l) - 1, d = c >> 1, f = 23 === i ?
Math.pow(2, -24) - Math.pow(2, -77) : 0, h = r ? 0 : o - 1, p = r ? 1 : -1, m = t < 0 || 0 ===
t && 1 / t < 0 ? 1 : 0;
for (t = Math.abs(t),
isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0,
a = c) : (a = Math.floor(Math.log(t) / Math.LN2),
t * (u = Math.pow(2, -a)) < 1 && (a--,
u *= 2),
(t += a + d >= 1 ? f / u : f * Math.pow(2, 1 - d)) * u >= 2 && (a++,
u /= 2),
a + d >= c ? (s = 0,
a = c) : a + d >= 1 ? (s = (t * u - 1) * Math.pow(2, i),
a += d) : (s = t * Math.pow(2, d - 1) * Math.pow(2, i),
a = 0)); i >= 8; e[n + h] = 255 & s,
h += p,
s /= 256,
i -= 8)
;
for (a = a << i | s,
l += i; l > 0; e[n + h] = 255 & a,
h += p,
a /= 256,
l -= 8)
;
e[n + h - p] |= 128 * m
}
var v = {}.toString
, b = Array.isArray || function(e) {
return "[object Array]" == v.call(e)
}
;
_.TYPED_ARRAY_SUPPORT = void 0 === t.TYPED_ARRAY_SUPPORT ||
t.TYPED_ARRAY_SUPPORT;
var y = A();
function A() {
return _.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
}
function w(e, t) {
if (A() < t)
throw new RangeError("Invalid typed array length");
return _.TYPED_ARRAY_SUPPORT ? (e = new
Uint8Array(t)).__proto__ = _.prototype : (null === e && (e = new _(t)),
e.length = t),
e
}
function _(e, t, n) {
if (!(_.TYPED_ARRAY_SUPPORT || this instanceof _))
return new _(e,t,n);
if ("number" == typeof e) {
if ("string" == typeof t)
throw new Error("If encoding is specified then the first argument
must be a string");
return k(this, e)
}
return E(this, e, t, n)
}
function E(e, t, n, r) {
if ("number" == typeof t)
throw new TypeError('"value" argument must not be a number');
return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ?
function(e, t, n, r) {
if (t.byteLength,
n < 0 || t.byteLength < n)
throw new RangeError("'offset' is out of bounds");
if (t.byteLength < n + (r || 0))
throw new RangeError("'length' is out of bounds");
return t = void 0 === n && void 0 === r ? new Uint8Array(t) : void 0
=== r ? new Uint8Array(t,n) : new Uint8Array(t,n,r),
_.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = _.prototype : e
= M(e, t),
e
}(e, t, n, r) : "string" == typeof t ? function(e, t, n) {
if ("string" == typeof n && "" !== n || (n = "utf8"),
!_.isEncoding(n))
throw new TypeError('"encoding" must be a valid string
encoding');
var r = 0 | R(t, n)
, i = (e = w(e, r)).write(t, n);
return i !== r && (e = e.slice(0, i)),
e
}(e, t, n) : function(e, t) {
if (x(t)) {
var n = 0 | C(t.length);
return 0 === (e = w(e, n)).length || t.copy(e, 0, 0, n),
e
}
if (t) {
if ("undefined" != typeof ArrayBuffer && t.buffer instanceof
ArrayBuffer || "length"in t)
return "number" != typeof t.length || (r = t.length) != r ? w(e,
0) : M(e, t);
if ("Buffer" === t.type && b(t.data))
return M(e, t.data)
}
var r;
throw new TypeError("First argument must be a string, Buffer,
ArrayBuffer, Array, or array-like object.")
}(e, t)
}
function S(e) {
if ("number" != typeof e)
throw new TypeError('"size" argument must be a number');
if (e < 0)
throw new RangeError('"size" argument must not be negative')
}
function k(e, t) {
if (S(t),
e = w(e, t < 0 ? 0 : 0 | C(t)),
!_.TYPED_ARRAY_SUPPORT)
for (var n = 0; n < t; ++n)
e[n] = 0;
return e
}
function M(e, t) {
var n = t.length < 0 ? 0 : 0 | C(t.length);
e = w(e, n);
for (var r = 0; r < n; r += 1)
e[r] = 255 & t[r];
return e
}
function C(e) {
if (e >= A())
throw new RangeError("Attempt to allocate Buffer larger than
maximum size: 0x" + A().toString(16) + " bytes");
return 0 | e
}
function x(e) {
return !(null == e || !e._isBuffer)
}
function R(e, t) {
if (x(e))
return e.length;
if ("undefined" != typeof ArrayBuffer && "function" == typeof
ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer))
return e.byteLength;
"string" != typeof e && (e = "" + e);
var n = e.length;
if (0 === n)
return 0;
for (var r = !1; ; )
switch (t) {
case "ascii":
case "latin1":
case "binary":
return n;
case "utf8":
case "utf-8":
case void 0:
return ne(e).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return 2 * n;
case "hex":
return n >>> 1;
case "base64":
return re(e).length;
default:
if (r)
return ne(e).length;
t = ("" + t).toLowerCase(),
r = !0
}
}
function T(e, t, n) {
var r = !1;
if ((void 0 === t || t < 0) && (t = 0),
t > this.length)
return "";
if ((void 0 === n || n > this.length) && (n = this.length),
n <= 0)
return "";
if ((n >>>= 0) <= (t >>>= 0))
return "";
for (e || (e = "utf8"); ; )
switch (e) {
case "hex":
return V(this, t, n);
case "utf8":
case "utf-8":
return U(this, t, n);
case "ascii":
return q(this, t, n);
case "latin1":
case "binary":
return H(this, t, n);
case "base64":
return F(this, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return W(this, t, n);
default:
if (r)
throw new TypeError("Unknown encoding: " + e);
e = (e + "").toLowerCase(),
r = !0
}
}
function I(e, t, n) {
var r = e[t];
e[t] = e[n],
e[n] = r
}
function P(e, t, n, r, i) {
if (0 === e.length)
return -1;
if ("string" == typeof n ? (r = n,
n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -
2147483648),
n = +n,
isNaN(n) && (n = i ? 0 : e.length - 1),
n < 0 && (n = e.length + n),
n >= e.length) {
if (i)
return -1;
n = e.length - 1
} else if (n < 0) {
if (!i)
return -1;
n=0
}
if ("string" == typeof t && (t = _.from(t, r)),
x(t))
return 0 === t.length ? -1 : L(e, t, n, r, i);
if ("number" == typeof t)
return t &= 255,
_.TYPED_ARRAY_SUPPORT && "function" == typeof
Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(e, t, n) :
Uint8Array.prototype.lastIndexOf.call(e, t, n) : L(e, [t], n, r, i);
throw new TypeError("val must be string, number or Buffer")
}
function L(e, t, n, r, i) {
var o, a = 1, s = e.length, u = t.length;
if (void 0 !== r && ("ucs2" === (r = String(r).toLowerCase()) || "ucs-2"
=== r || "utf16le" === r || "utf-16le" === r)) {
if (e.length < 2 || t.length < 2)
return -1;
a = 2,
s /= 2,
u /= 2,
n /= 2
}
function l(e, t) {
return 1 === a ? e[t] : e.readUInt16BE(t * a)
}
if (i) {
var c = -1;
for (o = n; o < s; o++)
if (l(e, o) === l(t, -1 === c ? 0 : o - c)) {
if (-1 === c && (c = o),
o - c + 1 === u)
return c * a
} else
-1 !== c && (o -= o - c),
c = -1
} else
for (n + u > s && (n = s - u),
o = n; o >= 0; o--) {
for (var d = !0, f = 0; f < u; f++)
if (l(e, o + f) !== l(t, f)) {
d = !1;
break
}
if (d)
return o
}
return -1
}
function O(e, t, n, r) {
n = Number(n) || 0;
var i = e.length - n;
r ? (r = Number(r)) > i && (r = i) : r = i;
var o = t.length;
if (o % 2 != 0)
throw new TypeError("Invalid hex string");
r > o / 2 && (r = o / 2);
for (var a = 0; a < r; ++a) {
var s = parseInt(t.substr(2 * a, 2), 16);
if (isNaN(s))
return a;
e[n + a] = s
}
return a
}
function N(e, t, n, r) {
return ie(ne(t, e.length - n), e, n, r)
}
function D(e, t, n, r) {
return ie(function(e) {
for (var t = [], n = 0; n < e.length; ++n)
t.push(255 & e.charCodeAt(n));
return t
}(t), e, n, r)
}
function B(e, t, n, r) {
return D(e, t, n, r)
}
function j(e, t, n, r) {
return ie(re(t), e, n, r)
}
function z(e, t, n, r) {
return ie(function(e, t) {
for (var n, r, i, o = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
r = (n = e.charCodeAt(a)) >> 8,
i = n % 256,
o.push(i),
o.push(r);
return o
}(t, e.length - n), e, n, r)
}
function F(e, t, n) {
return 0 === t && n === e.length ? p(e) : p(e.slice(t, n))
}
function U(e, t, n) {
n = Math.min(e.length, n);
for (var r = [], i = t; i < n; ) {
var o, a, s, u, l = e[i], c = null, d = l > 239 ? 4 : l > 223 ? 3 : l > 191 ?
2 : 1;
if (i + d <= n)
switch (d) {
case 1:
l < 128 && (c = l);
break;
case 2:
128 == (192 & (o = e[i + 1])) && (u = (31 & l) << 6 | 63 & o)
> 127 && (c = u);
break;
case 3:
o = e[i + 1],
a = e[i + 2],
128 == (192 & o) && 128 == (192 & a) && (u = (15 & l) <<
12 | (63 & o) << 6 | 63 & a) > 2047 && (u < 55296 || u > 57343) && (c = u);
break;
case 4:
o = e[i + 1],
a = e[i + 2],
s = e[i + 3],
128 == (192 & o) && 128 == (192 & a) && 128 == (192 & s)
&& (u = (15 & l) << 18 | (63 & o) << 12 | (63 & a) << 6 | 63 & s) > 65535 && u < 1114112
&& (c = u)
}
null === c ? (c = 65533,
d = 1) : c > 65535 && (c -= 65536,
r.push(c >>> 10 & 1023 | 55296),
c = 56320 | 1023 & c),
r.push(c),
i += d
}
return function(e) {
var t = e.length;
if (t <= K)
return String.fromCharCode.apply(String, e);
for (var n = "", r = 0; r < t; )
n += String.fromCharCode.apply(String, e.slice(r, r += K));
return n
}(r)
}
_.poolSize = 8192,
_._augment = function(e) {
return e.__proto__ = _.prototype,
e
}
,
_.from = function(e, t, n) {
return E(null, e, t, n)
}
,
_.TYPED_ARRAY_SUPPORT && (_.prototype.__proto__ =
Uint8Array.prototype,
_.__proto__ = Uint8Array,
"undefined" != typeof Symbol && Symbol.species && _[Symbol.species]),
_.alloc = function(e, t, n) {
return function(e, t, n, r) {
return S(t),
t <= 0 ? w(e, t) : void 0 !== n ? "string" == typeof r ? w(e, t).fill(n, r) :
w(e, t).fill(n) : w(e, t)
}(null, e, t, n)
}
,
_.allocUnsafe = function(e) {
return k(null, e)
}
,
_.allocUnsafeSlow = function(e) {
return k(null, e)
}
,
_.isBuffer = oe,
_.compare = function(e, t) {
if (!x(e) || !x(t))
throw new TypeError("Arguments must be Buffers");
if (e === t)
return 0;
for (var n = e.length, r = t.length, i = 0, o = Math.min(n, r); i < o; ++i)
if (e[i] !== t[i]) {
n = e[i],
r = t[i];
break
}
return n < r ? -1 : r < n ? 1 : 0
}
,
_.isEncoding = function(e) {
switch (String(e).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return !0;
default:
return !1
}
}
,
_.concat = function(e, t) {
if (!b(e))
throw new TypeError('"list" argument must be an Array of Buffers');
if (0 === e.length)
return _.alloc(0);
var n;
if (void 0 === t)
for (t = 0,
n = 0; n < e.length; ++n)
t += e[n].length;
var r = _.allocUnsafe(t)
, i = 0;
for (n = 0; n < e.length; ++n) {
var o = e[n];
if (!x(o))
throw new TypeError('"list" argument must be an Array of
Buffers');
o.copy(r, i),
i += o.length
}
return r
}
,
_.byteLength = R,
_.prototype._isBuffer = !0,
_.prototype.swap16 = function() {
var e = this.length;
if (e % 2 != 0)
throw new RangeError("Buffer size must be a multiple of 16-bits");
for (var t = 0; t < e; t += 2)
I(this, t, t + 1);
return this
}
,
_.prototype.swap32 = function() {
var e = this.length;
if (e % 4 != 0)
throw new RangeError("Buffer size must be a multiple of 32-bits");
for (var t = 0; t < e; t += 4)
I(this, t, t + 3),
I(this, t + 1, t + 2);
return this
}
,
_.prototype.swap64 = function() {
var e = this.length;
if (e % 8 != 0)
throw new RangeError("Buffer size must be a multiple of 64-bits");
for (var t = 0; t < e; t += 8)
I(this, t, t + 7),
I(this, t + 1, t + 6),
I(this, t + 2, t + 5),
I(this, t + 3, t + 4);
return this
}
,
_.prototype.toString = function() {
var e = 0 | this.length;
return 0 === e ? "" : 0 === arguments.length ? U(this, 0, e) :
T.apply(this, arguments)
}
,
_.prototype.equals = function(e) {
if (!x(e))
throw new TypeError("Argument must be a Buffer");
return this === e || 0 === _.compare(this, e)
}
,
_.prototype.inspect = function() {
var e = "";
return this.length > 0 && (e = this.toString("hex", 0,
50).match(/.{2}/g).join(" "),
this.length > 50 && (e += " ... ")),
"<Buffer " + e + ">"
}
,
_.prototype.compare = function(e, t, n, r, i) {
if (!x(e))
throw new TypeError("Argument must be a Buffer");
if (void 0 === t && (t = 0),
void 0 === n && (n = e ? e.length : 0),
void 0 === r && (r = 0),
void 0 === i && (i = this.length),
t < 0 || n > e.length || r < 0 || i > this.length)
throw new RangeError("out of range index");
if (r >= i && t >= n)
return 0;
if (r >= i)
return -1;
if (t >= n)
return 1;
if (this === e)
return 0;
for (var o = (i >>>= 0) - (r >>>= 0), a = (n >>>= 0) - (t >>>= 0), s =
Math.min(o, a), u = this.slice(r, i), l = e.slice(t, n), c = 0; c < s; ++c)
if (u[c] !== l[c]) {
o = u[c],
a = l[c];
break
}
return o < a ? -1 : a < o ? 1 : 0
}
,
_.prototype.includes = function(e, t, n) {
return -1 !== this.indexOf(e, t, n)
}
,
_.prototype.indexOf = function(e, t, n) {
return P(this, e, t, n, !0)
}
,
_.prototype.lastIndexOf = function(e, t, n) {
return P(this, e, t, n, !1)
}
,
_.prototype.write = function(e, t, n, r) {
if (void 0 === t)
r = "utf8",
n = this.length,
t = 0;
else if (void 0 === n && "string" == typeof t)
r = t,
n = this.length,
t = 0;
else {
if (!isFinite(t))
throw new Error("Buffer.write(string, encoding, offset[, length]) is
no longer supported");
t |= 0,
isFinite(n) ? (n |= 0,
void 0 === r && (r = "utf8")) : (r = n,
n = void 0)
}
var i = this.length - t;
if ((void 0 === n || n > i) && (n = i),
e.length > 0 && (n < 0 || t < 0) || t > this.length)
throw new RangeError("Attempt to write outside buffer bounds");
r || (r = "utf8");
for (var o = !1; ; )
switch (r) {
case "hex":
return O(this, e, t, n);
case "utf8":
case "utf-8":
return N(this, e, t, n);
case "ascii":
return D(this, e, t, n);
case "latin1":
case "binary":
return B(this, e, t, n);
case "base64":
return j(this, e, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return z(this, e, t, n);
default:
if (o)
throw new TypeError("Unknown encoding: " + r);
r = ("" + r).toLowerCase(),
o = !0
}
}
,
_.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
;
var K = 4096;
function q(e, t, n) {
var r = "";
n = Math.min(e.length, n);
for (var i = t; i < n; ++i)
r += String.fromCharCode(127 & e[i]);
return r
}
function H(e, t, n) {
var r = "";
n = Math.min(e.length, n);
for (var i = t; i < n; ++i)
r += String.fromCharCode(e[i]);
return r
}
function V(e, t, n) {
var r = e.length;
(!t || t < 0) && (t = 0),
(!n || n < 0 || n > r) && (n = r);
for (var i = "", o = t; o < n; ++o)
i += te(e[o]);
return i
}
function W(e, t, n) {
for (var r = e.slice(t, n), i = "", o = 0; o < r.length; o += 2)
i += String.fromCharCode(r[o] + 256 * r[o + 1]);
return i
}
function $(e, t, n) {
if (e % 1 != 0 || e < 0)
throw new RangeError("offset is not uint");
if (e + t > n)
throw new RangeError("Trying to access beyond buffer length")
}
function Y(e, t, n, r, i, o) {
if (!x(e))
throw new TypeError('"buffer" argument must be a Buffer instance');
if (t > i || t < o)
throw new RangeError('"value" argument is out of bounds');
if (n + r > e.length)
throw new RangeError("Index out of range")
}
function Q(e, t, n, r) {
t < 0 && (t = 65535 + t + 1);
for (var i = 0, o = Math.min(e.length - n, 2); i < o; ++i)
e[n + i] = (t & 255 << 8 * (r ? i : 1 - i)) >>> 8 * (r ? i : 1 - i)
}
function Z(e, t, n, r) {
t < 0 && (t = 4294967295 + t + 1);
for (var i = 0, o = Math.min(e.length - n, 4); i < o; ++i)
e[n + i] = t >>> 8 * (r ? i : 3 - i) & 255
}
function G(e, t, n, r, i, o) {
if (n + r > e.length)
throw new RangeError("Index out of range");
if (n < 0)
throw new RangeError("Index out of range")
}
function X(e, t, n, r, i) {
return i || G(e, 0, n, 4),
g(e, t, n, r, 23, 4),
n+4
}
function J(e, t, n, r, i) {
return i || G(e, 0, n, 8),
g(e, t, n, r, 52, 8),
n+8
}
_.prototype.slice = function(e, t) {
var n, r = this.length;
if ((e = ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r),
(t = void 0 === t ? r : ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r),
t < e && (t = e),
_.TYPED_ARRAY_SUPPORT)
(n = this.subarray(e, t)).__proto__ = _.prototype;
else {
var i = t - e;
n = new _(i,void 0);
for (var o = 0; o < i; ++o)
n[o] = this[o + e]
}
return n
}
,
_.prototype.readUIntLE = function(e, t, n) {
e |= 0,
t |= 0,
n || $(e, t, this.length);
for (var r = this[e], i = 1, o = 0; ++o < t && (i *= 256); )
r += this[e + o] * i;
return r
}
,
_.prototype.readUIntBE = function(e, t, n) {
e |= 0,
t |= 0,
n || $(e, t, this.length);
for (var r = this[e + --t], i = 1; t > 0 && (i *= 256); )
r += this[e + --t] * i;
return r
}
,
_.prototype.readUInt8 = function(e, t) {
return t || $(e, 1, this.length),
this[e]
}
,
_.prototype.readUInt16LE = function(e, t) {
return t || $(e, 2, this.length),
this[e] | this[e + 1] << 8
}
,
_.prototype.readUInt16BE = function(e, t) {
return t || $(e, 2, this.length),
this[e] << 8 | this[e + 1]
}
,
_.prototype.readUInt32LE = function(e, t) {
return t || $(e, 4, this.length),
(this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
}
,
_.prototype.readUInt32BE = function(e, t) {
return t || $(e, 4, this.length),
16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
}
,
_.prototype.readIntLE = function(e, t, n) {
e |= 0,
t |= 0,
n || $(e, t, this.length);
for (var r = this[e], i = 1, o = 0; ++o < t && (i *= 256); )
r += this[e + o] * i;
return r >= (i *= 128) && (r -= Math.pow(2, 8 * t)),
r
}
,
_.prototype.readIntBE = function(e, t, n) {
e |= 0,
t |= 0,
n || $(e, t, this.length);
for (var r = t, i = 1, o = this[e + --r]; r > 0 && (i *= 256); )
o += this[e + --r] * i;
return o >= (i *= 128) && (o -= Math.pow(2, 8 * t)),
o
}
,
_.prototype.readInt8 = function(e, t) {
return t || $(e, 1, this.length),
128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
}
,
_.prototype.readInt16LE = function(e, t) {
t || $(e, 2, this.length);
var n = this[e] | this[e + 1] << 8;
return 32768 & n ? 4294901760 | n : n
}
,
_.prototype.readInt16BE = function(e, t) {
t || $(e, 2, this.length);
var n = this[e + 1] | this[e] << 8;
return 32768 & n ? 4294901760 | n : n
}
,
_.prototype.readInt32LE = function(e, t) {
return t || $(e, 4, this.length),
this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
}
,
_.prototype.readInt32BE = function(e, t) {
return t || $(e, 4, this.length),
this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
}
,
_.prototype.readFloatLE = function(e, t) {
return t || $(e, 4, this.length),
m(this, e, !0, 23, 4)
}
,
_.prototype.readFloatBE = function(e, t) {
return t || $(e, 4, this.length),
m(this, e, !1, 23, 4)
}
,
_.prototype.readDoubleLE = function(e, t) {
return t || $(e, 8, this.length),
m(this, e, !0, 52, 8)
}
,
_.prototype.readDoubleBE = function(e, t) {
return t || $(e, 8, this.length),
m(this, e, !1, 52, 8)
}
,
_.prototype.writeUIntLE = function(e, t, n, r) {
e = +e,
t |= 0,
n |= 0,
r || Y(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
var i = 1
, o = 0;
for (this[t] = 255 & e; ++o < n && (i *= 256); )
this[t + o] = e / i & 255;
return t + n
}
,
_.prototype.writeUIntBE = function(e, t, n, r) {
e = +e,
t |= 0,
n |= 0,
r || Y(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
var i = n - 1
, o = 1;
for (this[t + i] = 255 & e; --i >= 0 && (o *= 256); )
this[t + i] = e / o & 255;
return t + n
}
,
_.prototype.writeUInt8 = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 1, 255, 0),
_.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
this[t] = 255 & e,
t+1
}
,
_.prototype.writeUInt16LE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 2, 65535, 0),
_.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8) : Q(this, e, t, !0),
t+2
}
,
_.prototype.writeUInt16BE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 2, 65535, 0),
_.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
this[t + 1] = 255 & e) : Q(this, e, t, !1),
t+2
}
,
_.prototype.writeUInt32LE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 4, 4294967295, 0),
_.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24,
this[t + 2] = e >>> 16,
this[t + 1] = e >>> 8,
this[t] = 255 & e) : Z(this, e, t, !0),
t+4
}
,
_.prototype.writeUInt32BE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 4, 4294967295, 0),
_.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & e) : Z(this, e, t, !1),
t+4
}
,
_.prototype.writeIntLE = function(e, t, n, r) {
if (e = +e,
t |= 0,
!r) {
var i = Math.pow(2, 8 * n - 1);
Y(this, e, t, n, i - 1, -i)
}
var o = 0
,a=1
, s = 0;
for (this[t] = 255 & e; ++o < n && (a *= 256); )
e < 0 && 0 === s && 0 !== this[t + o - 1] && (s = 1),
this[t + o] = (e / a >> 0) - s & 255;
return t + n
}
,
_.prototype.writeIntBE = function(e, t, n, r) {
if (e = +e,
t |= 0,
!r) {
var i = Math.pow(2, 8 * n - 1);
Y(this, e, t, n, i - 1, -i)
}
var o = n - 1
,a=1
, s = 0;
for (this[t + o] = 255 & e; --o >= 0 && (a *= 256); )
e < 0 && 0 === s && 0 !== this[t + o + 1] && (s = 1),
this[t + o] = (e / a >> 0) - s & 255;
return t + n
}
,
_.prototype.writeInt8 = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 1, 127, -128),
_.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
e < 0 && (e = 255 + e + 1),
this[t] = 255 & e,
t+1
}
,
_.prototype.writeInt16LE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 2, 32767, -32768),
_.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8) : Q(this, e, t, !0),
t+2
}
,
_.prototype.writeInt16BE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 2, 32767, -32768),
_.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
this[t + 1] = 255 & e) : Q(this, e, t, !1),
t+2
}
,
_.prototype.writeInt32LE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 4, 2147483647, -2147483648),
_.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8,
this[t + 2] = e >>> 16,
this[t + 3] = e >>> 24) : Z(this, e, t, !0),
t+4
}
,
_.prototype.writeInt32BE = function(e, t, n) {
return e = +e,
t |= 0,
n || Y(this, e, t, 4, 2147483647, -2147483648),
e < 0 && (e = 4294967295 + e + 1),
_.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & e) : Z(this, e, t, !1),
t+4
}
,
_.prototype.writeFloatLE = function(e, t, n) {
return X(this, e, t, !0, n)
}
,
_.prototype.writeFloatBE = function(e, t, n) {
return X(this, e, t, !1, n)
}
,
_.prototype.writeDoubleLE = function(e, t, n) {
return J(this, e, t, !0, n)
}
,
_.prototype.writeDoubleBE = function(e, t, n) {
return J(this, e, t, !1, n)
}
,
_.prototype.copy = function(e, t, n, r) {
if (n || (n = 0),
r || 0 === r || (r = this.length),
t >= e.length && (t = e.length),
t || (t = 0),
r > 0 && r < n && (r = n),
r === n)
return 0;
if (0 === e.length || 0 === this.length)
return 0;
if (t < 0)
throw new RangeError("targetStart out of bounds");
if (n < 0 || n >= this.length)
throw new RangeError("sourceStart out of bounds");
if (r < 0)
throw new RangeError("sourceEnd out of bounds");
r > this.length && (r = this.length),
e.length - t < r - n && (r = e.length - t + n);
var i, o = r - n;
if (this === e && n < t && t < r)
for (i = o - 1; i >= 0; --i)
e[i + t] = this[i + n];
else if (o < 1e3 || !_.TYPED_ARRAY_SUPPORT)
for (i = 0; i < o; ++i)
e[i + t] = this[i + n];
else
Uint8Array.prototype.set.call(e, this.subarray(n, n + o), t);
return o
}
,
_.prototype.fill = function(e, t, n, r) {
if ("string" == typeof e) {
if ("string" == typeof t ? (r = t,
t = 0,
n = this.length) : "string" == typeof n && (r = n,
n = this.length),
1 === e.length) {
var i = e.charCodeAt(0);
i < 256 && (e = i)
}
if (void 0 !== r && "string" != typeof r)
throw new TypeError("encoding must be a string");
if ("string" == typeof r && !_.isEncoding(r))
throw new TypeError("Unknown encoding: " + r)
} else
"number" == typeof e && (e &= 255);
if (t < 0 || this.length < t || this.length < n)
throw new RangeError("Out of range index");
if (n <= t)
return this;
var o;
if (t >>>= 0,
n = void 0 === n ? this.length : n >>> 0,
e || (e = 0),
"number" == typeof e)
for (o = t; o < n; ++o)
this[o] = e;
else {
var a = x(e) ? e : ne(new _(e,r).toString())
, s = a.length;
for (o = 0; o < n - t; ++o)
this[o + t] = a[o % s]
}
return this
}
;
var ee = /[^+\/0-9A-Za-z-_]/g;
function te(e) {
return e < 16 ? "0" + e.toString(16) : e.toString(16)
}
function ne(e, t) {
var n;
t = t || 1 / 0;
for (var r = e.length, i = null, o = [], a = 0; a < r; ++a) {
if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
if (!i) {
if (n > 56319) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue
}
if (a + 1 === r) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue
}
i = n;
continue
}
if (n < 56320) {
(t -= 3) > -1 && o.push(239, 191, 189),
i = n;
continue
}
n = 65536 + (i - 55296 << 10 | n - 56320)
} else
i && (t -= 3) > -1 && o.push(239, 191, 189);
if (i = null,
n < 128) {
if ((t -= 1) < 0)
break;
o.push(n)
} else if (n < 2048) {
if ((t -= 2) < 0)
break;
o.push(n >> 6 | 192, 63 & n | 128)
} else if (n < 65536) {
if ((t -= 3) < 0)
break;
o.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
} else {
if (!(n < 1114112))
throw new Error("Invalid code point");
if ((t -= 4) < 0)
break;
o.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63
& n | 128)
}
}
return o
}
function re(e) {
return function(e) {
var t, n, r, i, o, a;
d || f();
var s = e.length;
if (s % 4 > 0)
throw new Error("Invalid string. Length must be a multiple of 4");
o = "=" === e[s - 2] ? 2 : "=" === e[s - 1] ? 1 : 0,
a = new c(3 * s / 4 - o),
r = o > 0 ? s - 4 : s;
var u = 0;
for (t = 0,
n = 0; t < r; t += 4,
n += 3)
i = l[e.charCodeAt(t)] << 18 | l[e.charCodeAt(t + 1)] << 12 |
l[e.charCodeAt(t + 2)] << 6 | l[e.charCodeAt(t + 3)],
a[u++] = i >> 16 & 255,
a[u++] = i >> 8 & 255,
a[u++] = 255 & i;
return 2 === o ? (i = l[e.charCodeAt(t)] << 2 | l[e.charCodeAt(t + 1)]
>> 4,
a[u++] = 255 & i) : 1 === o && (i = l[e.charCodeAt(t)] << 10 |
l[e.charCodeAt(t + 1)] << 4 | l[e.charCodeAt(t + 2)] >> 2,
a[u++] = i >> 8 & 255,
a[u++] = 255 & i),
a
}(function(e) {
if ((e = function(e) {
return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
}(e).replace(ee, "")).length < 2)
return "";
for (; e.length % 4 != 0; )
e += "=";
return e
}(e))
}
function ie(e, t, n, r) {
for (var i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i)
t[i + n] = e[i];
return i
}
function oe(e) {
return null != e && (!!e._isBuffer || ae(e) || function(e) {
return "function" == typeof e.readFloatLE && "function" == typeof
e.slice && ae(e.slice(0, 0))
}(e))
}
function ae(e) {
return !!e.constructor && "function" == typeof e.constructor.isBuffer &&
e.constructor.isBuffer(e)
}
var se = Object.freeze({
__proto__: null,
Buffer: _,
INSPECT_MAX_BYTES: 50,
SlowBuffer: function(e) {
return +e != e && (e = 0),
_.alloc(+e)
},
isBuffer: oe,
kMaxLength: y
})
, ue = {}
, le = {}
, ce = {}
, de = o(se)
, fe = {};
function he() {
throw new Error("setTimeout has not been defined")
}
function pe() {
throw new Error("clearTimeout has not been defined")
}
var me = he
, ge = pe;
function ve(e) {
if (me === setTimeout)
return setTimeout(e, 0);
if ((me === he || !me) && setTimeout)
return me = setTimeout,
setTimeout(e, 0);
try {
return me(e, 0)
} catch (t) {
try {
return me.call(null, e, 0)
} catch (t) {
return me.call(this, e, 0)
}
}
}
"function" == typeof t.setTimeout && (me = setTimeout),
"function" == typeof t.clearTimeout && (ge = clearTimeout);
var be, ye = [], Ae = !1, we = -1;
function _e() {
Ae && be && (Ae = !1,
be.length ? ye = be.concat(ye) : we = -1,
ye.length && Ee())
}
function Ee() {
if (!Ae) {
var e = ve(_e);
Ae = !0;
for (var t = ye.length; t; ) {
for (be = ye,
ye = []; ++we < t; )
be && be[we].run();
we = -1,
t = ye.length
}
be = null,
Ae = !1,
function(e) {
if (ge === clearTimeout)
return clearTimeout(e);
if ((ge === pe || !ge) && clearTimeout)
return ge = clearTimeout,
clearTimeout(e);
try {
return ge(e)
} catch (t) {
try {
return ge.call(null, e)
} catch (t) {
return ge.call(this, e)
}
}
}(e)
}
}
function Se(e) {
var t = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
ye.push(new ke(e,t)),
1 !== ye.length || Ae || ve(Ee)
}
function ke(e, t) {
this.fun = e,
this.array = t
}
function Me() {}
ke.prototype.run = function() {
this.fun.apply(null, this.array)
}
;
var Ce, xe = Me, Re = Me, Te = Me, Ie = Me, Pe = Me, Le = Me, Oe = Me,
Ne = t.performance || {}, De = Ne.now || Ne.mozNow || Ne.msNow || Ne.oNow ||
Ne.webkitNow || function() {
return (new Date).getTime()
}
, Be = new Date, je = {
nextTick: Se,
title: "browser",
browser: !0,
env: {},
argv: [],
version: "",
versions: {},
on: xe,
addListener: Re,
once: Te,
off: Ie,
removeListener: Pe,
removeAllListeners: Le,
emit: Oe,
binding: function(e) {
throw new Error("process.binding is not supported")
},
cwd: function() {
return "/"
},
chdir: function(e) {
throw new Error("process.chdir is not supported")
},
umask: function() {
return 0
},
hrtime: function(e) {
var t = .001 * De.call(Ne)
, n = Math.floor(t)
, r = Math.floor(t % 1 * 1e9);
return e && (n -= e[0],
(r -= e[1]) < 0 && (n--,
r += 1e9)),
[n, r]
},
platform: "browser",
release: {},
config: {},
uptime: function() {
return (new Date - Be) / 1e3
}
}, ze = {
exports: {}
}, Fe = {
exports: {}
};
function Ue() {
return Ce || (Ce = 1,
function(e, t) {
var n = de
, r = n.Buffer;
function i(e, t) {
for (var n in e)
t[n] = e[n]
}
function o(e, t, n) {
return r(e, t, n)
}
r.from && r.alloc && r.allocUnsafe && r.allocUnsafeSlow ? e.exports
= n : (i(n, t),
t.Buffer = o),
o.prototype = Object.create(r.prototype),
i(r, o),
o.from = function(e, t, n) {
if ("number" == typeof e)
throw new TypeError("Argument must not be a number");
return r(e, t, n)
}
,
o.alloc = function(e, t, n) {
if ("number" != typeof e)
throw new TypeError("Argument must be a number");
var i = r(e);
return void 0 !== t ? "string" == typeof n ? i.fill(t, n) : i.fill(t) :
i.fill(0),
i
}
,
o.allocUnsafe = function(e) {
if ("number" != typeof e)
throw new TypeError("Argument must be a number");
return r(e)
}
,
o.allocUnsafeSlow = function(e) {
if ("number" != typeof e)
throw new TypeError("Argument must be a number");
return n.SlowBuffer(e)
}
}(Fe, Fe.exports)),
Fe.exports
}
var Ke = 65536
, qe = 4294967295
, He = Ue().Buffer
, Ve = r.crypto || r.msCrypto;
Ve && Ve.getRandomValues ? ze.exports = function(e, t) {
if (e > qe)
throw new RangeError("requested too many random bytes");
var n = He.allocUnsafe(e);
if (e > 0)
if (e > Ke)
for (var r = 0; r < e; r += Ke)
Ve.getRandomValues(n.slice(r, r + Ke));
else
Ve.getRandomValues(n);
return "function" == typeof t ? Se((function() {
t(null, n)
}
)) : n
}
: ze.exports = function() {
throw new Error("Secure random number generation is not supported
by this browser.\nUse Chrome, Firefox or Internet Explorer 11")
}
;
var We = ze.exports
, $e = {
exports: {}
};
"function" == typeof Object.create ? $e.exports = function(e, t) {
t && (e.super_ = t,
e.prototype = Object.create(t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}))
}
: $e.exports = function(e, t) {
if (t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
}
;
var Ye = $e.exports
, Qe = {
exports: {}
};
function Ze() {}
function Ge() {
Ge.init.call(this)
}
function Xe(e) {
return void 0 === e._maxListeners ? Ge.defaultMaxListeners :
e._maxListeners
}
function Je(e, t, n, r) {
var i, o, a;
if ("function" != typeof n)
throw new TypeError('"listener" argument must be a function');
if ((o = e._events) ? (o.newListener && (e.emit("newListener", t,
n.listener ? n.listener : n),
o = e._events),
a = o[t]) : (o = e._events = new Ze,
e._eventsCount = 0),
a) {
if ("function" == typeof a ? a = o[t] = r ? [n, a] : [a, n] : r ? a.unshift(n)
: a.push(n),
!a.warned && (i = Xe(e)) && i > 0 && a.length > i) {
a.warned = !0;
var s = new Error("Possible EventEmitter memory leak
detected. " + a.length + " " + t + " listeners added. Use emitter.setMaxListeners() to
increase limit");
s.name = "MaxListenersExceededWarning",
s.emitter = e,
s.type = t,
s.count = a.length,
function(e) {
"function" == typeof console.warn ? console.warn(e) :
console.log(e)
}(s)
}
} else
a = o[t] = n,
++e._eventsCount;
return e
}
function et(e, t, n) {
var r = !1;
function i() {
e.removeListener(t, i),
r || (r = !0,
n.apply(e, arguments))
}
return i.listener = n,
i
}
function tt(e) {
var t = this._events;
if (t) {
var n = t[e];
if ("function" == typeof n)
return 1;
if (n)
return n.length
}
return 0
}
function nt(e, t) {
for (var n = new Array(t); t--; )
n[t] = e[t];
return n
}
Ze.prototype = Object.create(null),
Ge.EventEmitter = Ge,
Ge.usingDomains = !1,
Ge.prototype.domain = void 0,
Ge.prototype._events = void 0,
Ge.prototype._maxListeners = void 0,
Ge.defaultMaxListeners = 10,
Ge.init = function() {
this.domain = null,
Ge.usingDomains && (void 0).active,
this._events && this._events !== Object.getPrototypeOf(this)._events ||
(this._events = new Ze,
this._eventsCount = 0),
this._maxListeners = this._maxListeners || void 0
}
,
Ge.prototype.setMaxListeners = function(e) {
if ("number" != typeof e || e < 0 || isNaN(e))
throw new TypeError('"n" argument must be a positive number');
return this._maxListeners = e,
this
}
,
Ge.prototype.getMaxListeners = function() {
return Xe(this)
}
,
Ge.prototype.emit = function(e) {
var t, n, r, i, o, a, s, u = "error" === e;
if (a = this._events)
u = u && null == a.error;
else if (!u)
return !1;
if (s = this.domain,
u) {
if (t = arguments[1],
!s) {
if (t instanceof Error)
throw t;
var l = new Error('Uncaught, unspecified "error" event. (' + t +
")");
throw l.context = t,
l
}
return t || (t = new Error('Uncaught, unspecified "error" event')),
t.domainEmitter = this,
t.domain = s,
t.domainThrown = !1,
s.emit("error", t),
!1
}
if (!(n = a[e]))
return !1;
var c = "function" == typeof n;
switch (r = arguments.length) {
case 1:
!function(e, t, n) {
if (t)
e.call(n);
else
for (var r = e.length, i = nt(e, r), o = 0; o < r; ++o)
i[o].call(n)
}(n, c, this);
break;
case 2:
!function(e, t, n, r) {
if (t)
e.call(n, r);
else
for (var i = e.length, o = nt(e, i), a = 0; a < i; ++a)
o[a].call(n, r)
}(n, c, this, arguments[1]);
break;
case 3:
!function(e, t, n, r, i) {
if (t)
e.call(n, r, i);
else
for (var o = e.length, a = nt(e, o), s = 0; s < o; ++s)
a[s].call(n, r, i)
}(n, c, this, arguments[1], arguments[2]);
break;
case 4:
!function(e, t, n, r, i, o) {
if (t)
e.call(n, r, i, o);
else
for (var a = e.length, s = nt(e, a), u = 0; u < a; ++u)
s[u].call(n, r, i, o)
}(n, c, this, arguments[1], arguments[2], arguments[3]);
break;
default:
for (i = new Array(r - 1),
o = 1; o < r; o++)
i[o - 1] = arguments[o];
!function(e, t, n, r) {
if (t)
e.apply(n, r);
else
for (var i = e.length, o = nt(e, i), a = 0; a < i; ++a)
o[a].apply(n, r)
}(n, c, this, i)
}
return !0
}
,
Ge.prototype.addListener = function(e, t) {
return Je(this, e, t, !1)
}
,
Ge.prototype.on = Ge.prototype.addListener,
Ge.prototype.prependListener = function(e, t) {
return Je(this, e, t, !0)
}
,
Ge.prototype.once = function(e, t) {
if ("function" != typeof t)
throw new TypeError('"listener" argument must be a function');
return this.on(e, et(this, e, t)),
this
}
,
Ge.prototype.prependOnceListener = function(e, t) {
if ("function" != typeof t)
throw new TypeError('"listener" argument must be a function');
return this.prependListener(e, et(this, e, t)),
this
}
,
Ge.prototype.removeListener = function(e, t) {
var n, r, i, o, a;
if ("function" != typeof t)
throw new TypeError('"listener" argument must be a function');
if (!(r = this._events))
return this;
if (!(n = r[e]))
return this;
if (n === t || n.listener && n.listener === t)
0 == --this._eventsCount ? this._events = new Ze : (delete r[e],
r.removeListener && this.emit("removeListener", e, n.listener || t));
else if ("function" != typeof n) {
for (i = -1,
o = n.length; o-- > 0; )
if (n[o] === t || n[o].listener && n[o].listener === t) {
a = n[o].listener,
i = o;
break
}
if (i < 0)
return this;
if (1 === n.length) {
if (n[0] = void 0,
0 == --this._eventsCount)
return this._events = new Ze,
this;
delete r[e]
} else
!function(e, t) {
for (var n = t, r = n + 1, i = e.length; r < i; n += 1,
r += 1)
e[n] = e[r];
e.pop()
}(n, i);
r.removeListener && this.emit("removeListener", e, a || t)
}
return this
}
,
Ge.prototype.removeAllListeners = function(e) {
var t, n;
if (!(n = this._events))
return this;
if (!n.removeListener)
return 0 === arguments.length ? (this._events = new Ze,
this._eventsCount = 0) : n[e] && (0 == --this._eventsCount ?
this._events = new Ze : delete n[e]),
this;
if (0 === arguments.length) {
for (var r, i = Object.keys(n), o = 0; o < i.length; ++o)
"removeListener" !== (r = i[o]) && this.removeAllListeners(r);
return this.removeAllListeners("removeListener"),
this._events = new Ze,
this._eventsCount = 0,
this
}
if ("function" == typeof (t = n[e]))
this.removeListener(e, t);
else if (t)
do {
this.removeListener(e, t[t.length - 1])
} while (t[0]);
return this
}
,
Ge.prototype.listeners = function(e) {
var t, n, r = this._events;
return n = r && (t = r[e]) ? "function" == typeof t ? [t.listener || t] :
function(e) {
for (var t = new Array(e.length), n = 0; n < t.length; ++n)
t[n] = e[n].listener || e[n];
return t
}(t) : [],
n
}
,
Ge.listenerCount = function(e, t) {
return "function" == typeof e.listenerCount ? e.listenerCount(t) : tt.call(e,
t)
}
,
Ge.prototype.listenerCount = tt,
Ge.prototype.eventNames = function() {
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : []
}
;
var rt = o(Object.freeze({
__proto__: null,
EventEmitter: Ge,
default: Ge
}))
, it = rt.EventEmitter
, ot = "function" == typeof Object.create ? function(e, t) {
e.super_ = t,
e.prototype = Object.create(t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
})
}
: function(e, t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
, at = /%[sdj%]/g;
function st(e) {
if (!Et(e)) {
for (var t = [], n = 0; n < arguments.length; n++)
t.push(ft(arguments[n]));
return t.join(" ")
}
n = 1;
for (var r = arguments, i = r.length, o = String(e).replace(at, (function(e) {
if ("%%" === e)
return "%";
if (n >= i)
return e;
switch (e) {
case "%s":
return String(r[n++]);
case "%d":
return Number(r[n++]);
case "%j":
try {
return JSON.stringify(r[n++])
} catch (e) {
return "[Circular]"
}
default:
return e
}
}
)), a = r[n]; n < i; a = r[++n])
At(a) || !Ct(a) ? o += " " + a : o += " " + ft(a);
return o
}
function ut(e, n) {
if (kt(t.process))
return function() {
return ut(e, n).apply(this, arguments)
}
;
if (!0 === je.noDeprecation)
return e;
var r = !1;
return function() {
if (!r) {
if (je.throwDeprecation)
throw new Error(n);
je.traceDeprecation ? console.trace(n) : console.error(n),
r = !0
}
return e.apply(this, arguments)
}
}
var lt, ct = {};
function dt(e) {
return kt(lt) && (lt = je.env.NODE_DEBUG || ""),
e = e.toUpperCase(),
ct[e] || (new RegExp("\\b" + e + "\\b","i").test(lt) ? ct[e] = function() {
var t = st.apply(null, arguments);
console.error("%s %d: %s", e, 0, t)
}
: ct[e] = function() {}
),
ct[e]
}
function ft(e, t) {
var n = {
seen: [],
stylize: pt
};
return arguments.length >= 3 && (n.depth = arguments[2]),
arguments.length >= 4 && (n.colors = arguments[3]),
yt(t) ? n.showHidden = t : t && Bt(n, t),
kt(n.showHidden) && (n.showHidden = !1),
kt(n.depth) && (n.depth = 2),
kt(n.colors) && (n.colors = !1),
kt(n.customInspect) && (n.customInspect = !0),
n.colors && (n.stylize = ht),
mt(n, e, n.depth)
}
function ht(e, t) {
var n = ft.styles[t];
return n ? "\x1b[" + ft.colors[n][0] + "m" + e + "\x1b[" + ft.colors[n][1] +
"m" : e
}
function pt(e, t) {
return e
}
function mt(e, t, n) {
if (e.customInspect && t && Tt(t.inspect) && t.inspect !== ft && (!
t.constructor || t.constructor.prototype !== t)) {
var r = t.inspect(n, e);
return Et(r) || (r = mt(e, r, n)),
r
}
var i = function(e, t) {
if (kt(t))
return e.stylize("undefined", "undefined");
if (Et(t)) {
var n = "'" + JSON.stringify(t).replace(/^"|"$/g, "").replace(/'/g,
"\\'").replace(/\\"/g, '"') + "'";
return e.stylize(n, "string")
}
return _t(t) ? e.stylize("" + t, "number") : yt(t) ? e.stylize("" + t,
"boolean") : At(t) ? e.stylize("null", "null") : void 0
}(e, t);
if (i)
return i;
var o = Object.keys(t)
, a = function(e) {
var t = {};
return e.forEach((function(e, n) {
t[e] = !0
}
)),
t
}(o);
if (e.showHidden && (o = Object.getOwnPropertyNames(t)),
Rt(t) && (o.indexOf("message") >= 0 || o.indexOf("description") >= 0))
return gt(t);
if (0 === o.length) {
if (Tt(t)) {
var s = t.name ? ": " + t.name : "";
return e.stylize("[Function" + s + "]", "special")
}
if (Mt(t))
return e.stylize(RegExp.prototype.toString.call(t), "regexp");
if (xt(t))
return e.stylize(Date.prototype.toString.call(t), "date");
if (Rt(t))
return gt(t)
}
var u, l = "", c = !1, d = ["{", "}"];
return bt(t) && (c = !0,
d = ["[", "]"]),
Tt(t) && (l = " [Function" + (t.name ? ": " + t.name : "") + "]"),
Mt(t) && (l = " " + RegExp.prototype.toString.call(t)),
xt(t) && (l = " " + Date.prototype.toUTCString.call(t)),
Rt(t) && (l = " " + gt(t)),
0 !== o.length || c && 0 != t.length ? n < 0 ? Mt(t) ?
e.stylize(RegExp.prototype.toString.call(t), "regexp") : e.stylize("[Object]", "special") :
(e.seen.push(t),
u = c ? function(e, t, n, r, i) {
for (var o = [], a = 0, s = t.length; a < s; ++a)
jt(t, String(a)) ? o.push(vt(e, t, n, r, String(a), !0)) : o.push("");
return i.forEach((function(i) {
i.match(/^\d+$/) || o.push(vt(e, t, n, r, i, !0))
}
)),
o
}(e, t, n, a, o) : o.map((function(r) {
return vt(e, t, n, a, r, c)
}
)),
e.seen.pop(),
function(e, t, n) {
var r = e.reduce((function(e, t) {
return t.indexOf("\n"),
e + t.replace(/\u001b\[\d\d?m/g, "").length + 1
}
), 0);
return r > 60 ? n[0] + ("" === t ? "" : t + "\n ") + " " + e.join(",\n ") + "
" + n[1] : n[0] + t + " " + e.join(", ") + " " + n[1]
}(u, l, d)) : d[0] + l + d[1]
}
function gt(e) {
return "[" + Error.prototype.toString.call(e) + "]"
}
function vt(e, t, n, r, i, o) {
var a, s, u;
if ((u = Object.getOwnPropertyDescriptor(t, i) || {
value: t[i]
}).get ? s = u.set ? e.stylize("[Getter/Setter]", "special") :
e.stylize("[Getter]", "special") : u.set && (s = e.stylize("[Setter]", "special")),
jt(r, i) || (a = "[" + i + "]"),
s || (e.seen.indexOf(u.value) < 0 ? (s = At(n) ? mt(e, u.value, null) : mt(e,
u.value, n - 1)).indexOf("\n") > -1 && (s = o ? s.split("\n").map((function(e) {
return " " + e
}
)).join("\n").substr(2) : "\n" + s.split("\n").map((function(e) {
return " " + e
}
)).join("\n")) : s = e.stylize("[Circular]", "special")),
kt(a)) {
if (o && i.match(/^\d+$/))
return s;
(a = JSON.stringify("" + i)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ?
(a = a.substr(1, a.length - 2),
a = e.stylize(a, "name")) : (a = a.replace(/'/g, "\\'").replace(/\\"/g,
'"').replace(/(^"|"$)/g, "'"),
a = e.stylize(a, "string"))
}
return a + ": " + s
}
function bt(e) {
return Array.isArray(e)
}
function yt(e) {
return "boolean" == typeof e
}
function At(e) {
return null === e
}
function wt(e) {
return null == e
}
function _t(e) {
return "number" == typeof e
}
function Et(e) {
return "string" == typeof e
}
function St(e) {
return "symbol" == typeof e
}
function kt(e) {
return void 0 === e
}
function Mt(e) {
return Ct(e) && "[object RegExp]" === Lt(e)
}
function Ct(e) {
return "object" == typeof e && null !== e
}
function xt(e) {
return Ct(e) && "[object Date]" === Lt(e)
}
function Rt(e) {
return Ct(e) && ("[object Error]" === Lt(e) || e instanceof Error)
}
function Tt(e) {
return "function" == typeof e
}
function It(e) {
return null === e || "boolean" == typeof e || "number" == typeof e ||
"string" == typeof e || "symbol" == typeof e || void 0 === e
}
function Pt(e) {
return oe(e)
}
function Lt(e) {
return Object.prototype.toString.call(e)
}
function Ot(e) {
return e < 10 ? "0" + e.toString(10) : e.toString(10)
}
ft.colors = {
bold: [1, 22],
italic: [3, 23],
underline: [4, 24],
inverse: [7, 27],
white: [37, 39],
grey: [90, 39],
black: [30, 39],
blue: [34, 39],
cyan: [36, 39],
green: [32, 39],
magenta: [35, 39],
red: [31, 39],
yellow: [33, 39]
},
ft.styles = {
special: "cyan",
number: "yellow",
boolean: "yellow",
undefined: "grey",
null: "bold",
string: "green",
date: "magenta",
regexp: "red"
};
var Nt = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct",
"Nov", "Dec"];
function Dt() {
console.log("%s - %s", function() {
var e = new Date
, t = [Ot(e.getHours()), Ot(e.getMinutes()),
Ot(e.getSeconds())].join(":");
return [e.getDate(), Nt[e.getMonth()], t].join(" ")
}(), st.apply(null, arguments))
}
function Bt(e, t) {
if (!t || !Ct(t))
return e;
for (var n = Object.keys(t), r = n.length; r--; )
e[n[r]] = t[n[r]];
return e
}
function jt(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}
var zt, Ft, Ut = {
inherits: ot,
_extend: Bt,
log: Dt,
isBuffer: Pt,
isPrimitive: It,
isFunction: Tt,
isError: Rt,
isDate: xt,
isObject: Ct,
isRegExp: Mt,
isUndefined: kt,
isSymbol: St,
isString: Et,
isNumber: _t,
isNullOrUndefined: wt,
isNull: At,
isBoolean: yt,
isArray: bt,
inspect: ft,
deprecate: ut,
format: st,
debuglog: dt
}, Kt = o(Object.freeze({
__proto__: null,
_extend: Bt,
debuglog: dt,
default: Ut,
deprecate: ut,
format: st,
inherits: ot,
inspect: ft,
isArray: bt,
isBoolean: yt,
isBuffer: Pt,
isDate: xt,
isError: Rt,
isFunction: Tt,
isNull: At,
isNullOrUndefined: wt,
isNumber: _t,
isObject: Ct,
isPrimitive: It,
isRegExp: Mt,
isString: Et,
isSymbol: St,
isUndefined: kt,
log: Dt
}));
function qt() {
if (Ft)
return zt;
function e(e, t) {
var n = Object.keys(e);
if (Object.getOwnPropertySymbols) {
var r = Object.getOwnPropertySymbols(e);
t && (r = r.filter((function(t) {
return Object.getOwnPropertyDescriptor(e, t).enumerable
}
))),
n.push.apply(n, r)
}
return n
}
function t(t) {
for (var r = 1; r < arguments.length; r++) {
var i = null != arguments[r] ? arguments[r] : {};
r % 2 ? e(Object(i), !0).forEach((function(e) {
n(t, e, i[e])
}
)) : Object.getOwnPropertyDescriptors ?
Object.defineProperties(t, Object.getOwnPropertyDescriptors(i)) :
e(Object(i)).forEach((function(e) {
Object.defineProperty(t, e,
Object.getOwnPropertyDescriptor(i, e))
}
))
}
return t
}
function n(e, t, n) {
return (t = i(t))in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n,
e
}
function r(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1,
r.configurable = !0,
"value"in r && (r.writable = !0),
Object.defineProperty(e, i(r.key), r)
}
}
function i(e) {
var t = function(e, t) {
if ("object" != typeof e || null === e)
return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" != typeof r)
return r;
throw new TypeError("@@toPrimitive must return a
primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" == typeof t ? t : String(t)
}
Ft = 1;
var o = de.Buffer
, a = Kt.inspect
, s = a && a.custom || "inspect";
return zt = function() {
function e() {
!function(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a
function")
}(this, e),
this.head = null,
this.tail = null,
this.length = 0
}
var n, i, u;
return n = e,
i = [{
key: "push",
value: function(e) {
var t = {
data: e,
next: null
};
this.length > 0 ? this.tail.next = t : this.head = t,
this.tail = t,
++this.length
}
}, {
key: "unshift",
value: function(e) {
var t = {
data: e,
next: this.head
};
0 === this.length && (this.tail = t),
this.head = t,
++this.length
}
}, {
key: "shift",
value: function() {
if (0 !== this.length) {
var e = this.head.data;
return 1 === this.length ? this.head = this.tail = null :
this.head = this.head.next,
--this.length,
e
}
}
}, {
key: "clear",
value: function() {
this.head = this.tail = null,
this.length = 0
}
}, {
key: "join",
value: function(e) {
if (0 === this.length)
return "";
for (var t = this.head, n = "" + t.data; t = t.next; )
n += e + t.data;
return n
}
}, {
key: "concat",
value: function(e) {
if (0 === this.length)
return o.alloc(0);
for (var t, n, r, i = o.allocUnsafe(e >>> 0), a = this.head, s =
0; a; )
t = a.data,
n = i,
r = s,
o.prototype.copy.call(t, n, r),
s += a.data.length,
a = a.next;
return i
}
}, {
key: "consume",
value: function(e, t) {
var n;
return e < this.head.data.length ? (n =
this.head.data.slice(0, e),
this.head.data = this.head.data.slice(e)) : n = e ===
this.head.data.length ? this.shift() : t ? this._getString(e) : this._getBuffer(e),
n
}
}, {
key: "first",
value: function() {
return this.head.data
}
}, {
key: "_getString",
value: function(e) {
var t = this.head
,n=1
, r = t.data;
for (e -= r.length; t = t.next; ) {
var i = t.data
, o = e > i.length ? i.length : e;
if (o === i.length ? r += i : r += i.slice(0, e),
0 == (e -= o)) {
o === i.length ? (++n,
t.next ? this.head = t.next : this.head = this.tail =
null) : (this.head = t,
t.data = i.slice(o));
break
}
++n
}
return this.length -= n,
r
}
}, {
key: "_getBuffer",
value: function(e) {
var t = o.allocUnsafe(e)
, n = this.head
, r = 1;
for (n.data.copy(t),
e -= n.data.length; n = n.next; ) {
var i = n.data
, a = e > i.length ? i.length : e;
if (i.copy(t, t.length - e, 0, a),
0 == (e -= a)) {
a === i.length ? (++r,
n.next ? this.head = n.next : this.head = this.tail =
null) : (this.head = n,
n.data = i.slice(a));
break
}
++r
}
return this.length -= r,
t
}
}, {
key: s,
value: function(e, n) {
return a(this, t(t({}, n), {}, {
depth: 0,
customInspect: !1
}))
}
}],
i && r(n.prototype, i),
u && r(n, u),
Object.defineProperty(n, "prototype", {
writable: !1
}),
e
}(),
zt
}
function Ht(e, t) {
Wt(e, t),
Vt(e)
}
function Vt(e) {
e._writableState && !e._writableState.emitClose || e._readableState
&& !e._readableState.emitClose || e.emit("close")
}
function Wt(e, t) {
e.emit("error", t)
}
var $t = {
destroy: function(e, t) {
var n = this
, r = this._readableState && this._readableState.destroyed
, i = this._writableState && this._writableState.destroyed;
return r || i ? (t ? t(e) : e && (this._writableState ?
this._writableState.errorEmitted || (this._writableState.errorEmitted = !0,
Se(Wt, this, e)) : Se(Wt, this, e)),
this) : (this._readableState && (this._readableState.destroyed = !0),
this._writableState && (this._writableState.destroyed = !0),
this._destroy(e || null, (function(e) {
!t && e ? n._writableState ? n._writableState.errorEmitted ?
Se(Vt, n) : (n._writableState.errorEmitted = !0,
Se(Ht, n, e)) : Se(Ht, n, e) : t ? (Se(Vt, n),
t(e)) : Se(Vt, n)
}
)),
this)
},
undestroy: function() {
this._readableState && (this._readableState.destroyed = !1,
this._readableState.reading = !1,
this._readableState.ended = !1,
this._readableState.endEmitted = !1),
this._writableState && (this._writableState.destroyed = !1,
this._writableState.ended = !1,
this._writableState.ending = !1,
this._writableState.finalCalled = !1,
this._writableState.prefinished = !1,
this._writableState.finished = !1,
this._writableState.errorEmitted = !1)
},
errorOrDestroy: function(e, t) {
var n = e._readableState
, r = e._writableState;
n && n.autoDestroy || r && r.autoDestroy ? e.destroy(t) :
e.emit("error", t)
}
}
, Yt = {}
, Qt = {};
function Zt(e, t, n) {
n || (n = Error);
var r = function(e) {
var n, r;
function i(n, r, i) {
return e.call(this, function(e, n, r) {
return "string" == typeof t ? t : t(e, n, r)
}(n, r, i)) || this
}
return r = e,
(n = i).prototype = Object.create(r.prototype),
n.prototype.constructor = n,
n.__proto__ = r,
i
}(n);
r.prototype.name = n.name,
r.prototype.code = e,
Qt[e] = r
}
function Gt(e, t) {
if (Array.isArray(e)) {
var n = e.length;
return e = e.map((function(e) {
return String(e)
}
)),
n > 2 ? "one of ".concat(t, " ").concat(e.slice(0, n - 1).join(", "), ", or ")
+ e[n - 1] : 2 === n ? "one of ".concat(t, " ").concat(e[0], " or ").concat(e[1]) : "of
".concat(t, " ").concat(e[0])
}
return "of ".concat(t, " ").concat(String(e))
}
Zt("ERR_INVALID_OPT_VALUE", (function(e, t) {
return 'The value "' + t + '" is invalid for option "' + e + '"'
}
), TypeError),
Zt("ERR_INVALID_ARG_TYPE", (function(e, t, n) {
var r, i, o, a;
if ("string" == typeof t && (i = "not ",
t.substr(!o || o < 0 ? 0 : +o, i.length) === i) ? (r = "must not be",
t = t.replace(/^not /, "")) : r = "must be",
function(e, t, n) {
return (void 0 === n || n > e.length) && (n = e.length),
e.substring(n - t.length, n) === t
}(e, " argument"))
a = "The ".concat(e, " ").concat(r, " ").concat(Gt(t, "type"));
else {
var s = function(e, t, n) {
return "number" != typeof n && (n = 0),
!(n + t.length > e.length) && -1 !== e.indexOf(t, n)
}(e, ".") ? "property" : "argument";
a = 'The "'.concat(e, '" ').concat(s, " ").concat(r, " ").concat(Gt(t,
"type"))
}
return a + ". Received type ".concat(typeof n)
}
), TypeError),
Zt("ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF"),
Zt("ERR_METHOD_NOT_IMPLEMENTED", (function(e) {
return "The " + e + " method is not implemented"
}
)),
Zt("ERR_STREAM_PREMATURE_CLOSE", "Premature close"),
Zt("ERR_STREAM_DESTROYED", (function(e) {
return "Cannot call " + e + " after a stream was destroyed"
}
)),
Zt("ERR_MULTIPLE_CALLBACK", "Callback called multiple times"),
Zt("ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable"),
Zt("ERR_STREAM_WRITE_AFTER_END", "write after end"),
Zt("ERR_STREAM_NULL_VALUES", "May not write null values to stream",
TypeError),
Zt("ERR_UNKNOWN_ENCODING", (function(e) {
return "Unknown encoding: " + e
}
), TypeError),
Zt("ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift()
after end event"),
Yt.codes = Qt;
var Xt, Jt, en, tn, nn = Yt.codes.ERR_INVALID_OPT_VALUE, rn = {
getHighWaterMark: function(e, t, n, r) {
var i = function(e, t, n) {
return null != e.highWaterMark ? e.highWaterMark : t ? e[n] :
null
}(t, r, n);
if (null != i) {
if (!isFinite(i) || Math.floor(i) !== i || i < 0)
throw new nn(r ? n : "highWaterMark",i);
return Math.floor(i)
}
return e.objectMode ? 16 : 16384
}
}, on = function(e, t) {
if (an("noDeprecation"))
return e;
var n = !1;
return function() {
if (!n) {
if (an("throwDeprecation"))
throw new Error(t);
an("traceDeprecation") ? console.trace(t) : console.warn(t),
n = !0
}
return e.apply(this, arguments)
}
};
function an(e) {
try {
if (!r.localStorage)
return !1
} catch (e) {
return !1
}
var t = r.localStorage[e];
return null != t && "true" === String(t).toLowerCase()
}
function sn() {
if (Jt)
return Xt;
function e(e) {
var t = this;
this.next = null,
this.entry = null,
this.finish = function() {
!function(e, t, n) {
var r = e.entry;
for (e.entry = null; r; ) {
var i = r.callback;
t.pendingcb--,
i(n),
r = r.next
}
t.corkedRequestsFree.next = e
}(t, e)
}
}
var t;
Jt = 1,
Xt = _,
_.WritableState = w;
var n, i = {
deprecate: on
}, o = it, a = de.Buffer, s = (void 0 !== r ? r : "undefined" != typeof
window ? window : "undefined" != typeof self ? self : {}).Uint8Array || function() {}
, u = $t, l = rn.getHighWaterMark, c = Yt.codes, d =
c.ERR_INVALID_ARG_TYPE, f = c.ERR_METHOD_NOT_IMPLEMENTED, h =
c.ERR_MULTIPLE_CALLBACK, p = c.ERR_STREAM_CANNOT_PIPE, m =
c.ERR_STREAM_DESTROYED, g = c.ERR_STREAM_NULL_VALUES, v =
c.ERR_STREAM_WRITE_AFTER_END, b = c.ERR_UNKNOWN_ENCODING, y =
u.errorOrDestroy;
function A() {}
function w(n, r, i) {
t = t || un(),
n = n || {},
"boolean" != typeof i && (i = r instanceof t),
this.objectMode = !!n.objectMode,
i && (this.objectMode = this.objectMode || !!n.writableObjectMode),
this.highWaterMark = l(this, n, "writableHighWaterMark", i),
this.finalCalled = !1,
this.needDrain = !1,
this.ending = !1,
this.ended = !1,
this.finished = !1,
this.destroyed = !1;
var o = !1 === n.decodeStrings;
this.decodeStrings = !o,
this.defaultEncoding = n.defaultEncoding || "utf8",
this.length = 0,
this.writing = !1,
this.corked = 0,
this.sync = !0,
this.bufferProcessing = !1,
this.onwrite = function(e) {
!function(e, t) {
var n = e._writableState
, r = n.sync
, i = n.writecb;
if ("function" != typeof i)
throw new h;
if (function(e) {
e.writing = !1,
e.writecb = null,
e.length -= e.writelen,
e.writelen = 0
}(n),
t)
!function(e, t, n, r, i) {
--t.pendingcb,
n ? (Se(i, r),
Se(x, e, t),
e._writableState.errorEmitted = !0,
y(e, r)) : (i(r),
e._writableState.errorEmitted = !0,
y(e, r),
x(e, t))
}(e, n, r, t, i);
else {
var o = M(n) || e.destroyed;
o || n.corked || n.bufferProcessing || !n.bufferedRequest
|| k(e, n),
r ? Se(S, e, n, o, i) : S(e, n, o, i)
}
}(r, e)
}
,
this.writecb = null,
this.writelen = 0,
this.bufferedRequest = null,
this.lastBufferedRequest = null,
this.pendingcb = 0,
this.prefinished = !1,
this.errorEmitted = !1,
this.emitClose = !1 !== n.emitClose,
this.autoDestroy = !!n.autoDestroy,
this.bufferedRequestCount = 0,
this.corkedRequestsFree = new e(this)
}
function _(e) {
var r = this instanceof (t = t || un());
if (!r && !n.call(_, this))
return new _(e);
this._writableState = new w(e,this,r),
this.writable = !0,
e && ("function" == typeof e.write && (this._write = e.write),
"function" == typeof e.writev && (this._writev = e.writev),
"function" == typeof e.destroy && (this._destroy = e.destroy),
"function" == typeof e.final && (this._final = e.final)),
o.call(this)
}
function E(e, t, n, r, i, o, a) {
t.writelen = r,
t.writecb = a,
t.writing = !0,
t.sync = !0,
t.destroyed ? t.onwrite(new m("write")) : n ? e._writev(i, t.onwrite) :
e._write(i, o, t.onwrite),
t.sync = !1
}
function S(e, t, n, r) {
n || function(e, t) {
0 === t.length && t.needDrain && (t.needDrain = !1,
e.emit("drain"))
}(e, t),
t.pendingcb--,
r(),
x(e, t)
}
function k(t, n) {
n.bufferProcessing = !0;
var r = n.bufferedRequest;
if (t._writev && r && r.next) {
var i = n.bufferedRequestCount
, o = new Array(i)
, a = n.corkedRequestsFree;
a.entry = r;
for (var s = 0, u = !0; r; )
o[s] = r,
r.isBuf || (u = !1),
r = r.next,
s += 1;
o.allBuffers = u,
E(t, n, !0, n.length, o, "", a.finish),
n.pendingcb++,
n.lastBufferedRequest = null,
a.next ? (n.corkedRequestsFree = a.next,
a.next = null) : n.corkedRequestsFree = new e(n),
n.bufferedRequestCount = 0
} else {
for (; r; ) {
var l = r.chunk
, c = r.encoding
, d = r.callback;
if (E(t, n, !1, n.objectMode ? 1 : l.length, l, c, d),
r = r.next,
n.bufferedRequestCount--,
n.writing)
break
}
null === r && (n.lastBufferedRequest = null)
}
n.bufferedRequest = r,
n.bufferProcessing = !1
}
function M(e) {
return e.ending && 0 === e.length && null === e.bufferedRequest
&& !e.finished && !e.writing
}
function C(e, t) {
e._final((function(n) {
t.pendingcb--,
n && y(e, n),
t.prefinished = !0,
e.emit("prefinish"),
x(e, t)
}
))
}
function x(e, t) {
var n = M(t);
if (n && (function(e, t) {
t.prefinished || t.finalCalled || ("function" != typeof e._final ||
t.destroyed ? (t.prefinished = !0,
e.emit("prefinish")) : (t.pendingcb++,
t.finalCalled = !0,
Se(C, e, t)))
}(e, t),
0 === t.pendingcb && (t.finished = !0,
e.emit("finish"),
t.autoDestroy))) {
var r = e._readableState;
(!r || r.autoDestroy && r.endEmitted) && e.destroy()
}
return n
}
return Ye(_, o),
w.prototype.getBuffer = function() {
for (var e = this.bufferedRequest, t = []; e; )
t.push(e),
e = e.next;
return t
}
,
function() {
try {
Object.defineProperty(w.prototype, "buffer", {
get: i.deprecate((function() {
return this.getBuffer()
}
), "_writableState.buffer is deprecated. Use
_writableState.getBuffer instead.", "DEP0003")
})
} catch (e) {}
}(),
"function" == typeof Symbol && Symbol.hasInstance && "function" ==
typeof Function.prototype[Symbol.hasInstance] ? (n =
Function.prototype[Symbol.hasInstance],
Object.defineProperty(_, Symbol.hasInstance, {
value: function(e) {
return !!n.call(this, e) || this === _ && e && e._writableState
instanceof w
}
})) : n = function(e) {
return e instanceof this
}
,
_.prototype.pipe = function() {
y(this, new p)
}
,
_.prototype.write = function(e, t, n) {
var r, i = this._writableState, o = !1, u = !i.objectMode && (r = e,
a.isBuffer(r) || r instanceof s);
return u && !a.isBuffer(e) && (e = function(e) {
return a.from(e)
}(e)),
"function" == typeof t && (n = t,
t = null),
u ? t = "buffer" : t || (t = i.defaultEncoding),
"function" != typeof n && (n = A),
i.ending ? function(e, t) {
var n = new v;
y(e, n),
Se(t, n)
}(this, n) : (u || function(e, t, n, r) {
var i;
return null === n ? i = new g : "string" == typeof n ||
t.objectMode || (i = new d("chunk",["string", "Buffer"],n)),
!i || (y(e, i),
Se(r, i),
!1)
}(this, i, e, n)) && (i.pendingcb++,
o = function(e, t, n, r, i, o) {
if (!n) {
var s = function(e, t, n) {
return e.objectMode || !1 === e.decodeStrings || "string"
!= typeof t || (t = a.from(t, n)),
t
}(t, r, i);
r !== s && (n = !0,
i = "buffer",
r = s)
}
var u = t.objectMode ? 1 : r.length;
t.length += u;
var l = t.length < t.highWaterMark;
if (l || (t.needDrain = !0),
t.writing || t.corked) {
var c = t.lastBufferedRequest;
t.lastBufferedRequest = {
chunk: r,
encoding: i,
isBuf: n,
callback: o,
next: null
},
c ? c.next = t.lastBufferedRequest : t.bufferedRequest =
t.lastBufferedRequest,
t.bufferedRequestCount += 1
} else
E(e, t, !1, u, r, i, o);
return l
}(this, i, u, e, t, n)),
o
}
,
_.prototype.cork = function() {
this._writableState.corked++
}
,
_.prototype.uncork = function() {
var e = this._writableState;
e.corked && (e.corked--,
e.writing || e.corked || e.bufferProcessing || !e.bufferedRequest ||
k(this, e))
}
,
_.prototype.setDefaultEncoding = function(e) {
if ("string" == typeof e && (e = e.toLowerCase()),
!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2",
"utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1))
throw new b(e);
return this._writableState.defaultEncoding = e,
this
}
,
Object.defineProperty(_.prototype, "writableBuffer", {
enumerable: !1,
get: function() {
return this._writableState && this._writableState.getBuffer()
}
}),
Object.defineProperty(_.prototype, "writableHighWaterMark", {
enumerable: !1,
get: function() {
return this._writableState.highWaterMark
}
}),
_.prototype._write = function(e, t, n) {
n(new f("_write()"))
}
,
_.prototype._writev = null,
_.prototype.end = function(e, t, n) {
var r = this._writableState;
return "function" == typeof e ? (n = e,
e = null,
t = null) : "function" == typeof t && (n = t,
t = null),
null != e && this.write(e, t),
r.corked && (r.corked = 1,
this.uncork()),
r.ending || function(e, t, n) {
t.ending = !0,
x(e, t),
n && (t.finished ? Se(n) : e.once("finish", n)),
t.ended = !0,
e.writable = !1
}(this, r, n),
this
}
,
Object.defineProperty(_.prototype, "writableLength", {
enumerable: !1,
get: function() {
return this._writableState.length
}
}),
Object.defineProperty(_.prototype, "destroyed", {
enumerable: !1,
get: function() {
return void 0 !== this._writableState &&
this._writableState.destroyed
},
set: function(e) {
this._writableState && (this._writableState.destroyed = e)
}
}),
_.prototype.destroy = u.destroy,
_.prototype._undestroy = u.undestroy,
_.prototype._destroy = function(e, t) {
t(e)
}
,
Xt
}
function un() {
if (tn)
return en;
tn = 1;
var e = Object.keys || function(e) {
var t = [];
for (var n in e)
t.push(n);
return t
}
;
en = a;
var t = _n()
, n = sn();
Ye(a, t);
for (var r = e(n.prototype), i = 0; i < r.length; i++) {
var o = r[i];
a.prototype[o] || (a.prototype[o] = n.prototype[o])
}
function a(e) {
if (!(this instanceof a))
return new a(e);
t.call(this, e),
n.call(this, e),
this.allowHalfOpen = !0,
e && (!1 === e.readable && (this.readable = !1),
!1 === e.writable && (this.writable = !1),
!1 === e.allowHalfOpen && (this.allowHalfOpen = !1,
this.once("end", s)))
}
function s() {
this._writableState.ended || Se(u, this)
}
function u(e) {
e.end()
}
return Object.defineProperty(a.prototype, "writableHighWaterMark", {
enumerable: !1,
get: function() {
return this._writableState.highWaterMark
}
}),
Object.defineProperty(a.prototype, "writableBuffer", {
enumerable: !1,
get: function() {
return this._writableState && this._writableState.getBuffer()
}
}),
Object.defineProperty(a.prototype, "writableLength", {
enumerable: !1,
get: function() {
return this._writableState.length
}
}),
Object.defineProperty(a.prototype, "destroyed", {
enumerable: !1,
get: function() {
return void 0 !== this._readableState && void 0 !==
this._writableState && this._readableState.destroyed && this._writableState.destroyed
},
set: function(e) {
void 0 !== this._readableState && void 0 !== this._writableState
&& (this._readableState.destroyed = e,
this._writableState.destroyed = e)
}
}),
en
}
var ln, cn = {};
function dn() {
if (ln)
return cn;
ln = 1;
var e = Ue().Buffer
, t = e.isEncoding || function(e) {
switch ((e = "" + e) && e.toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
case "raw":
return !0;
default:
return !1
}
}
;
function n(n) {
var r;
switch (this.encoding = function(n) {
var r = function(e) {
if (!e)
return "utf8";
for (var t; ; )
switch (e) {
case "utf8":
case "utf-8":
return "utf8";
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return "utf16le";
case "latin1":
case "binary":
return "latin1";
case "base64":
case "ascii":
case "hex":
return e;
default:
if (t)
return;
e = ("" + e).toLowerCase(),
t = !0
}
}(n);
if ("string" != typeof r && (e.isEncoding === t || !t(n)))
throw new Error("Unknown encoding: " + n);
return r || n
}(n),
this.encoding) {
case "utf16le":
this.text = o,
this.end = a,
r = 4;
break;
case "utf8":
this.fillLast = i,
r = 4;
break;
case "base64":
this.text = s,
this.end = u,
r = 3;
break;
default:
return this.write = l,
void (this.end = c)
}
this.lastNeed = 0,
this.lastTotal = 0,
this.lastChar = e.allocUnsafe(r)
}
function r(e) {
return e <= 127 ? 0 : e >> 5 == 6 ? 2 : e >> 4 == 14 ? 3 : e >> 3 ==
30 ? 4 : e >> 6 == 2 ? -1 : -2
}
function i(e) {
var t = this.lastTotal - this.lastNeed
, n = function(e, t, n) {
if (128 != (192 & t[0]))
return e.lastNeed = 0,
"\ufffd";
if (e.lastNeed > 1 && t.length > 1) {
if (128 != (192 & t[1]))
return e.lastNeed = 1,
"\ufffd";
if (e.lastNeed > 2 && t.length > 2 && 128 != (192 & t[2]))
return e.lastNeed = 2,
"\ufffd"
}
}(this, e);
return void 0 !== n ? n : this.lastNeed <= e.length ?
(e.copy(this.lastChar, t, 0, this.lastNeed),
this.lastChar.toString(this.encoding, 0, this.lastTotal)) :
(e.copy(this.lastChar, t, 0, e.length),
void (this.lastNeed -= e.length))
}
function o(e, t) {
if ((e.length - t) % 2 == 0) {
var n = e.toString("utf16le", t);
if (n) {
var r = n.charCodeAt(n.length - 1);
if (r >= 55296 && r <= 56319)
return this.lastNeed = 2,
this.lastTotal = 4,
this.lastChar[0] = e[e.length - 2],
this.lastChar[1] = e[e.length - 1],
n.slice(0, -1)
}
return n
}
return this.lastNeed = 1,
this.lastTotal = 2,
this.lastChar[0] = e[e.length - 1],
e.toString("utf16le", t, e.length - 1)
}
function a(e) {
var t = e && e.length ? this.write(e) : "";
if (this.lastNeed) {
var n = this.lastTotal - this.lastNeed;
return t + this.lastChar.toString("utf16le", 0, n)
}
return t
}
function s(e, t) {
var n = (e.length - t) % 3;
return 0 === n ? e.toString("base64", t) : (this.lastNeed = 3 - n,
this.lastTotal = 3,
1 === n ? this.lastChar[0] = e[e.length - 1] : (this.lastChar[0] =
e[e.length - 2],
this.lastChar[1] = e[e.length - 1]),
e.toString("base64", t, e.length - n))
}
function u(e) {
var t = e && e.length ? this.write(e) : "";
return this.lastNeed ? t + this.lastChar.toString("base64", 0, 3 -
this.lastNeed) : t
}
function l(e) {
return e.toString(this.encoding)
}
function c(e) {
return e && e.length ? this.write(e) : ""
}
return cn.StringDecoder = n,
n.prototype.write = function(e) {
if (0 === e.length)
return "";
var t, n;
if (this.lastNeed) {
if (void 0 === (t = this.fillLast(e)))
return "";
n = this.lastNeed,
this.lastNeed = 0
} else
n = 0;
return n < e.length ? t ? t + this.text(e, n) : this.text(e, n) : t || ""
}
,
n.prototype.end = function(e) {
var t = e && e.length ? this.write(e) : "";
return this.lastNeed ? t + "\ufffd" : t
}
,
n.prototype.text = function(e, t) {
var n = function(e, t, n) {
var i = t.length - 1;
if (i < n)
return 0;
var o = r(t[i]);
return o >= 0 ? (o > 0 && (e.lastNeed = o - 1),
o) : --i < n || -2 === o ? 0 : (o = r(t[i])) >= 0 ? (o > 0 &&
(e.lastNeed = o - 2),
o) : --i < n || -2 === o ? 0 : (o = r(t[i])) >= 0 ? (o > 0 && (2 ===
o ? o = 0 : e.lastNeed = o - 3),
o) : 0
}(this, e, t);
if (!this.lastNeed)
return e.toString("utf8", t);
this.lastTotal = n;
var i = e.length - (n - this.lastNeed);
return e.copy(this.lastChar, 0, i),
e.toString("utf8", t, i)
}
,
n.prototype.fillLast = function(e) {
if (this.lastNeed <= e.length)
return e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0,
this.lastNeed),
this.lastChar.toString(this.encoding, 0, this.lastTotal);
e.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, e.length),
this.lastNeed -= e.length
}
,
cn
}
var fn = Yt.codes.ERR_STREAM_PREMATURE_CLOSE;
function hn() {}
var pn, mn, gn, vn, bn, yn, An = function e(t, n, r) {
if ("function" == typeof n)
return e(t, null, n);
n || (n = {}),
r = function(e) {
var t = !1;
return function() {
if (!t) {
t = !0;
for (var n = arguments.length, r = new Array(n), i = 0; i < n;
i++)
r[i] = arguments[i];
e.apply(this, r)
}
}
}(r || hn);
var i = n.readable || !1 !== n.readable && t.readable
, o = n.writable || !1 !== n.writable && t.writable
, a = function() {
t.writable || u()
}
, s = t._writableState && t._writableState.finished
, u = function() {
o = !1,
s = !0,
i || r.call(t)
}
, l = t._readableState && t._readableState.endEmitted
, c = function() {
i = !1,
l = !0,
o || r.call(t)
}
, d = function(e) {
r.call(t, e)
}
, f = function() {
var e;
return i && !l ? (t._readableState && t._readableState.ended || (e =
new fn),
r.call(t, e)) : o && !s ? (t._writableState && t._writableState.ended ||
(e = new fn),
r.call(t, e)) : void 0
}
, h = function() {
t.req.on("finish", u)
};
return function(e) {
return e.setHeader && "function" == typeof e.abort
}(t) ? (t.on("complete", u),
t.on("abort", f),
t.req ? h() : t.on("request", h)) : o && !t._writableState && (t.on("end", a),
t.on("close", a)),
t.on("end", c),
t.on("finish", u),
!1 !== n.error && t.on("error", d),
t.on("close", f),
function() {
t.removeListener("complete", u),
t.removeListener("abort", f),
t.removeListener("request", h),
t.req && t.req.removeListener("finish", u),
t.removeListener("end", a),
t.removeListener("close", a),
t.removeListener("finish", u),
t.removeListener("end", c),
t.removeListener("error", d),
t.removeListener("close", f)
}
};
function wn() {
if (mn)
return pn;
var e;
function t(e, t, n) {
return (t = function(e) {
var t = function(e, t) {
if ("object" != typeof e || null === e)
return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" != typeof r)
return r;
throw new TypeError("@@toPrimitive must return a
primitive value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" == typeof t ? t : String(t)
}(t))in e ? Object.defineProperty(e, t, {
value: n,
enumerable: !0,
configurable: !0,
writable: !0
}) : e[t] = n,
e
}
mn = 1;
var n = An
, r = Symbol("lastResolve")
, i = Symbol("lastReject")
, o = Symbol("error")
, a = Symbol("ended")
, s = Symbol("lastPromise")
, u = Symbol("handlePromise")
, l = Symbol("stream");
function c(e, t) {
return {
value: e,
done: t
}
}
function d(e) {
var t = e[r];
if (null !== t) {
var n = e[l].read();
null !== n && (e[s] = null,
e[r] = null,
e[i] = null,
t(c(n, !1)))
}
}
function f(e) {
Se(d, e)
}
var h = Object.getPrototypeOf((function() {}
))
, p = Object.setPrototypeOf((t(e = {
get stream() {
return this[l]
},
next: function() {
var e = this
, t = this[o];
if (null !== t)
return Promise.reject(t);
if (this[a])
return Promise.resolve(c(void 0, !0));
if (this[l].destroyed)
return new Promise((function(t, n) {
Se((function() {
e[o] ? n(e[o]) : t(c(void 0, !0))
}
))
}
));
var n, r = this[s];
if (r)
n = new Promise(function(e, t) {
return function(n, r) {
e.then((function() {
t[a] ? n(c(void 0, !0)) : t[u](n, r)
}
), r)
}
}(r, this));
else {
var i = this[l].read();
if (null !== i)
return Promise.resolve(c(i, !1));
n = new Promise(this[u])
}
return this[s] = n,
n
}
}, Symbol.asyncIterator, (function() {
return this
}
)),
t(e, "return", (function() {
var e = this;
return new Promise((function(t, n) {
e[l].destroy(null, (function(e) {
e ? n(e) : t(c(void 0, !0))
}
))
}
))
}
)),
e), h);
return pn = function(e) {
var d, h = Object.create(p, (t(d = {}, l, {
value: e,
writable: !0
}),
t(d, r, {
value: null,
writable: !0
}),
t(d, i, {
value: null,
writable: !0
}),
t(d, o, {
value: null,
writable: !0
}),
t(d, a, {
value: e._readableState.endEmitted,
writable: !0
}),
t(d, u, {
value: function(e, t) {
var n = h[l].read();
n ? (h[s] = null,
h[r] = null,
h[i] = null,
e(c(n, !1))) : (h[r] = e,
h[i] = t)
},
writable: !0
}),
d));
return h[s] = null,
n(e, (function(e) {
if (e && "ERR_STREAM_PREMATURE_CLOSE" !== e.code) {
var t = h[i];
return null !== t && (h[s] = null,
h[r] = null,
h[i] = null,
t(e)),
void (h[o] = e)
}
var n = h[r];
null !== n && (h[s] = null,
h[r] = null,
h[i] = null,
n(c(void 0, !0))),
h[a] = !0
}
)),
e.on("readable", f.bind(null, h)),
h
}
,
pn
}
function _n() {
if (yn)
return bn;
var e;
yn = 1,
bn = _,
_.ReadableState = w,
rt.EventEmitter;
var t, n = function(e, t) {
return e.listeners(t).length
}, i = it, o = de.Buffer, a = (void 0 !== r ? r : "undefined" != typeof window
? window : "undefined" != typeof self ? self : {}).Uint8Array || function() {}
, s = Kt;
t = s && s.debuglog ? s.debuglog("stream") : function() {}
;
var u, l, c, d = qt(), f = $t, h = rn.getHighWaterMark, p = Yt.codes, m =
p.ERR_INVALID_ARG_TYPE, g = p.ERR_STREAM_PUSH_AFTER_EOF, v =
p.ERR_METHOD_NOT_IMPLEMENTED, b =
p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
Ye(_, i);
var y = f.errorOrDestroy
, A = ["error", "close", "destroy", "pause", "resume"];
function w(t, n, r) {
e = e || un(),
t = t || {},
"boolean" != typeof r && (r = n instanceof e),
this.objectMode = !!t.objectMode,
r && (this.objectMode = this.objectMode || !!t.readableObjectMode),
this.highWaterMark = h(this, t, "readableHighWaterMark", r),
this.buffer = new d,
this.length = 0,
this.pipes = null,
this.pipesCount = 0,
this.flowing = null,
this.ended = !1,
this.endEmitted = !1,
this.reading = !1,
this.sync = !0,
this.needReadable = !1,
this.emittedReadable = !1,
this.readableListening = !1,
this.resumeScheduled = !1,
this.paused = !0,
this.emitClose = !1 !== t.emitClose,
this.autoDestroy = !!t.autoDestroy,
this.destroyed = !1,
this.defaultEncoding = t.defaultEncoding || "utf8",
this.awaitDrain = 0,
this.readingMore = !1,
this.decoder = null,
this.encoding = null,
t.encoding && (u || (u = dn().StringDecoder),
this.decoder = new u(t.encoding),
this.encoding = t.encoding)
}
function _(t) {
if (e = e || un(),
!(this instanceof _))
return new _(t);
var n = this instanceof e;
this._readableState = new w(t,this,n),
this.readable = !0,
t && ("function" == typeof t.read && (this._read = t.read),
"function" == typeof t.destroy && (this._destroy = t.destroy)),
i.call(this)
}
function E(e, n, r, i, s) {
t("readableAddChunk", n);
var u, l = e._readableState;
if (null === n)
l.reading = !1,
function(e, n) {
if (t("onEofChunk"),
!n.ended) {
if (n.decoder) {
var r = n.decoder.end();
r && r.length && (n.buffer.push(r),
n.length += n.objectMode ? 1 : r.length)
}
n.ended = !0,
n.sync ? C(e) : (n.needReadable = !1,
n.emittedReadable || (n.emittedReadable = !0,
x(e)))
}
}(e, l);
else if (s || (u = function(e, t) {
var n, r;
return r = t,
o.isBuffer(r) || r instanceof a || "string" == typeof t || void 0 === t
|| e.objectMode || (n = new m("chunk",["string", "Buffer", "Uint8Array"],t)),
n
}(l, n)),
u)
y(e, u);
else if (l.objectMode || n && n.length > 0)
if ("string" == typeof n || l.objectMode ||
Object.getPrototypeOf(n) === o.prototype || (n = function(e) {
return o.from(e)
}(n)),
i)
l.endEmitted ? y(e, new b) : S(e, l, n, !0);
else if (l.ended)
y(e, new g);
else {
if (l.destroyed)
return !1;
l.reading = !1,
l.decoder && !r ? (n = l.decoder.write(n),
l.objectMode || 0 !== n.length ? S(e, l, n, !1) : R(e, l)) : S(e, l,
n, !1)
}
else
i || (l.reading = !1,
R(e, l));
return !l.ended && (l.length < l.highWaterMark || 0 === l.length)
}
function S(e, t, n, r) {
t.flowing && 0 === t.length && !t.sync ? (t.awaitDrain = 0,
e.emit("data", n)) : (t.length += t.objectMode ? 1 : n.length,
r ? t.buffer.unshift(n) : t.buffer.push(n),
t.needReadable && C(e)),
R(e, t)
}
Object.defineProperty(_.prototype, "destroyed", {
enumerable: !1,
get: function() {
return void 0 !== this._readableState &&
this._readableState.destroyed
},
set: function(e) {
this._readableState && (this._readableState.destroyed = e)
}
}),
_.prototype.destroy = f.destroy,
_.prototype._undestroy = f.undestroy,
_.prototype._destroy = function(e, t) {
t(e)
}
,
_.prototype.push = function(e, t) {
var n, r = this._readableState;
return r.objectMode ? n = !0 : "string" == typeof e && ((t = t ||
r.defaultEncoding) !== r.encoding && (e = o.from(e, t),
t = ""),
n = !0),
E(this, e, t, !1, n)
}
,
_.prototype.unshift = function(e) {
return E(this, e, null, !0, !1)
}
,
_.prototype.isPaused = function() {
return !1 === this._readableState.flowing
}
,
_.prototype.setEncoding = function(e) {
u || (u = dn().StringDecoder);
var t = new u(e);
this._readableState.decoder = t,
this._readableState.encoding =
this._readableState.decoder.encoding;
for (var n = this._readableState.buffer.head, r = ""; null !== n; )
r += t.write(n.data),
n = n.next;
return this._readableState.buffer.clear(),
"" !== r && this._readableState.buffer.push(r),
this._readableState.length = r.length,
this
}
;
var k = 1073741824;
function M(e, t) {
return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e !
= e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark
&& (t.highWaterMark = function(e) {
return e >= k ? e = k : (e--,
e |= e >>> 1,
e |= e >>> 2,
e |= e >>> 4,
e |= e >>> 8,
e |= e >>> 16,
e++),
e
}(e)),
e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0,
0))
}
function C(e) {
var n = e._readableState;
t("emitReadable", n.needReadable, n.emittedReadable),
n.needReadable = !1,
n.emittedReadable || (t("emitReadable", n.flowing),
n.emittedReadable = !0,
Se(x, e))
}
function x(e) {
var n = e._readableState;
t("emitReadable_", n.destroyed, n.length, n.ended),
n.destroyed || !n.length && !n.ended || (e.emit("readable"),
n.emittedReadable = !1),
n.needReadable = !n.flowing && !n.ended && n.length <=
n.highWaterMark,
O(e)
}
function R(e, t) {
t.readingMore || (t.readingMore = !0,
Se(T, e, t))
}
function T(e, n) {
for (; !n.reading && !n.ended && (n.length < n.highWaterMark ||
n.flowing && 0 === n.length); ) {
var r = n.length;
if (t("maybeReadMore read 0"),
e.read(0),
r === n.length)
break
}
n.readingMore = !1
}
function I(e) {
var t = e._readableState;
t.readableListening = e.listenerCount("readable") > 0,
t.resumeScheduled && !t.paused ? t.flowing = !0 :
e.listenerCount("data") > 0 && e.resume()
}
function P(e) {
t("readable nexttick read 0"),
e.read(0)
}
function L(e, n) {
t("resume", n.reading),
n.reading || e.read(0),
n.resumeScheduled = !1,
e.emit("resume"),
O(e),
n.flowing && !n.reading && e.read(0)
}
function O(e) {
var n = e._readableState;
for (t("flow", n.flowing); n.flowing && null !== e.read(); )
;
}
function N(e, t) {
return 0 === t.length ? null : (t.objectMode ? n = t.buffer.shift() : !e ||
e >= t.length ? (n = t.decoder ? t.buffer.join("") : 1 === t.buffer.length ? t.buffer.first() :
t.buffer.concat(t.length),
t.buffer.clear()) : n = t.buffer.consume(e, t.decoder),
n);
var n
}
function D(e) {
var n = e._readableState;
t("endReadable", n.endEmitted),
n.endEmitted || (n.ended = !0,
Se(B, n, e))
}
function B(e, n) {
if (t("endReadableNT", e.endEmitted, e.length),
!e.endEmitted && 0 === e.length && (e.endEmitted = !0,
n.readable = !1,
n.emit("end"),
e.autoDestroy)) {
var r = n._writableState;
(!r || r.autoDestroy && r.finished) && n.destroy()
}
}
function j(e, t) {
for (var n = 0, r = e.length; n < r; n++)
if (e[n] === t)
return n;
return -1
}
return _.prototype.read = function(e) {
t("read", e),
e = parseInt(e, 10);
var n = this._readableState
, r = e;
if (0 !== e && (n.emittedReadable = !1),
0 === e && n.needReadable && ((0 !== n.highWaterMark ? n.length
>= n.highWaterMark : n.length > 0) || n.ended))
return t("read: emitReadable", n.length, n.ended),
0 === n.length && n.ended ? D(this) : C(this),
null;
if (0 === (e = M(e, n)) && n.ended)
return 0 === n.length && D(this),
null;
var i, o = n.needReadable;
return t("need readable", o),
(0 === n.length || n.length - e < n.highWaterMark) && t("length less
than watermark", o = !0),
n.ended || n.reading ? t("reading or ended", o = !1) : o && (t("do
read"),
n.reading = !0,
n.sync = !0,
0 === n.length && (n.needReadable = !0),
this._read(n.highWaterMark),
n.sync = !1,
n.reading || (e = M(r, n))),
null === (i = e > 0 ? N(e, n) : null) ? (n.needReadable = n.length <=
n.highWaterMark,
e = 0) : (n.length -= e,
n.awaitDrain = 0),
0 === n.length && (n.ended || (n.needReadable = !0),
r !== e && n.ended && D(this)),
null !== i && this.emit("data", i),
i
}
,
_.prototype._read = function(e) {
y(this, new v("_read()"))
}
,
_.prototype.pipe = function(e, r) {
var i = this
, o = this._readableState;
switch (o.pipesCount) {
case 0:
o.pipes = e;
break;
case 1:
o.pipes = [o.pipes, e];
break;
default:
o.pipes.push(e)
}
o.pipesCount += 1,
t("pipe count=%d opts=%j", o.pipesCount, r);
var a = r && !1 === r.end || e === je.stdout || e === je.stderr ? m : u;
function s(n, r) {
t("onunpipe"),
n === i && r && !1 === r.hasUnpiped && (r.hasUnpiped = !0,
t("cleanup"),
e.removeListener("close", h),
e.removeListener("finish", p),
e.removeListener("drain", l),
e.removeListener("error", f),
e.removeListener("unpipe", s),
i.removeListener("end", u),
i.removeListener("end", m),
i.removeListener("data", d),
c = !0,
!o.awaitDrain || e._writableState && !e._writableState.needDrain
|| l())
}
function u() {
t("onend"),
e.end()
}
o.endEmitted ? Se(a) : i.once("end", a),
e.on("unpipe", s);
var l = function(e) {
return function() {
var r = e._readableState;
t("pipeOnDrain", r.awaitDrain),
r.awaitDrain && r.awaitDrain--,
0 === r.awaitDrain && n(e, "data") && (r.flowing = !0,
O(e))
}
}(i);
e.on("drain", l);
var c = !1;
function d(n) {
t("ondata");
var r = e.write(n);
t("dest.write", r),
!1 === r && ((1 === o.pipesCount && o.pipes === e ||
o.pipesCount > 1 && -1 !== j(o.pipes, e)) && !c && (t("false write response, pause",
o.awaitDrain),
o.awaitDrain++),
i.pause())
}
function f(r) {
t("onerror", r),
m(),
e.removeListener("error", f),
0 === n(e, "error") && y(e, r)
}
function h() {
e.removeListener("finish", p),
m()
}
function p() {
t("onfinish"),
e.removeListener("close", h),
m()
}
function m() {
t("unpipe"),
i.unpipe(e)
}
return i.on("data", d),
function(e, t, n) {
if ("function" == typeof e.prependListener)
return e.prependListener(t, n);
e._events && e._events[t] ? Array.isArray(e._events[t]) ?
e._events[t].unshift(n) : e._events[t] = [n, e._events[t]] : e.on(t, n)
}(e, "error", f),
e.once("close", h),
e.once("finish", p),
e.emit("pipe", i),
o.flowing || (t("pipe resume"),
i.resume()),
e
}
,
_.prototype.unpipe = function(e) {
var t = this._readableState
,n={
hasUnpiped: !1
};
if (0 === t.pipesCount)
return this;
if (1 === t.pipesCount)
return e && e !== t.pipes || (e || (e = t.pipes),
t.pipes = null,
t.pipesCount = 0,
t.flowing = !1,
e && e.emit("unpipe", this, n)),
this;
if (!e) {
var r = t.pipes
, i = t.pipesCount;
t.pipes = null,
t.pipesCount = 0,
t.flowing = !1;
for (var o = 0; o < i; o++)
r[o].emit("unpipe", this, {
hasUnpiped: !1
});
return this
}
var a = j(t.pipes, e);
return -1 === a || (t.pipes.splice(a, 1),
t.pipesCount -= 1,
1 === t.pipesCount && (t.pipes = t.pipes[0]),
e.emit("unpipe", this, n)),
this
}
,
_.prototype.on = function(e, n) {
var r = i.prototype.on.call(this, e, n)
, o = this._readableState;
return "data" === e ? (o.readableListening =
this.listenerCount("readable") > 0,
!1 !== o.flowing && this.resume()) : "readable" === e &&
(o.endEmitted || o.readableListening || (o.readableListening = o.needReadable = !0,
o.flowing = !1,
o.emittedReadable = !1,
t("on readable", o.length, o.reading),
o.length ? C(this) : o.reading || Se(P, this))),
r
}
,
_.prototype.addListener = _.prototype.on,
_.prototype.removeListener = function(e, t) {
var n = i.prototype.removeListener.call(this, e, t);
return "readable" === e && Se(I, this),
n
}
,
_.prototype.removeAllListeners = function(e) {
var t = i.prototype.removeAllListeners.apply(this, arguments);
return "readable" !== e && void 0 !== e || Se(I, this),
t
}
,
_.prototype.resume = function() {
var e = this._readableState;
return e.flowing || (t("resume"),
e.flowing = !e.readableListening,
function(e, t) {
t.resumeScheduled || (t.resumeScheduled = !0,
Se(L, e, t))
}(this, e)),
e.paused = !1,
this
}
,
_.prototype.pause = function() {
return t("call pause flowing=%j", this._readableState.flowing),
!1 !== this._readableState.flowing && (t("pause"),
this._readableState.flowing = !1,
this.emit("pause")),
this._readableState.paused = !0,
this
}
,
_.prototype.wrap = function(e) {
var n = this
, r = this._readableState
, i = !1;
for (var o in e.on("end", (function() {
if (t("wrapped end"),
r.decoder && !r.ended) {
var e = r.decoder.end();
e && e.length && n.push(e)
}
n.push(null)
}
)),
e.on("data", (function(o) {
t("wrapped data"),
r.decoder && (o = r.decoder.write(o)),
r.objectMode && null == o || (r.objectMode || o && o.length) &&
(n.push(o) || (i = !0,
e.pause()))
}
)),
e)
void 0 === this[o] && "function" == typeof e[o] && (this[o] =
function(t) {
return function() {
return e[t].apply(e, arguments)
}
}(o));
for (var a = 0; a < A.length; a++)
e.on(A[a], this.emit.bind(this, A[a]));
return this._read = function(n) {
t("wrapped _read", n),
i && (i = !1,
e.resume())
}
,
this
}
,
"function" == typeof Symbol && (_.prototype[Symbol.asyncIterator] =
function() {
return void 0 === l && (l = wn()),
l(this)
}
),
Object.defineProperty(_.prototype, "readableHighWaterMark", {
enumerable: !1,
get: function() {
return this._readableState.highWaterMark
}
}),
Object.defineProperty(_.prototype, "readableBuffer", {
enumerable: !1,
get: function() {
return this._readableState && this._readableState.buffer
}
}),
Object.defineProperty(_.prototype, "readableFlowing", {
enumerable: !1,
get: function() {
return this._readableState.flowing
},
set: function(e) {
this._readableState && (this._readableState.flowing = e)
}
}),
_._fromList = N,
Object.defineProperty(_.prototype, "readableLength", {
enumerable: !1,
get: function() {
return this._readableState.length
}
}),
"function" == typeof Symbol && (_.from = function(e, t) {
return void 0 === c && (c = vn ? gn : (vn = 1,
gn = function() {
throw new Error("Readable.from is not available in the
browser")
}
)),
c(_, e, t)
}
),
bn
}
var En = In
, Sn = Yt.codes
, kn = Sn.ERR_METHOD_NOT_IMPLEMENTED
, Mn = Sn.ERR_MULTIPLE_CALLBACK
, Cn = Sn.ERR_TRANSFORM_ALREADY_TRANSFORMING
, xn = Sn.ERR_TRANSFORM_WITH_LENGTH_0
, Rn = un();
function Tn(e, t) {
var n = this._transformState;
n.transforming = !1;
var r = n.writecb;
if (null === r)
return this.emit("error", new Mn);
n.writechunk = null,
n.writecb = null,
null != t && this.push(t),
r(e);
var i = this._readableState;
i.reading = !1,
(i.needReadable || i.length < i.highWaterMark) &&
this._read(i.highWaterMark)
}
function In(e) {
if (!(this instanceof In))
return new In(e);
Rn.call(this, e),
this._transformState = {
afterTransform: Tn.bind(this),
needTransform: !1,
transforming: !1,
writecb: null,
writechunk: null,
writeencoding: null
},
this._readableState.needReadable = !0,
this._readableState.sync = !1,
e && ("function" == typeof e.transform && (this._transform =
e.transform),
"function" == typeof e.flush && (this._flush = e.flush)),
this.on("prefinish", Pn)
}
function Pn() {
var e = this;
"function" != typeof this._flush || this._readableState.destroyed ?
Ln(this, null, null) : this._flush((function(t, n) {
Ln(e, t, n)
}
))
}
function Ln(e, t, n) {
if (t)
return e.emit("error", t);
if (null != n && e.push(n),
e._writableState.length)
throw new xn;
if (e._transformState.transforming)
throw new Cn;
return e.push(null)
}
Ye(In, Rn),
In.prototype.push = function(e, t) {
return this._transformState.needTransform = !1,
Rn.prototype.push.call(this, e, t)
}
,
In.prototype._transform = function(e, t, n) {
n(new kn("_transform()"))
}
,
In.prototype._write = function(e, t, n) {
var r = this._transformState;
if (r.writecb = n,
r.writechunk = e,
r.writeencoding = t,
!r.transforming) {
var i = this._readableState;
(r.needTransform || i.needReadable || i.length < i.highWaterMark)
&& this._read(i.highWaterMark)
}
}
,
In.prototype._read = function(e) {
var t = this._transformState;
null === t.writechunk || t.transforming ? t.needTransform = !0 :
(t.transforming = !0,
this._transform(t.writechunk, t.writeencoding, t.afterTransform))
}
,
In.prototype._destroy = function(e, t) {
Rn.prototype._destroy.call(this, e, (function(e) {
t(e)
}
))
}
;
var On, Nn = Bn, Dn = En;
function Bn(e) {
if (!(this instanceof Bn))
return new Bn(e);
Dn.call(this, e)
}
Ye(Bn, Dn),
Bn.prototype._transform = function(e, t, n) {
n(null, e)
}
;
var jn = Yt.codes
, zn = jn.ERR_MISSING_ARGS
, Fn = jn.ERR_STREAM_DESTROYED;
function Un(e) {
if (e)
throw e
}
function Kn(e) {
e()
}
function qn(e, t) {
return e.pipe(t)
}
var Hn = function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
var r, i = function(e) {
return e.length ? "function" != typeof e[e.length - 1] ? Un : e.pop() :
Un
}(t);
if (Array.isArray(t[0]) && (t = t[0]),
t.length < 2)
throw new zn("streams");
var o = t.map((function(e, n) {
var a = n < t.length - 1;
return function(e, t, n, r) {
r = function(e) {
var t = !1;
return function() {
t || (t = !0,
e.apply(void 0, arguments))
}
}(r);
var i = !1;
e.on("close", (function() {
i = !0
}
)),
void 0 === On && (On = An),
On(e, {
readable: t,
writable: n
}, (function(e) {
if (e)
return r(e);
i = !0,
r()
}
));
var o = !1;
return function(t) {
if (!i && !o)
return o = !0,
function(e) {
return e.setHeader && "function" == typeof e.abort
}(e) ? e.abort() : "function" == typeof e.destroy ?
e.destroy() : void r(t || new Fn("pipe"))
}
}(e, a, n > 0, (function(e) {
r || (r = e),
e && o.forEach(Kn),
a || (o.forEach(Kn),
i(r))
}
))
}
));
return t.reduce(qn)
};
!function(e, t) {
(t = e.exports = _n()).Stream = t,
t.Readable = t,
t.Writable = sn(),
t.Duplex = un(),
t.Transform = En,
t.PassThrough = Nn,
t.finished = An,
t.pipeline = Hn
}(Qe, Qe.exports);
var Vn = Qe.exports
, Wn = Ue().Buffer
, $n = Vn.Transform;
function Yn(e) {
$n.call(this),
this._block = Wn.allocUnsafe(e),
this._blockSize = e,
this._blockOffset = 0,
this._length = [0, 0, 0, 0],
this._finalized = !1
}
Ye(Yn, $n),
Yn.prototype._transform = function(e, t, n) {
var r = null;
try {
this.update(e, t)
} catch (e) {
r=e
}
n(r)
}
,
Yn.prototype._flush = function(e) {
var t = null;
try {
this.push(this.digest())
} catch (e) {
t=e
}
e(t)
}
,
Yn.prototype.update = function(e, t) {
if (function(e, t) {
if (!Wn.isBuffer(e) && "string" != typeof e)
throw new TypeError(t + " must be a string or a buffer")
}(e, "Data"),
this._finalized)
throw new Error("Digest already called");
Wn.isBuffer(e) || (e = Wn.from(e, t));
for (var n = this._block, r = 0; this._blockOffset + e.length - r >=
this._blockSize; ) {
for (var i = this._blockOffset; i < this._blockSize; )
n[i++] = e[r++];
this._update(),
this._blockOffset = 0
}
for (; r < e.length; )
n[this._blockOffset++] = e[r++];
for (var o = 0, a = 8 * e.length; a > 0; ++o)
this._length[o] += a,
(a = this._length[o] / 4294967296 | 0) > 0 && (this._length[o] -=
4294967296 * a);
return this
}
,
Yn.prototype._update = function() {
throw new Error("_update is not implemented")
}
,
Yn.prototype.digest = function(e) {
if (this._finalized)
throw new Error("Digest already called");
this._finalized = !0;
var t = this._digest();
void 0 !== e && (t = t.toString(e)),
this._block.fill(0),
this._blockOffset = 0;
for (var n = 0; n < 4; ++n)
this._length[n] = 0;
return t
}
,
Yn.prototype._digest = function() {
throw new Error("_digest is not implemented")
}
;
var Qn = Yn
, Zn = Ye
, Gn = Qn
, Xn = Ue().Buffer
, Jn = new Array(16);
function er() {
Gn.call(this, 64),
this._a = 1732584193,
this._b = 4023233417,
this._c = 2562383102,
this._d = 271733878
}
function tr(e, t) {
return e << t | e >>> 32 - t
}
function nr(e, t, n, r, i, o, a) {
return tr(e + (t & n | ~t & r) + i + o | 0, a) + t | 0
}
function rr(e, t, n, r, i, o, a) {
return tr(e + (t & r | n & ~r) + i + o | 0, a) + t | 0
}
function ir(e, t, n, r, i, o, a) {
return tr(e + (t ^ n ^ r) + i + o | 0, a) + t | 0
}
function or(e, t, n, r, i, o, a) {
return tr(e + (n ^ (t | ~r)) + i + o | 0, a) + t | 0
}
Zn(er, Gn),
er.prototype._update = function() {
for (var e = Jn, t = 0; t < 16; ++t)
e[t] = this._block.readInt32LE(4 * t);
var n = this._a
, r = this._b
, i = this._c
, o = this._d;
n = nr(n, r, i, o, e[0], 3614090360, 7),
o = nr(o, n, r, i, e[1], 3905402710, 12),
i = nr(i, o, n, r, e[2], 606105819, 17),
r = nr(r, i, o, n, e[3], 3250441966, 22),
n = nr(n, r, i, o, e[4], 4118548399, 7),
o = nr(o, n, r, i, e[5], 1200080426, 12),
i = nr(i, o, n, r, e[6], 2821735955, 17),
r = nr(r, i, o, n, e[7], 4249261313, 22),
n = nr(n, r, i, o, e[8], 1770035416, 7),
o = nr(o, n, r, i, e[9], 2336552879, 12),
i = nr(i, o, n, r, e[10], 4294925233, 17),
r = nr(r, i, o, n, e[11], 2304563134, 22),
n = nr(n, r, i, o, e[12], 1804603682, 7),
o = nr(o, n, r, i, e[13], 4254626195, 12),
i = nr(i, o, n, r, e[14], 2792965006, 17),
n = rr(n, r = nr(r, i, o, n, e[15], 1236535329, 22), i, o, e[1], 4129170786,
5),
o = rr(o, n, r, i, e[6], 3225465664, 9),
i = rr(i, o, n, r, e[11], 643717713, 14),
r = rr(r, i, o, n, e[0], 3921069994, 20),
n = rr(n, r, i, o, e[5], 3593408605, 5),
o = rr(o, n, r, i, e[10], 38016083, 9),
i = rr(i, o, n, r, e[15], 3634488961, 14),
r = rr(r, i, o, n, e[4], 3889429448, 20),
n = rr(n, r, i, o, e[9], 568446438, 5),
o = rr(o, n, r, i, e[14], 3275163606, 9),
i = rr(i, o, n, r, e[3], 4107603335, 14),
r = rr(r, i, o, n, e[8], 1163531501, 20),
n = rr(n, r, i, o, e[13], 2850285829, 5),
o = rr(o, n, r, i, e[2], 4243563512, 9),
i = rr(i, o, n, r, e[7], 1735328473, 14),
n = ir(n, r = rr(r, i, o, n, e[12], 2368359562, 20), i, o, e[5], 4294588738,
4),
o = ir(o, n, r, i, e[8], 2272392833, 11),
i = ir(i, o, n, r, e[11], 1839030562, 16),
r = ir(r, i, o, n, e[14], 4259657740, 23),
n = ir(n, r, i, o, e[1], 2763975236, 4),
o = ir(o, n, r, i, e[4], 1272893353, 11),
i = ir(i, o, n, r, e[7], 4139469664, 16),
r = ir(r, i, o, n, e[10], 3200236656, 23),
n = ir(n, r, i, o, e[13], 681279174, 4),
o = ir(o, n, r, i, e[0], 3936430074, 11),
i = ir(i, o, n, r, e[3], 3572445317, 16),
r = ir(r, i, o, n, e[6], 76029189, 23),
n = ir(n, r, i, o, e[9], 3654602809, 4),
o = ir(o, n, r, i, e[12], 3873151461, 11),
i = ir(i, o, n, r, e[15], 530742520, 16),
n = or(n, r = ir(r, i, o, n, e[2], 3299628645, 23), i, o, e[0], 4096336452,
6),
o = or(o, n, r, i, e[7], 1126891415, 10),
i = or(i, o, n, r, e[14], 2878612391, 15),
r = or(r, i, o, n, e[5], 4237533241, 21),
n = or(n, r, i, o, e[12], 1700485571, 6),
o = or(o, n, r, i, e[3], 2399980690, 10),
i = or(i, o, n, r, e[10], 4293915773, 15),
r = or(r, i, o, n, e[1], 2240044497, 21),
n = or(n, r, i, o, e[8], 1873313359, 6),
o = or(o, n, r, i, e[15], 4264355552, 10),
i = or(i, o, n, r, e[6], 2734768916, 15),
r = or(r, i, o, n, e[13], 1309151649, 21),
n = or(n, r, i, o, e[4], 4149444226, 6),
o = or(o, n, r, i, e[11], 3174756917, 10),
i = or(i, o, n, r, e[2], 718787259, 15),
r = or(r, i, o, n, e[9], 3951481745, 21),
this._a = this._a + n | 0,
this._b = this._b + r | 0,
this._c = this._c + i | 0,
this._d = this._d + o | 0
}
,
er.prototype._digest = function() {
this._block[this._blockOffset++] = 128,
this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64),
this._update(),
this._blockOffset = 0),
this._block.fill(0, this._blockOffset, 56),
this._block.writeUInt32LE(this._length[0], 56),
this._block.writeUInt32LE(this._length[1], 60),
this._update();
var e = Xn.allocUnsafe(16);
return e.writeInt32LE(this._a, 0),
e.writeInt32LE(this._b, 4),
e.writeInt32LE(this._c, 8),
e.writeInt32LE(this._d, 12),
e
}
;
var ar = er
, sr = de.Buffer
, ur = Ye
, lr = Qn
, cr = new Array(16)
, dr = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6,
15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11,
10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]
, fr = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5,
10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3,
11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]
, hr = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9,
7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11,
12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14,
11, 8, 5, 6]
, pr = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12,
8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15,
5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15,
13, 11, 11]
, mr = [0, 1518500249, 1859775393, 2400959708, 2840853838]
, gr = [1352829926, 1548603684, 1836072691, 2053994217, 0];
function vr() {
lr.call(this, 64),
this._a = 1732584193,
this._b = 4023233417,
this._c = 2562383102,
this._d = 271733878,
this._e = 3285377520
}
function br(e, t) {
return e << t | e >>> 32 - t
}
function yr(e, t, n, r, i, o, a, s) {
return br(e + (t ^ n ^ r) + o + a | 0, s) + i | 0
}
function Ar(e, t, n, r, i, o, a, s) {
return br(e + (t & n | ~t & r) + o + a | 0, s) + i | 0
}
function wr(e, t, n, r, i, o, a, s) {
return br(e + ((t | ~n) ^ r) + o + a | 0, s) + i | 0
}
function _r(e, t, n, r, i, o, a, s) {
return br(e + (t & r | n & ~r) + o + a | 0, s) + i | 0
}
function Er(e, t, n, r, i, o, a, s) {
return br(e + (t ^ (n | ~r)) + o + a | 0, s) + i | 0
}
ur(vr, lr),
vr.prototype._update = function() {
for (var e = cr, t = 0; t < 16; ++t)
e[t] = this._block.readInt32LE(4 * t);
for (var n = 0 | this._a, r = 0 | this._b, i = 0 | this._c, o = 0 | this._d, a = 0
| this._e, s = 0 | this._a, u = 0 | this._b, l = 0 | this._c, c = 0 | this._d, d = 0 | this._e, f = 0;
f < 80; f += 1) {
var h, p;
f < 16 ? (h = yr(n, r, i, o, a, e[dr[f]], mr[0], hr[f]),
p = Er(s, u, l, c, d, e[fr[f]], gr[0], pr[f])) : f < 32 ? (h = Ar(n, r, i, o, a,
e[dr[f]], mr[1], hr[f]),
p = _r(s, u, l, c, d, e[fr[f]], gr[1], pr[f])) : f < 48 ? (h = wr(n, r, i, o, a,
e[dr[f]], mr[2], hr[f]),
p = wr(s, u, l, c, d, e[fr[f]], gr[2], pr[f])) : f < 64 ? (h = _r(n, r, i, o, a,
e[dr[f]], mr[3], hr[f]),
p = Ar(s, u, l, c, d, e[fr[f]], gr[3], pr[f])) : (h = Er(n, r, i, o, a, e[dr[f]],
mr[4], hr[f]),
p = yr(s, u, l, c, d, e[fr[f]], gr[4], pr[f])),
n = a,
a = o,
o = br(i, 10),
i = r,
r = h,
s = d,
d = c,
c = br(l, 10),
l = u,
u=p
}
var m = this._b + i + c | 0;
this._b = this._c + o + d | 0,
this._c = this._d + a + s | 0,
this._d = this._e + n + u | 0,
this._e = this._a + r + l | 0,
this._a = m
}
,
vr.prototype._digest = function() {
this._block[this._blockOffset++] = 128,
this._blockOffset > 56 && (this._block.fill(0, this._blockOffset, 64),
this._update(),
this._blockOffset = 0),
this._block.fill(0, this._blockOffset, 56),
this._block.writeUInt32LE(this._length[0], 56),
this._block.writeUInt32LE(this._length[1], 60),
this._update();
var e = sr.alloc ? sr.alloc(20) : new sr(20);
return e.writeInt32LE(this._a, 0),
e.writeInt32LE(this._b, 4),
e.writeInt32LE(this._c, 8),
e.writeInt32LE(this._d, 12),
e.writeInt32LE(this._e, 16),
e
}
;
var Sr = vr
, kr = {
exports: {}
}
, Mr = Ue().Buffer;
function Cr(e, t) {
this._block = Mr.alloc(e),
this._finalSize = t,
this._blockSize = e,
this._len = 0
}
Cr.prototype.update = function(e, t) {
"string" == typeof e && (t = t || "utf8",
e = Mr.from(e, t));
for (var n = this._block, r = this._blockSize, i = e.length, o = this._len, a
= 0; a < i; ) {
for (var s = o % r, u = Math.min(i - a, r - s), l = 0; l < u; l++)
n[s + l] = e[a + l];
a += u,
(o += u) % r == 0 && this._update(n)
}
return this._len += i,
this
}
,
Cr.prototype.digest = function(e) {
var t = this._len % this._blockSize;
this._block[t] = 128,
this._block.fill(0, t + 1),
t >= this._finalSize && (this._update(this._block),
this._block.fill(0));
var n = 8 * this._len;
if (n <= 4294967295)
this._block.writeUInt32BE(n, this._blockSize - 4);
else {
var r = (4294967295 & n) >>> 0
, i = (n - r) / 4294967296;
this._block.writeUInt32BE(i, this._blockSize - 8),
this._block.writeUInt32BE(r, this._blockSize - 4)
}
this._update(this._block);
var o = this._hash();
return e ? o.toString(e) : o
}
,
Cr.prototype._update = function() {
throw new Error("_update must be implemented by subclass")
}
;
var xr = Cr
, Rr = Ye
, Tr = xr
, Ir = Ue().Buffer
, Pr = [1518500249, 1859775393, -1894007588, -899497514]
, Lr = new Array(80);
function Or() {
this.init(),
this._w = Lr,
Tr.call(this, 64, 56)
}
function Nr(e) {
return e << 30 | e >>> 2
}
function Dr(e, t, n, r) {
return 0 === e ? t & n | ~t & r : 2 === e ? t & n | t & r | n & r : t ^ n ^ r
}
Rr(Or, Tr),
Or.prototype.init = function() {
return this._a = 1732584193,
this._b = 4023233417,
this._c = 2562383102,
this._d = 271733878,
this._e = 3285377520,
this
}
,
Or.prototype._update = function(e) {
for (var t, n = this._w, r = 0 | this._a, i = 0 | this._b, o = 0 | this._c, a = 0 |
this._d, s = 0 | this._e, u = 0; u < 16; ++u)
n[u] = e.readInt32BE(4 * u);
for (; u < 80; ++u)
n[u] = n[u - 3] ^ n[u - 8] ^ n[u - 14] ^ n[u - 16];
for (var l = 0; l < 80; ++l) {
var c = ~~(l / 20)
, d = 0 | ((t = r) << 5 | t >>> 27) + Dr(c, i, o, a) + s + n[l] + Pr[c];
s = a,
a = o,
o = Nr(i),
i = r,
r=d
}
this._a = r + this._a | 0,
this._b = i + this._b | 0,
this._c = o + this._c | 0,
this._d = a + this._d | 0,
this._e = s + this._e | 0
}
,
Or.prototype._hash = function() {
var e = Ir.allocUnsafe(20);
return e.writeInt32BE(0 | this._a, 0),
e.writeInt32BE(0 | this._b, 4),
e.writeInt32BE(0 | this._c, 8),
e.writeInt32BE(0 | this._d, 12),
e.writeInt32BE(0 | this._e, 16),
e
}
;
var Br = Or
, jr = Ye
, zr = xr
, Fr = Ue().Buffer
, Ur = [1518500249, 1859775393, -1894007588, -899497514]
, Kr = new Array(80);
function qr() {
this.init(),
this._w = Kr,
zr.call(this, 64, 56)
}
function Hr(e) {
return e << 5 | e >>> 27
}
function Vr(e) {
return e << 30 | e >>> 2
}
function Wr(e, t, n, r) {
return 0 === e ? t & n | ~t & r : 2 === e ? t & n | t & r | n & r : t ^ n ^ r
}
jr(qr, zr),
qr.prototype.init = function() {
return this._a = 1732584193,
this._b = 4023233417,
this._c = 2562383102,
this._d = 271733878,
this._e = 3285377520,
this
}
,
qr.prototype._update = function(e) {
for (var t, n = this._w, r = 0 | this._a, i = 0 | this._b, o = 0 | this._c, a = 0 |
this._d, s = 0 | this._e, u = 0; u < 16; ++u)
n[u] = e.readInt32BE(4 * u);
for (; u < 80; ++u)
n[u] = (t = n[u - 3] ^ n[u - 8] ^ n[u - 14] ^ n[u - 16]) << 1 | t >>> 31;
for (var l = 0; l < 80; ++l) {
var c = ~~(l / 20)
, d = Hr(r) + Wr(c, i, o, a) + s + n[l] + Ur[c] | 0;
s = a,
a = o,
o = Vr(i),
i = r,
r=d
}
this._a = r + this._a | 0,
this._b = i + this._b | 0,
this._c = o + this._c | 0,
this._d = a + this._d | 0,
this._e = s + this._e | 0
}
,
qr.prototype._hash = function() {
var e = Fr.allocUnsafe(20);
return e.writeInt32BE(0 | this._a, 0),
e.writeInt32BE(0 | this._b, 4),
e.writeInt32BE(0 | this._c, 8),
e.writeInt32BE(0 | this._d, 12),
e.writeInt32BE(0 | this._e, 16),
e
}
;
var $r = qr
, Yr = Ye
, Qr = xr
, Zr = Ue().Buffer
, Gr = [1116352408, 1899447441, 3049323471, 3921009573, 961987163,
1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278,
1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401,
4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692,
1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891,
3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372,
1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921,
2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909,
275423344, 430227734, 506948616, 659060556, 883997877, 958139571,
1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452,
2361852424, 2428436474, 2756734187, 3204031479, 3329325298]
, Xr = new Array(64);
function Jr() {
this.init(),
this._w = Xr,
Qr.call(this, 64, 56)
}
function ei(e, t, n) {
return n ^ e & (t ^ n)
}
function ti(e, t, n) {
return e & t | n & (e | t)
}
function ni(e) {
return (e >>> 2 | e << 30) ^ (e >>> 13 | e << 19) ^ (e >>> 22 | e << 10)
}
function ri(e) {
return (e >>> 6 | e << 26) ^ (e >>> 11 | e << 21) ^ (e >>> 25 | e << 7)
}
function ii(e) {
return (e >>> 7 | e << 25) ^ (e >>> 18 | e << 14) ^ e >>> 3
}
function oi(e) {
return (e >>> 17 | e << 15) ^ (e >>> 19 | e << 13) ^ e >>> 10
}
Yr(Jr, Qr),
Jr.prototype.init = function() {
return this._a = 1779033703,
this._b = 3144134277,
this._c = 1013904242,
this._d = 2773480762,
this._e = 1359893119,
this._f = 2600822924,
this._g = 528734635,
this._h = 1541459225,
this
}
,
Jr.prototype._update = function(e) {
for (var t = this._w, n = 0 | this._a, r = 0 | this._b, i = 0 | this._c, o = 0 |
this._d, a = 0 | this._e, s = 0 | this._f, u = 0 | this._g, l = 0 | this._h, c = 0; c < 16; ++c)
t[c] = e.readInt32BE(4 * c);
for (; c < 64; ++c)
t[c] = oi(t[c - 2]) + t[c - 7] + ii(t[c - 15]) + t[c - 16] | 0;
for (var d = 0; d < 64; ++d) {
var f = l + ri(a) + ei(a, s, u) + Gr[d] + t[d] | 0
, h = ni(n) + ti(n, r, i) | 0;
l = u,
u = s,
s = a,
a = o + f | 0,
o = i,
i = r,
r = n,
n=f+h|0
}
this._a = n + this._a | 0,
this._b = r + this._b | 0,
this._c = i + this._c | 0,
this._d = o + this._d | 0,
this._e = a + this._e | 0,
this._f = s + this._f | 0,
this._g = u + this._g | 0,
this._h = l + this._h | 0
}
,
Jr.prototype._hash = function() {
var e = Zr.allocUnsafe(32);
return e.writeInt32BE(this._a, 0),
e.writeInt32BE(this._b, 4),
e.writeInt32BE(this._c, 8),
e.writeInt32BE(this._d, 12),
e.writeInt32BE(this._e, 16),
e.writeInt32BE(this._f, 20),
e.writeInt32BE(this._g, 24),
e.writeInt32BE(this._h, 28),
e
}
;
var ai = Jr
, si = Ye
, ui = ai
, li = xr
, ci = Ue().Buffer
, di = new Array(64);
function fi() {
this.init(),
this._w = di,
li.call(this, 64, 56)
}
si(fi, ui),
fi.prototype.init = function() {
return this._a = 3238371032,
this._b = 914150663,
this._c = 812702999,
this._d = 4144912697,
this._e = 4290775857,
this._f = 1750603025,
this._g = 1694076839,
this._h = 3204075428,
this
}
,
fi.prototype._hash = function() {
var e = ci.allocUnsafe(28);
return e.writeInt32BE(this._a, 0),
e.writeInt32BE(this._b, 4),
e.writeInt32BE(this._c, 8),
e.writeInt32BE(this._d, 12),
e.writeInt32BE(this._e, 16),
e.writeInt32BE(this._f, 20),
e.writeInt32BE(this._g, 24),
e
}
;
var hi = fi
, pi = Ye
, mi = xr
, gi = Ue().Buffer
, vi = [1116352408, 3609767458, 1899447441, 602891725, 3049323471,
3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993,
3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080,
2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987,
3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103,
633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774,
944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983,
1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986,
2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808,
2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711,
2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205,
1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291,
2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350,
1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411,
3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817,
3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344,
851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556,
3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218,
3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222,
1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424,
442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479,
2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271,
566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474,
1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269,
320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298,
365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948,
4234509866, 1607167915, 987167468, 1816402316, 1246189591]
, bi = new Array(160);
function yi() {
this.init(),
this._w = bi,
mi.call(this, 128, 112)
}
function Ai(e, t, n) {
return n ^ e & (t ^ n)
}
function wi(e, t, n) {
return e & t | n & (e | t)
}
function _i(e, t) {
return (e >>> 28 | t << 4) ^ (t >>> 2 | e << 30) ^ (t >>> 7 | e << 25)
}
function Ei(e, t) {
return (e >>> 14 | t << 18) ^ (e >>> 18 | t << 14) ^ (t >>> 9 | e << 23)
}
function Si(e, t) {
return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ e >>> 7
}
function ki(e, t) {
return (e >>> 1 | t << 31) ^ (e >>> 8 | t << 24) ^ (e >>> 7 | t << 25)
}
function Mi(e, t) {
return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ e >>> 6
}
function Ci(e, t) {
return (e >>> 19 | t << 13) ^ (t >>> 29 | e << 3) ^ (e >>> 6 | t << 26)
}
function xi(e, t) {
return e >>> 0 < t >>> 0 ? 1 : 0
}
pi(yi, mi),
yi.prototype.init = function() {
return this._ah = 1779033703,
this._bh = 3144134277,
this._ch = 1013904242,
this._dh = 2773480762,
this._eh = 1359893119,
this._fh = 2600822924,
this._gh = 528734635,
this._hh = 1541459225,
this._al = 4089235720,
this._bl = 2227873595,
this._cl = 4271175723,
this._dl = 1595750129,
this._el = 2917565137,
this._fl = 725511199,
this._gl = 4215389547,
this._hl = 327033209,
this
}
,
yi.prototype._update = function(e) {
for (var t = this._w, n = 0 | this._ah, r = 0 | this._bh, i = 0 | this._ch, o = 0
| this._dh, a = 0 | this._eh, s = 0 | this._fh, u = 0 | this._gh, l = 0 | this._hh, c = 0 | this._al,
d = 0 | this._bl, f = 0 | this._cl, h = 0 | this._dl, p = 0 | this._el, m = 0 | this._fl, g = 0 |
this._gl, v = 0 | this._hl, b = 0; b < 32; b += 2)
t[b] = e.readInt32BE(4 * b),
t[b + 1] = e.readInt32BE(4 * b + 4);
for (; b < 160; b += 2) {
var y = t[b - 30]
, A = t[b - 30 + 1]
, w = Si(y, A)
, _ = ki(A, y)
, E = Mi(y = t[b - 4], A = t[b - 4 + 1])
, S = Ci(A, y)
, k = t[b - 14]
, M = t[b - 14 + 1]
, C = t[b - 32]
, x = t[b - 32 + 1]
,R=_+M|0
, T = w + k + xi(R, _) | 0;
T = (T = T + E + xi(R = R + S | 0, S) | 0) + C + xi(R = R + x | 0, x) | 0,
t[b] = T,
t[b + 1] = R
}
for (var I = 0; I < 160; I += 2) {
T = t[I],
R = t[I + 1];
var P = wi(n, r, i)
, L = wi(c, d, f)
, O = _i(n, c)
, N = _i(c, n)
, D = Ei(a, p)
, B = Ei(p, a)
, j = vi[I]
, z = vi[I + 1]
, F = Ai(a, s, u)
, U = Ai(p, m, g)
,K=v+B|0
, q = l + D + xi(K, v) | 0;
q = (q = (q = q + F + xi(K = K + U | 0, U) | 0) + j + xi(K = K + z | 0, z)
| 0) + T + xi(K = K + R | 0, R) | 0;
var H = N + L | 0
, V = O + P + xi(H, N) | 0;
l = u,
v = g,
u = s,
g = m,
s = a,
m = p,
a = o + q + xi(p = h + K | 0, h) | 0,
o = i,
h = f,
i = r,
f = d,
r = n,
d = c,
n = q + V + xi(c = K + H | 0, K) | 0
}
this._al = this._al + c | 0,
this._bl = this._bl + d | 0,
this._cl = this._cl + f | 0,
this._dl = this._dl + h | 0,
this._el = this._el + p | 0,
this._fl = this._fl + m | 0,
this._gl = this._gl + g | 0,
this._hl = this._hl + v | 0,
this._ah = this._ah + n + xi(this._al, c) | 0,
this._bh = this._bh + r + xi(this._bl, d) | 0,
this._ch = this._ch + i + xi(this._cl, f) | 0,
this._dh = this._dh + o + xi(this._dl, h) | 0,
this._eh = this._eh + a + xi(this._el, p) | 0,
this._fh = this._fh + s + xi(this._fl, m) | 0,
this._gh = this._gh + u + xi(this._gl, g) | 0,
this._hh = this._hh + l + xi(this._hl, v) | 0
}
,
yi.prototype._hash = function() {
var e = gi.allocUnsafe(64);
function t(t, n, r) {
e.writeInt32BE(t, r),
e.writeInt32BE(n, r + 4)
}
return t(this._ah, this._al, 0),
t(this._bh, this._bl, 8),
t(this._ch, this._cl, 16),
t(this._dh, this._dl, 24),
t(this._eh, this._el, 32),
t(this._fh, this._fl, 40),
t(this._gh, this._gl, 48),
t(this._hh, this._hl, 56),
e
}
;
var Ri = yi
, Ti = Ye
, Ii = Ri
, Pi = xr
, Li = Ue().Buffer
, Oi = new Array(160);
function Ni() {
this.init(),
this._w = Oi,
Pi.call(this, 128, 112)
}
Ti(Ni, Ii),
Ni.prototype.init = function() {
return this._ah = 3418070365,
this._bh = 1654270250,
this._ch = 2438529370,
this._dh = 355462360,
this._eh = 1731405415,
this._fh = 2394180231,
this._gh = 3675008525,
this._hh = 1203062813,
this._al = 3238371032,
this._bl = 914150663,
this._cl = 812702999,
this._dl = 4144912697,
this._el = 4290775857,
this._fl = 1750603025,
this._gl = 1694076839,
this._hl = 3204075428,
this
}
,
Ni.prototype._hash = function() {
var e = Li.allocUnsafe(48);
function t(t, n, r) {
e.writeInt32BE(t, r),
e.writeInt32BE(n, r + 4)
}
return t(this._ah, this._al, 0),
t(this._bh, this._bl, 8),
t(this._ch, this._cl, 16),
t(this._dh, this._dl, 24),
t(this._eh, this._el, 32),
t(this._fh, this._fl, 40),
e
}
;
var Di = Ni
, Bi = kr.exports = function(e) {
e = e.toLowerCase();
var t = Bi[e];
if (!t)
throw new Error(e + " is not supported (we accept pull requests)");
return new t
}
;
Bi.sha = Br,
Bi.sha1 = $r,
Bi.sha224 = hi,
Bi.sha256 = ai,
Bi.sha384 = Di,
Bi.sha512 = Ri;
var ji = kr.exports;
function zi() {
this.head = null,
this.tail = null,
this.length = 0
}
zi.prototype.push = function(e) {
var t = {
data: e,
next: null
};
this.length > 0 ? this.tail.next = t : this.head = t,
this.tail = t,
++this.length
}
,
zi.prototype.unshift = function(e) {
var t = {
data: e,
next: this.head
};
0 === this.length && (this.tail = t),
this.head = t,
++this.length
}
,
zi.prototype.shift = function() {
if (0 !== this.length) {
var e = this.head.data;
return 1 === this.length ? this.head = this.tail = null : this.head =
this.head.next,
--this.length,
e
}
}
,
zi.prototype.clear = function() {
this.head = this.tail = null,
this.length = 0
}
,
zi.prototype.join = function(e) {
if (0 === this.length)
return "";
for (var t = this.head, n = "" + t.data; t = t.next; )
n += e + t.data;
return n
}
,
zi.prototype.concat = function(e) {
if (0 === this.length)
return _.alloc(0);
if (1 === this.length)
return this.head.data;
for (var t = _.allocUnsafe(e >>> 0), n = this.head, r = 0; n; )
n.data.copy(t, r),
r += n.data.length,
n = n.next;
return t
}
;
var Fi = _.isEncoding || function(e) {
switch (e && e.toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
case "raw":
return !0;
default:
return !1
}
}
;
function Ui(e) {
switch (this.encoding = (e || "utf8").toLowerCase().replace(/[-_]/, ""),
function(e) {
if (e && !Fi(e))
throw new Error("Unknown encoding: " + e)
}(e),
this.encoding) {
case "utf8":
this.surrogateSize = 3;
break;
case "ucs2":
case "utf16le":
this.surrogateSize = 2,
this.detectIncompleteChar = qi;
break;
case "base64":
this.surrogateSize = 3,
this.detectIncompleteChar = Hi;
break;
default:
return void (this.write = Ki)
}
this.charBuffer = new _(6),
this.charReceived = 0,
this.charLength = 0
}
function Ki(e) {
return e.toString(this.encoding)
}
function qi(e) {
this.charReceived = e.length % 2,
this.charLength = this.charReceived ? 2 : 0
}
function Hi(e) {
this.charReceived = e.length % 3,
this.charLength = this.charReceived ? 3 : 0
}
Ui.prototype.write = function(e) {
for (var t = ""; this.charLength; ) {
var n = e.length >= this.charLength - this.charReceived ?
this.charLength - this.charReceived : e.length;
if (e.copy(this.charBuffer, this.charReceived, 0, n),
this.charReceived += n,
this.charReceived < this.charLength)
return "";
if (e = e.slice(n, e.length),
!((r = (t = this.charBuffer.slice(0,
this.charLength).toString(this.encoding)).charCodeAt(t.length - 1)) >= 55296 && r <=
56319)) {
if (this.charReceived = this.charLength = 0,
0 === e.length)
return t;
break
}
this.charLength += this.surrogateSize,
t = ""
}
this.detectIncompleteChar(e);
var r, i = e.length;
if (this.charLength && (e.copy(this.charBuffer, 0, e.length -
this.charReceived, i),
i -= this.charReceived),
i = (t += e.toString(this.encoding, 0, i)).length - 1,
(r = t.charCodeAt(i)) >= 55296 && r <= 56319) {
var o = this.surrogateSize;
return this.charLength += o,
this.charReceived += o,
this.charBuffer.copy(this.charBuffer, o, 0, o),
e.copy(this.charBuffer, 0, 0, o),
t.substring(0, i)
}
return t
}
,
Ui.prototype.detectIncompleteChar = function(e) {
for (var t = e.length >= 3 ? 3 : e.length; t > 0; t--) {
var n = e[e.length - t];
if (1 == t && n >> 5 == 6) {
this.charLength = 2;
break
}
if (t <= 2 && n >> 4 == 14) {
this.charLength = 3;
break
}
if (t <= 3 && n >> 3 == 30) {
this.charLength = 4;
break
}
}
this.charReceived = t
}
,
Ui.prototype.end = function(e) {
var t = "";
if (e && e.length && (t = this.write(e)),
this.charReceived) {
var n = this.charReceived
, r = this.charBuffer
, i = this.encoding;
t += r.slice(0, n).toString(i)
}
return t
}
;
var Vi = Object.freeze({
__proto__: null,
StringDecoder: Ui
});
Yi.ReadableState = $i;
var Wi = dt("stream");
function $i(e, t) {
e = e || {},
this.objectMode = !!e.objectMode,
t instanceof Eo && (this.objectMode = this.objectMode || !!
e.readableObjectMode);
var n = e.highWaterMark
, r = this.objectMode ? 16 : 16384;
this.highWaterMark = n || 0 === n ? n : r,
this.highWaterMark = ~~this.highWaterMark,
this.buffer = new zi,
this.length = 0,
this.pipes = null,
this.pipesCount = 0,
this.flowing = null,
this.ended = !1,
this.endEmitted = !1,
this.reading = !1,
this.sync = !0,
this.needReadable = !1,
this.emittedReadable = !1,
this.readableListening = !1,
this.resumeScheduled = !1,
this.defaultEncoding = e.defaultEncoding || "utf8",
this.ranOut = !1,
this.awaitDrain = 0,
this.readingMore = !1,
this.decoder = null,
this.encoding = null,
e.encoding && (this.decoder = new Ui(e.encoding),
this.encoding = e.encoding)
}
function Yi(e) {
if (!(this instanceof Yi))
return new Yi(e);
this._readableState = new $i(e,this),
this.readable = !0,
e && "function" == typeof e.read && (this._read = e.read),
Ge.call(this)
}
function Qi(e, t, n, r, i) {
var o = function(e, t) {
var n = null;
return oe(t) || "string" == typeof t || null == t || e.objectMode || (n =
new TypeError("Invalid non-string/buffer chunk")),
n
}(t, n);
if (o)
e.emit("error", o);
else if (null === n)
t.reading = !1,
function(e, t) {
if (!t.ended) {
if (t.decoder) {
var n = t.decoder.end();
n && n.length && (t.buffer.push(n),
t.length += t.objectMode ? 1 : n.length)
}
t.ended = !0,
Xi(e)
}
}(e, t);
else if (t.objectMode || n && n.length > 0)
if (t.ended && !i) {
var a = new Error("stream.push() after EOF");
e.emit("error", a)
} else if (t.endEmitted && i) {
var s = new Error("stream.unshift() after end event");
e.emit("error", s)
} else {
var u;
!t.decoder || i || r || (n = t.decoder.write(n),
u = !t.objectMode && 0 === n.length),
i || (t.reading = !1),
u || (t.flowing && 0 === t.length && !t.sync ? (e.emit("data", n),
e.read(0)) : (t.length += t.objectMode ? 1 : n.length,
i ? t.buffer.unshift(n) : t.buffer.push(n),
t.needReadable && Xi(e))),
function(e, t) {
t.readingMore || (t.readingMore = !0,
Se(eo, e, t))
}(e, t)
}
else
i || (t.reading = !1);
return function(e) {
return !e.ended && (e.needReadable || e.length < e.highWaterMark
|| 0 === e.length)
}(t)
}
ot(Yi, Ge),
Yi.prototype.push = function(e, t) {
var n = this._readableState;
return n.objectMode || "string" != typeof e || (t = t || n.defaultEncoding) !
== n.encoding && (e = _.from(e, t),
t = ""),
Qi(this, n, e, t, !1)
}
,
Yi.prototype.unshift = function(e) {
return Qi(this, this._readableState, e, "", !0)
}
,
Yi.prototype.isPaused = function() {
return !1 === this._readableState.flowing
}
,
Yi.prototype.setEncoding = function(e) {
return this._readableState.decoder = new Ui(e),
this._readableState.encoding = e,
this
}
;
var Zi = 8388608;
function Gi(e, t) {
return e <= 0 || 0 === t.length && t.ended ? 0 : t.objectMode ? 1 : e !=
e ? t.flowing && t.length ? t.buffer.head.data.length : t.length : (e > t.highWaterMark &&
(t.highWaterMark = function(e) {
return e >= Zi ? e = Zi : (e--,
e |= e >>> 1,
e |= e >>> 2,
e |= e >>> 4,
e |= e >>> 8,
e |= e >>> 16,
e++),
e
}(e)),
e <= t.length ? e : t.ended ? t.length : (t.needReadable = !0,
0))
}
function Xi(e) {
var t = e._readableState;
t.needReadable = !1,
t.emittedReadable || (Wi("emitReadable", t.flowing),
t.emittedReadable = !0,
t.sync ? Se(Ji, e) : Ji(e))
}
function Ji(e) {
Wi("emit readable"),
e.emit("readable"),
ro(e)
}
function eo(e, t) {
for (var n = t.length; !t.reading && !t.flowing && !t.ended && t.length <
t.highWaterMark && (Wi("maybeReadMore read 0"),
e.read(0),
n !== t.length); )
n = t.length;
t.readingMore = !1
}
function to(e) {
Wi("readable nexttick read 0"),
e.read(0)
}
function no(e, t) {
t.reading || (Wi("resume read 0"),
e.read(0)),
t.resumeScheduled = !1,
t.awaitDrain = 0,
e.emit("resume"),
ro(e),
t.flowing && !t.reading && e.read(0)
}
function ro(e) {
var t = e._readableState;
for (Wi("flow", t.flowing); t.flowing && null !== e.read(); )
;
}
function io(e, t) {
return 0 === t.length ? null : (t.objectMode ? n = t.buffer.shift() : !e || e
>= t.length ? (n = t.decoder ? t.buffer.join("") : 1 === t.buffer.length ? t.buffer.head.data :
t.buffer.concat(t.length),
t.buffer.clear()) : n = function(e, t, n) {
var r;
return e < t.head.data.length ? (r = t.head.data.slice(0, e),
t.head.data = t.head.data.slice(e)) : r = e === t.head.data.length ?
t.shift() : n ? function(e, t) {
var n = t.head
,r=1
, i = n.data;
for (e -= i.length; n = n.next; ) {
var o = n.data
, a = e > o.length ? o.length : e;
if (a === o.length ? i += o : i += o.slice(0, e),
0 === (e -= a)) {
a === o.length ? (++r,
n.next ? t.head = n.next : t.head = t.tail = null) : (t.head
= n,
n.data = o.slice(a));
break
}
++r
}
return t.length -= r,
i
}(e, t) : function(e, t) {
var n = _.allocUnsafe(e)
, r = t.head
, i = 1;
for (r.data.copy(n),
e -= r.data.length; r = r.next; ) {
var o = r.data
, a = e > o.length ? o.length : e;
if (o.copy(n, n.length - e, 0, a),
0 === (e -= a)) {
a === o.length ? (++i,
r.next ? t.head = r.next : t.head = t.tail = null) : (t.head =
r,
r.data = o.slice(a));
break
}
++i
}
return t.length -= i,
n
}(e, t),
r
}(e, t.buffer, t.decoder),
n);
var n
}
function oo(e) {
var t = e._readableState;
if (t.length > 0)
throw new Error('"endReadable()" called on non-empty stream');
t.endEmitted || (t.ended = !0,
Se(ao, t, e))
}
function ao(e, t) {
e.endEmitted || 0 !== e.length || (e.endEmitted = !0,
t.readable = !1,
t.emit("end"))
}
function so(e, t) {
for (var n = 0, r = e.length; n < r; n++)
if (e[n] === t)
return n;
return -1
}
function uo() {}
function lo(e, t, n) {
this.chunk = e,
this.encoding = t,
this.callback = n,
this.next = null
}
function co(e, t) {
Object.defineProperty(this, "buffer", {
get: ut((function() {
return this.getBuffer()
}
), "_writableState.buffer is deprecated. Use _writableState.getBuffer
instead.")
}),
e = e || {},
this.objectMode = !!e.objectMode,
t instanceof Eo && (this.objectMode = this.objectMode || !!
e.writableObjectMode);
var n = e.highWaterMark
, r = this.objectMode ? 16 : 16384;
this.highWaterMark = n || 0 === n ? n : r,
this.highWaterMark = ~~this.highWaterMark,
this.needDrain = !1,
this.ending = !1,
this.ended = !1,
this.finished = !1;
var i = !1 === e.decodeStrings;
this.decodeStrings = !i,
this.defaultEncoding = e.defaultEncoding || "utf8",
this.length = 0,
this.writing = !1,
this.corked = 0,
this.sync = !0,
this.bufferProcessing = !1,
this.onwrite = function(e) {
!function(e, t) {
var n = e._writableState
, r = n.sync
, i = n.writecb;
if (function(e) {
e.writing = !1,
e.writecb = null,
e.length -= e.writelen,
e.writelen = 0
}(n),
t)
!function(e, t, n, r, i) {
--t.pendingcb,
n ? Se(i, r) : i(r),
e._writableState.errorEmitted = !0,
e.emit("error", r)
}(e, n, r, t, i);
else {
var o = go(n);
o || n.corked || n.bufferProcessing || !n.bufferedRequest ||
mo(e, n),
r ? Se(po, e, n, o, i) : po(e, n, o, i)
}
}(t, e)
}
,
this.writecb = null,
this.writelen = 0,
this.bufferedRequest = null,
this.lastBufferedRequest = null,
this.pendingcb = 0,
this.prefinished = !1,
this.errorEmitted = !1,
this.bufferedRequestCount = 0,
this.corkedRequestsFree = new yo(this)
}
function fo(e) {
if (!(this instanceof fo || this instanceof Eo))
return new fo(e);
this._writableState = new co(e,this),
this.writable = !0,
e && ("function" == typeof e.write && (this._write = e.write),
"function" == typeof e.writev && (this._writev = e.writev)),
Ge.call(this)
}
function ho(e, t, n, r, i, o, a) {
t.writelen = r,
t.writecb = a,
t.writing = !0,
t.sync = !0,
n ? e._writev(i, t.onwrite) : e._write(i, o, t.onwrite),
t.sync = !1
}
function po(e, t, n, r) {
n || function(e, t) {
0 === t.length && t.needDrain && (t.needDrain = !1,
e.emit("drain"))
}(e, t),
t.pendingcb--,
r(),
bo(e, t)
}
function mo(e, t) {
t.bufferProcessing = !0;
var n = t.bufferedRequest;
if (e._writev && n && n.next) {
var r = t.bufferedRequestCount
, i = new Array(r)
, o = t.corkedRequestsFree;
o.entry = n;
for (var a = 0; n; )
i[a] = n,
n = n.next,
a += 1;
ho(e, t, !0, t.length, i, "", o.finish),
t.pendingcb++,
t.lastBufferedRequest = null,
o.next ? (t.corkedRequestsFree = o.next,
o.next = null) : t.corkedRequestsFree = new yo(t)
} else {
for (; n; ) {
var s = n.chunk
, u = n.encoding
, l = n.callback;
if (ho(e, t, !1, t.objectMode ? 1 : s.length, s, u, l),
n = n.next,
t.writing)
break
}
null === n && (t.lastBufferedRequest = null)
}
t.bufferedRequestCount = 0,
t.bufferedRequest = n,
t.bufferProcessing = !1
}
function go(e) {
return e.ending && 0 === e.length && null === e.bufferedRequest && !
e.finished && !e.writing
}
function vo(e, t) {
t.prefinished || (t.prefinished = !0,
e.emit("prefinish"))
}
function bo(e, t) {
var n = go(t);
return n && (0 === t.pendingcb ? (vo(e, t),
t.finished = !0,
e.emit("finish")) : vo(e, t)),
n
}
function yo(e) {
var t = this;
this.next = null,
this.entry = null,
this.finish = function(n) {
var r = t.entry;
for (t.entry = null; r; ) {
var i = r.callback;
e.pendingcb--,
i(n),
r = r.next
}
e.corkedRequestsFree ? e.corkedRequestsFree.next = t :
e.corkedRequestsFree = t
}
}
Yi.prototype.read = function(e) {
Wi("read", e),
e = parseInt(e, 10);
var t = this._readableState
, n = e;
if (0 !== e && (t.emittedReadable = !1),
0 === e && t.needReadable && (t.length >= t.highWaterMark ||
t.ended))
return Wi("read: emitReadable", t.length, t.ended),
0 === t.length && t.ended ? oo(this) : Xi(this),
null;
if (0 === (e = Gi(e, t)) && t.ended)
return 0 === t.length && oo(this),
null;
var r, i = t.needReadable;
return Wi("need readable", i),
(0 === t.length || t.length - e < t.highWaterMark) && Wi("length less than
watermark", i = !0),
t.ended || t.reading ? Wi("reading or ended", i = !1) : i && (Wi("do read"),
t.reading = !0,
t.sync = !0,
0 === t.length && (t.needReadable = !0),
this._read(t.highWaterMark),
t.sync = !1,
t.reading || (e = Gi(n, t))),
null === (r = e > 0 ? io(e, t) : null) ? (t.needReadable = !0,
e = 0) : t.length -= e,
0 === t.length && (t.ended || (t.needReadable = !0),
n !== e && t.ended && oo(this)),
null !== r && this.emit("data", r),
r
}
,
Yi.prototype._read = function(e) {
this.emit("error", new Error("not implemented"))
}
,
Yi.prototype.pipe = function(e, t) {
var n = this
, r = this._readableState;
switch (r.pipesCount) {
case 0:
r.pipes = e;
break;
case 1:
r.pipes = [r.pipes, e];
break;
default:
r.pipes.push(e)
}
r.pipesCount += 1,
Wi("pipe count=%d opts=%j", r.pipesCount, t);
var i = t && !1 === t.end ? l : a;
function o(e) {
Wi("onunpipe"),
e === n && l()
}
function a() {
Wi("onend"),
e.end()
}
r.endEmitted ? Se(i) : n.once("end", i),
e.on("unpipe", o);
var s = function(e) {
return function() {
var t = e._readableState;
Wi("pipeOnDrain", t.awaitDrain),
t.awaitDrain && t.awaitDrain--,
0 === t.awaitDrain && e.listeners("data").length && (t.flowing = !
0,
ro(e))
}
}(n);
e.on("drain", s);
var u = !1;
function l() {
Wi("cleanup"),
e.removeListener("close", h),
e.removeListener("finish", p),
e.removeListener("drain", s),
e.removeListener("error", f),
e.removeListener("unpipe", o),
n.removeListener("end", a),
n.removeListener("end", l),
n.removeListener("data", d),
u = !0,
!r.awaitDrain || e._writableState && !e._writableState.needDrain ||
s()
}
var c = !1;
function d(t) {
Wi("ondata"),
c = !1,
!1 !== e.write(t) || c || ((1 === r.pipesCount && r.pipes === e ||
r.pipesCount > 1 && -1 !== so(r.pipes, e)) && !u && (Wi("false write response, pause",
n._readableState.awaitDrain),
n._readableState.awaitDrain++,
c = !0),
n.pause())
}
function f(t) {
var n;
Wi("onerror", t),
m(),
e.removeListener("error", f),
0 === (n = "error",
e.listeners(n).length) && e.emit("error", t)
}
function h() {
e.removeListener("finish", p),
m()
}
function p() {
Wi("onfinish"),
e.removeListener("close", h),
m()
}
function m() {
Wi("unpipe"),
n.unpipe(e)
}
return n.on("data", d),
function(e, t, n) {
if ("function" == typeof e.prependListener)
return e.prependListener(t, n);
e._events && e._events[t] ? Array.isArray(e._events[t]) ?
e._events[t].unshift(n) : e._events[t] = [n, e._events[t]] : e.on(t, n)
}(e, "error", f),
e.once("close", h),
e.once("finish", p),
e.emit("pipe", n),
r.flowing || (Wi("pipe resume"),
n.resume()),
e
}
,
Yi.prototype.unpipe = function(e) {
var t = this._readableState;
if (0 === t.pipesCount)
return this;
if (1 === t.pipesCount)
return e && e !== t.pipes || (e || (e = t.pipes),
t.pipes = null,
t.pipesCount = 0,
t.flowing = !1,
e && e.emit("unpipe", this)),
this;
if (!e) {
var n = t.pipes
, r = t.pipesCount;
t.pipes = null,
t.pipesCount = 0,
t.flowing = !1;
for (var i = 0; i < r; i++)
n[i].emit("unpipe", this);
return this
}
var o = so(t.pipes, e);
return -1 === o || (t.pipes.splice(o, 1),
t.pipesCount -= 1,
1 === t.pipesCount && (t.pipes = t.pipes[0]),
e.emit("unpipe", this)),
this
}
,
Yi.prototype.on = function(e, t) {
var n = Ge.prototype.on.call(this, e, t);
if ("data" === e)
!1 !== this._readableState.flowing && this.resume();
else if ("readable" === e) {
var r = this._readableState;
r.endEmitted || r.readableListening || (r.readableListening =
r.needReadable = !0,
r.emittedReadable = !1,
r.reading ? r.length && Xi(this) : Se(to, this))
}
return n
}
,
Yi.prototype.addListener = Yi.prototype.on,
Yi.prototype.resume = function() {
var e = this._readableState;
return e.flowing || (Wi("resume"),
e.flowing = !0,
function(e, t) {
t.resumeScheduled || (t.resumeScheduled = !0,
Se(no, e, t))
}(this, e)),
this
}
,
Yi.prototype.pause = function() {
return Wi("call pause flowing=%j", this._readableState.flowing),
!1 !== this._readableState.flowing && (Wi("pause"),
this._readableState.flowing = !1,
this.emit("pause")),
this
}
,
Yi.prototype.wrap = function(e) {
var t = this._readableState
, n = !1
, r = this;
for (var i in e.on("end", (function() {
if (Wi("wrapped end"),
t.decoder && !t.ended) {
var e = t.decoder.end();
e && e.length && r.push(e)
}
r.push(null)
}
)),
e.on("data", (function(i) {
Wi("wrapped data"),
t.decoder && (i = t.decoder.write(i)),
t.objectMode && null == i || (t.objectMode || i && i.length) &&
(r.push(i) || (n = !0,
e.pause()))
}
)),
e)
void 0 === this[i] && "function" == typeof e[i] && (this[i] = function(t)
{
return function() {
return e[t].apply(e, arguments)
}
}(i));
return function(e, t) {
for (var n = 0, r = e.length; n < r; n++)
t(e[n], n)
}(["error", "close", "destroy", "pause", "resume"], (function(t) {
e.on(t, r.emit.bind(r, t))
}
)),
r._read = function(t) {
Wi("wrapped _read", t),
n && (n = !1,
e.resume())
}
,
r
}
,
Yi._fromList = io,
fo.WritableState = co,
ot(fo, Ge),
co.prototype.getBuffer = function() {
for (var e = this.bufferedRequest, t = []; e; )
t.push(e),
e = e.next;
return t
}
,
fo.prototype.pipe = function() {
this.emit("error", new Error("Cannot pipe, not readable"))
}
,
fo.prototype.write = function(e, t, n) {
var r = this._writableState
, i = !1;
return "function" == typeof t && (n = t,
t = null),
_.isBuffer(e) ? t = "buffer" : t || (t = r.defaultEncoding),
"function" != typeof n && (n = uo),
r.ended ? function(e, t) {
var n = new Error("write after end");
e.emit("error", n),
Se(t, n)
}(this, n) : function(e, t, n, r) {
var i = !0
, o = !1;
return null === n ? o = new TypeError("May not write null values to
stream") : _.isBuffer(n) || "string" == typeof n || void 0 === n || t.objectMode || (o = new
TypeError("Invalid non-string/buffer chunk")),
o && (e.emit("error", o),
Se(r, o),
i = !1),
i
}(this, r, e, n) && (r.pendingcb++,
i = function(e, t, n, r, i) {
n = function(e, t, n) {
return e.objectMode || !1 === e.decodeStrings || "string" !=
typeof t || (t = _.from(t, n)),
t
}(t, n, r),
_.isBuffer(n) && (r = "buffer");
var o = t.objectMode ? 1 : n.length;
t.length += o;
var a = t.length < t.highWaterMark;
if (a || (t.needDrain = !0),
t.writing || t.corked) {
var s = t.lastBufferedRequest;
t.lastBufferedRequest = new lo(n,r,i),
s ? s.next = t.lastBufferedRequest : t.bufferedRequest =
t.lastBufferedRequest,
t.bufferedRequestCount += 1
} else
ho(e, t, !1, o, n, r, i);
return a
}(this, r, e, t, n)),
i
}
,
fo.prototype.cork = function() {
this._writableState.corked++
}
,
fo.prototype.uncork = function() {
var e = this._writableState;
e.corked && (e.corked--,
e.writing || e.corked || e.finished || e.bufferProcessing || !
e.bufferedRequest || mo(this, e))
}
,
fo.prototype.setDefaultEncoding = function(e) {
if ("string" == typeof e && (e = e.toLowerCase()),
!(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2",
"utf16le", "utf-16le", "raw"].indexOf((e + "").toLowerCase()) > -1))
throw new TypeError("Unknown encoding: " + e);
return this._writableState.defaultEncoding = e,
this
}
,
fo.prototype._write = function(e, t, n) {
n(new Error("not implemented"))
}
,
fo.prototype._writev = null,
fo.prototype.end = function(e, t, n) {
var r = this._writableState;
"function" == typeof e ? (n = e,
e = null,
t = null) : "function" == typeof t && (n = t,
t = null),
null != e && this.write(e, t),
r.corked && (r.corked = 1,
this.uncork()),
r.ending || r.finished || function(e, t, n) {
t.ending = !0,
bo(e, t),
n && (t.finished ? Se(n) : e.once("finish", n)),
t.ended = !0,
e.writable = !1
}(this, r, n)
}
,
ot(Eo, Yi);
for (var Ao = Object.keys(fo.prototype), wo = 0; wo < Ao.length; wo++) {
var _o = Ao[wo];
Eo.prototype[_o] || (Eo.prototype[_o] = fo.prototype[_o])
}
function Eo(e) {
if (!(this instanceof Eo))
return new Eo(e);
Yi.call(this, e),
fo.call(this, e),
e && !1 === e.readable && (this.readable = !1),
e && !1 === e.writable && (this.writable = !1),
this.allowHalfOpen = !0,
e && !1 === e.allowHalfOpen && (this.allowHalfOpen = !1),
this.once("end", So)
}
function So() {
this.allowHalfOpen || this._writableState.ended || Se(ko, this)
}
function ko(e) {
e.end()
}
function Mo(e) {
this.afterTransform = function(t, n) {
return function(e, t, n) {
var r = e._transformState;
r.transforming = !1;
var i = r.writecb;
if (!i)
return e.emit("error", new Error("no writecb in Transform
class"));
r.writechunk = null,
r.writecb = null,
null != n && e.push(n),
i(t);
var o = e._readableState;
o.reading = !1,
(o.needReadable || o.length < o.highWaterMark) &&
e._read(o.highWaterMark)
}(e, t, n)
}
,
this.needTransform = !1,
this.transforming = !1,
this.writecb = null,
this.writechunk = null,
this.writeencoding = null
}
function Co(e) {
if (!(this instanceof Co))
return new Co(e);
Eo.call(this, e),
this._transformState = new Mo(this);
var t = this;
this._readableState.needReadable = !0,
this._readableState.sync = !1,
e && ("function" == typeof e.transform && (this._transform =
e.transform),
"function" == typeof e.flush && (this._flush = e.flush)),
this.once("prefinish", (function() {
"function" == typeof this._flush ? this._flush((function(e) {
xo(t, e)
}
)) : xo(t)
}
))
}
function xo(e, t) {
if (t)
return e.emit("error", t);
var n = e._writableState
, r = e._transformState;
if (n.length)
throw new Error("Calling transform done when ws.length != 0");
if (r.transforming)
throw new Error("Calling transform done when still transforming");
return e.push(null)
}
function Ro(e) {
if (!(this instanceof Ro))
return new Ro(e);
Co.call(this, e)
}
function To() {
Ge.call(this)
}
ot(Co, Eo),
Co.prototype.push = function(e, t) {
return this._transformState.needTransform = !1,
Eo.prototype.push.call(this, e, t)
}
,
Co.prototype._transform = function(e, t, n) {
throw new Error("Not implemented")
}
,
Co.prototype._write = function(e, t, n) {
var r = this._transformState;
if (r.writecb = n,
r.writechunk = e,
r.writeencoding = t,
!r.transforming) {
var i = this._readableState;
(r.needTransform || i.needReadable || i.length < i.highWaterMark)
&& this._read(i.highWaterMark)
}
}
,
Co.prototype._read = function(e) {
var t = this._transformState;
null !== t.writechunk && t.writecb && !t.transforming ? (t.transforming = !
0,
this._transform(t.writechunk, t.writeencoding, t.afterTransform)) :
t.needTransform = !0
}
,
ot(Ro, Co),
Ro.prototype._transform = function(e, t, n) {
n(null, e)
}
,
ot(To, Ge),
To.Readable = Yi,
To.Writable = fo,
To.Duplex = Eo,
To.Transform = Co,
To.PassThrough = Ro,
To.Stream = To,
To.prototype.pipe = function(e, t) {
var n = this;
function r(t) {
e.writable && !1 === e.write(t) && n.pause && n.pause()
}
function i() {
n.readable && n.resume && n.resume()
}
n.on("data", r),
e.on("drain", i),
e._isStdio || t && !1 === t.end || (n.on("end", a),
n.on("close", s));
var o = !1;
function a() {
o || (o = !0,
e.end())
}
function s() {
o || (o = !0,
"function" == typeof e.destroy && e.destroy())
}
function u(e) {
if (l(),
0 === Ge.listenerCount(this, "error"))
throw e
}
function l() {
n.removeListener("data", r),
e.removeListener("drain", i),
n.removeListener("end", a),
n.removeListener("close", s),
n.removeListener("error", u),
e.removeListener("error", u),
n.removeListener("end", l),
n.removeListener("close", l),
e.removeListener("close", l)
}
return n.on("error", u),
e.on("error", u),
n.on("end", l),
n.on("close", l),
e.on("close", l),
e.emit("pipe", n),
e
}
;
var Io = o(Object.freeze({
__proto__: null,
Duplex: Eo,
PassThrough: Ro,
Readable: Yi,
Stream: To,
Transform: Co,
Writable: fo,
default: To
}))
, Po = o(Vi)
, Lo = Ue().Buffer
, Oo = Io.Transform
, No = Po.StringDecoder;
function Do(e) {
Oo.call(this),
this.hashMode = "string" == typeof e,
this.hashMode ? this[e] = this._finalOrDigest : this.final =
this._finalOrDigest,
this._final && (this.__final = this._final,
this._final = null),
this._decoder = null,
this._encoding = null
}
Ye(Do, Oo),
Do.prototype.update = function(e, t, n) {
"string" == typeof e && (e = Lo.from(e, t));
var r = this._update(e);
return this.hashMode ? this : (n && (r = this._toString(r, n)),
r)
}
,
Do.prototype.setAutoPadding = function() {}
,
Do.prototype.getAuthTag = function() {
throw new Error("trying to get auth tag in unsupported state")
}
,
Do.prototype.setAuthTag = function() {
throw new Error("trying to set auth tag in unsupported state")
}
,
Do.prototype.setAAD = function() {
throw new Error("trying to set aad in unsupported state")
}
,
Do.prototype._transform = function(e, t, n) {
var r;
try {
this.hashMode ? this._update(e) : this.push(this._update(e))
} catch (e) {
r=e
} finally {
n(r)
}
}
,
Do.prototype._flush = function(e) {
var t;
try {
this.push(this.__final())
} catch (e) {
t=e
}
e(t)
}
,
Do.prototype._finalOrDigest = function(e) {
var t = this.__final() || Lo.alloc(0);
return e && (t = this._toString(t, e, !0)),
t
}
,
Do.prototype._toString = function(e, t, n) {
if (this._decoder || (this._decoder = new No(t),
this._encoding = t),
this._encoding !== t)
throw new Error("can't switch encodings");
var r = this._decoder.write(e);
return n && (r += this._decoder.end()),
r
}
;
var Bo = Do
, jo = ar
, zo = Sr
, Fo = ji
, Uo = Bo;
function Ko(e) {
Uo.call(this, "digest"),
this._hash = e
}
Ye(Ko, Uo),
Ko.prototype._update = function(e) {
this._hash.update(e)
}
,
Ko.prototype._final = function() {
return this._hash.digest()
}
;
var qo = function(e) {
return "md5" === (e = e.toLowerCase()) ? new jo : "rmd160" === e ||
"ripemd160" === e ? new zo : new Ko(Fo(e))
}
, Ho = Ye
, Vo = Ue().Buffer
, Wo = Bo
, $o = Vo.alloc(128)
, Yo = 64;
function Qo(e, t) {
Wo.call(this, "digest"),
"string" == typeof t && (t = Vo.from(t)),
this._alg = e,
this._key = t,
t.length > Yo ? t = e(t) : t.length < Yo && (t = Vo.concat([t, $o], Yo));
for (var n = this._ipad = Vo.allocUnsafe(Yo), r = this._opad =
Vo.allocUnsafe(Yo), i = 0; i < Yo; i++)
n[i] = 54 ^ t[i],
r[i] = 92 ^ t[i];
this._hash = [n]
}
Ho(Qo, Wo),
Qo.prototype._update = function(e) {
this._hash.push(e)
}
,
Qo.prototype._final = function() {
var e = this._alg(Vo.concat(this._hash));
return this._alg(Vo.concat([this._opad, e]))
}
;
var Zo = ar
, Go = function(e) {
return (new Zo).update(e).digest()
}
, Xo = Ye
, Jo = Qo
, ea = Bo
, ta = Ue().Buffer
, na = Go
, ra = Sr
, ia = ji
, oa = ta.alloc(128);
function aa(e, t) {
ea.call(this, "digest"),
"string" == typeof t && (t = ta.from(t));
var n = "sha512" === e || "sha384" === e ? 128 : 64;
this._alg = e,
this._key = t,
t.length > n ? t = ("rmd160" === e ? new ra : ia(e)).update(t).digest() :
t.length < n && (t = ta.concat([t, oa], n));
for (var r = this._ipad = ta.allocUnsafe(n), i = this._opad =
ta.allocUnsafe(n), o = 0; o < n; o++)
r[o] = 54 ^ t[o],
i[o] = 92 ^ t[o];
this._hash = "rmd160" === e ? new ra : ia(e),
this._hash.update(r)
}
Xo(aa, ea),
aa.prototype._update = function(e) {
this._hash.update(e)
}
,
aa.prototype._final = function() {
var e = this._hash.digest();
return ("rmd160" === this._alg ? new ra :
ia(this._alg)).update(this._opad).update(e).digest()
}
;
var sa = function(e, t) {
return "rmd160" === (e = e.toLowerCase()) || "ripemd160" === e ? new
aa("rmd160",t) : "md5" === e ? new Jo(na,t) : new aa(e,t)
}
, ua = {
sha224WithRSAEncryption: {
sign: "rsa",
hash: "sha224",
id: "302d300d06096086480165030402040500041c"
},
"RSA-SHA224": {
sign: "ecdsa/rsa",
hash: "sha224",
id: "302d300d06096086480165030402040500041c"
},
sha256WithRSAEncryption: {
sign: "rsa",
hash: "sha256",
id: "3031300d060960864801650304020105000420"
},
"RSA-SHA256": {
sign: "ecdsa/rsa",
hash: "sha256",
id: "3031300d060960864801650304020105000420"
},
sha384WithRSAEncryption: {
sign: "rsa",
hash: "sha384",
id: "3041300d060960864801650304020205000430"
},
"RSA-SHA384": {
sign: "ecdsa/rsa",
hash: "sha384",
id: "3041300d060960864801650304020205000430"
},
sha512WithRSAEncryption: {
sign: "rsa",
hash: "sha512",
id: "3051300d060960864801650304020305000440"
},
"RSA-SHA512": {
sign: "ecdsa/rsa",
hash: "sha512",
id: "3051300d060960864801650304020305000440"
},
"RSA-SHA1": {
sign: "rsa",
hash: "sha1",
id: "3021300906052b0e03021a05000414"
},
"ecdsa-with-SHA1": {
sign: "ecdsa",
hash: "sha1",
id: ""
},
sha256: {
sign: "ecdsa",
hash: "sha256",
id: ""
},
sha224: {
sign: "ecdsa",
hash: "sha224",
id: ""
},
sha384: {
sign: "ecdsa",
hash: "sha384",
id: ""
},
sha512: {
sign: "ecdsa",
hash: "sha512",
id: ""
},
"DSA-SHA": {
sign: "dsa",
hash: "sha1",
id: ""
},
"DSA-SHA1": {
sign: "dsa",
hash: "sha1",
id: ""
},
DSA: {
sign: "dsa",
hash: "sha1",
id: ""
},
"DSA-WITH-SHA224": {
sign: "dsa",
hash: "sha224",
id: ""
},
"DSA-SHA224": {
sign: "dsa",
hash: "sha224",
id: ""
},
"DSA-WITH-SHA256": {
sign: "dsa",
hash: "sha256",
id: ""
},
"DSA-SHA256": {
sign: "dsa",
hash: "sha256",
id: ""
},
"DSA-WITH-SHA384": {
sign: "dsa",
hash: "sha384",
id: ""
},
"DSA-SHA384": {
sign: "dsa",
hash: "sha384",
id: ""
},
"DSA-WITH-SHA512": {
sign: "dsa",
hash: "sha512",
id: ""
},
"DSA-SHA512": {
sign: "dsa",
hash: "sha512",
id: ""
},
"DSA-RIPEMD160": {
sign: "dsa",
hash: "rmd160",
id: ""
},
ripemd160WithRSA: {
sign: "rsa",
hash: "rmd160",
id: "3021300906052b2403020105000414"
},
"RSA-RIPEMD160": {
sign: "rsa",
hash: "rmd160",
id: "3021300906052b2403020105000414"
},
md5WithRSAEncryption: {
sign: "rsa",
hash: "md5",
id: "3020300c06082a864886f70d020505000410"
},
"RSA-MD5": {
sign: "rsa",
hash: "md5",
id: "3020300c06082a864886f70d020505000410"
}
}
, la = ua
, ca = {}
, da = Math.pow(2, 30) - 1
, fa = function(e, t) {
if ("number" != typeof e)
throw new TypeError("Iterations not a number");
if (e < 0)
throw new TypeError("Bad iterations");
if ("number" != typeof t)
throw new TypeError("Key length not a number");
if (t < 0 || t > da || t != t)
throw new TypeError("Bad key length")
}
, ha = r.process && r.process.browser ? "utf-8" : r.process &&
r.process.version ? parseInt(je.version.split(".")[0].slice(1), 10) >= 6 ? "utf-8" : "binary" :
"utf-8"
, pa = Ue().Buffer
, ma = function(e, t, n) {
if (pa.isBuffer(e))
return e;
if ("string" == typeof e)
return pa.from(e, t);
if (ArrayBuffer.isView(e))
return pa.from(e.buffer);
throw new TypeError(n + " must be a string, a Buffer, a typed array or a
DataView")
}
, ga = Go
, va = Sr
, ba = ji
, ya = Ue().Buffer
, Aa = fa
, wa = ha
, _a = ma
, Ea = ya.alloc(128)
, Sa = {
md5: 16,
sha1: 20,
sha224: 28,
sha256: 32,
sha384: 48,
sha512: 64,
rmd160: 20,
ripemd160: 20
};
function ka(e, t, n) {
var r = function(e) {
function t(t) {
return ba(e).update(t).digest()
}
function n(e) {
return (new va).update(e).digest()
}
return "rmd160" === e || "ripemd160" === e ? n : "md5" === e ? ga :
t
}(e)
, i = "sha512" === e || "sha384" === e ? 128 : 64;
t.length > i ? t = r(t) : t.length < i && (t = ya.concat([t, Ea], i));
for (var o = ya.allocUnsafe(i + Sa[e]), a = ya.allocUnsafe(i + Sa[e]), s =
0; s < i; s++)
o[s] = 54 ^ t[s],
a[s] = 92 ^ t[s];
var u = ya.allocUnsafe(i + n + 4);
o.copy(u, 0, 0, i),
this.ipad1 = u,
this.ipad2 = o,
this.opad = a,
this.alg = e,
this.blocksize = i,
this.hash = r,
this.size = Sa[e]
}
ka.prototype.run = function(e, t) {
return e.copy(t, this.blocksize),
this.hash(t).copy(this.opad, this.blocksize),
this.hash(this.opad)
}
;
var Ma, Ca, xa = function(e, t, n, r, i) {
Aa(n, r);
var o = new ka(i = i || "sha1",e = _a(e, wa, "Password"),(t = _a(t, wa,
"Salt")).length)
, a = ya.allocUnsafe(r)
, s = ya.allocUnsafe(t.length + 4);
t.copy(s, 0, 0, t.length);
for (var u = 0, l = Sa[i], c = Math.ceil(r / l), d = 1; d <= c; d++) {
s.writeUInt32BE(d, t.length);
for (var f = o.run(s, o.ipad1), h = f, p = 1; p < n; p++) {
h = o.run(h, o.ipad2);
for (var m = 0; m < l; m++)
f[m] ^= h[m]
}
f.copy(a, u),
u += l
}
return a
}, Ra = Ue().Buffer, Ta = fa, Ia = ha, Pa = xa, La = ma, Oa = r.crypto &&
r.crypto.subtle, Na = {
sha: "SHA-1",
"sha-1": "SHA-1",
sha1: "SHA-1",
sha256: "SHA-256",
"sha-256": "SHA-256",
sha384: "SHA-384",
"sha-384": "SHA-384",
"sha-512": "SHA-512",
sha512: "SHA-512"
}, Da = [];
function Ba() {
return Ca || (Ca = r.process && r.process.nextTick ? r.process.nextTick :
r.queueMicrotask ? r.queueMicrotask : r.setImmediate ? r.setImmediate : r.setTimeout)
}
function ja(e, t, n, r, i) {
return Oa.importKey("raw", e, {
name: "PBKDF2"
}, !1, ["deriveBits"]).then((function(e) {
return Oa.deriveBits({
name: "PBKDF2",
salt: t,
iterations: n,
hash: {
name: i
}
}, e, r << 3)
}
)).then((function(e) {
return Ra.from(e)
}
))
}
ca.pbkdf2 = function(e, t, n, i, o, a) {
"function" == typeof o && (a = o,
o = void 0);
var s = Na[(o = o || "sha1").toLowerCase()];
if (s && "function" == typeof r.Promise) {
if (Ta(n, i),
e = La(e, Ia, "Password"),
t = La(t, Ia, "Salt"),
"function" != typeof a)
throw new Error("No callback provided to pbkdf2");
!function(e, t) {
e.then((function(e) {
Ba()((function() {
t(null, e)
}
))
}
), (function(e) {
Ba()((function() {
t(e)
}
))
}
))
}(function(e) {
if (r.process && !r.process.browser)
return Promise.resolve(!1);
if (!Oa || !Oa.importKey || !Oa.deriveBits)
return Promise.resolve(!1);
if (void 0 !== Da[e])
return Da[e];
var t = ja(Ma = Ma || Ra.alloc(8), Ma, 10, 128,
e).then((function() {
return !0
}
)).catch((function() {
return !1
}
));
return Da[e] = t,
t
}(s).then((function(r) {
return r ? ja(e, t, n, i, s) : Pa(e, t, n, i, o)
}
)), a)
} else
Ba()((function() {
var r;
try {
r = Pa(e, t, n, i, o)
} catch (e) {
return a(e)
}
a(null, r)
}
))
}
,
ca.pbkdf2Sync = xa;
var za = {}
, Fa = {}
, Ua = {
readUInt32BE: function(e, t) {
return (e[0 + t] << 24 | e[1 + t] << 16 | e[2 + t] << 8 | e[3 + t]) >>> 0
},
writeUInt32BE: function(e, t, n) {
e[0 + n] = t >>> 24,
e[1 + n] = t >>> 16 & 255,
e[2 + n] = t >>> 8 & 255,
e[3 + n] = 255 & t
},
ip: function(e, t, n, r) {
for (var i = 0, o = 0, a = 6; a >= 0; a -= 2) {
for (var s = 0; s <= 24; s += 8)
i <<= 1,
i |= t >>> s + a & 1;
for (s = 0; s <= 24; s += 8)
i <<= 1,
i |= e >>> s + a & 1
}
for (a = 6; a >= 0; a -= 2) {
for (s = 1; s <= 25; s += 8)
o <<= 1,
o |= t >>> s + a & 1;
for (s = 1; s <= 25; s += 8)
o <<= 1,
o |= e >>> s + a & 1
}
n[r + 0] = i >>> 0,
n[r + 1] = o >>> 0
},
rip: function(e, t, n, r) {
for (var i = 0, o = 0, a = 0; a < 4; a++)
for (var s = 24; s >= 0; s -= 8)
i <<= 1,
i |= t >>> s + a & 1,
i <<= 1,
i |= e >>> s + a & 1;
for (a = 4; a < 8; a++)
for (s = 24; s >= 0; s -= 8)
o <<= 1,
o |= t >>> s + a & 1,
o <<= 1,
o |= e >>> s + a & 1;
n[r + 0] = i >>> 0,
n[r + 1] = o >>> 0
},
pc1: function(e, t, n, r) {
for (var i = 0, o = 0, a = 7; a >= 5; a--) {
for (var s = 0; s <= 24; s += 8)
i <<= 1,
i |= t >> s + a & 1;
for (s = 0; s <= 24; s += 8)
i <<= 1,
i |= e >> s + a & 1
}
for (s = 0; s <= 24; s += 8)
i <<= 1,
i |= t >> s + a & 1;
for (a = 1; a <= 3; a++) {
for (s = 0; s <= 24; s += 8)
o <<= 1,
o |= t >> s + a & 1;
for (s = 0; s <= 24; s += 8)
o <<= 1,
o |= e >> s + a & 1
}
for (s = 0; s <= 24; s += 8)
o <<= 1,
o |= e >> s + a & 1;
n[r + 0] = i >>> 0,
n[r + 1] = o >>> 0
},
r28shl: function(e, t) {
return e << t & 268435455 | e >>> 28 - t
}
}
, Ka = [14, 11, 17, 4, 27, 23, 25, 0, 13, 22, 7, 18, 5, 9, 16, 24, 2, 20, 12,
21, 1, 8, 15, 26, 15, 4, 25, 19, 9, 1, 26, 16, 5, 11, 23, 8, 12, 7, 17, 0, 22, 3, 10, 14, 6, 20,
27, 24];
Ua.pc2 = function(e, t, n, r) {
for (var i = 0, o = 0, a = Ka.length >>> 1, s = 0; s < a; s++)
i <<= 1,
i |= e >>> Ka[s] & 1;
for (s = a; s < Ka.length; s++)
o <<= 1,
o |= t >>> Ka[s] & 1;
n[r + 0] = i >>> 0,
n[r + 1] = o >>> 0
}
,
Ua.expand = function(e, t, n) {
var r = 0
, i = 0;
r = (1 & e) << 5 | e >>> 27;
for (var o = 23; o >= 15; o -= 4)
r <<= 6,
r |= e >>> o & 63;
for (o = 11; o >= 3; o -= 4)
i |= e >>> o & 63,
i <<= 6;
i |= (31 & e) << 1 | e >>> 31,
t[n + 0] = r >>> 0,
t[n + 1] = i >>> 0
}
;
var qa = [14, 0, 4, 15, 13, 7, 1, 4, 2, 14, 15, 2, 11, 13, 8, 1, 3, 10, 10, 6, 6,
12, 12, 11, 5, 9, 9, 5, 0, 3, 7, 8, 4, 15, 1, 12, 14, 8, 8, 2, 13, 4, 6, 9, 2, 1, 11, 7, 15, 5, 12,
11, 9, 3, 7, 14, 3, 10, 10, 0, 5, 6, 0, 13, 15, 3, 1, 13, 8, 4, 14, 7, 6, 15, 11, 2, 3, 8, 4, 14,
9, 12, 7, 0, 2, 1, 13, 10, 12, 6, 0, 9, 5, 11, 10, 5, 0, 13, 14, 8, 7, 10, 11, 1, 10, 3, 4, 15,
13, 4, 1, 2, 5, 11, 8, 6, 12, 7, 6, 12, 9, 0, 3, 5, 2, 14, 15, 9, 10, 13, 0, 7, 9, 0, 14, 9, 6, 3,
3, 4, 15, 6, 5, 10, 1, 2, 13, 8, 12, 5, 7, 14, 11, 12, 4, 11, 2, 15, 8, 1, 13, 1, 6, 10, 4, 13, 9,
0, 8, 6, 15, 9, 3, 8, 0, 7, 11, 4, 1, 15, 2, 14, 12, 3, 5, 11, 10, 5, 14, 2, 7, 12, 7, 13, 13, 8,
14, 11, 3, 5, 0, 6, 6, 15, 9, 0, 10, 3, 1, 4, 2, 7, 8, 2, 5, 12, 11, 1, 12, 10, 4, 14, 15, 9, 10,
3, 6, 15, 9, 0, 0, 6, 12, 10, 11, 1, 7, 13, 13, 8, 15, 9, 1, 4, 3, 5, 14, 11, 5, 12, 2, 7, 8, 2, 4,
14, 2, 14, 12, 11, 4, 2, 1, 12, 7, 4, 10, 7, 11, 13, 6, 1, 8, 5, 5, 0, 3, 15, 15, 10, 13, 3, 0, 9,
14, 8, 9, 6, 4, 11, 2, 8, 1, 12, 11, 7, 10, 1, 13, 14, 7, 2, 8, 13, 15, 6, 9, 15, 12, 0, 5, 9, 6,
10, 3, 4, 0, 5, 14, 3, 12, 10, 1, 15, 10, 4, 15, 2, 9, 7, 2, 12, 6, 9, 8, 5, 0, 6, 13, 1, 3, 13, 4,
14, 14, 0, 7, 11, 5, 3, 11, 8, 9, 4, 14, 3, 15, 2, 5, 12, 2, 9, 8, 5, 12, 15, 3, 10, 7, 11, 0, 14,
4, 1, 10, 7, 1, 6, 13, 0, 11, 8, 6, 13, 4, 13, 11, 0, 2, 11, 14, 7, 15, 4, 0, 9, 8, 1, 13, 10, 3,
14, 12, 3, 9, 5, 7, 12, 5, 2, 10, 15, 6, 8, 1, 6, 1, 6, 4, 11, 11, 13, 13, 8, 12, 1, 3, 4, 7, 10,
14, 7, 10, 9, 15, 5, 6, 0, 8, 15, 0, 14, 5, 2, 9, 3, 2, 12, 13, 1, 2, 15, 8, 13, 4, 8, 6, 10, 15,
3, 11, 7, 1, 4, 10, 12, 9, 5, 3, 6, 14, 11, 5, 0, 0, 14, 12, 9, 7, 2, 7, 2, 11, 1, 4, 14, 1, 7, 9, 4,
12, 10, 14, 8, 2, 13, 0, 15, 6, 12, 10, 9, 13, 0, 15, 3, 3, 5, 5, 6, 8, 11];
Ua.substitute = function(e, t) {
for (var n = 0, r = 0; r < 4; r++)
n <<= 4,
n |= qa[64 * r + (e >>> 18 - 6 * r & 63)];
for (r = 0; r < 4; r++)
n <<= 4,
n |= qa[256 + 64 * r + (t >>> 18 - 6 * r & 63)];
return n >>> 0
}
;
var Ha = [16, 25, 12, 11, 3, 20, 4, 15, 31, 17, 9, 6, 27, 14, 1, 22, 30, 24, 8,
18, 0, 5, 29, 23, 13, 19, 2, 26, 10, 21, 28, 7];
Ua.permute = function(e) {
for (var t = 0, n = 0; n < Ha.length; n++)
t <<= 1,
t |= e >>> Ha[n] & 1;
return t >>> 0
}
,
Ua.padSplit = function(e, t, n) {
for (var r = e.toString(2); r.length < t; )
r = "0" + r;
for (var i = [], o = 0; o < t; o += n)
i.push(r.slice(o, o + n));
return i.join(" ")
}
;
var Va = Wa;
function Wa(e, t) {
if (!e)
throw new Error(t || "Assertion failed")
}
Wa.equal = function(e, t, n) {
if (e != t)
throw new Error(n || "Assertion failed: " + e + " != " + t)
}
;
var $a = Va;
function Ya(e) {
this.options = e,
this.type = this.options.type,
this.blockSize = 8,
this._init(),
this.buffer = new Array(this.blockSize),
this.bufferOff = 0,
this.padding = !1 !== e.padding
}
var Qa = Ya;
Ya.prototype._init = function() {}
,
Ya.prototype.update = function(e) {
return 0 === e.length ? [] : "decrypt" === this.type ?
this._updateDecrypt(e) : this._updateEncrypt(e)
}
,
Ya.prototype._buffer = function(e, t) {
for (var n = Math.min(this.buffer.length - this.bufferOff, e.length - t), r =
0; r < n; r++)
this.buffer[this.bufferOff + r] = e[t + r];
return this.bufferOff += n,
n
}
,
Ya.prototype._flushBuffer = function(e, t) {
return this._update(this.buffer, 0, e, t),
this.bufferOff = 0,
this.blockSize
}
,
Ya.prototype._updateEncrypt = function(e) {
var t = 0
,n=0
, r = (this.bufferOff + e.length) / this.blockSize | 0
, i = new Array(r * this.blockSize);
0 !== this.bufferOff && (t += this._buffer(e, t),
this.bufferOff === this.buffer.length && (n += this._flushBuffer(i, n)));
for (var o = e.length - (e.length - t) % this.blockSize; t < o; t +=
this.blockSize)
this._update(e, t, i, n),
n += this.blockSize;
for (; t < e.length; t++,
this.bufferOff++)
this.buffer[this.bufferOff] = e[t];
return i
}
,
Ya.prototype._updateDecrypt = function(e) {
for (var t = 0, n = 0, r = Math.ceil((this.bufferOff + e.length) /
this.blockSize) - 1, i = new Array(r * this.blockSize); r > 0; r--)
t += this._buffer(e, t),
n += this._flushBuffer(i, n);
return t += this._buffer(e, t),
i
}
,
Ya.prototype.final = function(e) {
var t, n;
return e && (t = this.update(e)),
n = "encrypt" === this.type ? this._finalEncrypt() : this._finalDecrypt(),
t ? t.concat(n) : n
}
,
Ya.prototype._pad = function(e, t) {
if (0 === t)
return !1;
for (; t < e.length; )
e[t++] = 0;
return !0
}
,
Ya.prototype._finalEncrypt = function() {
if (!this._pad(this.buffer, this.bufferOff))
return [];
var e = new Array(this.blockSize);
return this._update(this.buffer, 0, e, 0),
e
}
,
Ya.prototype._unpad = function(e) {
return e
}
,
Ya.prototype._finalDecrypt = function() {
$a.equal(this.bufferOff, this.blockSize, "Not enough data to decrypt");
var e = new Array(this.blockSize);
return this._flushBuffer(e, 0),
this._unpad(e)
}
;
var Za = Va
, Ga = Ua
, Xa = Qa;
function Ja() {
this.tmp = new Array(2),
this.keys = null
}
function es(e) {
Xa.call(this, e);
var t = new Ja;
this._desState = t,
this.deriveKeys(t, e.key)
}
Ye(es, Xa);
var ts = es;
es.create = function(e) {
return new es(e)
}
;
var ns = [1, 1, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 1];
es.prototype.deriveKeys = function(e, t) {
e.keys = new Array(32),
Za.equal(t.length, this.blockSize, "Invalid key length");
var n = Ga.readUInt32BE(t, 0)
, r = Ga.readUInt32BE(t, 4);
Ga.pc1(n, r, e.tmp, 0),
n = e.tmp[0],
r = e.tmp[1];
for (var i = 0; i < e.keys.length; i += 2) {
var o = ns[i >>> 1];
n = Ga.r28shl(n, o),
r = Ga.r28shl(r, o),
Ga.pc2(n, r, e.keys, i)
}
}
,
es.prototype._update = function(e, t, n, r) {
var i = this._desState
, o = Ga.readUInt32BE(e, t)
, a = Ga.readUInt32BE(e, t + 4);
Ga.ip(o, a, i.tmp, 0),
o = i.tmp[0],
a = i.tmp[1],
"encrypt" === this.type ? this._encrypt(i, o, a, i.tmp, 0) : this._decrypt(i,
o, a, i.tmp, 0),
o = i.tmp[0],
a = i.tmp[1],
Ga.writeUInt32BE(n, o, r),
Ga.writeUInt32BE(n, a, r + 4)
}
,
es.prototype._pad = function(e, t) {
if (!1 === this.padding)
return !1;
for (var n = e.length - t, r = t; r < e.length; r++)
e[r] = n;
return !0
}
,
es.prototype._unpad = function(e) {
if (!1 === this.padding)
return e;
for (var t = e[e.length - 1], n = e.length - t; n < e.length; n++)
Za.equal(e[n], t);
return e.slice(0, e.length - t)
}
,
es.prototype._encrypt = function(e, t, n, r, i) {
for (var o = t, a = n, s = 0; s < e.keys.length; s += 2) {
var u = e.keys[s]
, l = e.keys[s + 1];
Ga.expand(a, e.tmp, 0),
u ^= e.tmp[0],
l ^= e.tmp[1];
var c = Ga.substitute(u, l)
, d = a;
a = (o ^ Ga.permute(c)) >>> 0,
o=d
}
Ga.rip(a, o, r, i)
}
,
es.prototype._decrypt = function(e, t, n, r, i) {
for (var o = n, a = t, s = e.keys.length - 2; s >= 0; s -= 2) {
var u = e.keys[s]
, l = e.keys[s + 1];
Ga.expand(o, e.tmp, 0),
u ^= e.tmp[0],
l ^= e.tmp[1];
var c = Ga.substitute(u, l)
, d = o;
o = (a ^ Ga.permute(c)) >>> 0,
a=d
}
Ga.rip(o, a, r, i)
}
;
var rs = {}
, is = Va
, os = Ye
, as = {};
function ss(e) {
is.equal(e.length, 8, "Invalid IV length"),
this.iv = new Array(8);
for (var t = 0; t < this.iv.length; t++)
this.iv[t] = e[t]
}
rs.instantiate = function(e) {
function t(t) {
e.call(this, t),
this._cbcInit()
}
os(t, e);
for (var n = Object.keys(as), r = 0; r < n.length; r++) {
var i = n[r];
t.prototype[i] = as[i]
}
return t.create = function(e) {
return new t(e)
}
,
t
}
,
as._cbcInit = function() {
var e = new ss(this.options.iv);
this._cbcState = e
}
,
as._update = function(e, t, n, r) {
var i = this._cbcState
, o = this.constructor.super_.prototype
, a = i.iv;
if ("encrypt" === this.type) {
for (var s = 0; s < this.blockSize; s++)
a[s] ^= e[t + s];
for (o._update.call(this, a, 0, n, r),
s = 0; s < this.blockSize; s++)
a[s] = n[r + s]
} else {
for (o._update.call(this, e, t, n, r),
s = 0; s < this.blockSize; s++)
n[r + s] ^= a[s];
for (s = 0; s < this.blockSize; s++)
a[s] = e[t + s]
}
}
;
var us = Va
, ls = Qa
, cs = ts;
function ds(e, t) {
us.equal(t.length, 24, "Invalid key length");
var n = t.slice(0, 8)
, r = t.slice(8, 16)
, i = t.slice(16, 24);
this.ciphers = "encrypt" === e ? [cs.create({
type: "encrypt",
key: n
}), cs.create({
type: "decrypt",
key: r
}), cs.create({
type: "encrypt",
key: i
})] : [cs.create({
type: "decrypt",
key: i
}), cs.create({
type: "encrypt",
key: r
}), cs.create({
type: "decrypt",
key: n
})]
}
function fs(e) {
ls.call(this, e);
var t = new ds(this.type,this.options.key);
this._edeState = t
}
Ye(fs, ls);
var hs = fs;
fs.create = function(e) {
return new fs(e)
}
,
fs.prototype._update = function(e, t, n, r) {
var i = this._edeState;
i.ciphers[0]._update(e, t, n, r),
i.ciphers[1]._update(n, r, n, r),
i.ciphers[2]._update(n, r, n, r)
}
,
fs.prototype._pad = cs.prototype._pad,
fs.prototype._unpad = cs.prototype._unpad,
Fa.utils = Ua,
Fa.Cipher = Qa,
Fa.DES = ts,
Fa.CBC = rs,
Fa.EDE = hs;
var ps = Bo
, ms = Fa
, gs = Ye
, vs = Ue().Buffer
, bs = {
"des-ede3-cbc": ms.CBC.instantiate(ms.EDE),
"des-ede3": ms.EDE,
"des-ede-cbc": ms.CBC.instantiate(ms.EDE),
"des-ede": ms.EDE,
"des-cbc": ms.CBC.instantiate(ms.DES),
"des-ecb": ms.DES
};
bs.des = bs["des-cbc"],
bs.des3 = bs["des-ede3-cbc"];
var ys = As;
function As(e) {
ps.call(this);
var t, n = e.mode.toLowerCase(), r = bs[n];
t = e.decrypt ? "decrypt" : "encrypt";
var i = e.key;
vs.isBuffer(i) || (i = vs.from(i)),
"des-ede" !== n && "des-ede-cbc" !== n || (i = vs.concat([i, i.slice(0,
8)]));
var o = e.iv;
vs.isBuffer(o) || (o = vs.from(o)),
this._des = r.create({
key: i,
iv: o,
type: t
})
}
gs(As, ps),
As.prototype._update = function(e) {
return vs.from(this._des.update(e))
}
,
As.prototype._final = function() {
return vs.from(this._des.final())
}
;
var ws = {}
, _s = {}
, Es = {
encrypt: function(e, t) {
return e._cipher.encryptBlock(t)
},
decrypt: function(e, t) {
return e._cipher.decryptBlock(t)
}
}
, Ss = {}
, ks = function(e, t) {
for (var n = Math.min(e.length, t.length), r = new _(n), i = 0; i < n; ++i)
r[i] = e[i] ^ t[i];
return r
}
, Ms = ks;
Ss.encrypt = function(e, t) {
var n = Ms(t, e._prev);
return e._prev = e._cipher.encryptBlock(n),
e._prev
}
,
Ss.decrypt = function(e, t) {
var n = e._prev;
e._prev = t;
var r = e._cipher.decryptBlock(t);
return Ms(r, n)
}
;
var Cs = {}
, xs = Ue().Buffer
, Rs = ks;
function Ts(e, t, n) {
var r = t.length
, i = Rs(t, e._cache);
return e._cache = e._cache.slice(r),
e._prev = xs.concat([e._prev, n ? t : i]),
i
}
Cs.encrypt = function(e, t, n) {
for (var r, i = xs.allocUnsafe(0); t.length; ) {
if (0 === e._cache.length && (e._cache =
e._cipher.encryptBlock(e._prev),
e._prev = xs.allocUnsafe(0)),
!(e._cache.length <= t.length)) {
i = xs.concat([i, Ts(e, t, n)]);
break
}
r = e._cache.length,
i = xs.concat([i, Ts(e, t.slice(0, r), n)]),
t = t.slice(r)
}
return i
}
;
var Is = {}
, Ps = Ue().Buffer;
function Ls(e, t, n) {
var r = e._cipher.encryptBlock(e._prev)[0] ^ t;
return e._prev = Ps.concat([e._prev.slice(1), Ps.from([n ? t : r])]),
r
}
Is.encrypt = function(e, t, n) {
for (var r = t.length, i = Ps.allocUnsafe(r), o = -1; ++o < r; )
i[o] = Ls(e, t[o], n);
return i
}
;
var Os = {}
, Ns = Ue().Buffer;
function Ds(e, t, n) {
for (var r, i, o = -1, a = 0; ++o < 8; )
r = t & 1 << 7 - o ? 128 : 0,
a += (128 & (i = e._cipher.encryptBlock(e._prev)[0] ^ r)) >> o % 8,
e._prev = Bs(e._prev, n ? r : i);
return a
}
function Bs(e, t) {
var n = e.length
, r = -1
, i = Ns.allocUnsafe(e.length);
for (e = Ns.concat([e, Ns.from([t])]); ++r < n; )
i[r] = e[r] << 1 | e[r + 1] >> 7;
return i
}
Os.encrypt = function(e, t, n) {
for (var r = t.length, i = Ns.allocUnsafe(r), o = -1; ++o < r; )
i[o] = Ds(e, t[o], n);
return i
}
;
var js = {}
, zs = ks;
function Fs(e) {
return e._prev = e._cipher.encryptBlock(e._prev),
e._prev
}
js.encrypt = function(e, t) {
for (; e._cache.length < t.length; )
e._cache = _.concat([e._cache, Fs(e)]);
var n = e._cache.slice(0, t.length);
return e._cache = e._cache.slice(t.length),
zs(t, n)
}
;
var Us = {}
, Ks = function(e) {
for (var t, n = e.length; n--; ) {
if (255 !== (t = e.readUInt8(n))) {
t++,
e.writeUInt8(t, n);
break
}
e.writeUInt8(0, n)
}
}
, qs = ks
, Hs = Ue().Buffer
, Vs = Ks;
function Ws(e) {
var t = e._cipher.encryptBlockRaw(e._prev);
return Vs(e._prev),
t
}
Us.encrypt = function(e, t) {
var n = Math.ceil(t.length / 16)
, r = e._cache.length;
e._cache = Hs.concat([e._cache, Hs.allocUnsafe(16 * n)]);
for (var i = 0; i < n; i++) {
var o = Ws(e)
, a = r + 16 * i;
e._cache.writeUInt32BE(o[0], a + 0),
e._cache.writeUInt32BE(o[1], a + 4),
e._cache.writeUInt32BE(o[2], a + 8),
e._cache.writeUInt32BE(o[3], a + 12)
}
var s = e._cache.slice(0, t.length);
return e._cache = e._cache.slice(t.length),
qs(t, s)
}
;
var $s = {
"aes-128-ecb": {
cipher: "AES",
key: 128,
iv: 0,
mode: "ECB",
type: "block"
},
"aes-192-ecb": {
cipher: "AES",
key: 192,
iv: 0,
mode: "ECB",
type: "block"
},
"aes-256-ecb": {
cipher: "AES",
key: 256,
iv: 0,
mode: "ECB",
type: "block"
},
"aes-128-cbc": {
cipher: "AES",
key: 128,
iv: 16,
mode: "CBC",
type: "block"
},
"aes-192-cbc": {
cipher: "AES",
key: 192,
iv: 16,
mode: "CBC",
type: "block"
},
"aes-256-cbc": {
cipher: "AES",
key: 256,
iv: 16,
mode: "CBC",
type: "block"
},
aes128: {
cipher: "AES",
key: 128,
iv: 16,
mode: "CBC",
type: "block"
},
aes192: {
cipher: "AES",
key: 192,
iv: 16,
mode: "CBC",
type: "block"
},
aes256: {
cipher: "AES",
key: 256,
iv: 16,
mode: "CBC",
type: "block"
},
"aes-128-cfb": {
cipher: "AES",
key: 128,
iv: 16,
mode: "CFB",
type: "stream"
},
"aes-192-cfb": {
cipher: "AES",
key: 192,
iv: 16,
mode: "CFB",
type: "stream"
},
"aes-256-cfb": {
cipher: "AES",
key: 256,
iv: 16,
mode: "CFB",
type: "stream"
},
"aes-128-cfb8": {
cipher: "AES",
key: 128,
iv: 16,
mode: "CFB8",
type: "stream"
},
"aes-192-cfb8": {
cipher: "AES",
key: 192,
iv: 16,
mode: "CFB8",
type: "stream"
},
"aes-256-cfb8": {
cipher: "AES",
key: 256,
iv: 16,
mode: "CFB8",
type: "stream"
},
"aes-128-cfb1": {
cipher: "AES",
key: 128,
iv: 16,
mode: "CFB1",
type: "stream"
},
"aes-192-cfb1": {
cipher: "AES",
key: 192,
iv: 16,
mode: "CFB1",
type: "stream"
},
"aes-256-cfb1": {
cipher: "AES",
key: 256,
iv: 16,
mode: "CFB1",
type: "stream"
},
"aes-128-ofb": {
cipher: "AES",
key: 128,
iv: 16,
mode: "OFB",
type: "stream"
},
"aes-192-ofb": {
cipher: "AES",
key: 192,
iv: 16,
mode: "OFB",
type: "stream"
},
"aes-256-ofb": {
cipher: "AES",
key: 256,
iv: 16,
mode: "OFB",
type: "stream"
},
"aes-128-ctr": {
cipher: "AES",
key: 128,
iv: 16,
mode: "CTR",
type: "stream"
},
"aes-192-ctr": {
cipher: "AES",
key: 192,
iv: 16,
mode: "CTR",
type: "stream"
},
"aes-256-ctr": {
cipher: "AES",
key: 256,
iv: 16,
mode: "CTR",
type: "stream"
},
"aes-128-gcm": {
cipher: "AES",
key: 128,
iv: 12,
mode: "GCM",
type: "auth"
},
"aes-192-gcm": {
cipher: "AES",
key: 192,
iv: 12,
mode: "GCM",
type: "auth"
},
"aes-256-gcm": {
cipher: "AES",
key: 256,
iv: 12,
mode: "GCM",
type: "auth"
}
}
, Ys = {
ECB: Es,
CBC: Ss,
CFB: Cs,
CFB8: Is,
CFB1: Os,
OFB: js,
CTR: Us,
GCM: Us
}
, Qs = $s;
for (var Zs in Qs)
Qs[Zs].module = Ys[Qs[Zs].mode];
var Gs = Qs
, Xs = {}
, Js = Ue().Buffer;
function eu(e) {
Js.isBuffer(e) || (e = Js.from(e));
for (var t = e.length / 4 | 0, n = new Array(t), r = 0; r < t; r++)
n[r] = e.readUInt32BE(4 * r);
return n
}
function tu(e) {
for (; 0 < e.length; e++)
e[0] = 0
}
function nu(e, t, n, r, i) {
for (var o, a, s, u, l = n[0], c = n[1], d = n[2], f = n[3], h = e[0] ^ t[0], p =
e[1] ^ t[1], m = e[2] ^ t[2], g = e[3] ^ t[3], v = 4, b = 1; b < i; b++)
o = l[h >>> 24] ^ c[p >>> 16 & 255] ^ d[m >>> 8 & 255] ^ f[255 & g]
^ t[v++],
a = l[p >>> 24] ^ c[m >>> 16 & 255] ^ d[g >>> 8 & 255] ^ f[255 & h]
^ t[v++],
s = l[m >>> 24] ^ c[g >>> 16 & 255] ^ d[h >>> 8 & 255] ^ f[255 & p]
^ t[v++],
u = l[g >>> 24] ^ c[h >>> 16 & 255] ^ d[p >>> 8 & 255] ^ f[255 & m]
^ t[v++],
h = o,
p = a,
m = s,
g = u;
return o = (r[h >>> 24] << 24 | r[p >>> 16 & 255] << 16 | r[m >>> 8 &
255] << 8 | r[255 & g]) ^ t[v++],
a = (r[p >>> 24] << 24 | r[m >>> 16 & 255] << 16 | r[g >>> 8 & 255] << 8
| r[255 & h]) ^ t[v++],
s = (r[m >>> 24] << 24 | r[g >>> 16 & 255] << 16 | r[h >>> 8 & 255] << 8
| r[255 & p]) ^ t[v++],
u = (r[g >>> 24] << 24 | r[h >>> 16 & 255] << 16 | r[p >>> 8 & 255] << 8
| r[255 & m]) ^ t[v++],
[o >>>= 0, a >>>= 0, s >>>= 0, u >>>= 0]
}
var ru = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]
, iu = function() {
for (var e = new Array(256), t = 0; t < 256; t++)
e[t] = t < 128 ? t << 1 : t << 1 ^ 283;
for (var n = [], r = [], i = [[], [], [], []], o = [[], [], [], []], a = 0, s = 0, u = 0; u <
256; ++u) {
var l = s ^ s << 1 ^ s << 2 ^ s << 3 ^ s << 4;
l = l >>> 8 ^ 255 & l ^ 99,
n[a] = l,
r[l] = a;
var c = e[a]
, d = e[c]
, f = e[d]
, h = 257 * e[l] ^ 16843008 * l;
i[0][a] = h << 24 | h >>> 8,
i[1][a] = h << 16 | h >>> 16,
i[2][a] = h << 8 | h >>> 24,
i[3][a] = h,
h = 16843009 * f ^ 65537 * d ^ 257 * c ^ 16843008 * a,
o[0][l] = h << 24 | h >>> 8,
o[1][l] = h << 16 | h >>> 16,
o[2][l] = h << 8 | h >>> 24,
o[3][l] = h,
0 === a ? a = s = 1 : (a = c ^ e[e[e[f ^ c]]],
s ^= e[e[s]])
}
return {
SBOX: n,
INV_SBOX: r,
SUB_MIX: i,
INV_SUB_MIX: o
}
}();
function ou(e) {
this._key = eu(e),
this._reset()
}
ou.blockSize = 16,
ou.keySize = 32,
ou.prototype.blockSize = ou.blockSize,
ou.prototype.keySize = ou.keySize,
ou.prototype._reset = function() {
for (var e = this._key, t = e.length, n = t + 6, r = 4 * (n + 1), i = [], o = 0; o
< t; o++)
i[o] = e[o];
for (o = t; o < r; o++) {
var a = i[o - 1];
o % t == 0 ? (a = a << 8 | a >>> 24,
a = iu.SBOX[a >>> 24] << 24 | iu.SBOX[a >>> 16 & 255] << 16 |
iu.SBOX[a >>> 8 & 255] << 8 | iu.SBOX[255 & a],
a ^= ru[o / t | 0] << 24) : t > 6 && o % t == 4 && (a = iu.SBOX[a >>>
24] << 24 | iu.SBOX[a >>> 16 & 255] << 16 | iu.SBOX[a >>> 8 & 255] << 8 |
iu.SBOX[255 & a]),
i[o] = i[o - t] ^ a
}
for (var s = [], u = 0; u < r; u++) {
var l = r - u
, c = i[l - (u % 4 ? 0 : 4)];
s[u] = u < 4 || l <= 4 ? c : iu.INV_SUB_MIX[0][iu.SBOX[c >>> 24]] ^
iu.INV_SUB_MIX[1][iu.SBOX[c >>> 16 & 255]] ^ iu.INV_SUB_MIX[2][iu.SBOX[c >>> 8
& 255]] ^ iu.INV_SUB_MIX[3][iu.SBOX[255 & c]]
}
this._nRounds = n,
this._keySchedule = i,
this._invKeySchedule = s
}
,
ou.prototype.encryptBlockRaw = function(e) {
return nu(e = eu(e), this._keySchedule, iu.SUB_MIX, iu.SBOX,
this._nRounds)
}
,
ou.prototype.encryptBlock = function(e) {
var t = this.encryptBlockRaw(e)
, n = Js.allocUnsafe(16);
return n.writeUInt32BE(t[0], 0),
n.writeUInt32BE(t[1], 4),
n.writeUInt32BE(t[2], 8),
n.writeUInt32BE(t[3], 12),
n
}
,
ou.prototype.decryptBlock = function(e) {
var t = (e = eu(e))[1];
e[1] = e[3],
e[3] = t;
var n = nu(e, this._invKeySchedule, iu.INV_SUB_MIX, iu.INV_SBOX,
this._nRounds)
, r = Js.allocUnsafe(16);
return r.writeUInt32BE(n[0], 0),
r.writeUInt32BE(n[3], 4),
r.writeUInt32BE(n[2], 8),
r.writeUInt32BE(n[1], 12),
r
}
,
ou.prototype.scrub = function() {
tu(this._keySchedule),
tu(this._invKeySchedule),
tu(this._key)
}
,
Xs.AES = ou;
var au = Ue().Buffer
, su = au.alloc(16, 0);
function uu(e) {
var t = au.allocUnsafe(16);
return t.writeUInt32BE(e[0] >>> 0, 0),
t.writeUInt32BE(e[1] >>> 0, 4),
t.writeUInt32BE(e[2] >>> 0, 8),
t.writeUInt32BE(e[3] >>> 0, 12),
t
}
function lu(e) {
this.h = e,
this.state = au.alloc(16, 0),
this.cache = au.allocUnsafe(0)
}
lu.prototype.ghash = function(e) {
for (var t = -1; ++t < e.length; )
this.state[t] ^= e[t];
this._multiply()
}
,
lu.prototype._multiply = function() {
for (var e, t, n, r = [(e = this.h).readUInt32BE(0), e.readUInt32BE(4),
e.readUInt32BE(8), e.readUInt32BE(12)], i = [0, 0, 0, 0], o = -1; ++o < 128; ) {
for (0 != (this.state[~~(o / 8)] & 1 << 7 - o % 8) && (i[0] ^= r[0],
i[1] ^= r[1],
i[2] ^= r[2],
i[3] ^= r[3]),
n = 0 != (1 & r[3]),
t = 3; t > 0; t--)
r[t] = r[t] >>> 1 | (1 & r[t - 1]) << 31;
r[0] = r[0] >>> 1,
n && (r[0] = r[0] ^ 225 << 24)
}
this.state = uu(i)
}
,
lu.prototype.update = function(e) {
var t;
for (this.cache = au.concat([this.cache, e]); this.cache.length >= 16; )
t = this.cache.slice(0, 16),
this.cache = this.cache.slice(16),
this.ghash(t)
}
,
lu.prototype.final = function(e, t) {
return this.cache.length && this.ghash(au.concat([this.cache, su], 16)),
this.ghash(uu([0, e, 0, t])),
this.state
}
;
var cu = lu
, du = Xs
, fu = Ue().Buffer
, hu = Bo
, pu = cu
, mu = ks
, gu = Ks;
function vu(e, t, n, r) {
hu.call(this);
var i = fu.alloc(4, 0);
this._cipher = new du.AES(t);
var o = this._cipher.encryptBlock(i);
this._ghash = new pu(o),
n = function(e, t, n) {
if (12 === t.length)
return e._finID = fu.concat([t, fu.from([0, 0, 0, 1])]),
fu.concat([t, fu.from([0, 0, 0, 2])]);
var r = new pu(n)
, i = t.length
, o = i % 16;
r.update(t),
o && (o = 16 - o,
r.update(fu.alloc(o, 0))),
r.update(fu.alloc(8, 0));
var a = 8 * i
, s = fu.alloc(8);
s.writeUIntBE(a, 0, 8),
r.update(s),
e._finID = r.state;
var u = fu.from(e._finID);
return gu(u),
u
}(this, n, o),
this._prev = fu.from(n),
this._cache = fu.allocUnsafe(0),
this._secCache = fu.allocUnsafe(0),
this._decrypt = r,
this._alen = 0,
this._len = 0,
this._mode = e,
this._authTag = null,
this._called = !1
}
Ye(vu, hu),
vu.prototype._update = function(e) {
if (!this._called && this._alen) {
var t = 16 - this._alen % 16;
t < 16 && (t = fu.alloc(t, 0),
this._ghash.update(t))
}
this._called = !0;
var n = this._mode.encrypt(this, e);
return this._decrypt ? this._ghash.update(e) : this._ghash.update(n),
this._len += e.length,
n
}
,
vu.prototype._final = function() {
if (this._decrypt && !this._authTag)
throw new Error("Unsupported state or unable to authenticate
data");
var e = mu(this._ghash.final(8 * this._alen, 8 * this._len),
this._cipher.encryptBlock(this._finID));
if (this._decrypt && function(e, t) {
var n = 0;
e.length !== t.length && n++;
for (var r = Math.min(e.length, t.length), i = 0; i < r; ++i)
n += e[i] ^ t[i];
return n
}(e, this._authTag))
throw new Error("Unsupported state or unable to authenticate
data");
this._authTag = e,
this._cipher.scrub()
}
,
vu.prototype.getAuthTag = function() {
if (this._decrypt || !fu.isBuffer(this._authTag))
throw new Error("Attempting to get auth tag in unsupported state");
return this._authTag
}
,
vu.prototype.setAuthTag = function(e) {
if (!this._decrypt)
throw new Error("Attempting to set auth tag in unsupported state");
this._authTag = e
}
,
vu.prototype.setAAD = function(e) {
if (this._called)
throw new Error("Attempting to set AAD in unsupported state");
this._ghash.update(e),
this._alen += e.length
}
;
var bu = vu
, yu = Xs
, Au = Ue().Buffer
, wu = Bo;
function _u(e, t, n, r) {
wu.call(this),
this._cipher = new yu.AES(t),
this._prev = Au.from(n),
this._cache = Au.allocUnsafe(0),
this._secCache = Au.allocUnsafe(0),
this._decrypt = r,
this._mode = e
}
Ye(_u, wu),
_u.prototype._update = function(e) {
return this._mode.encrypt(this, e, this._decrypt)
}
,
_u.prototype._final = function() {
this._cipher.scrub()
}
;
var Eu = _u
, Su = Ue().Buffer
, ku = ar
, Mu = function(e, t, n, r) {
if (Su.isBuffer(e) || (e = Su.from(e, "binary")),
t && (Su.isBuffer(t) || (t = Su.from(t, "binary")),
8 !== t.length))
throw new RangeError("salt should be Buffer with 8 byte length");
for (var i = n / 8, o = Su.alloc(i), a = Su.alloc(r || 0), s = Su.alloc(0); i > 0
|| r > 0; ) {
var u = new ku;
u.update(s),
u.update(e),
t && u.update(t),
s = u.digest();
var l = 0;
if (i > 0) {
var c = o.length - i;
l = Math.min(i, s.length),
s.copy(o, c, 0, l),
i -= l
}
if (l < s.length && r > 0) {
var d = a.length - r
, f = Math.min(r, s.length - l);
s.copy(a, d, l, l + f),
r -= f
}
}
return s.fill(0),
{
key: o,
iv: a
}
}
, Cu = Gs
, xu = bu
, Ru = Ue().Buffer
, Tu = Eu
, Iu = Bo
, Pu = Xs
, Lu = Mu;
function Ou(e, t, n) {
Iu.call(this),
this._cache = new Du,
this._cipher = new Pu.AES(t),
this._prev = Ru.from(n),
this._mode = e,
this._autopadding = !0
}
Ye(Ou, Iu),
Ou.prototype._update = function(e) {
var t, n;
this._cache.add(e);
for (var r = []; t = this._cache.get(); )
n = this._mode.encrypt(this, t),
r.push(n);
return Ru.concat(r)
}
;
var Nu = Ru.alloc(16, 16);
function Du() {
this.cache = Ru.allocUnsafe(0)
}
function Bu(e, t, n) {
var r = Cu[e.toLowerCase()];
if (!r)
throw new TypeError("invalid suite type");
if ("string" == typeof t && (t = Ru.from(t)),
t.length !== r.key / 8)
throw new TypeError("invalid key length " + t.length);
if ("string" == typeof n && (n = Ru.from(n)),
"GCM" !== r.mode && n.length !== r.iv)
throw new TypeError("invalid iv length " + n.length);
return "stream" === r.type ? new Tu(r.module,t,n) : "auth" === r.type ?
new xu(r.module,t,n) : new Ou(r.module,t,n)
}
Ou.prototype._final = function() {
var e = this._cache.flush();
if (this._autopadding)
return e = this._mode.encrypt(this, e),
this._cipher.scrub(),
e;
if (!e.equals(Nu))
throw this._cipher.scrub(),
new Error("data not multiple of block length")
}
,
Ou.prototype.setAutoPadding = function(e) {
return this._autopadding = !!e,
this
}
,
Du.prototype.add = function(e) {
this.cache = Ru.concat([this.cache, e])
}
,
Du.prototype.get = function() {
if (this.cache.length > 15) {
var e = this.cache.slice(0, 16);
return this.cache = this.cache.slice(16),
e
}
return null
}
,
Du.prototype.flush = function() {
for (var e = 16 - this.cache.length, t = Ru.allocUnsafe(e), n = -1; ++n <
e; )
t.writeUInt8(e, n);
return Ru.concat([this.cache, t])
}
,
_s.createCipheriv = Bu,
_s.createCipher = function(e, t) {
var n = Cu[e.toLowerCase()];
if (!n)
throw new TypeError("invalid suite type");
var r = Lu(t, !1, n.key, n.iv);
return Bu(e, r.key, r.iv)
}
;
var ju = {}
, zu = bu
, Fu = Ue().Buffer
, Uu = Gs
, Ku = Eu
, qu = Bo
, Hu = Xs
, Vu = Mu;
function Wu(e, t, n) {
qu.call(this),
this._cache = new $u,
this._last = void 0,
this._cipher = new Hu.AES(t),
this._prev = Fu.from(n),
this._mode = e,
this._autopadding = !0
}
function $u() {
this.cache = Fu.allocUnsafe(0)
}
function Yu(e, t, n) {
var r = Uu[e.toLowerCase()];
if (!r)
throw new TypeError("invalid suite type");
if ("string" == typeof n && (n = Fu.from(n)),
"GCM" !== r.mode && n.length !== r.iv)
throw new TypeError("invalid iv length " + n.length);
if ("string" == typeof t && (t = Fu.from(t)),
t.length !== r.key / 8)
throw new TypeError("invalid key length " + t.length);
return "stream" === r.type ? new Ku(r.module,t,n,!0) : "auth" ===
r.type ? new zu(r.module,t,n,!0) : new Wu(r.module,t,n)
}
Ye(Wu, qu),
Wu.prototype._update = function(e) {
var t, n;
this._cache.add(e);
for (var r = []; t = this._cache.get(this._autopadding); )
n = this._mode.decrypt(this, t),
r.push(n);
return Fu.concat(r)
}
,
Wu.prototype._final = function() {
var e = this._cache.flush();
if (this._autopadding)
return function(e) {
var t = e[15];
if (t < 1 || t > 16)
throw new Error("unable to decrypt data");
for (var n = -1; ++n < t; )
if (e[n + (16 - t)] !== t)
throw new Error("unable to decrypt data");
if (16 !== t)
return e.slice(0, 16 - t)
}(this._mode.decrypt(this, e));
if (e)
throw new Error("data not multiple of block length")
}
,
Wu.prototype.setAutoPadding = function(e) {
return this._autopadding = !!e,
this
}
,
$u.prototype.add = function(e) {
this.cache = Fu.concat([this.cache, e])
}
,
$u.prototype.get = function(e) {
var t;
if (e) {
if (this.cache.length > 16)
return t = this.cache.slice(0, 16),
this.cache = this.cache.slice(16),
t
} else if (this.cache.length >= 16)
return t = this.cache.slice(0, 16),
this.cache = this.cache.slice(16),
t;
return null
}
,
$u.prototype.flush = function() {
if (this.cache.length)
return this.cache
}
,
ju.createDecipher = function(e, t) {
var n = Uu[e.toLowerCase()];
if (!n)
throw new TypeError("invalid suite type");
var r = Vu(t, !1, n.key, n.iv);
return Yu(e, r.key, r.iv)
}
,
ju.createDecipheriv = Yu;
var Qu = _s
, Zu = ju
, Gu = $s;
ws.createCipher = ws.Cipher = Qu.createCipher,
ws.createCipheriv = ws.Cipheriv = Qu.createCipheriv,
ws.createDecipher = ws.Decipher = Zu.createDecipher,
ws.createDecipheriv = ws.Decipheriv = Zu.createDecipheriv,
ws.listCiphers = ws.getCiphers = function() {
return Object.keys(Gu)
}
;
var Xu = {};
!function(e) {
e["des-ecb"] = {
key: 8,
iv: 0
},
e["des-cbc"] = e.des = {
key: 8,
iv: 8
},
e["des-ede3-cbc"] = e.des3 = {
key: 24,
iv: 8
},
e["des-ede3"] = {
key: 24,
iv: 0
},
e["des-ede-cbc"] = {
key: 16,
iv: 8
},
e["des-ede"] = {
key: 16,
iv: 0
}
}(Xu);
var Ju = ys
, el = ws
, tl = Gs
, nl = Xu
, rl = Mu;
function il(e, t, n) {
if (e = e.toLowerCase(),
tl[e])
return el.createCipheriv(e, t, n);
if (nl[e])
return new Ju({
key: t,
iv: n,
mode: e
});
throw new TypeError("invalid suite type")
}
function ol(e, t, n) {
if (e = e.toLowerCase(),
tl[e])
return el.createDecipheriv(e, t, n);
if (nl[e])
return new Ju({
key: t,
iv: n,
mode: e,
decrypt: !0
});
throw new TypeError("invalid suite type")
}
za.createCipher = za.Cipher = function(e, t) {
var n, r;
if (e = e.toLowerCase(),
tl[e])
n = tl[e].key,
r = tl[e].iv;
else {
if (!nl[e])
throw new TypeError("invalid suite type");
n = 8 * nl[e].key,
r = nl[e].iv
}
var i = rl(t, !1, n, r);
return il(e, i.key, i.iv)
}
,
za.createCipheriv = za.Cipheriv = il,
za.createDecipher = za.Decipher = function(e, t) {
var n, r;
if (e = e.toLowerCase(),
tl[e])
n = tl[e].key,
r = tl[e].iv;
else {
if (!nl[e])
throw new TypeError("invalid suite type");
n = 8 * nl[e].key,
r = nl[e].iv
}
var i = rl(t, !1, n, r);
return ol(e, i.key, i.iv)
}
,
za.createDecipheriv = za.Decipheriv = ol,
za.listCiphers = za.getCiphers = function() {
return Object.keys(nl).concat(el.getCiphers())
}
;
var al = {}
, sl = {
exports: {}
};
!function(e) {
!function(e, t) {
function n(e, t) {
if (!e)
throw new Error(t || "Assertion failed")
}
function r(e, t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
function i(e, t, n) {
if (i.isBN(e))
return e;
this.negative = 0,
this.words = null,
this.length = 0,
this.red = null,
null !== e && ("le" !== t && "be" !== t || (n = t,
t = 10),
this._init(e || 0, t || 10, n || "be"))
}
var o;
"object" == typeof e ? e.exports = i : t.BN = i,
i.BN = i,
i.wordSize = 26;
try {
o = "undefined" != typeof window && void 0 !== window.Buffer ?
window.Buffer : de.Buffer
} catch (e) {}
function a(e, t) {
var n = e.charCodeAt(t);
return n >= 65 && n <= 70 ? n - 55 : n >= 97 && n <= 102 ? n -
87 : n - 48 & 15
}
function s(e, t, n) {
var r = a(e, n);
return n - 1 >= t && (r |= a(e, n - 1) << 4),
r
}
function u(e, t, n, r) {
for (var i = 0, o = Math.min(e.length, n), a = t; a < o; a++) {
var s = e.charCodeAt(a) - 48;
i *= r,
i += s >= 49 ? s - 49 + 10 : s >= 17 ? s - 17 + 10 : s
}
return i
}
i.isBN = function(e) {
return e instanceof i || null !== e && "object" == typeof e &&
e.constructor.wordSize === i.wordSize && Array.isArray(e.words)
}
,
i.max = function(e, t) {
return e.cmp(t) > 0 ? e : t
}
,
i.min = function(e, t) {
return e.cmp(t) < 0 ? e : t
}
,
i.prototype._init = function(e, t, r) {
if ("number" == typeof e)
return this._initNumber(e, t, r);
if ("object" == typeof e)
return this._initArray(e, t, r);
"hex" === t && (t = 16),
n(t === (0 | t) && t >= 2 && t <= 36);
var i = 0;
"-" === (e = e.toString().replace(/\s+/g, ""))[0] && (i++,
this.negative = 1),
i < e.length && (16 === t ? this._parseHex(e, i, r) :
(this._parseBase(e, t, i),
"le" === r && this._initArray(this.toArray(), t, r)))
}
,
i.prototype._initNumber = function(e, t, r) {
e < 0 && (this.negative = 1,
e = -e),
e < 67108864 ? (this.words = [67108863 & e],
this.length = 1) : e < 4503599627370496 ? (this.words =
[67108863 & e, e / 67108864 & 67108863],
this.length = 2) : (n(e < 9007199254740992),
this.words = [67108863 & e, e / 67108864 & 67108863, 1],
this.length = 3),
"le" === r && this._initArray(this.toArray(), t, r)
}
,
i.prototype._initArray = function(e, t, r) {
if (n("number" == typeof e.length),
e.length <= 0)
return this.words = [0],
this.length = 1,
this;
this.length = Math.ceil(e.length / 3),
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++)
this.words[i] = 0;
var o, a, s = 0;
if ("be" === r)
for (i = e.length - 1,
o = 0; i >= 0; i -= 3)
a = e[i] | e[i - 1] << 8 | e[i - 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
else if ("le" === r)
for (i = 0,
o = 0; i < e.length; i += 3)
a = e[i] | e[i + 1] << 8 | e[i + 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
return this.strip()
}
,
i.prototype._parseHex = function(e, t, n) {
this.length = Math.ceil((e.length - t) / 6),
this.words = new Array(this.length);
for (var r = 0; r < this.length; r++)
this.words[r] = 0;
var i, o = 0, a = 0;
if ("be" === n)
for (r = e.length - 1; r >= t; r -= 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
else
for (r = (e.length - t) % 2 == 0 ? t + 1 : t; r < e.length; r += 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
this.strip()
}
,
i.prototype._parseBase = function(e, t, n) {
this.words = [0],
this.length = 1;
for (var r = 0, i = 1; i <= 67108863; i *= t)
r++;
r--,
i = i / t | 0;
for (var o = e.length - n, a = o % r, s = Math.min(o, o - a) + n, l =
0, c = n; c < s; c += r)
l = u(e, c, c + r, t),
this.imuln(i),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l);
if (0 !== a) {
var d = 1;
for (l = u(e, c, e.length, t),
c = 0; c < a; c++)
d *= t;
this.imuln(d),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l)
}
this.strip()
}
,
i.prototype.copy = function(e) {
e.words = new Array(this.length);
for (var t = 0; t < this.length; t++)
e.words[t] = this.words[t];
e.length = this.length,
e.negative = this.negative,
e.red = this.red
}
,
i.prototype.clone = function() {
var e = new i(null);
return this.copy(e),
e
}
,
i.prototype._expand = function(e) {
for (; this.length < e; )
this.words[this.length++] = 0;
return this
}
,
i.prototype.strip = function() {
for (; this.length > 1 && 0 === this.words[this.length - 1]; )
this.length--;
return this._normSign()
}
,
i.prototype._normSign = function() {
return 1 === this.length && 0 === this.words[0] &&
(this.negative = 0),
this
}
,
i.prototype.inspect = function() {
return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">"
}
;
var l = ["", "0", "00", "000", "0000", "00000", "000000", "0000000",
"00000000", "000000000", "0000000000", "00000000000", "000000000000",
"0000000000000", "00000000000000", "000000000000000", "0000000000000000",
"00000000000000000", "000000000000000000", "0000000000000000000",
"00000000000000000000", "000000000000000000000", "0000000000000000000000",
"00000000000000000000000", "000000000000000000000000",
"0000000000000000000000000"]
, c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
, d = [0, 0, 33554432, 43046721, 16777216, 48828125,
60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517,
7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101,
5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];
function f(e, t, n) {
n.negative = t.negative ^ e.negative;
var r = e.length + t.length | 0;
n.length = r,
r = r - 1 | 0;
var i = 0 | e.words[0]
, o = 0 | t.words[0]
,a=i*o
, s = 67108863 & a
, u = a / 67108864 | 0;
n.words[0] = s;
for (var l = 1; l < r; l++) {
for (var c = u >>> 26, d = 67108863 & u, f = Math.min(l,
t.length - 1), h = Math.max(0, l - e.length + 1); h <= f; h++) {
var p = l - h | 0;
c += (a = (i = 0 | e.words[p]) * (o = 0 | t.words[h]) + d) /
67108864 | 0,
d = 67108863 & a
}
n.words[l] = 0 | d,
u=0|c
}
return 0 !== u ? n.words[l] = 0 | u : n.length--,
n.strip()
}
i.prototype.toString = function(e, t) {
var r;
if (t = 0 | t || 1,
16 === (e = e || 10) || "hex" === e) {
r = "";
for (var i = 0, o = 0, a = 0; a < this.length; a++) {
var s = this.words[a]
, u = (16777215 & (s << i | o)).toString(16);
r = 0 !== (o = s >>> 24 - i & 16777215) || a !==
this.length - 1 ? l[6 - u.length] + u + r : u + r,
(i += 2) >= 26 && (i -= 26,
a--)
}
for (0 !== o && (r = o.toString(16) + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
if (e === (0 | e) && e >= 2 && e <= 36) {
var f = c[e]
, h = d[e];
r = "";
var p = this.clone();
for (p.negative = 0; !p.isZero(); ) {
var m = p.modn(h).toString(e);
r = (p = p.idivn(h)).isZero() ? m + r : l[f - m.length] + m +
r
}
for (this.isZero() && (r = "0" + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
n(!1, "Base should be between 2 and 36")
}
,
i.prototype.toNumber = function() {
var e = this.words[0];
return 2 === this.length ? e += 67108864 * this.words[1] : 3 ===
this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 *
this.words[1] : this.length > 2 && n(!1, "Number can only safely store up to 53 bits"),
0 !== this.negative ? -e : e
}
,
i.prototype.toJSON = function() {
return this.toString(16)
}
,
i.prototype.toBuffer = function(e, t) {
return n(void 0 !== o),
this.toArrayLike(o, e, t)
}
,
i.prototype.toArray = function(e, t) {
return this.toArrayLike(Array, e, t)
}
,
i.prototype.toArrayLike = function(e, t, r) {
var i = this.byteLength()
, o = r || Math.max(1, i);
n(i <= o, "byte array longer than desired length"),
n(o > 0, "Requested array length <= 0"),
this.strip();
var a, s, u = "le" === t, l = new e(o), c = this.clone();
if (u) {
for (s = 0; !c.isZero(); s++)
a = c.andln(255),
c.iushrn(8),
l[s] = a;
for (; s < o; s++)
l[s] = 0
} else {
for (s = 0; s < o - i; s++)
l[s] = 0;
for (s = 0; !c.isZero(); s++)
a = c.andln(255),
c.iushrn(8),
l[o - s - 1] = a
}
return l
}
,
Math.clz32 ? i.prototype._countBits = function(e) {
return 32 - Math.clz32(e)
}
: i.prototype._countBits = function(e) {
var t = e
, n = 0;
return t >= 4096 && (n += 13,
t >>>= 13),
t >= 64 && (n += 7,
t >>>= 7),
t >= 8 && (n += 4,
t >>>= 4),
t >= 2 && (n += 2,
t >>>= 2),
n+t
}
,
i.prototype._zeroBits = function(e) {
if (0 === e)
return 26;
var t = e
, n = 0;
return 0 == (8191 & t) && (n += 13,
t >>>= 13),
0 == (127 & t) && (n += 7,
t >>>= 7),
0 == (15 & t) && (n += 4,
t >>>= 4),
0 == (3 & t) && (n += 2,
t >>>= 2),
0 == (1 & t) && n++,
n
}
,
i.prototype.bitLength = function() {
var e = this.words[this.length - 1]
, t = this._countBits(e);
return 26 * (this.length - 1) + t
}
,
i.prototype.zeroBits = function() {
if (this.isZero())
return 0;
for (var e = 0, t = 0; t < this.length; t++) {
var n = this._zeroBits(this.words[t]);
if (e += n,
26 !== n)
break
}
return e
}
,
i.prototype.byteLength = function() {
return Math.ceil(this.bitLength() / 8)
}
,
i.prototype.toTwos = function(e) {
return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) :
this.clone()
}
,
i.prototype.fromTwos = function(e) {
return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone()
}
,
i.prototype.isNeg = function() {
return 0 !== this.negative
}
,
i.prototype.neg = function() {
return this.clone().ineg()
}
,
i.prototype.ineg = function() {
return this.isZero() || (this.negative ^= 1),
this
}
,
i.prototype.iuor = function(e) {
for (; this.length < e.length; )
this.words[this.length++] = 0;
for (var t = 0; t < e.length; t++)
this.words[t] = this.words[t] | e.words[t];
return this.strip()
}
,
i.prototype.ior = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuor(e)
}
,
i.prototype.or = function(e) {
return this.length > e.length ? this.clone().ior(e) :
e.clone().ior(this)
}
,
i.prototype.uor = function(e) {
return this.length > e.length ? this.clone().iuor(e) :
e.clone().iuor(this)
}
,
i.prototype.iuand = function(e) {
var t;
t = this.length > e.length ? e : this;
for (var n = 0; n < t.length; n++)
this.words[n] = this.words[n] & e.words[n];
return this.length = t.length,
this.strip()
}
,
i.prototype.iand = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuand(e)
}
,
i.prototype.and = function(e) {
return this.length > e.length ? this.clone().iand(e) :
e.clone().iand(this)
}
,
i.prototype.uand = function(e) {
return this.length > e.length ? this.clone().iuand(e) :
e.clone().iuand(this)
}
,
i.prototype.iuxor = function(e) {
var t, n;
this.length > e.length ? (t = this,
n = e) : (t = e,
n = this);
for (var r = 0; r < n.length; r++)
this.words[r] = t.words[r] ^ n.words[r];
if (this !== t)
for (; r < t.length; r++)
this.words[r] = t.words[r];
return this.length = t.length,
this.strip()
}
,
i.prototype.ixor = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuxor(e)
}
,
i.prototype.xor = function(e) {
return this.length > e.length ? this.clone().ixor(e) :
e.clone().ixor(this)
}
,
i.prototype.uxor = function(e) {
return this.length > e.length ? this.clone().iuxor(e) :
e.clone().iuxor(this)
}
,
i.prototype.inotn = function(e) {
n("number" == typeof e && e >= 0);
var t = 0 | Math.ceil(e / 26)
, r = e % 26;
this._expand(t),
r > 0 && t--;
for (var i = 0; i < t; i++)
this.words[i] = 67108863 & ~this.words[i];
return r > 0 && (this.words[i] = ~this.words[i] & 67108863 >> 26
- r),
this.strip()
}
,
i.prototype.notn = function(e) {
return this.clone().inotn(e)
}
,
i.prototype.setn = function(e, t) {
n("number" == typeof e && e >= 0);
var r = e / 26 | 0
, i = e % 26;
return this._expand(r + 1),
this.words[r] = t ? this.words[r] | 1 << i : this.words[r] & ~(1 << i),
this.strip()
}
,
i.prototype.iadd = function(e) {
var t, n, r;
if (0 !== this.negative && 0 === e.negative)
return this.negative = 0,
t = this.isub(e),
this.negative ^= 1,
this._normSign();
if (0 === this.negative && 0 !== e.negative)
return e.negative = 0,
t = this.isub(e),
e.negative = 1,
t._normSign();
this.length > e.length ? (n = this,
r = e) : (n = e,
r = this);
for (var i = 0, o = 0; o < r.length; o++)
t = (0 | n.words[o]) + (0 | r.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
for (; 0 !== i && o < n.length; o++)
t = (0 | n.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
if (this.length = n.length,
0 !== i)
this.words[this.length] = i,
this.length++;
else if (n !== this)
for (; o < n.length; o++)
this.words[o] = n.words[o];
return this
}
,
i.prototype.add = function(e) {
var t;
return 0 !== e.negative && 0 === this.negative ? (e.negative =
0,
t = this.sub(e),
e.negative ^= 1,
t) : 0 === e.negative && 0 !== this.negative ? (this.negative = 0,
t = e.sub(this),
this.negative = 1,
t) : this.length > e.length ? this.clone().iadd(e) :
e.clone().iadd(this)
}
,
i.prototype.isub = function(e) {
if (0 !== e.negative) {
e.negative = 0;
var t = this.iadd(e);
return e.negative = 1,
t._normSign()
}
if (0 !== this.negative)
return this.negative = 0,
this.iadd(e),
this.negative = 1,
this._normSign();
var n, r, i = this.cmp(e);
if (0 === i)
return this.negative = 0,
this.length = 1,
this.words[0] = 0,
this;
i > 0 ? (n = this,
r = e) : (n = e,
r = this);
for (var o = 0, a = 0; a < r.length; a++)
o = (t = (0 | n.words[a]) - (0 | r.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
for (; 0 !== o && a < n.length; a++)
o = (t = (0 | n.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
if (0 === o && a < n.length && n !== this)
for (; a < n.length; a++)
this.words[a] = n.words[a];
return this.length = Math.max(this.length, a),
n !== this && (this.negative = 1),
this.strip()
}
,
i.prototype.sub = function(e) {
return this.clone().isub(e)
}
;
var h = function(e, t, n) {
var r, i, o, a = e.words, s = t.words, u = n.words, l = 0, c = 0 |
a[0], d = 8191 & c, f = c >>> 13, h = 0 | a[1], p = 8191 & h, m = h >>> 13, g = 0 | a[2], v
= 8191 & g, b = g >>> 13, y = 0 | a[3], A = 8191 & y, w = y >>> 13, _ = 0 | a[4], E = 8191
& _, S = _ >>> 13, k = 0 | a[5], M = 8191 & k, C = k >>> 13, x = 0 | a[6], R = 8191 & x, T
= x >>> 13, I = 0 | a[7], P = 8191 & I, L = I >>> 13, O = 0 | a[8], N = 8191 & O, D = O
>>> 13, B = 0 | a[9], j = 8191 & B, z = B >>> 13, F = 0 | s[0], U = 8191 & F, K = F >>>
13, q = 0 | s[1], H = 8191 & q, V = q >>> 13, W = 0 | s[2], $ = 8191 & W, Y = W >>> 13,
Q = 0 | s[3], Z = 8191 & Q, G = Q >>> 13, X = 0 | s[4], J = 8191 & X, ee = X >>> 13, te =
0 | s[5], ne = 8191 & te, re = te >>> 13, ie = 0 | s[6], oe = 8191 & ie, ae = ie >>> 13, se =
0 | s[7], ue = 8191 & se, le = se >>> 13, ce = 0 | s[8], de = 8191 & ce, fe = ce >>> 13, he
= 0 | s[9], pe = 8191 & he, me = he >>> 13;
n.negative = e.negative ^ t.negative,
n.length = 19;
var ge = (l + (r = Math.imul(d, U)) | 0) + ((8191 & (i = (i =
Math.imul(d, K)) + Math.imul(f, U) | 0)) << 13) | 0;
l = ((o = Math.imul(f, K)) + (i >>> 13) | 0) + (ge >>> 26) | 0,
ge &= 67108863,
r = Math.imul(p, U),
i = (i = Math.imul(p, K)) + Math.imul(m, U) | 0,
o = Math.imul(m, K);
var ve = (l + (r = r + Math.imul(d, H) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, V) | 0) + Math.imul(f, H) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, V) | 0) + (i >>> 13) | 0) + (ve >>> 26) |
0,
ve &= 67108863,
r = Math.imul(v, U),
i = (i = Math.imul(v, K)) + Math.imul(b, U) | 0,
o = Math.imul(b, K),
r = r + Math.imul(p, H) | 0,
i = (i = i + Math.imul(p, V) | 0) + Math.imul(m, H) | 0,
o = o + Math.imul(m, V) | 0;
var be = (l + (r = r + Math.imul(d, $) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, Y) | 0) + Math.imul(f, $) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, Y) | 0) + (i >>> 13) | 0) + (be >>> 26) |
0,
be &= 67108863,
r = Math.imul(A, U),
i = (i = Math.imul(A, K)) + Math.imul(w, U) | 0,
o = Math.imul(w, K),
r = r + Math.imul(v, H) | 0,
i = (i = i + Math.imul(v, V) | 0) + Math.imul(b, H) | 0,
o = o + Math.imul(b, V) | 0,
r = r + Math.imul(p, $) | 0,
i = (i = i + Math.imul(p, Y) | 0) + Math.imul(m, $) | 0,
o = o + Math.imul(m, Y) | 0;
var ye = (l + (r = r + Math.imul(d, Z) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, G) | 0) + Math.imul(f, Z) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, G) | 0) + (i >>> 13) | 0) + (ye >>> 26) |
0,
ye &= 67108863,
r = Math.imul(E, U),
i = (i = Math.imul(E, K)) + Math.imul(S, U) | 0,
o = Math.imul(S, K),
r = r + Math.imul(A, H) | 0,
i = (i = i + Math.imul(A, V) | 0) + Math.imul(w, H) | 0,
o = o + Math.imul(w, V) | 0,
r = r + Math.imul(v, $) | 0,
i = (i = i + Math.imul(v, Y) | 0) + Math.imul(b, $) | 0,
o = o + Math.imul(b, Y) | 0,
r = r + Math.imul(p, Z) | 0,
i = (i = i + Math.imul(p, G) | 0) + Math.imul(m, Z) | 0,
o = o + Math.imul(m, G) | 0;
var Ae = (l + (r = r + Math.imul(d, J) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, ee) | 0) + Math.imul(f, J) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ee) | 0) + (i >>> 13) | 0) + (Ae >>> 26) |
0,
Ae &= 67108863,
r = Math.imul(M, U),
i = (i = Math.imul(M, K)) + Math.imul(C, U) | 0,
o = Math.imul(C, K),
r = r + Math.imul(E, H) | 0,
i = (i = i + Math.imul(E, V) | 0) + Math.imul(S, H) | 0,
o = o + Math.imul(S, V) | 0,
r = r + Math.imul(A, $) | 0,
i = (i = i + Math.imul(A, Y) | 0) + Math.imul(w, $) | 0,
o = o + Math.imul(w, Y) | 0,
r = r + Math.imul(v, Z) | 0,
i = (i = i + Math.imul(v, G) | 0) + Math.imul(b, Z) | 0,
o = o + Math.imul(b, G) | 0,
r = r + Math.imul(p, J) | 0,
i = (i = i + Math.imul(p, ee) | 0) + Math.imul(m, J) | 0,
o = o + Math.imul(m, ee) | 0;
var we = (l + (r = r + Math.imul(d, ne) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, re) | 0) + Math.imul(f, ne) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, re) | 0) + (i >>> 13) | 0) + (we >>> 26) |
0,
we &= 67108863,
r = Math.imul(R, U),
i = (i = Math.imul(R, K)) + Math.imul(T, U) | 0,
o = Math.imul(T, K),
r = r + Math.imul(M, H) | 0,
i = (i = i + Math.imul(M, V) | 0) + Math.imul(C, H) | 0,
o = o + Math.imul(C, V) | 0,
r = r + Math.imul(E, $) | 0,
i = (i = i + Math.imul(E, Y) | 0) + Math.imul(S, $) | 0,
o = o + Math.imul(S, Y) | 0,
r = r + Math.imul(A, Z) | 0,
i = (i = i + Math.imul(A, G) | 0) + Math.imul(w, Z) | 0,
o = o + Math.imul(w, G) | 0,
r = r + Math.imul(v, J) | 0,
i = (i = i + Math.imul(v, ee) | 0) + Math.imul(b, J) | 0,
o = o + Math.imul(b, ee) | 0,
r = r + Math.imul(p, ne) | 0,
i = (i = i + Math.imul(p, re) | 0) + Math.imul(m, ne) | 0,
o = o + Math.imul(m, re) | 0;
var _e = (l + (r = r + Math.imul(d, oe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, ae) | 0) + Math.imul(f, oe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ae) | 0) + (i >>> 13) | 0) + (_e >>> 26) |
0,
_e &= 67108863,
r = Math.imul(P, U),
i = (i = Math.imul(P, K)) + Math.imul(L, U) | 0,
o = Math.imul(L, K),
r = r + Math.imul(R, H) | 0,
i = (i = i + Math.imul(R, V) | 0) + Math.imul(T, H) | 0,
o = o + Math.imul(T, V) | 0,
r = r + Math.imul(M, $) | 0,
i = (i = i + Math.imul(M, Y) | 0) + Math.imul(C, $) | 0,
o = o + Math.imul(C, Y) | 0,
r = r + Math.imul(E, Z) | 0,
i = (i = i + Math.imul(E, G) | 0) + Math.imul(S, Z) | 0,
o = o + Math.imul(S, G) | 0,
r = r + Math.imul(A, J) | 0,
i = (i = i + Math.imul(A, ee) | 0) + Math.imul(w, J) | 0,
o = o + Math.imul(w, ee) | 0,
r = r + Math.imul(v, ne) | 0,
i = (i = i + Math.imul(v, re) | 0) + Math.imul(b, ne) | 0,
o = o + Math.imul(b, re) | 0,
r = r + Math.imul(p, oe) | 0,
i = (i = i + Math.imul(p, ae) | 0) + Math.imul(m, oe) | 0,
o = o + Math.imul(m, ae) | 0;
var Ee = (l + (r = r + Math.imul(d, ue) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, le) | 0) + Math.imul(f, ue) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, le) | 0) + (i >>> 13) | 0) + (Ee >>> 26) |
0,
Ee &= 67108863,
r = Math.imul(N, U),
i = (i = Math.imul(N, K)) + Math.imul(D, U) | 0,
o = Math.imul(D, K),
r = r + Math.imul(P, H) | 0,
i = (i = i + Math.imul(P, V) | 0) + Math.imul(L, H) | 0,
o = o + Math.imul(L, V) | 0,
r = r + Math.imul(R, $) | 0,
i = (i = i + Math.imul(R, Y) | 0) + Math.imul(T, $) | 0,
o = o + Math.imul(T, Y) | 0,
r = r + Math.imul(M, Z) | 0,
i = (i = i + Math.imul(M, G) | 0) + Math.imul(C, Z) | 0,
o = o + Math.imul(C, G) | 0,
r = r + Math.imul(E, J) | 0,
i = (i = i + Math.imul(E, ee) | 0) + Math.imul(S, J) | 0,
o = o + Math.imul(S, ee) | 0,
r = r + Math.imul(A, ne) | 0,
i = (i = i + Math.imul(A, re) | 0) + Math.imul(w, ne) | 0,
o = o + Math.imul(w, re) | 0,
r = r + Math.imul(v, oe) | 0,
i = (i = i + Math.imul(v, ae) | 0) + Math.imul(b, oe) | 0,
o = o + Math.imul(b, ae) | 0,
r = r + Math.imul(p, ue) | 0,
i = (i = i + Math.imul(p, le) | 0) + Math.imul(m, ue) | 0,
o = o + Math.imul(m, le) | 0;
var Se = (l + (r = r + Math.imul(d, de) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, fe) | 0) + Math.imul(f, de) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, fe) | 0) + (i >>> 13) | 0) + (Se >>> 26) |
0,
Se &= 67108863,
r = Math.imul(j, U),
i = (i = Math.imul(j, K)) + Math.imul(z, U) | 0,
o = Math.imul(z, K),
r = r + Math.imul(N, H) | 0,
i = (i = i + Math.imul(N, V) | 0) + Math.imul(D, H) | 0,
o = o + Math.imul(D, V) | 0,
r = r + Math.imul(P, $) | 0,
i = (i = i + Math.imul(P, Y) | 0) + Math.imul(L, $) | 0,
o = o + Math.imul(L, Y) | 0,
r = r + Math.imul(R, Z) | 0,
i = (i = i + Math.imul(R, G) | 0) + Math.imul(T, Z) | 0,
o = o + Math.imul(T, G) | 0,
r = r + Math.imul(M, J) | 0,
i = (i = i + Math.imul(M, ee) | 0) + Math.imul(C, J) | 0,
o = o + Math.imul(C, ee) | 0,
r = r + Math.imul(E, ne) | 0,
i = (i = i + Math.imul(E, re) | 0) + Math.imul(S, ne) | 0,
o = o + Math.imul(S, re) | 0,
r = r + Math.imul(A, oe) | 0,
i = (i = i + Math.imul(A, ae) | 0) + Math.imul(w, oe) | 0,
o = o + Math.imul(w, ae) | 0,
r = r + Math.imul(v, ue) | 0,
i = (i = i + Math.imul(v, le) | 0) + Math.imul(b, ue) | 0,
o = o + Math.imul(b, le) | 0,
r = r + Math.imul(p, de) | 0,
i = (i = i + Math.imul(p, fe) | 0) + Math.imul(m, de) | 0,
o = o + Math.imul(m, fe) | 0;
var ke = (l + (r = r + Math.imul(d, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, me) | 0) + Math.imul(f, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, me) | 0) + (i >>> 13) | 0) + (ke >>> 26) |
0,
ke &= 67108863,
r = Math.imul(j, H),
i = (i = Math.imul(j, V)) + Math.imul(z, H) | 0,
o = Math.imul(z, V),
r = r + Math.imul(N, $) | 0,
i = (i = i + Math.imul(N, Y) | 0) + Math.imul(D, $) | 0,
o = o + Math.imul(D, Y) | 0,
r = r + Math.imul(P, Z) | 0,
i = (i = i + Math.imul(P, G) | 0) + Math.imul(L, Z) | 0,
o = o + Math.imul(L, G) | 0,
r = r + Math.imul(R, J) | 0,
i = (i = i + Math.imul(R, ee) | 0) + Math.imul(T, J) | 0,
o = o + Math.imul(T, ee) | 0,
r = r + Math.imul(M, ne) | 0,
i = (i = i + Math.imul(M, re) | 0) + Math.imul(C, ne) | 0,
o = o + Math.imul(C, re) | 0,
r = r + Math.imul(E, oe) | 0,
i = (i = i + Math.imul(E, ae) | 0) + Math.imul(S, oe) | 0,
o = o + Math.imul(S, ae) | 0,
r = r + Math.imul(A, ue) | 0,
i = (i = i + Math.imul(A, le) | 0) + Math.imul(w, ue) | 0,
o = o + Math.imul(w, le) | 0,
r = r + Math.imul(v, de) | 0,
i = (i = i + Math.imul(v, fe) | 0) + Math.imul(b, de) | 0,
o = o + Math.imul(b, fe) | 0;
var Me = (l + (r = r + Math.imul(p, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(p, me) | 0) + Math.imul(m, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(m, me) | 0) + (i >>> 13) | 0) + (Me >>>
26) | 0,
Me &= 67108863,
r = Math.imul(j, $),
i = (i = Math.imul(j, Y)) + Math.imul(z, $) | 0,
o = Math.imul(z, Y),
r = r + Math.imul(N, Z) | 0,
i = (i = i + Math.imul(N, G) | 0) + Math.imul(D, Z) | 0,
o = o + Math.imul(D, G) | 0,
r = r + Math.imul(P, J) | 0,
i = (i = i + Math.imul(P, ee) | 0) + Math.imul(L, J) | 0,
o = o + Math.imul(L, ee) | 0,
r = r + Math.imul(R, ne) | 0,
i = (i = i + Math.imul(R, re) | 0) + Math.imul(T, ne) | 0,
o = o + Math.imul(T, re) | 0,
r = r + Math.imul(M, oe) | 0,
i = (i = i + Math.imul(M, ae) | 0) + Math.imul(C, oe) | 0,
o = o + Math.imul(C, ae) | 0,
r = r + Math.imul(E, ue) | 0,
i = (i = i + Math.imul(E, le) | 0) + Math.imul(S, ue) | 0,
o = o + Math.imul(S, le) | 0,
r = r + Math.imul(A, de) | 0,
i = (i = i + Math.imul(A, fe) | 0) + Math.imul(w, de) | 0,
o = o + Math.imul(w, fe) | 0;
var Ce = (l + (r = r + Math.imul(v, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(v, me) | 0) + Math.imul(b, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(b, me) | 0) + (i >>> 13) | 0) + (Ce >>> 26)
| 0,
Ce &= 67108863,
r = Math.imul(j, Z),
i = (i = Math.imul(j, G)) + Math.imul(z, Z) | 0,
o = Math.imul(z, G),
r = r + Math.imul(N, J) | 0,
i = (i = i + Math.imul(N, ee) | 0) + Math.imul(D, J) | 0,
o = o + Math.imul(D, ee) | 0,
r = r + Math.imul(P, ne) | 0,
i = (i = i + Math.imul(P, re) | 0) + Math.imul(L, ne) | 0,
o = o + Math.imul(L, re) | 0,
r = r + Math.imul(R, oe) | 0,
i = (i = i + Math.imul(R, ae) | 0) + Math.imul(T, oe) | 0,
o = o + Math.imul(T, ae) | 0,
r = r + Math.imul(M, ue) | 0,
i = (i = i + Math.imul(M, le) | 0) + Math.imul(C, ue) | 0,
o = o + Math.imul(C, le) | 0,
r = r + Math.imul(E, de) | 0,
i = (i = i + Math.imul(E, fe) | 0) + Math.imul(S, de) | 0,
o = o + Math.imul(S, fe) | 0;
var xe = (l + (r = r + Math.imul(A, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(A, me) | 0) + Math.imul(w, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(w, me) | 0) + (i >>> 13) | 0) + (xe >>> 26)
| 0,
xe &= 67108863,
r = Math.imul(j, J),
i = (i = Math.imul(j, ee)) + Math.imul(z, J) | 0,
o = Math.imul(z, ee),
r = r + Math.imul(N, ne) | 0,
i = (i = i + Math.imul(N, re) | 0) + Math.imul(D, ne) | 0,
o = o + Math.imul(D, re) | 0,
r = r + Math.imul(P, oe) | 0,
i = (i = i + Math.imul(P, ae) | 0) + Math.imul(L, oe) | 0,
o = o + Math.imul(L, ae) | 0,
r = r + Math.imul(R, ue) | 0,
i = (i = i + Math.imul(R, le) | 0) + Math.imul(T, ue) | 0,
o = o + Math.imul(T, le) | 0,
r = r + Math.imul(M, de) | 0,
i = (i = i + Math.imul(M, fe) | 0) + Math.imul(C, de) | 0,
o = o + Math.imul(C, fe) | 0;
var Re = (l + (r = r + Math.imul(E, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(E, me) | 0) + Math.imul(S, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(S, me) | 0) + (i >>> 13) | 0) + (Re >>>
26) | 0,
Re &= 67108863,
r = Math.imul(j, ne),
i = (i = Math.imul(j, re)) + Math.imul(z, ne) | 0,
o = Math.imul(z, re),
r = r + Math.imul(N, oe) | 0,
i = (i = i + Math.imul(N, ae) | 0) + Math.imul(D, oe) | 0,
o = o + Math.imul(D, ae) | 0,
r = r + Math.imul(P, ue) | 0,
i = (i = i + Math.imul(P, le) | 0) + Math.imul(L, ue) | 0,
o = o + Math.imul(L, le) | 0,
r = r + Math.imul(R, de) | 0,
i = (i = i + Math.imul(R, fe) | 0) + Math.imul(T, de) | 0,
o = o + Math.imul(T, fe) | 0;
var Te = (l + (r = r + Math.imul(M, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(M, me) | 0) + Math.imul(C, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(C, me) | 0) + (i >>> 13) | 0) + (Te >>> 26)
| 0,
Te &= 67108863,
r = Math.imul(j, oe),
i = (i = Math.imul(j, ae)) + Math.imul(z, oe) | 0,
o = Math.imul(z, ae),
r = r + Math.imul(N, ue) | 0,
i = (i = i + Math.imul(N, le) | 0) + Math.imul(D, ue) | 0,
o = o + Math.imul(D, le) | 0,
r = r + Math.imul(P, de) | 0,
i = (i = i + Math.imul(P, fe) | 0) + Math.imul(L, de) | 0,
o = o + Math.imul(L, fe) | 0;
var Ie = (l + (r = r + Math.imul(R, pe) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(R, me) | 0) + Math.imul(T, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(T, me) | 0) + (i >>> 13) | 0) + (Ie >>> 26) |
0,
Ie &= 67108863,
r = Math.imul(j, ue),
i = (i = Math.imul(j, le)) + Math.imul(z, ue) | 0,
o = Math.imul(z, le),
r = r + Math.imul(N, de) | 0,
i = (i = i + Math.imul(N, fe) | 0) + Math.imul(D, de) | 0,
o = o + Math.imul(D, fe) | 0;
var Pe = (l + (r = r + Math.imul(P, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(P, me) | 0) + Math.imul(L, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(L, me) | 0) + (i >>> 13) | 0) + (Pe >>> 26)
| 0,
Pe &= 67108863,
r = Math.imul(j, de),
i = (i = Math.imul(j, fe)) + Math.imul(z, de) | 0,
o = Math.imul(z, fe);
var Le = (l + (r = r + Math.imul(N, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(N, me) | 0) + Math.imul(D, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(D, me) | 0) + (i >>> 13) | 0) + (Le >>> 26)
| 0,
Le &= 67108863;
var Oe = (l + (r = Math.imul(j, pe)) | 0) + ((8191 & (i = (i =
Math.imul(j, me)) + Math.imul(z, pe) | 0)) << 13) | 0;
return l = ((o = Math.imul(z, me)) + (i >>> 13) | 0) + (Oe >>> 26)
| 0,
Oe &= 67108863,
u[0] = ge,
u[1] = ve,
u[2] = be,
u[3] = ye,
u[4] = Ae,
u[5] = we,
u[6] = _e,
u[7] = Ee,
u[8] = Se,
u[9] = ke,
u[10] = Me,
u[11] = Ce,
u[12] = xe,
u[13] = Re,
u[14] = Te,
u[15] = Ie,
u[16] = Pe,
u[17] = Le,
u[18] = Oe,
0 !== l && (u[19] = l,
n.length++),
n
};
function p(e, t, n) {
return (new m).mulp(e, t, n)
}
function m(e, t) {
this.x = e,
this.y = t
}
Math.imul || (h = f),
i.prototype.mulTo = function(e, t) {
var n, r = this.length + e.length;
return n = 10 === this.length && 10 === e.length ? h(this, e, t) :
r < 63 ? f(this, e, t) : r < 1024 ? function(e, t, n) {
n.negative = t.negative ^ e.negative,
n.length = e.length + t.length;
for (var r = 0, i = 0, o = 0; o < n.length - 1; o++) {
var a = i;
i = 0;
for (var s = 67108863 & r, u = Math.min(o, t.length - 1), l
= Math.max(0, o - e.length + 1); l <= u; l++) {
var c = o - l
, d = (0 | e.words[c]) * (0 | t.words[l])
, f = 67108863 & d;
s = 67108863 & (f = f + s | 0),
i += (a = (a = a + (d / 67108864 | 0) | 0) + (f >>> 26)
| 0) >>> 26,
a &= 67108863
}
n.words[o] = s,
r = a,
a=i
}
return 0 !== r ? n.words[o] = r : n.length--,
n.strip()
}(this, e, t) : p(this, e, t),
n
}
,
m.prototype.makeRBT = function(e) {
for (var t = new Array(e), n = i.prototype._countBits(e) - 1, r = 0;
r < e; r++)
t[r] = this.revBin(r, n, e);
return t
}
,
m.prototype.revBin = function(e, t, n) {
if (0 === e || e === n - 1)
return e;
for (var r = 0, i = 0; i < t; i++)
r |= (1 & e) << t - i - 1,
e >>= 1;
return r
}
,
m.prototype.permute = function(e, t, n, r, i, o) {
for (var a = 0; a < o; a++)
r[a] = t[e[a]],
i[a] = n[e[a]]
}
,
m.prototype.transform = function(e, t, n, r, i, o) {
this.permute(o, e, t, n, r, i);
for (var a = 1; a < i; a <<= 1)
for (var s = a << 1, u = Math.cos(2 * Math.PI / s), l =
Math.sin(2 * Math.PI / s), c = 0; c < i; c += s)
for (var d = u, f = l, h = 0; h < a; h++) {
var p = n[c + h]
, m = r[c + h]
, g = n[c + h + a]
, v = r[c + h + a]
, b = d * g - f * v;
v = d * v + f * g,
g = b,
n[c + h] = p + g,
r[c + h] = m + v,
n[c + h + a] = p - g,
r[c + h + a] = m - v,
h !== s && (b = u * d - l * f,
f = u * f + l * d,
d = b)
}
}
,
m.prototype.guessLen13b = function(e, t) {
var n = 1 | Math.max(t, e)
,r=1&n
, i = 0;
for (n = n / 2 | 0; n; n >>>= 1)
i++;
return 1 << i + 1 + r
}
,
m.prototype.conjugate = function(e, t, n) {
if (!(n <= 1))
for (var r = 0; r < n / 2; r++) {
var i = e[r];
e[r] = e[n - r - 1],
e[n - r - 1] = i,
i = t[r],
t[r] = -t[n - r - 1],
t[n - r - 1] = -i
}
}
,
m.prototype.normalize13b = function(e, t) {
for (var n = 0, r = 0; r < t / 2; r++) {
var i = 8192 * Math.round(e[2 * r + 1] / t) + Math.round(e[2 *
r] / t) + n;
e[r] = 67108863 & i,
n = i < 67108864 ? 0 : i / 67108864 | 0
}
return e
}
,
m.prototype.convert13b = function(e, t, r, i) {
for (var o = 0, a = 0; a < t; a++)
o += 0 | e[a],
r[2 * a] = 8191 & o,
o >>>= 13,
r[2 * a + 1] = 8191 & o,
o >>>= 13;
for (a = 2 * t; a < i; ++a)
r[a] = 0;
n(0 === o),
n(0 == (-8192 & o))
}
,
m.prototype.stub = function(e) {
for (var t = new Array(e), n = 0; n < e; n++)
t[n] = 0;
return t
}
,
m.prototype.mulp = function(e, t, n) {
var r = 2 * this.guessLen13b(e.length, t.length)
, i = this.makeRBT(r)
, o = this.stub(r)
, a = new Array(r)
, s = new Array(r)
, u = new Array(r)
, l = new Array(r)
, c = new Array(r)
, d = new Array(r)
, f = n.words;
f.length = r,
this.convert13b(e.words, e.length, a, r),
this.convert13b(t.words, t.length, l, r),
this.transform(a, o, s, u, r, i),
this.transform(l, o, c, d, r, i);
for (var h = 0; h < r; h++) {
var p = s[h] * c[h] - u[h] * d[h];
u[h] = s[h] * d[h] + u[h] * c[h],
s[h] = p
}
return this.conjugate(s, u, r),
this.transform(s, u, f, o, r, i),
this.conjugate(f, o, r),
this.normalize13b(f, r),
n.negative = e.negative ^ t.negative,
n.length = e.length + t.length,
n.strip()
}
,
i.prototype.mul = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
this.mulTo(e, t)
}
,
i.prototype.mulf = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
p(this, e, t)
}
,
i.prototype.imul = function(e) {
return this.clone().mulTo(e, this)
}
,
i.prototype.imuln = function(e) {
n("number" == typeof e),
n(e < 67108864);
for (var t = 0, r = 0; r < this.length; r++) {
var i = (0 | this.words[r]) * e
, o = (67108863 & i) + (67108863 & t);
t >>= 26,
t += i / 67108864 | 0,
t += o >>> 26,
this.words[r] = 67108863 & o
}
return 0 !== t && (this.words[r] = t,
this.length++),
this
}
,
i.prototype.muln = function(e) {
return this.clone().imuln(e)
}
,
i.prototype.sqr = function() {
return this.mul(this)
}
,
i.prototype.isqr = function() {
return this.imul(this.clone())
}
,
i.prototype.pow = function(e) {
var t = function(e) {
for (var t = new Array(e.bitLength()), n = 0; n < t.length; n++)
{
var r = n / 26 | 0
, i = n % 26;
t[n] = (e.words[r] & 1 << i) >>> i
}
return t
}(e);
if (0 === t.length)
return new i(1);
for (var n = this, r = 0; r < t.length && 0 === t[r]; r++,
n = n.sqr())
;
if (++r < t.length)
for (var o = n.sqr(); r < t.length; r++,
o = o.sqr())
0 !== t[r] && (n = n.mul(o));
return n
}
,
i.prototype.iushln = function(e) {
n("number" == typeof e && e >= 0);
var t, r = e % 26, i = (e - r) / 26, o = 67108863 >>> 26 - r << 26 -
r;
if (0 !== r) {
var a = 0;
for (t = 0; t < this.length; t++) {
var s = this.words[t] & o
, u = (0 | this.words[t]) - s << r;
this.words[t] = u | a,
a = s >>> 26 - r
}
a && (this.words[t] = a,
this.length++)
}
if (0 !== i) {
for (t = this.length - 1; t >= 0; t--)
this.words[t + i] = this.words[t];
for (t = 0; t < i; t++)
this.words[t] = 0;
this.length += i
}
return this.strip()
}
,
i.prototype.ishln = function(e) {
return n(0 === this.negative),
this.iushln(e)
}
,
i.prototype.iushrn = function(e, t, r) {
var i;
n("number" == typeof e && e >= 0),
i = t ? (t - t % 26) / 26 : 0;
var o = e % 26
, a = Math.min((e - o) / 26, this.length)
, s = 67108863 ^ 67108863 >>> o << o
, u = r;
if (i -= a,
i = Math.max(0, i),
u) {
for (var l = 0; l < a; l++)
u.words[l] = this.words[l];
u.length = a
}
if (0 === a)
;
else if (this.length > a)
for (this.length -= a,
l = 0; l < this.length; l++)
this.words[l] = this.words[l + a];
else
this.words[0] = 0,
this.length = 1;
var c = 0;
for (l = this.length - 1; l >= 0 && (0 !== c || l >= i); l--) {
var d = 0 | this.words[l];
this.words[l] = c << 26 - o | d >>> o,
c=d&s
}
return u && 0 !== c && (u.words[u.length++] = c),
0 === this.length && (this.words[0] = 0,
this.length = 1),
this.strip()
}
,
i.prototype.ishrn = function(e, t, r) {
return n(0 === this.negative),
this.iushrn(e, t, r)
}
,
i.prototype.shln = function(e) {
return this.clone().ishln(e)
}
,
i.prototype.ushln = function(e) {
return this.clone().iushln(e)
}
,
i.prototype.shrn = function(e) {
return this.clone().ishrn(e)
}
,
i.prototype.ushrn = function(e) {
return this.clone().iushrn(e)
}
,
i.prototype.testn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
return !(this.length <= r) && !!(this.words[r] & i)
}
,
i.prototype.imaskn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26;
if (n(0 === this.negative, "imaskn works only with positive
numbers"),
this.length <= r)
return this;
if (0 !== t && r++,
this.length = Math.min(r, this.length),
0 !== t) {
var i = 67108863 ^ 67108863 >>> t << t;
this.words[this.length - 1] &= i
}
return this.strip()
}
,
i.prototype.maskn = function(e) {
return this.clone().imaskn(e)
}
,
i.prototype.iaddn = function(e) {
return n("number" == typeof e),
n(e < 67108864),
e < 0 ? this.isubn(-e) : 0 !== this.negative ? 1 === this.length &&
(0 | this.words[0]) < e ? (this.words[0] = e - (0 | this.words[0]),
this.negative = 0,
this) : (this.negative = 0,
this.isubn(e),
this.negative = 1,
this) : this._iaddn(e)
}
,
i.prototype._iaddn = function(e) {
this.words[0] += e;
for (var t = 0; t < this.length && this.words[t] >= 67108864; t++)
this.words[t] -= 67108864,
t === this.length - 1 ? this.words[t + 1] = 1 : this.words[t +
1]++;
return this.length = Math.max(this.length, t + 1),
this
}
,
i.prototype.isubn = function(e) {
if (n("number" == typeof e),
n(e < 67108864),
e < 0)
return this.iaddn(-e);
if (0 !== this.negative)
return this.negative = 0,
this.iaddn(e),
this.negative = 1,
this;
if (this.words[0] -= e,
1 === this.length && this.words[0] < 0)
this.words[0] = -this.words[0],
this.negative = 1;
else
for (var t = 0; t < this.length && this.words[t] < 0; t++)
this.words[t] += 67108864,
this.words[t + 1] -= 1;
return this.strip()
}
,
i.prototype.addn = function(e) {
return this.clone().iaddn(e)
}
,
i.prototype.subn = function(e) {
return this.clone().isubn(e)
}
,
i.prototype.iabs = function() {
return this.negative = 0,
this
}
,
i.prototype.abs = function() {
return this.clone().iabs()
}
,
i.prototype._ishlnsubmul = function(e, t, r) {
var i, o, a = e.length + r;
this._expand(a);
var s = 0;
for (i = 0; i < e.length; i++) {
o = (0 | this.words[i + r]) + s;
var u = (0 | e.words[i]) * t;
s = ((o -= 67108863 & u) >> 26) - (u / 67108864 | 0),
this.words[i + r] = 67108863 & o
}
for (; i < this.length - r; i++)
s = (o = (0 | this.words[i + r]) + s) >> 26,
this.words[i + r] = 67108863 & o;
if (0 === s)
return this.strip();
for (n(-1 === s),
s = 0,
i = 0; i < this.length; i++)
s = (o = -(0 | this.words[i]) + s) >> 26,
this.words[i] = 67108863 & o;
return this.negative = 1,
this.strip()
}
,
i.prototype._wordDiv = function(e, t) {
var n = (this.length,
e.length)
, r = this.clone()
,o=e
, a = 0 | o.words[o.length - 1];
0 !== (n = 26 - this._countBits(a)) && (o = o.ushln(n),
r.iushln(n),
a = 0 | o.words[o.length - 1]);
var s, u = r.length - o.length;
if ("mod" !== t) {
(s = new i(null)).length = u + 1,
s.words = new Array(s.length);
for (var l = 0; l < s.length; l++)
s.words[l] = 0
}
var c = r.clone()._ishlnsubmul(o, 1, u);
0 === c.negative && (r = c,
s && (s.words[u] = 1));
for (var d = u - 1; d >= 0; d--) {
var f = 67108864 * (0 | r.words[o.length + d]) + (0 |
r.words[o.length + d - 1]);
for (f = Math.min(f / a | 0, 67108863),
r._ishlnsubmul(o, f, d); 0 !== r.negative; )
f--,
r.negative = 0,
r._ishlnsubmul(o, 1, d),
r.isZero() || (r.negative ^= 1);
s && (s.words[d] = f)
}
return s && s.strip(),
r.strip(),
"div" !== t && 0 !== n && r.iushrn(n),
{
div: s || null,
mod: r
}
}
,
i.prototype.divmod = function(e, t, r) {
return n(!e.isZero()),
this.isZero() ? {
div: new i(0),
mod: new i(0)
} : 0 !== this.negative && 0 === e.negative ? (s =
this.neg().divmod(e, t),
"mod" !== t && (o = s.div.neg()),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.iadd(e)),
{
div: o,
mod: a
}) : 0 === this.negative && 0 !== e.negative ? (s =
this.divmod(e.neg(), t),
"mod" !== t && (o = s.div.neg()),
{
div: o,
mod: s.mod
}) : 0 != (this.negative & e.negative) ? (s =
this.neg().divmod(e.neg(), t),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.isub(e)),
{
div: s.div,
mod: a
}) : e.length > this.length || this.cmp(e) < 0 ? {
div: new i(0),
mod: this
} : 1 === e.length ? "div" === t ? {
div: this.divn(e.words[0]),
mod: null
} : "mod" === t ? {
div: null,
mod: new i(this.modn(e.words[0]))
}:{
div: this.divn(e.words[0]),
mod: new i(this.modn(e.words[0]))
} : this._wordDiv(e, t);
var o, a, s
}
,
i.prototype.div = function(e) {
return this.divmod(e, "div", !1).div
}
,
i.prototype.mod = function(e) {
return this.divmod(e, "mod", !1).mod
}
,
i.prototype.umod = function(e) {
return this.divmod(e, "mod", !0).mod
}
,
i.prototype.divRound = function(e) {
var t = this.divmod(e);
if (t.mod.isZero())
return t.div;
var n = 0 !== t.div.negative ? t.mod.isub(e) : t.mod
, r = e.ushrn(1)
, i = e.andln(1)
, o = n.cmp(r);
return o < 0 || 1 === i && 0 === o ? t.div : 0 !== t.div.negative ?
t.div.isubn(1) : t.div.iaddn(1)
}
,
i.prototype.modn = function(e) {
n(e <= 67108863);
for (var t = (1 << 26) % e, r = 0, i = this.length - 1; i >= 0; i--)
r = (t * r + (0 | this.words[i])) % e;
return r
}
,
i.prototype.idivn = function(e) {
n(e <= 67108863);
for (var t = 0, r = this.length - 1; r >= 0; r--) {
var i = (0 | this.words[r]) + 67108864 * t;
this.words[r] = i / e | 0,
t=i%e
}
return this.strip()
}
,
i.prototype.divn = function(e) {
return this.clone().idivn(e)
}
,
i.prototype.egcd = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o = new i(1), a = new i(0), s = new i(0), u = new i(1), l =
0; t.isEven() && r.isEven(); )
t.iushrn(1),
r.iushrn(1),
++l;
for (var c = r.clone(), d = t.clone(); !t.isZero(); ) {
for (var f = 0, h = 1; 0 == (t.words[0] & h) && f < 26; ++f,
h <<= 1)
;
if (f > 0)
for (t.iushrn(f); f-- > 0; )
(o.isOdd() || a.isOdd()) && (o.iadd(c),
a.isub(d)),
o.iushrn(1),
a.iushrn(1);
for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p,
m <<= 1)
;
if (p > 0)
for (r.iushrn(p); p-- > 0; )
(s.isOdd() || u.isOdd()) && (s.iadd(c),
u.isub(d)),
s.iushrn(1),
u.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
o.isub(s),
a.isub(u)) : (r.isub(t),
s.isub(o),
u.isub(a))
}
return {
a: s,
b: u,
gcd: r.iushln(l)
}
}
,
i.prototype._invmp = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o, a = new i(1), s = new i(0), u = r.clone(); t.cmpn(1) > 0
&& r.cmpn(1) > 0; ) {
for (var l = 0, c = 1; 0 == (t.words[0] & c) && l < 26; ++l,
c <<= 1)
;
if (l > 0)
for (t.iushrn(l); l-- > 0; )
a.isOdd() && a.iadd(u),
a.iushrn(1);
for (var d = 0, f = 1; 0 == (r.words[0] & f) && d < 26; ++d,
f <<= 1)
;
if (d > 0)
for (r.iushrn(d); d-- > 0; )
s.isOdd() && s.iadd(u),
s.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
a.isub(s)) : (r.isub(t),
s.isub(a))
}
return (o = 0 === t.cmpn(1) ? a : s).cmpn(0) < 0 && o.iadd(e),
o
}
,
i.prototype.gcd = function(e) {
if (this.isZero())
return e.abs();
if (e.isZero())
return this.abs();
var t = this.clone()
, n = e.clone();
t.negative = 0,
n.negative = 0;
for (var r = 0; t.isEven() && n.isEven(); r++)
t.iushrn(1),
n.iushrn(1);
for (; ; ) {
for (; t.isEven(); )
t.iushrn(1);
for (; n.isEven(); )
n.iushrn(1);
var i = t.cmp(n);
if (i < 0) {
var o = t;
t = n,
n=o
} else if (0 === i || 0 === n.cmpn(1))
break;
t.isub(n)
}
return n.iushln(r)
}
,
i.prototype.invm = function(e) {
return this.egcd(e).a.umod(e)
}
,
i.prototype.isEven = function() {
return 0 == (1 & this.words[0])
}
,
i.prototype.isOdd = function() {
return 1 == (1 & this.words[0])
}
,
i.prototype.andln = function(e) {
return this.words[0] & e
}
,
i.prototype.bincn = function(e) {
n("number" == typeof e);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
if (this.length <= r)
return this._expand(r + 1),
this.words[r] |= i,
this;
for (var o = i, a = r; 0 !== o && a < this.length; a++) {
var s = 0 | this.words[a];
o = (s += o) >>> 26,
s &= 67108863,
this.words[a] = s
}
return 0 !== o && (this.words[a] = o,
this.length++),
this
}
,
i.prototype.isZero = function() {
return 1 === this.length && 0 === this.words[0]
}
,
i.prototype.cmpn = function(e) {
var t, r = e < 0;
if (0 !== this.negative && !r)
return -1;
if (0 === this.negative && r)
return 1;
if (this.strip(),
this.length > 1)
t = 1;
else {
r && (e = -e),
n(e <= 67108863, "Number is too big");
var i = 0 | this.words[0];
t = i === e ? 0 : i < e ? -1 : 1
}
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.cmp = function(e) {
if (0 !== this.negative && 0 === e.negative)
return -1;
if (0 === this.negative && 0 !== e.negative)
return 1;
var t = this.ucmp(e);
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.ucmp = function(e) {
if (this.length > e.length)
return 1;
if (this.length < e.length)
return -1;
for (var t = 0, n = this.length - 1; n >= 0; n--) {
var r = 0 | this.words[n]
, i = 0 | e.words[n];
if (r !== i) {
r < i ? t = -1 : r > i && (t = 1);
break
}
}
return t
}
,
i.prototype.gtn = function(e) {
return 1 === this.cmpn(e)
}
,
i.prototype.gt = function(e) {
return 1 === this.cmp(e)
}
,
i.prototype.gten = function(e) {
return this.cmpn(e) >= 0
}
,
i.prototype.gte = function(e) {
return this.cmp(e) >= 0
}
,
i.prototype.ltn = function(e) {
return -1 === this.cmpn(e)
}
,
i.prototype.lt = function(e) {
return -1 === this.cmp(e)
}
,
i.prototype.lten = function(e) {
return this.cmpn(e) <= 0
}
,
i.prototype.lte = function(e) {
return this.cmp(e) <= 0
}
,
i.prototype.eqn = function(e) {
return 0 === this.cmpn(e)
}
,
i.prototype.eq = function(e) {
return 0 === this.cmp(e)
}
,
i.red = function(e) {
return new _(e)
}
,
i.prototype.toRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
n(0 === this.negative, "red works only with positives"),
e.convertTo(this)._forceRed(e)
}
,
i.prototype.fromRed = function() {
return n(this.red, "fromRed works only with numbers in
reduction context"),
this.red.convertFrom(this)
}
,
i.prototype._forceRed = function(e) {
return this.red = e,
this
}
,
i.prototype.forceRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
this._forceRed(e)
}
,
i.prototype.redAdd = function(e) {
return n(this.red, "redAdd works only with red numbers"),
this.red.add(this, e)
}
,
i.prototype.redIAdd = function(e) {
return n(this.red, "redIAdd works only with red numbers"),
this.red.iadd(this, e)
}
,
i.prototype.redSub = function(e) {
return n(this.red, "redSub works only with red numbers"),
this.red.sub(this, e)
}
,
i.prototype.redISub = function(e) {
return n(this.red, "redISub works only with red numbers"),
this.red.isub(this, e)
}
,
i.prototype.redShl = function(e) {
return n(this.red, "redShl works only with red numbers"),
this.red.shl(this, e)
}
,
i.prototype.redMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.mul(this, e)
}
,
i.prototype.redIMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.imul(this, e)
}
,
i.prototype.redSqr = function() {
return n(this.red, "redSqr works only with red numbers"),
this.red._verify1(this),
this.red.sqr(this)
}
,
i.prototype.redISqr = function() {
return n(this.red, "redISqr works only with red numbers"),
this.red._verify1(this),
this.red.isqr(this)
}
,
i.prototype.redSqrt = function() {
return n(this.red, "redSqrt works only with red numbers"),
this.red._verify1(this),
this.red.sqrt(this)
}
,
i.prototype.redInvm = function() {
return n(this.red, "redInvm works only with red numbers"),
this.red._verify1(this),
this.red.invm(this)
}
,
i.prototype.redNeg = function() {
return n(this.red, "redNeg works only with red numbers"),
this.red._verify1(this),
this.red.neg(this)
}
,
i.prototype.redPow = function(e) {
return n(this.red && !e.red, "redPow(normalNum)"),
this.red._verify1(this),
this.red.pow(this, e)
}
;
var g = {
k256: null,
p224: null,
p192: null,
p25519: null
};
function v(e, t) {
this.name = e,
this.p = new i(t,16),
this.n = this.p.bitLength(),
this.k = new i(1).iushln(this.n).isub(this.p),
this.tmp = this._tmp()
}
function b() {
v.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
fffffc2f")
}
function y() {
v.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000
00000001")
}
function A() {
v.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")
}
function w() {
v.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")
}
function _(e) {
if ("string" == typeof e) {
var t = i._prime(e);
this.m = t.p,
this.prime = t
} else
n(e.gtn(1), "modulus must be greater than 1"),
this.m = e,
this.prime = null
}
function E(e) {
_.call(this, e),
this.shift = this.m.bitLength(),
this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26),
this.r = new i(1).iushln(this.shift),
this.r2 = this.imod(this.r.sqr()),
this.rinv = this.r._invmp(this.m),
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m),
this.minv = this.minv.umod(this.r),
this.minv = this.r.sub(this.minv)
}
v.prototype._tmp = function() {
var e = new i(null);
return e.words = new Array(Math.ceil(this.n / 13)),
e
}
,
v.prototype.ireduce = function(e) {
var t, n = e;
do {
this.split(n, this.tmp),
t = (n = (n = this.imulK(n)).iadd(this.tmp)).bitLength()
} while (t > this.n);
var r = t < this.n ? -1 : n.ucmp(this.p);
return 0 === r ? (n.words[0] = 0,
n.length = 1) : r > 0 ? n.isub(this.p) : void 0 !== n.strip ?
n.strip() : n._strip(),
n
}
,
v.prototype.split = function(e, t) {
e.iushrn(this.n, 0, t)
}
,
v.prototype.imulK = function(e) {
return e.imul(this.k)
}
,
r(b, v),
b.prototype.split = function(e, t) {
for (var n = 4194303, r = Math.min(e.length, 9), i = 0; i < r; i++)
t.words[i] = e.words[i];
if (t.length = r,
e.length <= 9)
return e.words[0] = 0,
void (e.length = 1);
var o = e.words[9];
for (t.words[t.length++] = o & n,
i = 10; i < e.length; i++) {
var a = 0 | e.words[i];
e.words[i - 10] = (a & n) << 4 | o >>> 22,
o=a
}
o >>>= 22,
e.words[i - 10] = o,
0 === o && e.length > 10 ? e.length -= 10 : e.length -= 9
}
,
b.prototype.imulK = function(e) {
e.words[e.length] = 0,
e.words[e.length + 1] = 0,
e.length += 2;
for (var t = 0, n = 0; n < e.length; n++) {
var r = 0 | e.words[n];
t += 977 * r,
e.words[n] = 67108863 & t,
t = 64 * r + (t / 67108864 | 0)
}
return 0 === e.words[e.length - 1] && (e.length--,
0 === e.words[e.length - 1] && e.length--),
e
}
,
r(y, v),
r(A, v),
r(w, v),
w.prototype.imulK = function(e) {
for (var t = 0, n = 0; n < e.length; n++) {
var r = 19 * (0 | e.words[n]) + t
, i = 67108863 & r;
r >>>= 26,
e.words[n] = i,
t=r
}
return 0 !== t && (e.words[e.length++] = t),
e
}
,
i._prime = function(e) {
if (g[e])
return g[e];
var t;
if ("k256" === e)
t = new b;
else if ("p224" === e)
t = new y;
else if ("p192" === e)
t = new A;
else {
if ("p25519" !== e)
throw new Error("Unknown prime " + e);
t = new w
}
return g[e] = t,
t
}
,
_.prototype._verify1 = function(e) {
n(0 === e.negative, "red works only with positives"),
n(e.red, "red works only with red numbers")
}
,
_.prototype._verify2 = function(e, t) {
n(0 == (e.negative | t.negative), "red works only with positives"),
n(e.red && e.red === t.red, "red works only with red numbers")
}
,
_.prototype.imod = function(e) {
return this.prime ? this.prime.ireduce(e)._forceRed(this) :
e.umod(this.m)._forceRed(this)
}
,
_.prototype.neg = function(e) {
return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this)
}
,
_.prototype.add = function(e, t) {
this._verify2(e, t);
var n = e.add(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n._forceRed(this)
}
,
_.prototype.iadd = function(e, t) {
this._verify2(e, t);
var n = e.iadd(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n
}
,
_.prototype.sub = function(e, t) {
this._verify2(e, t);
var n = e.sub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n._forceRed(this)
}
,
_.prototype.isub = function(e, t) {
this._verify2(e, t);
var n = e.isub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n
}
,
_.prototype.shl = function(e, t) {
return this._verify1(e),
this.imod(e.ushln(t))
}
,
_.prototype.imul = function(e, t) {
return this._verify2(e, t),
this.imod(e.imul(t))
}
,
_.prototype.mul = function(e, t) {
return this._verify2(e, t),
this.imod(e.mul(t))
}
,
_.prototype.isqr = function(e) {
return this.imul(e, e.clone())
}
,
_.prototype.sqr = function(e) {
return this.mul(e, e)
}
,
_.prototype.sqrt = function(e) {
if (e.isZero())
return e.clone();
var t = this.m.andln(3);
if (n(t % 2 == 1),
3 === t) {
var r = this.m.add(new i(1)).iushrn(2);
return this.pow(e, r)
}
for (var o = this.m.subn(1), a = 0; !o.isZero() && 0 ===
o.andln(1); )
a++,
o.iushrn(1);
n(!o.isZero());
var s = new i(1).toRed(this)
, u = s.redNeg()
, l = this.m.subn(1).iushrn(1)
, c = this.m.bitLength();
for (c = new i(2 * c * c).toRed(this); 0 !== this.pow(c, l).cmp(u); )
c.redIAdd(u);
for (var d = this.pow(c, o), f = this.pow(e, o.addn(1).iushrn(1)), h
= this.pow(e, o), p = a; 0 !== h.cmp(s); ) {
for (var m = h, g = 0; 0 !== m.cmp(s); g++)
m = m.redSqr();
n(g < p);
var v = this.pow(d, new i(1).iushln(p - g - 1));
f = f.redMul(v),
d = v.redSqr(),
h = h.redMul(d),
p=g
}
return f
}
,
_.prototype.invm = function(e) {
var t = e._invmp(this.m);
return 0 !== t.negative ? (t.negative = 0,
this.imod(t).redNeg()) : this.imod(t)
}
,
_.prototype.pow = function(e, t) {
if (t.isZero())
return new i(1).toRed(this);
if (0 === t.cmpn(1))
return e.clone();
var n = new Array(16);
n[0] = new i(1).toRed(this),
n[1] = e;
for (var r = 2; r < n.length; r++)
n[r] = this.mul(n[r - 1], e);
var o = n[0]
,a=0
,s=0
, u = t.bitLength() % 26;
for (0 === u && (u = 26),
r = t.length - 1; r >= 0; r--) {
for (var l = t.words[r], c = u - 1; c >= 0; c--) {
var d = l >> c & 1;
o !== n[0] && (o = this.sqr(o)),
0 !== d || 0 !== a ? (a <<= 1,
a |= d,
(4 === ++s || 0 === r && 0 === c) && (o = this.mul(o,
n[a]),
s = 0,
a = 0)) : s = 0
}
u = 26
}
return o
}
,
_.prototype.convertTo = function(e) {
var t = e.umod(this.m);
return t === e ? t.clone() : t
}
,
_.prototype.convertFrom = function(e) {
var t = e.clone();
return t.red = null,
t
}
,
i.mont = function(e) {
return new E(e)
}
,
r(E, _),
E.prototype.convertTo = function(e) {
return this.imod(e.ushln(this.shift))
}
,
E.prototype.convertFrom = function(e) {
var t = this.imod(e.mul(this.rinv));
return t.red = null,
t
}
,
E.prototype.imul = function(e, t) {
if (e.isZero() || t.isZero())
return e.words[0] = 0,
e.length = 1,
e;
var n = e.imul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, i = n.isub(r).iushrn(this.shift)
, o = i;
return i.cmp(this.m) >= 0 ? o = i.isub(this.m) : i.cmpn(0) < 0 &&
(o = i.iadd(this.m)),
o._forceRed(this)
}
,
E.prototype.mul = function(e, t) {
if (e.isZero() || t.isZero())
return new i(0)._forceRed(this);
var n = e.mul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, o = n.isub(r).iushrn(this.shift)
, a = o;
return o.cmp(this.m) >= 0 ? a = o.isub(this.m) : o.cmpn(0) < 0
&& (a = o.iadd(this.m)),
a._forceRed(this)
}
,
E.prototype.invm = function(e) {
return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)
}
}(e, r)
}(sl);
var ul, ll, cl, dl, fl, hl = sl.exports, pl = {
exports: {}
};
function ml() {
if (ul)
return pl.exports;
var e;
function t(e) {
this.rand = e
}
if (ul = 1,
pl.exports = function(n) {
return e || (e = new t(null)),
e.generate(n)
}
,
pl.exports.Rand = t,
t.prototype.generate = function(e) {
return this._rand(e)
}
,
t.prototype._rand = function(e) {
if (this.rand.getBytes)
return this.rand.getBytes(e);
for (var t = new Uint8Array(e), n = 0; n < t.length; n++)
t[n] = this.rand.getByte();
return t
}
,
"object" == typeof self)
self.crypto && self.crypto.getRandomValues ? t.prototype._rand =
function(e) {
var t = new Uint8Array(e);
return self.crypto.getRandomValues(t),
t
}
: self.msCrypto && self.msCrypto.getRandomValues ?
t.prototype._rand = function(e) {
var t = new Uint8Array(e);
return self.msCrypto.getRandomValues(t),
t
}
: "object" == typeof window && (t.prototype._rand = function() {
throw new Error("Not implemented yet")
}
);
else
try {
var n = zm();
if ("function" != typeof n.randomBytes)
throw new Error("Not supported");
t.prototype._rand = function(e) {
return n.randomBytes(e)
}
} catch (e) {}
return pl.exports
}
function gl() {
if (cl)
return ll;
cl = 1;
var e = hl
, t = ml();
function n(e) {
this.rand = e || new t.Rand
}
return ll = n,
n.create = function(e) {
return new n(e)
}
,
n.prototype._randbelow = function(t) {
var n = t.bitLength()
, r = Math.ceil(n / 8);
do {
var i = new e(this.rand.generate(r))
} while (i.cmp(t) >= 0);
return i
}
,
n.prototype._randrange = function(e, t) {
var n = t.sub(e);
return e.add(this._randbelow(n))
}
,
n.prototype.test = function(t, n, r) {
var i = t.bitLength()
, o = e.mont(t)
, a = new e(1).toRed(o);
n || (n = Math.max(1, i / 48 | 0));
for (var s = t.subn(1), u = 0; !s.testn(u); u++)
;
for (var l = t.shrn(u), c = s.toRed(o); n > 0; n--) {
var d = this._randrange(new e(2), s);
r && r(d);
var f = d.toRed(o).redPow(l);
if (0 !== f.cmp(a) && 0 !== f.cmp(c)) {
for (var h = 1; h < u; h++) {
if (0 === (f = f.redSqr()).cmp(a))
return !1;
if (0 === f.cmp(c))
break
}
if (h === u)
return !1
}
}
return !0
}
,
n.prototype.getDivisor = function(t, n) {
var r = t.bitLength()
, i = e.mont(t)
, o = new e(1).toRed(i);
n || (n = Math.max(1, r / 48 | 0));
for (var a = t.subn(1), s = 0; !a.testn(s); s++)
;
for (var u = t.shrn(s), l = a.toRed(i); n > 0; n--) {
var c = this._randrange(new e(2), a)
, d = t.gcd(c);
if (0 !== d.cmpn(1))
return d;
var f = c.toRed(i).redPow(u);
if (0 !== f.cmp(o) && 0 !== f.cmp(l)) {
for (var h = 1; h < s; h++) {
if (0 === (f = f.redSqr()).cmp(o))
return f.fromRed().subn(1).gcd(t);
if (0 === f.cmp(l))
break
}
if (h === s)
return (f = f.redSqr()).fromRed().subn(1).gcd(t)
}
}
return !1
}
,
ll
}
function vl() {
if (fl)
return dl;
fl = 1;
var e = We;
dl = m,
m.simpleSieve = h,
m.fermatTest = p;
var t = hl
, n = new t(24)
, r = new (gl())
, i = new t(1)
, o = new t(2)
, a = new t(5);
new t(16),
new t(8);
var s = new t(10)
, u = new t(3);
new t(7);
var l = new t(11)
, c = new t(4);
new t(12);
var d = null;
function f() {
if (null !== d)
return d;
var e = [];
e[0] = 2;
for (var t = 1, n = 3; n < 1048576; n += 2) {
for (var r = Math.ceil(Math.sqrt(n)), i = 0; i < t && e[i] <= r && n
% e[i] != 0; i++)
;
t !== i && e[i] <= r || (e[t++] = n)
}
return d = e,
e
}
function h(e) {
for (var t = f(), n = 0; n < t.length; n++)
if (0 === e.modn(t[n]))
return 0 === e.cmpn(t[n]);
return !0
}
function p(e) {
var n = t.mont(e);
return 0 === o.toRed(n).redPow(e.subn(1)).fromRed().cmpn(1)
}
function m(d, f) {
if (d < 16)
return new t(2 === f || 5 === f ? [140, 123] : [140, 39]);
var m, g;
for (f = new t(f); ; ) {
for (m = new t(e(Math.ceil(d / 8))); m.bitLength() > d; )
m.ishrn(1);
if (m.isEven() && m.iadd(i),
m.testn(1) || m.iadd(o),
f.cmp(o)) {
if (!f.cmp(a))
for (; m.mod(s).cmp(u); )
m.iadd(c)
} else
for (; m.mod(n).cmp(l); )
m.iadd(c);
if (h(g = m.shrn(1)) && h(m) && p(g) && p(m) && r.test(g) &&
r.test(m))
return m
}
}
return dl
}
var bl, yl, Al, wl = {
modp1: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a63a3620ffffffffffffffff"
},
modp2: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64
9286651ece65381ffffffffffffffff"
},
modp5: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64
9286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dc
a3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327fff
fffffffffffff"
},
modp14: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64
9286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dc
a3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c3
2905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf69
55817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"
},
modp15: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64
9286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dc
a3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c3
2905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf69
55817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a3
3a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8c
db0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a6
4521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bf
ce0fd108e4b82d120a93ad2caffffffffffffffff"
},
modp16: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64
9286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dc
a3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c3
2905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf69
55817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a3
3a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8c
db0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a6
4521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bf
ce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e2
3c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59
474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd7621704
81cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199fffffffffffff
fff"
},
modp17: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64
9286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dc
a3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c3
2905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf69
55817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a3
3a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8c
db0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a6
4521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bf
ce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e2
3c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59
474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd7621704
81cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fa
b4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001
aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1
447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d
03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7
e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0
a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2
ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024fffff
fffffffffff"
},
modp18: {
gen: "02",
prime:
"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b2
2514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b57
6625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe64
9286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dc
a3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c3
2905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf69
55817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a3
3a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8c
db0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a6
4521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bf
ce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e2
3c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59
474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd7621704
81cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fa
b4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001
aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1
447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d
03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7
e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0
a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2
ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974
a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8af
c47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fd
b8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f83
85ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310
ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee7
4d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190
da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98ed
d3dfffffffffffffffff"
}
};
function _l() {
if (yl)
return bl;
yl = 1;
var e = hl
, t = new (gl())
, n = new e(24)
, r = new e(11)
, i = new e(10)
, o = new e(3)
, a = new e(7)
, s = vl()
, u = We;
function l(t, n) {
return n = n || "utf8",
oe(t) || (t = new _(t,n)),
this._pub = new e(t),
this
}
function c(t, n) {
return n = n || "utf8",
oe(t) || (t = new _(t,n)),
this._priv = new e(t),
this
}
bl = f;
var d = {};
function f(t, n, r) {
this.setGenerator(n),
this.__prime = new e(t),
this._prime = e.mont(this.__prime),
this._primeLen = t.length,
this._pub = void 0,
this._priv = void 0,
this._primeCode = void 0,
r ? (this.setPublicKey = l,
this.setPrivateKey = c) : this._primeCode = 8
}
function h(e, t) {
var n = new _(e.toArray());
return t ? n.toString(t) : n
}
return Object.defineProperty(f.prototype, "verifyError", {
enumerable: !0,
get: function() {
return "number" != typeof this._primeCode && (this._primeCode
= function(e, u) {
var l = u.toString("hex")
, c = [l, e.toString(16)].join("_");
if (c in d)
return d[c];
var f, h = 0;
if (e.isEven() || !s.simpleSieve || !s.fermatTest(e) || !t.test(e))
return h += 1,
h += "02" === l || "05" === l ? 8 : 4,
d[c] = h,
h;
switch (t.test(e.shrn(1)) || (h += 2),
l) {
case "02":
e.mod(n).cmp(r) && (h += 8);
break;
case "05":
(f = e.mod(i)).cmp(o) && f.cmp(a) && (h += 8);
break;
default:
h += 4
}
return d[c] = h,
h
}(this.__prime, this.__gen)),
this._primeCode
}
}),
f.prototype.generateKeys = function() {
return this._priv || (this._priv = new e(u(this._primeLen))),
this._pub =
this._gen.toRed(this._prime).redPow(this._priv).fromRed(),
this.getPublicKey()
}
,
f.prototype.computeSecret = function(t) {
var n = new _((t = (t = new
e(t)).toRed(this._prime)).redPow(this._priv).fromRed().toArray())
, r = this.getPrime();
if (n.length < r.length) {
var i = new _(r.length - n.length);
i.fill(0),
n = _.concat([i, n])
}
return n
}
,
f.prototype.getPublicKey = function(e) {
return h(this._pub, e)
}
,
f.prototype.getPrivateKey = function(e) {
return h(this._priv, e)
}
,
f.prototype.getPrime = function(e) {
return h(this.__prime, e)
}
,
f.prototype.getGenerator = function(e) {
return h(this._gen, e)
}
,
f.prototype.setGenerator = function(t, n) {
return n = n || "utf8",
oe(t) || (t = new _(t,n)),
this.__gen = t,
this._gen = new e(t),
this
}
,
bl
}
var El = {
exports: {}
}
, Sl = {
exports: {}
};
!function(e) {
!function(e, t) {
function n(e, t) {
if (!e)
throw new Error(t || "Assertion failed")
}
function r(e, t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
function i(e, t, n) {
if (i.isBN(e))
return e;
this.negative = 0,
this.words = null,
this.length = 0,
this.red = null,
null !== e && ("le" !== t && "be" !== t || (n = t,
t = 10),
this._init(e || 0, t || 10, n || "be"))
}
var o;
"object" == typeof e ? e.exports = i : t.BN = i,
i.BN = i,
i.wordSize = 26;
try {
o = "undefined" != typeof window && void 0 !== window.Buffer ?
window.Buffer : de.Buffer
} catch (e) {}
function a(e, t) {
var r = e.charCodeAt(t);
return r >= 48 && r <= 57 ? r - 48 : r >= 65 && r <= 70 ? r - 55 : r
>= 97 && r <= 102 ? r - 87 : void n(!1, "Invalid character in " + e)
}
function s(e, t, n) {
var r = a(e, n);
return n - 1 >= t && (r |= a(e, n - 1) << 4),
r
}
function u(e, t, r, i) {
for (var o = 0, a = 0, s = Math.min(e.length, r), u = t; u < s; u++)
{
var l = e.charCodeAt(u) - 48;
o *= i,
a = l >= 49 ? l - 49 + 10 : l >= 17 ? l - 17 + 10 : l,
n(l >= 0 && a < i, "Invalid character"),
o += a
}
return o
}
function l(e, t) {
e.words = t.words,
e.length = t.length,
e.negative = t.negative,
e.red = t.red
}
if (i.isBN = function(e) {
return e instanceof i || null !== e && "object" == typeof e &&
e.constructor.wordSize === i.wordSize && Array.isArray(e.words)
}
,
i.max = function(e, t) {
return e.cmp(t) > 0 ? e : t
}
,
i.min = function(e, t) {
return e.cmp(t) < 0 ? e : t
}
,
i.prototype._init = function(e, t, r) {
if ("number" == typeof e)
return this._initNumber(e, t, r);
if ("object" == typeof e)
return this._initArray(e, t, r);
"hex" === t && (t = 16),
n(t === (0 | t) && t >= 2 && t <= 36);
var i = 0;
"-" === (e = e.toString().replace(/\s+/g, ""))[0] && (i++,
this.negative = 1),
i < e.length && (16 === t ? this._parseHex(e, i, r) :
(this._parseBase(e, t, i),
"le" === r && this._initArray(this.toArray(), t, r)))
}
,
i.prototype._initNumber = function(e, t, r) {
e < 0 && (this.negative = 1,
e = -e),
e < 67108864 ? (this.words = [67108863 & e],
this.length = 1) : e < 4503599627370496 ? (this.words =
[67108863 & e, e / 67108864 & 67108863],
this.length = 2) : (n(e < 9007199254740992),
this.words = [67108863 & e, e / 67108864 & 67108863, 1],
this.length = 3),
"le" === r && this._initArray(this.toArray(), t, r)
}
,
i.prototype._initArray = function(e, t, r) {
if (n("number" == typeof e.length),
e.length <= 0)
return this.words = [0],
this.length = 1,
this;
this.length = Math.ceil(e.length / 3),
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++)
this.words[i] = 0;
var o, a, s = 0;
if ("be" === r)
for (i = e.length - 1,
o = 0; i >= 0; i -= 3)
a = e[i] | e[i - 1] << 8 | e[i - 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
else if ("le" === r)
for (i = 0,
o = 0; i < e.length; i += 3)
a = e[i] | e[i + 1] << 8 | e[i + 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
return this._strip()
}
,
i.prototype._parseHex = function(e, t, n) {
this.length = Math.ceil((e.length - t) / 6),
this.words = new Array(this.length);
for (var r = 0; r < this.length; r++)
this.words[r] = 0;
var i, o = 0, a = 0;
if ("be" === n)
for (r = e.length - 1; r >= t; r -= 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
else
for (r = (e.length - t) % 2 == 0 ? t + 1 : t; r < e.length; r += 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
this._strip()
}
,
i.prototype._parseBase = function(e, t, n) {
this.words = [0],
this.length = 1;
for (var r = 0, i = 1; i <= 67108863; i *= t)
r++;
r--,
i = i / t | 0;
for (var o = e.length - n, a = o % r, s = Math.min(o, o - a) + n, l =
0, c = n; c < s; c += r)
l = u(e, c, c + r, t),
this.imuln(i),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l);
if (0 !== a) {
var d = 1;
for (l = u(e, c, e.length, t),
c = 0; c < a; c++)
d *= t;
this.imuln(d),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l)
}
this._strip()
}
,
i.prototype.copy = function(e) {
e.words = new Array(this.length);
for (var t = 0; t < this.length; t++)
e.words[t] = this.words[t];
e.length = this.length,
e.negative = this.negative,
e.red = this.red
}
,
i.prototype._move = function(e) {
l(e, this)
}
,
i.prototype.clone = function() {
var e = new i(null);
return this.copy(e),
e
}
,
i.prototype._expand = function(e) {
for (; this.length < e; )
this.words[this.length++] = 0;
return this
}
,
i.prototype._strip = function() {
for (; this.length > 1 && 0 === this.words[this.length - 1]; )
this.length--;
return this._normSign()
}
,
i.prototype._normSign = function() {
return 1 === this.length && 0 === this.words[0] &&
(this.negative = 0),
this
}
,
"undefined" != typeof Symbol && "function" == typeof Symbol.for)
try {
i.prototype[Symbol.for("nodejs.util.inspect.custom")] = c
} catch (e) {
i.prototype.inspect = c
}
else
i.prototype.inspect = c;
function c() {
return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">"
}
var d = ["", "0", "00", "000", "0000", "00000", "000000", "0000000",
"00000000", "000000000", "0000000000", "00000000000", "000000000000",
"0000000000000", "00000000000000", "000000000000000", "0000000000000000",
"00000000000000000", "000000000000000000", "0000000000000000000",
"00000000000000000000", "000000000000000000000", "0000000000000000000000",
"00000000000000000000000", "000000000000000000000000",
"0000000000000000000000000"]
, f = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
, h = [0, 0, 33554432, 43046721, 16777216, 48828125,
60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517,
7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101,
5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];
function p(e, t, n) {
n.negative = t.negative ^ e.negative;
var r = e.length + t.length | 0;
n.length = r,
r = r - 1 | 0;
var i = 0 | e.words[0]
, o = 0 | t.words[0]
,a=i*o
, s = 67108863 & a
, u = a / 67108864 | 0;
n.words[0] = s;
for (var l = 1; l < r; l++) {
for (var c = u >>> 26, d = 67108863 & u, f = Math.min(l,
t.length - 1), h = Math.max(0, l - e.length + 1); h <= f; h++) {
var p = l - h | 0;
c += (a = (i = 0 | e.words[p]) * (o = 0 | t.words[h]) + d) /
67108864 | 0,
d = 67108863 & a
}
n.words[l] = 0 | d,
u=0|c
}
return 0 !== u ? n.words[l] = 0 | u : n.length--,
n._strip()
}
i.prototype.toString = function(e, t) {
var r;
if (t = 0 | t || 1,
16 === (e = e || 10) || "hex" === e) {
r = "";
for (var i = 0, o = 0, a = 0; a < this.length; a++) {
var s = this.words[a]
, u = (16777215 & (s << i | o)).toString(16);
o = s >>> 24 - i & 16777215,
(i += 2) >= 26 && (i -= 26,
a--),
r = 0 !== o || a !== this.length - 1 ? d[6 - u.length] + u + r
:u+r
}
for (0 !== o && (r = o.toString(16) + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
if (e === (0 | e) && e >= 2 && e <= 36) {
var l = f[e]
, c = h[e];
r = "";
var p = this.clone();
for (p.negative = 0; !p.isZero(); ) {
var m = p.modrn(c).toString(e);
r = (p = p.idivn(c)).isZero() ? m + r : d[l - m.length] + m +
r
}
for (this.isZero() && (r = "0" + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
n(!1, "Base should be between 2 and 36")
}
,
i.prototype.toNumber = function() {
var e = this.words[0];
return 2 === this.length ? e += 67108864 * this.words[1] : 3 ===
this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 *
this.words[1] : this.length > 2 && n(!1, "Number can only safely store up to 53 bits"),
0 !== this.negative ? -e : e
}
,
i.prototype.toJSON = function() {
return this.toString(16, 2)
}
,
o && (i.prototype.toBuffer = function(e, t) {
return this.toArrayLike(o, e, t)
}
),
i.prototype.toArray = function(e, t) {
return this.toArrayLike(Array, e, t)
}
,
i.prototype.toArrayLike = function(e, t, r) {
this._strip();
var i = this.byteLength()
, o = r || Math.max(1, i);
n(i <= o, "byte array longer than desired length"),
n(o > 0, "Requested array length <= 0");
var a = function(e, t) {
return e.allocUnsafe ? e.allocUnsafe(t) : new e(t)
}(e, o);
return this["_toArrayLike" + ("le" === t ? "LE" : "BE")](a, i),
a
}
,
i.prototype._toArrayLikeLE = function(e, t) {
for (var n = 0, r = 0, i = 0, o = 0; i < this.length; i++) {
var a = this.words[i] << o | r;
e[n++] = 255 & a,
n < e.length && (e[n++] = a >> 8 & 255),
n < e.length && (e[n++] = a >> 16 & 255),
6 === o ? (n < e.length && (e[n++] = a >> 24 & 255),
r = 0,
o = 0) : (r = a >>> 24,
o += 2)
}
if (n < e.length)
for (e[n++] = r; n < e.length; )
e[n++] = 0
}
,
i.prototype._toArrayLikeBE = function(e, t) {
for (var n = e.length - 1, r = 0, i = 0, o = 0; i < this.length; i++) {
var a = this.words[i] << o | r;
e[n--] = 255 & a,
n >= 0 && (e[n--] = a >> 8 & 255),
n >= 0 && (e[n--] = a >> 16 & 255),
6 === o ? (n >= 0 && (e[n--] = a >> 24 & 255),
r = 0,
o = 0) : (r = a >>> 24,
o += 2)
}
if (n >= 0)
for (e[n--] = r; n >= 0; )
e[n--] = 0
}
,
Math.clz32 ? i.prototype._countBits = function(e) {
return 32 - Math.clz32(e)
}
: i.prototype._countBits = function(e) {
var t = e
, n = 0;
return t >= 4096 && (n += 13,
t >>>= 13),
t >= 64 && (n += 7,
t >>>= 7),
t >= 8 && (n += 4,
t >>>= 4),
t >= 2 && (n += 2,
t >>>= 2),
n+t
}
,
i.prototype._zeroBits = function(e) {
if (0 === e)
return 26;
var t = e
, n = 0;
return 0 == (8191 & t) && (n += 13,
t >>>= 13),
0 == (127 & t) && (n += 7,
t >>>= 7),
0 == (15 & t) && (n += 4,
t >>>= 4),
0 == (3 & t) && (n += 2,
t >>>= 2),
0 == (1 & t) && n++,
n
}
,
i.prototype.bitLength = function() {
var e = this.words[this.length - 1]
, t = this._countBits(e);
return 26 * (this.length - 1) + t
}
,
i.prototype.zeroBits = function() {
if (this.isZero())
return 0;
for (var e = 0, t = 0; t < this.length; t++) {
var n = this._zeroBits(this.words[t]);
if (e += n,
26 !== n)
break
}
return e
}
,
i.prototype.byteLength = function() {
return Math.ceil(this.bitLength() / 8)
}
,
i.prototype.toTwos = function(e) {
return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) :
this.clone()
}
,
i.prototype.fromTwos = function(e) {
return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone()
}
,
i.prototype.isNeg = function() {
return 0 !== this.negative
}
,
i.prototype.neg = function() {
return this.clone().ineg()
}
,
i.prototype.ineg = function() {
return this.isZero() || (this.negative ^= 1),
this
}
,
i.prototype.iuor = function(e) {
for (; this.length < e.length; )
this.words[this.length++] = 0;
for (var t = 0; t < e.length; t++)
this.words[t] = this.words[t] | e.words[t];
return this._strip()
}
,
i.prototype.ior = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuor(e)
}
,
i.prototype.or = function(e) {
return this.length > e.length ? this.clone().ior(e) :
e.clone().ior(this)
}
,
i.prototype.uor = function(e) {
return this.length > e.length ? this.clone().iuor(e) :
e.clone().iuor(this)
}
,
i.prototype.iuand = function(e) {
var t;
t = this.length > e.length ? e : this;
for (var n = 0; n < t.length; n++)
this.words[n] = this.words[n] & e.words[n];
return this.length = t.length,
this._strip()
}
,
i.prototype.iand = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuand(e)
}
,
i.prototype.and = function(e) {
return this.length > e.length ? this.clone().iand(e) :
e.clone().iand(this)
}
,
i.prototype.uand = function(e) {
return this.length > e.length ? this.clone().iuand(e) :
e.clone().iuand(this)
}
,
i.prototype.iuxor = function(e) {
var t, n;
this.length > e.length ? (t = this,
n = e) : (t = e,
n = this);
for (var r = 0; r < n.length; r++)
this.words[r] = t.words[r] ^ n.words[r];
if (this !== t)
for (; r < t.length; r++)
this.words[r] = t.words[r];
return this.length = t.length,
this._strip()
}
,
i.prototype.ixor = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuxor(e)
}
,
i.prototype.xor = function(e) {
return this.length > e.length ? this.clone().ixor(e) :
e.clone().ixor(this)
}
,
i.prototype.uxor = function(e) {
return this.length > e.length ? this.clone().iuxor(e) :
e.clone().iuxor(this)
}
,
i.prototype.inotn = function(e) {
n("number" == typeof e && e >= 0);
var t = 0 | Math.ceil(e / 26)
, r = e % 26;
this._expand(t),
r > 0 && t--;
for (var i = 0; i < t; i++)
this.words[i] = 67108863 & ~this.words[i];
return r > 0 && (this.words[i] = ~this.words[i] & 67108863 >> 26
- r),
this._strip()
}
,
i.prototype.notn = function(e) {
return this.clone().inotn(e)
}
,
i.prototype.setn = function(e, t) {
n("number" == typeof e && e >= 0);
var r = e / 26 | 0
, i = e % 26;
return this._expand(r + 1),
this.words[r] = t ? this.words[r] | 1 << i : this.words[r] & ~(1 << i),
this._strip()
}
,
i.prototype.iadd = function(e) {
var t, n, r;
if (0 !== this.negative && 0 === e.negative)
return this.negative = 0,
t = this.isub(e),
this.negative ^= 1,
this._normSign();
if (0 === this.negative && 0 !== e.negative)
return e.negative = 0,
t = this.isub(e),
e.negative = 1,
t._normSign();
this.length > e.length ? (n = this,
r = e) : (n = e,
r = this);
for (var i = 0, o = 0; o < r.length; o++)
t = (0 | n.words[o]) + (0 | r.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
for (; 0 !== i && o < n.length; o++)
t = (0 | n.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
if (this.length = n.length,
0 !== i)
this.words[this.length] = i,
this.length++;
else if (n !== this)
for (; o < n.length; o++)
this.words[o] = n.words[o];
return this
}
,
i.prototype.add = function(e) {
var t;
return 0 !== e.negative && 0 === this.negative ? (e.negative =
0,
t = this.sub(e),
e.negative ^= 1,
t) : 0 === e.negative && 0 !== this.negative ? (this.negative = 0,
t = e.sub(this),
this.negative = 1,
t) : this.length > e.length ? this.clone().iadd(e) :
e.clone().iadd(this)
}
,
i.prototype.isub = function(e) {
if (0 !== e.negative) {
e.negative = 0;
var t = this.iadd(e);
return e.negative = 1,
t._normSign()
}
if (0 !== this.negative)
return this.negative = 0,
this.iadd(e),
this.negative = 1,
this._normSign();
var n, r, i = this.cmp(e);
if (0 === i)
return this.negative = 0,
this.length = 1,
this.words[0] = 0,
this;
i > 0 ? (n = this,
r = e) : (n = e,
r = this);
for (var o = 0, a = 0; a < r.length; a++)
o = (t = (0 | n.words[a]) - (0 | r.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
for (; 0 !== o && a < n.length; a++)
o = (t = (0 | n.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
if (0 === o && a < n.length && n !== this)
for (; a < n.length; a++)
this.words[a] = n.words[a];
return this.length = Math.max(this.length, a),
n !== this && (this.negative = 1),
this._strip()
}
,
i.prototype.sub = function(e) {
return this.clone().isub(e)
}
;
var m = function(e, t, n) {
var r, i, o, a = e.words, s = t.words, u = n.words, l = 0, c = 0 |
a[0], d = 8191 & c, f = c >>> 13, h = 0 | a[1], p = 8191 & h, m = h >>> 13, g = 0 | a[2], v
= 8191 & g, b = g >>> 13, y = 0 | a[3], A = 8191 & y, w = y >>> 13, _ = 0 | a[4], E = 8191
& _, S = _ >>> 13, k = 0 | a[5], M = 8191 & k, C = k >>> 13, x = 0 | a[6], R = 8191 & x, T
= x >>> 13, I = 0 | a[7], P = 8191 & I, L = I >>> 13, O = 0 | a[8], N = 8191 & O, D = O
>>> 13, B = 0 | a[9], j = 8191 & B, z = B >>> 13, F = 0 | s[0], U = 8191 & F, K = F >>>
13, q = 0 | s[1], H = 8191 & q, V = q >>> 13, W = 0 | s[2], $ = 8191 & W, Y = W >>> 13,
Q = 0 | s[3], Z = 8191 & Q, G = Q >>> 13, X = 0 | s[4], J = 8191 & X, ee = X >>> 13, te =
0 | s[5], ne = 8191 & te, re = te >>> 13, ie = 0 | s[6], oe = 8191 & ie, ae = ie >>> 13, se =
0 | s[7], ue = 8191 & se, le = se >>> 13, ce = 0 | s[8], de = 8191 & ce, fe = ce >>> 13, he
= 0 | s[9], pe = 8191 & he, me = he >>> 13;
n.negative = e.negative ^ t.negative,
n.length = 19;
var ge = (l + (r = Math.imul(d, U)) | 0) + ((8191 & (i = (i =
Math.imul(d, K)) + Math.imul(f, U) | 0)) << 13) | 0;
l = ((o = Math.imul(f, K)) + (i >>> 13) | 0) + (ge >>> 26) | 0,
ge &= 67108863,
r = Math.imul(p, U),
i = (i = Math.imul(p, K)) + Math.imul(m, U) | 0,
o = Math.imul(m, K);
var ve = (l + (r = r + Math.imul(d, H) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, V) | 0) + Math.imul(f, H) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, V) | 0) + (i >>> 13) | 0) + (ve >>> 26) |
0,
ve &= 67108863,
r = Math.imul(v, U),
i = (i = Math.imul(v, K)) + Math.imul(b, U) | 0,
o = Math.imul(b, K),
r = r + Math.imul(p, H) | 0,
i = (i = i + Math.imul(p, V) | 0) + Math.imul(m, H) | 0,
o = o + Math.imul(m, V) | 0;
var be = (l + (r = r + Math.imul(d, $) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, Y) | 0) + Math.imul(f, $) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, Y) | 0) + (i >>> 13) | 0) + (be >>> 26) |
0,
be &= 67108863,
r = Math.imul(A, U),
i = (i = Math.imul(A, K)) + Math.imul(w, U) | 0,
o = Math.imul(w, K),
r = r + Math.imul(v, H) | 0,
i = (i = i + Math.imul(v, V) | 0) + Math.imul(b, H) | 0,
o = o + Math.imul(b, V) | 0,
r = r + Math.imul(p, $) | 0,
i = (i = i + Math.imul(p, Y) | 0) + Math.imul(m, $) | 0,
o = o + Math.imul(m, Y) | 0;
var ye = (l + (r = r + Math.imul(d, Z) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, G) | 0) + Math.imul(f, Z) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, G) | 0) + (i >>> 13) | 0) + (ye >>> 26) |
0,
ye &= 67108863,
r = Math.imul(E, U),
i = (i = Math.imul(E, K)) + Math.imul(S, U) | 0,
o = Math.imul(S, K),
r = r + Math.imul(A, H) | 0,
i = (i = i + Math.imul(A, V) | 0) + Math.imul(w, H) | 0,
o = o + Math.imul(w, V) | 0,
r = r + Math.imul(v, $) | 0,
i = (i = i + Math.imul(v, Y) | 0) + Math.imul(b, $) | 0,
o = o + Math.imul(b, Y) | 0,
r = r + Math.imul(p, Z) | 0,
i = (i = i + Math.imul(p, G) | 0) + Math.imul(m, Z) | 0,
o = o + Math.imul(m, G) | 0;
var Ae = (l + (r = r + Math.imul(d, J) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, ee) | 0) + Math.imul(f, J) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ee) | 0) + (i >>> 13) | 0) + (Ae >>> 26) |
0,
Ae &= 67108863,
r = Math.imul(M, U),
i = (i = Math.imul(M, K)) + Math.imul(C, U) | 0,
o = Math.imul(C, K),
r = r + Math.imul(E, H) | 0,
i = (i = i + Math.imul(E, V) | 0) + Math.imul(S, H) | 0,
o = o + Math.imul(S, V) | 0,
r = r + Math.imul(A, $) | 0,
i = (i = i + Math.imul(A, Y) | 0) + Math.imul(w, $) | 0,
o = o + Math.imul(w, Y) | 0,
r = r + Math.imul(v, Z) | 0,
i = (i = i + Math.imul(v, G) | 0) + Math.imul(b, Z) | 0,
o = o + Math.imul(b, G) | 0,
r = r + Math.imul(p, J) | 0,
i = (i = i + Math.imul(p, ee) | 0) + Math.imul(m, J) | 0,
o = o + Math.imul(m, ee) | 0;
var we = (l + (r = r + Math.imul(d, ne) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, re) | 0) + Math.imul(f, ne) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, re) | 0) + (i >>> 13) | 0) + (we >>> 26) |
0,
we &= 67108863,
r = Math.imul(R, U),
i = (i = Math.imul(R, K)) + Math.imul(T, U) | 0,
o = Math.imul(T, K),
r = r + Math.imul(M, H) | 0,
i = (i = i + Math.imul(M, V) | 0) + Math.imul(C, H) | 0,
o = o + Math.imul(C, V) | 0,
r = r + Math.imul(E, $) | 0,
i = (i = i + Math.imul(E, Y) | 0) + Math.imul(S, $) | 0,
o = o + Math.imul(S, Y) | 0,
r = r + Math.imul(A, Z) | 0,
i = (i = i + Math.imul(A, G) | 0) + Math.imul(w, Z) | 0,
o = o + Math.imul(w, G) | 0,
r = r + Math.imul(v, J) | 0,
i = (i = i + Math.imul(v, ee) | 0) + Math.imul(b, J) | 0,
o = o + Math.imul(b, ee) | 0,
r = r + Math.imul(p, ne) | 0,
i = (i = i + Math.imul(p, re) | 0) + Math.imul(m, ne) | 0,
o = o + Math.imul(m, re) | 0;
var _e = (l + (r = r + Math.imul(d, oe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, ae) | 0) + Math.imul(f, oe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ae) | 0) + (i >>> 13) | 0) + (_e >>> 26) |
0,
_e &= 67108863,
r = Math.imul(P, U),
i = (i = Math.imul(P, K)) + Math.imul(L, U) | 0,
o = Math.imul(L, K),
r = r + Math.imul(R, H) | 0,
i = (i = i + Math.imul(R, V) | 0) + Math.imul(T, H) | 0,
o = o + Math.imul(T, V) | 0,
r = r + Math.imul(M, $) | 0,
i = (i = i + Math.imul(M, Y) | 0) + Math.imul(C, $) | 0,
o = o + Math.imul(C, Y) | 0,
r = r + Math.imul(E, Z) | 0,
i = (i = i + Math.imul(E, G) | 0) + Math.imul(S, Z) | 0,
o = o + Math.imul(S, G) | 0,
r = r + Math.imul(A, J) | 0,
i = (i = i + Math.imul(A, ee) | 0) + Math.imul(w, J) | 0,
o = o + Math.imul(w, ee) | 0,
r = r + Math.imul(v, ne) | 0,
i = (i = i + Math.imul(v, re) | 0) + Math.imul(b, ne) | 0,
o = o + Math.imul(b, re) | 0,
r = r + Math.imul(p, oe) | 0,
i = (i = i + Math.imul(p, ae) | 0) + Math.imul(m, oe) | 0,
o = o + Math.imul(m, ae) | 0;
var Ee = (l + (r = r + Math.imul(d, ue) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, le) | 0) + Math.imul(f, ue) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, le) | 0) + (i >>> 13) | 0) + (Ee >>> 26) |
0,
Ee &= 67108863,
r = Math.imul(N, U),
i = (i = Math.imul(N, K)) + Math.imul(D, U) | 0,
o = Math.imul(D, K),
r = r + Math.imul(P, H) | 0,
i = (i = i + Math.imul(P, V) | 0) + Math.imul(L, H) | 0,
o = o + Math.imul(L, V) | 0,
r = r + Math.imul(R, $) | 0,
i = (i = i + Math.imul(R, Y) | 0) + Math.imul(T, $) | 0,
o = o + Math.imul(T, Y) | 0,
r = r + Math.imul(M, Z) | 0,
i = (i = i + Math.imul(M, G) | 0) + Math.imul(C, Z) | 0,
o = o + Math.imul(C, G) | 0,
r = r + Math.imul(E, J) | 0,
i = (i = i + Math.imul(E, ee) | 0) + Math.imul(S, J) | 0,
o = o + Math.imul(S, ee) | 0,
r = r + Math.imul(A, ne) | 0,
i = (i = i + Math.imul(A, re) | 0) + Math.imul(w, ne) | 0,
o = o + Math.imul(w, re) | 0,
r = r + Math.imul(v, oe) | 0,
i = (i = i + Math.imul(v, ae) | 0) + Math.imul(b, oe) | 0,
o = o + Math.imul(b, ae) | 0,
r = r + Math.imul(p, ue) | 0,
i = (i = i + Math.imul(p, le) | 0) + Math.imul(m, ue) | 0,
o = o + Math.imul(m, le) | 0;
var Se = (l + (r = r + Math.imul(d, de) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, fe) | 0) + Math.imul(f, de) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, fe) | 0) + (i >>> 13) | 0) + (Se >>> 26) |
0,
Se &= 67108863,
r = Math.imul(j, U),
i = (i = Math.imul(j, K)) + Math.imul(z, U) | 0,
o = Math.imul(z, K),
r = r + Math.imul(N, H) | 0,
i = (i = i + Math.imul(N, V) | 0) + Math.imul(D, H) | 0,
o = o + Math.imul(D, V) | 0,
r = r + Math.imul(P, $) | 0,
i = (i = i + Math.imul(P, Y) | 0) + Math.imul(L, $) | 0,
o = o + Math.imul(L, Y) | 0,
r = r + Math.imul(R, Z) | 0,
i = (i = i + Math.imul(R, G) | 0) + Math.imul(T, Z) | 0,
o = o + Math.imul(T, G) | 0,
r = r + Math.imul(M, J) | 0,
i = (i = i + Math.imul(M, ee) | 0) + Math.imul(C, J) | 0,
o = o + Math.imul(C, ee) | 0,
r = r + Math.imul(E, ne) | 0,
i = (i = i + Math.imul(E, re) | 0) + Math.imul(S, ne) | 0,
o = o + Math.imul(S, re) | 0,
r = r + Math.imul(A, oe) | 0,
i = (i = i + Math.imul(A, ae) | 0) + Math.imul(w, oe) | 0,
o = o + Math.imul(w, ae) | 0,
r = r + Math.imul(v, ue) | 0,
i = (i = i + Math.imul(v, le) | 0) + Math.imul(b, ue) | 0,
o = o + Math.imul(b, le) | 0,
r = r + Math.imul(p, de) | 0,
i = (i = i + Math.imul(p, fe) | 0) + Math.imul(m, de) | 0,
o = o + Math.imul(m, fe) | 0;
var ke = (l + (r = r + Math.imul(d, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, me) | 0) + Math.imul(f, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, me) | 0) + (i >>> 13) | 0) + (ke >>> 26) |
0,
ke &= 67108863,
r = Math.imul(j, H),
i = (i = Math.imul(j, V)) + Math.imul(z, H) | 0,
o = Math.imul(z, V),
r = r + Math.imul(N, $) | 0,
i = (i = i + Math.imul(N, Y) | 0) + Math.imul(D, $) | 0,
o = o + Math.imul(D, Y) | 0,
r = r + Math.imul(P, Z) | 0,
i = (i = i + Math.imul(P, G) | 0) + Math.imul(L, Z) | 0,
o = o + Math.imul(L, G) | 0,
r = r + Math.imul(R, J) | 0,
i = (i = i + Math.imul(R, ee) | 0) + Math.imul(T, J) | 0,
o = o + Math.imul(T, ee) | 0,
r = r + Math.imul(M, ne) | 0,
i = (i = i + Math.imul(M, re) | 0) + Math.imul(C, ne) | 0,
o = o + Math.imul(C, re) | 0,
r = r + Math.imul(E, oe) | 0,
i = (i = i + Math.imul(E, ae) | 0) + Math.imul(S, oe) | 0,
o = o + Math.imul(S, ae) | 0,
r = r + Math.imul(A, ue) | 0,
i = (i = i + Math.imul(A, le) | 0) + Math.imul(w, ue) | 0,
o = o + Math.imul(w, le) | 0,
r = r + Math.imul(v, de) | 0,
i = (i = i + Math.imul(v, fe) | 0) + Math.imul(b, de) | 0,
o = o + Math.imul(b, fe) | 0;
var Me = (l + (r = r + Math.imul(p, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(p, me) | 0) + Math.imul(m, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(m, me) | 0) + (i >>> 13) | 0) + (Me >>>
26) | 0,
Me &= 67108863,
r = Math.imul(j, $),
i = (i = Math.imul(j, Y)) + Math.imul(z, $) | 0,
o = Math.imul(z, Y),
r = r + Math.imul(N, Z) | 0,
i = (i = i + Math.imul(N, G) | 0) + Math.imul(D, Z) | 0,
o = o + Math.imul(D, G) | 0,
r = r + Math.imul(P, J) | 0,
i = (i = i + Math.imul(P, ee) | 0) + Math.imul(L, J) | 0,
o = o + Math.imul(L, ee) | 0,
r = r + Math.imul(R, ne) | 0,
i = (i = i + Math.imul(R, re) | 0) + Math.imul(T, ne) | 0,
o = o + Math.imul(T, re) | 0,
r = r + Math.imul(M, oe) | 0,
i = (i = i + Math.imul(M, ae) | 0) + Math.imul(C, oe) | 0,
o = o + Math.imul(C, ae) | 0,
r = r + Math.imul(E, ue) | 0,
i = (i = i + Math.imul(E, le) | 0) + Math.imul(S, ue) | 0,
o = o + Math.imul(S, le) | 0,
r = r + Math.imul(A, de) | 0,
i = (i = i + Math.imul(A, fe) | 0) + Math.imul(w, de) | 0,
o = o + Math.imul(w, fe) | 0;
var Ce = (l + (r = r + Math.imul(v, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(v, me) | 0) + Math.imul(b, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(b, me) | 0) + (i >>> 13) | 0) + (Ce >>> 26)
| 0,
Ce &= 67108863,
r = Math.imul(j, Z),
i = (i = Math.imul(j, G)) + Math.imul(z, Z) | 0,
o = Math.imul(z, G),
r = r + Math.imul(N, J) | 0,
i = (i = i + Math.imul(N, ee) | 0) + Math.imul(D, J) | 0,
o = o + Math.imul(D, ee) | 0,
r = r + Math.imul(P, ne) | 0,
i = (i = i + Math.imul(P, re) | 0) + Math.imul(L, ne) | 0,
o = o + Math.imul(L, re) | 0,
r = r + Math.imul(R, oe) | 0,
i = (i = i + Math.imul(R, ae) | 0) + Math.imul(T, oe) | 0,
o = o + Math.imul(T, ae) | 0,
r = r + Math.imul(M, ue) | 0,
i = (i = i + Math.imul(M, le) | 0) + Math.imul(C, ue) | 0,
o = o + Math.imul(C, le) | 0,
r = r + Math.imul(E, de) | 0,
i = (i = i + Math.imul(E, fe) | 0) + Math.imul(S, de) | 0,
o = o + Math.imul(S, fe) | 0;
var xe = (l + (r = r + Math.imul(A, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(A, me) | 0) + Math.imul(w, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(w, me) | 0) + (i >>> 13) | 0) + (xe >>> 26)
| 0,
xe &= 67108863,
r = Math.imul(j, J),
i = (i = Math.imul(j, ee)) + Math.imul(z, J) | 0,
o = Math.imul(z, ee),
r = r + Math.imul(N, ne) | 0,
i = (i = i + Math.imul(N, re) | 0) + Math.imul(D, ne) | 0,
o = o + Math.imul(D, re) | 0,
r = r + Math.imul(P, oe) | 0,
i = (i = i + Math.imul(P, ae) | 0) + Math.imul(L, oe) | 0,
o = o + Math.imul(L, ae) | 0,
r = r + Math.imul(R, ue) | 0,
i = (i = i + Math.imul(R, le) | 0) + Math.imul(T, ue) | 0,
o = o + Math.imul(T, le) | 0,
r = r + Math.imul(M, de) | 0,
i = (i = i + Math.imul(M, fe) | 0) + Math.imul(C, de) | 0,
o = o + Math.imul(C, fe) | 0;
var Re = (l + (r = r + Math.imul(E, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(E, me) | 0) + Math.imul(S, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(S, me) | 0) + (i >>> 13) | 0) + (Re >>>
26) | 0,
Re &= 67108863,
r = Math.imul(j, ne),
i = (i = Math.imul(j, re)) + Math.imul(z, ne) | 0,
o = Math.imul(z, re),
r = r + Math.imul(N, oe) | 0,
i = (i = i + Math.imul(N, ae) | 0) + Math.imul(D, oe) | 0,
o = o + Math.imul(D, ae) | 0,
r = r + Math.imul(P, ue) | 0,
i = (i = i + Math.imul(P, le) | 0) + Math.imul(L, ue) | 0,
o = o + Math.imul(L, le) | 0,
r = r + Math.imul(R, de) | 0,
i = (i = i + Math.imul(R, fe) | 0) + Math.imul(T, de) | 0,
o = o + Math.imul(T, fe) | 0;
var Te = (l + (r = r + Math.imul(M, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(M, me) | 0) + Math.imul(C, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(C, me) | 0) + (i >>> 13) | 0) + (Te >>> 26)
| 0,
Te &= 67108863,
r = Math.imul(j, oe),
i = (i = Math.imul(j, ae)) + Math.imul(z, oe) | 0,
o = Math.imul(z, ae),
r = r + Math.imul(N, ue) | 0,
i = (i = i + Math.imul(N, le) | 0) + Math.imul(D, ue) | 0,
o = o + Math.imul(D, le) | 0,
r = r + Math.imul(P, de) | 0,
i = (i = i + Math.imul(P, fe) | 0) + Math.imul(L, de) | 0,
o = o + Math.imul(L, fe) | 0;
var Ie = (l + (r = r + Math.imul(R, pe) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(R, me) | 0) + Math.imul(T, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(T, me) | 0) + (i >>> 13) | 0) + (Ie >>> 26) |
0,
Ie &= 67108863,
r = Math.imul(j, ue),
i = (i = Math.imul(j, le)) + Math.imul(z, ue) | 0,
o = Math.imul(z, le),
r = r + Math.imul(N, de) | 0,
i = (i = i + Math.imul(N, fe) | 0) + Math.imul(D, de) | 0,
o = o + Math.imul(D, fe) | 0;
var Pe = (l + (r = r + Math.imul(P, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(P, me) | 0) + Math.imul(L, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(L, me) | 0) + (i >>> 13) | 0) + (Pe >>> 26)
| 0,
Pe &= 67108863,
r = Math.imul(j, de),
i = (i = Math.imul(j, fe)) + Math.imul(z, de) | 0,
o = Math.imul(z, fe);
var Le = (l + (r = r + Math.imul(N, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(N, me) | 0) + Math.imul(D, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(D, me) | 0) + (i >>> 13) | 0) + (Le >>> 26)
| 0,
Le &= 67108863;
var Oe = (l + (r = Math.imul(j, pe)) | 0) + ((8191 & (i = (i =
Math.imul(j, me)) + Math.imul(z, pe) | 0)) << 13) | 0;
return l = ((o = Math.imul(z, me)) + (i >>> 13) | 0) + (Oe >>> 26)
| 0,
Oe &= 67108863,
u[0] = ge,
u[1] = ve,
u[2] = be,
u[3] = ye,
u[4] = Ae,
u[5] = we,
u[6] = _e,
u[7] = Ee,
u[8] = Se,
u[9] = ke,
u[10] = Me,
u[11] = Ce,
u[12] = xe,
u[13] = Re,
u[14] = Te,
u[15] = Ie,
u[16] = Pe,
u[17] = Le,
u[18] = Oe,
0 !== l && (u[19] = l,
n.length++),
n
};
function g(e, t, n) {
n.negative = t.negative ^ e.negative,
n.length = e.length + t.length;
for (var r = 0, i = 0, o = 0; o < n.length - 1; o++) {
var a = i;
i = 0;
for (var s = 67108863 & r, u = Math.min(o, t.length - 1), l =
Math.max(0, o - e.length + 1); l <= u; l++) {
var c = o - l
, d = (0 | e.words[c]) * (0 | t.words[l])
, f = 67108863 & d;
s = 67108863 & (f = f + s | 0),
i += (a = (a = a + (d / 67108864 | 0) | 0) + (f >>> 26) | 0)
>>> 26,
a &= 67108863
}
n.words[o] = s,
r = a,
a=i
}
return 0 !== r ? n.words[o] = r : n.length--,
n._strip()
}
function v(e, t, n) {
return g(e, t, n)
}
Math.imul || (m = p),
i.prototype.mulTo = function(e, t) {
var n = this.length + e.length;
return 10 === this.length && 10 === e.length ? m(this, e, t) : n <
63 ? p(this, e, t) : n < 1024 ? g(this, e, t) : v(this, e, t)
}
,
i.prototype.mul = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
this.mulTo(e, t)
}
,
i.prototype.mulf = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
v(this, e, t)
}
,
i.prototype.imul = function(e) {
return this.clone().mulTo(e, this)
}
,
i.prototype.imuln = function(e) {
var t = e < 0;
t && (e = -e),
n("number" == typeof e),
n(e < 67108864);
for (var r = 0, i = 0; i < this.length; i++) {
var o = (0 | this.words[i]) * e
, a = (67108863 & o) + (67108863 & r);
r >>= 26,
r += o / 67108864 | 0,
r += a >>> 26,
this.words[i] = 67108863 & a
}
return 0 !== r && (this.words[i] = r,
this.length++),
t ? this.ineg() : this
}
,
i.prototype.muln = function(e) {
return this.clone().imuln(e)
}
,
i.prototype.sqr = function() {
return this.mul(this)
}
,
i.prototype.isqr = function() {
return this.imul(this.clone())
}
,
i.prototype.pow = function(e) {
var t = function(e) {
for (var t = new Array(e.bitLength()), n = 0; n < t.length; n++)
{
var r = n / 26 | 0
, i = n % 26;
t[n] = e.words[r] >>> i & 1
}
return t
}(e);
if (0 === t.length)
return new i(1);
for (var n = this, r = 0; r < t.length && 0 === t[r]; r++,
n = n.sqr())
;
if (++r < t.length)
for (var o = n.sqr(); r < t.length; r++,
o = o.sqr())
0 !== t[r] && (n = n.mul(o));
return n
}
,
i.prototype.iushln = function(e) {
n("number" == typeof e && e >= 0);
var t, r = e % 26, i = (e - r) / 26, o = 67108863 >>> 26 - r << 26 -
r;
if (0 !== r) {
var a = 0;
for (t = 0; t < this.length; t++) {
var s = this.words[t] & o
, u = (0 | this.words[t]) - s << r;
this.words[t] = u | a,
a = s >>> 26 - r
}
a && (this.words[t] = a,
this.length++)
}
if (0 !== i) {
for (t = this.length - 1; t >= 0; t--)
this.words[t + i] = this.words[t];
for (t = 0; t < i; t++)
this.words[t] = 0;
this.length += i
}
return this._strip()
}
,
i.prototype.ishln = function(e) {
return n(0 === this.negative),
this.iushln(e)
}
,
i.prototype.iushrn = function(e, t, r) {
var i;
n("number" == typeof e && e >= 0),
i = t ? (t - t % 26) / 26 : 0;
var o = e % 26
, a = Math.min((e - o) / 26, this.length)
, s = 67108863 ^ 67108863 >>> o << o
, u = r;
if (i -= a,
i = Math.max(0, i),
u) {
for (var l = 0; l < a; l++)
u.words[l] = this.words[l];
u.length = a
}
if (0 === a)
;
else if (this.length > a)
for (this.length -= a,
l = 0; l < this.length; l++)
this.words[l] = this.words[l + a];
else
this.words[0] = 0,
this.length = 1;
var c = 0;
for (l = this.length - 1; l >= 0 && (0 !== c || l >= i); l--) {
var d = 0 | this.words[l];
this.words[l] = c << 26 - o | d >>> o,
c=d&s
}
return u && 0 !== c && (u.words[u.length++] = c),
0 === this.length && (this.words[0] = 0,
this.length = 1),
this._strip()
}
,
i.prototype.ishrn = function(e, t, r) {
return n(0 === this.negative),
this.iushrn(e, t, r)
}
,
i.prototype.shln = function(e) {
return this.clone().ishln(e)
}
,
i.prototype.ushln = function(e) {
return this.clone().iushln(e)
}
,
i.prototype.shrn = function(e) {
return this.clone().ishrn(e)
}
,
i.prototype.ushrn = function(e) {
return this.clone().iushrn(e)
}
,
i.prototype.testn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
return !(this.length <= r) && !!(this.words[r] & i)
}
,
i.prototype.imaskn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26;
if (n(0 === this.negative, "imaskn works only with positive
numbers"),
this.length <= r)
return this;
if (0 !== t && r++,
this.length = Math.min(r, this.length),
0 !== t) {
var i = 67108863 ^ 67108863 >>> t << t;
this.words[this.length - 1] &= i
}
return this._strip()
}
,
i.prototype.maskn = function(e) {
return this.clone().imaskn(e)
}
,
i.prototype.iaddn = function(e) {
return n("number" == typeof e),
n(e < 67108864),
e < 0 ? this.isubn(-e) : 0 !== this.negative ? 1 === this.length &&
(0 | this.words[0]) <= e ? (this.words[0] = e - (0 | this.words[0]),
this.negative = 0,
this) : (this.negative = 0,
this.isubn(e),
this.negative = 1,
this) : this._iaddn(e)
}
,
i.prototype._iaddn = function(e) {
this.words[0] += e;
for (var t = 0; t < this.length && this.words[t] >= 67108864; t++)
this.words[t] -= 67108864,
t === this.length - 1 ? this.words[t + 1] = 1 : this.words[t +
1]++;
return this.length = Math.max(this.length, t + 1),
this
}
,
i.prototype.isubn = function(e) {
if (n("number" == typeof e),
n(e < 67108864),
e < 0)
return this.iaddn(-e);
if (0 !== this.negative)
return this.negative = 0,
this.iaddn(e),
this.negative = 1,
this;
if (this.words[0] -= e,
1 === this.length && this.words[0] < 0)
this.words[0] = -this.words[0],
this.negative = 1;
else
for (var t = 0; t < this.length && this.words[t] < 0; t++)
this.words[t] += 67108864,
this.words[t + 1] -= 1;
return this._strip()
}
,
i.prototype.addn = function(e) {
return this.clone().iaddn(e)
}
,
i.prototype.subn = function(e) {
return this.clone().isubn(e)
}
,
i.prototype.iabs = function() {
return this.negative = 0,
this
}
,
i.prototype.abs = function() {
return this.clone().iabs()
}
,
i.prototype._ishlnsubmul = function(e, t, r) {
var i, o, a = e.length + r;
this._expand(a);
var s = 0;
for (i = 0; i < e.length; i++) {
o = (0 | this.words[i + r]) + s;
var u = (0 | e.words[i]) * t;
s = ((o -= 67108863 & u) >> 26) - (u / 67108864 | 0),
this.words[i + r] = 67108863 & o
}
for (; i < this.length - r; i++)
s = (o = (0 | this.words[i + r]) + s) >> 26,
this.words[i + r] = 67108863 & o;
if (0 === s)
return this._strip();
for (n(-1 === s),
s = 0,
i = 0; i < this.length; i++)
s = (o = -(0 | this.words[i]) + s) >> 26,
this.words[i] = 67108863 & o;
return this.negative = 1,
this._strip()
}
,
i.prototype._wordDiv = function(e, t) {
var n = (this.length,
e.length)
, r = this.clone()
,o=e
, a = 0 | o.words[o.length - 1];
0 !== (n = 26 - this._countBits(a)) && (o = o.ushln(n),
r.iushln(n),
a = 0 | o.words[o.length - 1]);
var s, u = r.length - o.length;
if ("mod" !== t) {
(s = new i(null)).length = u + 1,
s.words = new Array(s.length);
for (var l = 0; l < s.length; l++)
s.words[l] = 0
}
var c = r.clone()._ishlnsubmul(o, 1, u);
0 === c.negative && (r = c,
s && (s.words[u] = 1));
for (var d = u - 1; d >= 0; d--) {
var f = 67108864 * (0 | r.words[o.length + d]) + (0 |
r.words[o.length + d - 1]);
for (f = Math.min(f / a | 0, 67108863),
r._ishlnsubmul(o, f, d); 0 !== r.negative; )
f--,
r.negative = 0,
r._ishlnsubmul(o, 1, d),
r.isZero() || (r.negative ^= 1);
s && (s.words[d] = f)
}
return s && s._strip(),
r._strip(),
"div" !== t && 0 !== n && r.iushrn(n),
{
div: s || null,
mod: r
}
}
,
i.prototype.divmod = function(e, t, r) {
return n(!e.isZero()),
this.isZero() ? {
div: new i(0),
mod: new i(0)
} : 0 !== this.negative && 0 === e.negative ? (s =
this.neg().divmod(e, t),
"mod" !== t && (o = s.div.neg()),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.iadd(e)),
{
div: o,
mod: a
}) : 0 === this.negative && 0 !== e.negative ? (s =
this.divmod(e.neg(), t),
"mod" !== t && (o = s.div.neg()),
{
div: o,
mod: s.mod
}) : 0 != (this.negative & e.negative) ? (s =
this.neg().divmod(e.neg(), t),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.isub(e)),
{
div: s.div,
mod: a
}) : e.length > this.length || this.cmp(e) < 0 ? {
div: new i(0),
mod: this
} : 1 === e.length ? "div" === t ? {
div: this.divn(e.words[0]),
mod: null
} : "mod" === t ? {
div: null,
mod: new i(this.modrn(e.words[0]))
}:{
div: this.divn(e.words[0]),
mod: new i(this.modrn(e.words[0]))
} : this._wordDiv(e, t);
var o, a, s
}
,
i.prototype.div = function(e) {
return this.divmod(e, "div", !1).div
}
,
i.prototype.mod = function(e) {
return this.divmod(e, "mod", !1).mod
}
,
i.prototype.umod = function(e) {
return this.divmod(e, "mod", !0).mod
}
,
i.prototype.divRound = function(e) {
var t = this.divmod(e);
if (t.mod.isZero())
return t.div;
var n = 0 !== t.div.negative ? t.mod.isub(e) : t.mod
, r = e.ushrn(1)
, i = e.andln(1)
, o = n.cmp(r);
return o < 0 || 1 === i && 0 === o ? t.div : 0 !== t.div.negative ?
t.div.isubn(1) : t.div.iaddn(1)
}
,
i.prototype.modrn = function(e) {
var t = e < 0;
t && (e = -e),
n(e <= 67108863);
for (var r = (1 << 26) % e, i = 0, o = this.length - 1; o >= 0; o--)
i = (r * i + (0 | this.words[o])) % e;
return t ? -i : i
}
,
i.prototype.modn = function(e) {
return this.modrn(e)
}
,
i.prototype.idivn = function(e) {
var t = e < 0;
t && (e = -e),
n(e <= 67108863);
for (var r = 0, i = this.length - 1; i >= 0; i--) {
var o = (0 | this.words[i]) + 67108864 * r;
this.words[i] = o / e | 0,
r=o%e
}
return this._strip(),
t ? this.ineg() : this
}
,
i.prototype.divn = function(e) {
return this.clone().idivn(e)
}
,
i.prototype.egcd = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o = new i(1), a = new i(0), s = new i(0), u = new i(1), l =
0; t.isEven() && r.isEven(); )
t.iushrn(1),
r.iushrn(1),
++l;
for (var c = r.clone(), d = t.clone(); !t.isZero(); ) {
for (var f = 0, h = 1; 0 == (t.words[0] & h) && f < 26; ++f,
h <<= 1)
;
if (f > 0)
for (t.iushrn(f); f-- > 0; )
(o.isOdd() || a.isOdd()) && (o.iadd(c),
a.isub(d)),
o.iushrn(1),
a.iushrn(1);
for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p,
m <<= 1)
;
if (p > 0)
for (r.iushrn(p); p-- > 0; )
(s.isOdd() || u.isOdd()) && (s.iadd(c),
u.isub(d)),
s.iushrn(1),
u.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
o.isub(s),
a.isub(u)) : (r.isub(t),
s.isub(o),
u.isub(a))
}
return {
a: s,
b: u,
gcd: r.iushln(l)
}
}
,
i.prototype._invmp = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o, a = new i(1), s = new i(0), u = r.clone(); t.cmpn(1) > 0
&& r.cmpn(1) > 0; ) {
for (var l = 0, c = 1; 0 == (t.words[0] & c) && l < 26; ++l,
c <<= 1)
;
if (l > 0)
for (t.iushrn(l); l-- > 0; )
a.isOdd() && a.iadd(u),
a.iushrn(1);
for (var d = 0, f = 1; 0 == (r.words[0] & f) && d < 26; ++d,
f <<= 1)
;
if (d > 0)
for (r.iushrn(d); d-- > 0; )
s.isOdd() && s.iadd(u),
s.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
a.isub(s)) : (r.isub(t),
s.isub(a))
}
return (o = 0 === t.cmpn(1) ? a : s).cmpn(0) < 0 && o.iadd(e),
o
}
,
i.prototype.gcd = function(e) {
if (this.isZero())
return e.abs();
if (e.isZero())
return this.abs();
var t = this.clone()
, n = e.clone();
t.negative = 0,
n.negative = 0;
for (var r = 0; t.isEven() && n.isEven(); r++)
t.iushrn(1),
n.iushrn(1);
for (; ; ) {
for (; t.isEven(); )
t.iushrn(1);
for (; n.isEven(); )
n.iushrn(1);
var i = t.cmp(n);
if (i < 0) {
var o = t;
t = n,
n=o
} else if (0 === i || 0 === n.cmpn(1))
break;
t.isub(n)
}
return n.iushln(r)
}
,
i.prototype.invm = function(e) {
return this.egcd(e).a.umod(e)
}
,
i.prototype.isEven = function() {
return 0 == (1 & this.words[0])
}
,
i.prototype.isOdd = function() {
return 1 == (1 & this.words[0])
}
,
i.prototype.andln = function(e) {
return this.words[0] & e
}
,
i.prototype.bincn = function(e) {
n("number" == typeof e);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
if (this.length <= r)
return this._expand(r + 1),
this.words[r] |= i,
this;
for (var o = i, a = r; 0 !== o && a < this.length; a++) {
var s = 0 | this.words[a];
o = (s += o) >>> 26,
s &= 67108863,
this.words[a] = s
}
return 0 !== o && (this.words[a] = o,
this.length++),
this
}
,
i.prototype.isZero = function() {
return 1 === this.length && 0 === this.words[0]
}
,
i.prototype.cmpn = function(e) {
var t, r = e < 0;
if (0 !== this.negative && !r)
return -1;
if (0 === this.negative && r)
return 1;
if (this._strip(),
this.length > 1)
t = 1;
else {
r && (e = -e),
n(e <= 67108863, "Number is too big");
var i = 0 | this.words[0];
t = i === e ? 0 : i < e ? -1 : 1
}
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.cmp = function(e) {
if (0 !== this.negative && 0 === e.negative)
return -1;
if (0 === this.negative && 0 !== e.negative)
return 1;
var t = this.ucmp(e);
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.ucmp = function(e) {
if (this.length > e.length)
return 1;
if (this.length < e.length)
return -1;
for (var t = 0, n = this.length - 1; n >= 0; n--) {
var r = 0 | this.words[n]
, i = 0 | e.words[n];
if (r !== i) {
r < i ? t = -1 : r > i && (t = 1);
break
}
}
return t
}
,
i.prototype.gtn = function(e) {
return 1 === this.cmpn(e)
}
,
i.prototype.gt = function(e) {
return 1 === this.cmp(e)
}
,
i.prototype.gten = function(e) {
return this.cmpn(e) >= 0
}
,
i.prototype.gte = function(e) {
return this.cmp(e) >= 0
}
,
i.prototype.ltn = function(e) {
return -1 === this.cmpn(e)
}
,
i.prototype.lt = function(e) {
return -1 === this.cmp(e)
}
,
i.prototype.lten = function(e) {
return this.cmpn(e) <= 0
}
,
i.prototype.lte = function(e) {
return this.cmp(e) <= 0
}
,
i.prototype.eqn = function(e) {
return 0 === this.cmpn(e)
}
,
i.prototype.eq = function(e) {
return 0 === this.cmp(e)
}
,
i.red = function(e) {
return new S(e)
}
,
i.prototype.toRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
n(0 === this.negative, "red works only with positives"),
e.convertTo(this)._forceRed(e)
}
,
i.prototype.fromRed = function() {
return n(this.red, "fromRed works only with numbers in
reduction context"),
this.red.convertFrom(this)
}
,
i.prototype._forceRed = function(e) {
return this.red = e,
this
}
,
i.prototype.forceRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
this._forceRed(e)
}
,
i.prototype.redAdd = function(e) {
return n(this.red, "redAdd works only with red numbers"),
this.red.add(this, e)
}
,
i.prototype.redIAdd = function(e) {
return n(this.red, "redIAdd works only with red numbers"),
this.red.iadd(this, e)
}
,
i.prototype.redSub = function(e) {
return n(this.red, "redSub works only with red numbers"),
this.red.sub(this, e)
}
,
i.prototype.redISub = function(e) {
return n(this.red, "redISub works only with red numbers"),
this.red.isub(this, e)
}
,
i.prototype.redShl = function(e) {
return n(this.red, "redShl works only with red numbers"),
this.red.shl(this, e)
}
,
i.prototype.redMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.mul(this, e)
}
,
i.prototype.redIMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.imul(this, e)
}
,
i.prototype.redSqr = function() {
return n(this.red, "redSqr works only with red numbers"),
this.red._verify1(this),
this.red.sqr(this)
}
,
i.prototype.redISqr = function() {
return n(this.red, "redISqr works only with red numbers"),
this.red._verify1(this),
this.red.isqr(this)
}
,
i.prototype.redSqrt = function() {
return n(this.red, "redSqrt works only with red numbers"),
this.red._verify1(this),
this.red.sqrt(this)
}
,
i.prototype.redInvm = function() {
return n(this.red, "redInvm works only with red numbers"),
this.red._verify1(this),
this.red.invm(this)
}
,
i.prototype.redNeg = function() {
return n(this.red, "redNeg works only with red numbers"),
this.red._verify1(this),
this.red.neg(this)
}
,
i.prototype.redPow = function(e) {
return n(this.red && !e.red, "redPow(normalNum)"),
this.red._verify1(this),
this.red.pow(this, e)
}
;
var b = {
k256: null,
p224: null,
p192: null,
p25519: null
};
function y(e, t) {
this.name = e,
this.p = new i(t,16),
this.n = this.p.bitLength(),
this.k = new i(1).iushln(this.n).isub(this.p),
this.tmp = this._tmp()
}
function A() {
y.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
fffffc2f")
}
function w() {
y.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000
00000001")
}
function _() {
y.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")
}
function E() {
y.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")
}
function S(e) {
if ("string" == typeof e) {
var t = i._prime(e);
this.m = t.p,
this.prime = t
} else
n(e.gtn(1), "modulus must be greater than 1"),
this.m = e,
this.prime = null
}
function k(e) {
S.call(this, e),
this.shift = this.m.bitLength(),
this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26),
this.r = new i(1).iushln(this.shift),
this.r2 = this.imod(this.r.sqr()),
this.rinv = this.r._invmp(this.m),
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m),
this.minv = this.minv.umod(this.r),
this.minv = this.r.sub(this.minv)
}
y.prototype._tmp = function() {
var e = new i(null);
return e.words = new Array(Math.ceil(this.n / 13)),
e
}
,
y.prototype.ireduce = function(e) {
var t, n = e;
do {
this.split(n, this.tmp),
t = (n = (n = this.imulK(n)).iadd(this.tmp)).bitLength()
} while (t > this.n);
var r = t < this.n ? -1 : n.ucmp(this.p);
return 0 === r ? (n.words[0] = 0,
n.length = 1) : r > 0 ? n.isub(this.p) : void 0 !== n.strip ?
n.strip() : n._strip(),
n
}
,
y.prototype.split = function(e, t) {
e.iushrn(this.n, 0, t)
}
,
y.prototype.imulK = function(e) {
return e.imul(this.k)
}
,
r(A, y),
A.prototype.split = function(e, t) {
for (var n = 4194303, r = Math.min(e.length, 9), i = 0; i < r; i++)
t.words[i] = e.words[i];
if (t.length = r,
e.length <= 9)
return e.words[0] = 0,
void (e.length = 1);
var o = e.words[9];
for (t.words[t.length++] = o & n,
i = 10; i < e.length; i++) {
var a = 0 | e.words[i];
e.words[i - 10] = (a & n) << 4 | o >>> 22,
o=a
}
o >>>= 22,
e.words[i - 10] = o,
0 === o && e.length > 10 ? e.length -= 10 : e.length -= 9
}
,
A.prototype.imulK = function(e) {
e.words[e.length] = 0,
e.words[e.length + 1] = 0,
e.length += 2;
for (var t = 0, n = 0; n < e.length; n++) {
var r = 0 | e.words[n];
t += 977 * r,
e.words[n] = 67108863 & t,
t = 64 * r + (t / 67108864 | 0)
}
return 0 === e.words[e.length - 1] && (e.length--,
0 === e.words[e.length - 1] && e.length--),
e
}
,
r(w, y),
r(_, y),
r(E, y),
E.prototype.imulK = function(e) {
for (var t = 0, n = 0; n < e.length; n++) {
var r = 19 * (0 | e.words[n]) + t
, i = 67108863 & r;
r >>>= 26,
e.words[n] = i,
t=r
}
return 0 !== t && (e.words[e.length++] = t),
e
}
,
i._prime = function(e) {
if (b[e])
return b[e];
var t;
if ("k256" === e)
t = new A;
else if ("p224" === e)
t = new w;
else if ("p192" === e)
t = new _;
else {
if ("p25519" !== e)
throw new Error("Unknown prime " + e);
t = new E
}
return b[e] = t,
t
}
,
S.prototype._verify1 = function(e) {
n(0 === e.negative, "red works only with positives"),
n(e.red, "red works only with red numbers")
}
,
S.prototype._verify2 = function(e, t) {
n(0 == (e.negative | t.negative), "red works only with positives"),
n(e.red && e.red === t.red, "red works only with red numbers")
}
,
S.prototype.imod = function(e) {
return this.prime ? this.prime.ireduce(e)._forceRed(this) : (l(e,
e.umod(this.m)._forceRed(this)),
e)
}
,
S.prototype.neg = function(e) {
return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this)
}
,
S.prototype.add = function(e, t) {
this._verify2(e, t);
var n = e.add(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n._forceRed(this)
}
,
S.prototype.iadd = function(e, t) {
this._verify2(e, t);
var n = e.iadd(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n
}
,
S.prototype.sub = function(e, t) {
this._verify2(e, t);
var n = e.sub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n._forceRed(this)
}
,
S.prototype.isub = function(e, t) {
this._verify2(e, t);
var n = e.isub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n
}
,
S.prototype.shl = function(e, t) {
return this._verify1(e),
this.imod(e.ushln(t))
}
,
S.prototype.imul = function(e, t) {
return this._verify2(e, t),
this.imod(e.imul(t))
}
,
S.prototype.mul = function(e, t) {
return this._verify2(e, t),
this.imod(e.mul(t))
}
,
S.prototype.isqr = function(e) {
return this.imul(e, e.clone())
}
,
S.prototype.sqr = function(e) {
return this.mul(e, e)
}
,
S.prototype.sqrt = function(e) {
if (e.isZero())
return e.clone();
var t = this.m.andln(3);
if (n(t % 2 == 1),
3 === t) {
var r = this.m.add(new i(1)).iushrn(2);
return this.pow(e, r)
}
for (var o = this.m.subn(1), a = 0; !o.isZero() && 0 ===
o.andln(1); )
a++,
o.iushrn(1);
n(!o.isZero());
var s = new i(1).toRed(this)
, u = s.redNeg()
, l = this.m.subn(1).iushrn(1)
, c = this.m.bitLength();
for (c = new i(2 * c * c).toRed(this); 0 !== this.pow(c, l).cmp(u); )
c.redIAdd(u);
for (var d = this.pow(c, o), f = this.pow(e, o.addn(1).iushrn(1)), h
= this.pow(e, o), p = a; 0 !== h.cmp(s); ) {
for (var m = h, g = 0; 0 !== m.cmp(s); g++)
m = m.redSqr();
n(g < p);
var v = this.pow(d, new i(1).iushln(p - g - 1));
f = f.redMul(v),
d = v.redSqr(),
h = h.redMul(d),
p=g
}
return f
}
,
S.prototype.invm = function(e) {
var t = e._invmp(this.m);
return 0 !== t.negative ? (t.negative = 0,
this.imod(t).redNeg()) : this.imod(t)
}
,
S.prototype.pow = function(e, t) {
if (t.isZero())
return new i(1).toRed(this);
if (0 === t.cmpn(1))
return e.clone();
var n = new Array(16);
n[0] = new i(1).toRed(this),
n[1] = e;
for (var r = 2; r < n.length; r++)
n[r] = this.mul(n[r - 1], e);
var o = n[0]
,a=0
,s=0
, u = t.bitLength() % 26;
for (0 === u && (u = 26),
r = t.length - 1; r >= 0; r--) {
for (var l = t.words[r], c = u - 1; c >= 0; c--) {
var d = l >> c & 1;
o !== n[0] && (o = this.sqr(o)),
0 !== d || 0 !== a ? (a <<= 1,
a |= d,
(4 === ++s || 0 === r && 0 === c) && (o = this.mul(o,
n[a]),
s = 0,
a = 0)) : s = 0
}
u = 26
}
return o
}
,
S.prototype.convertTo = function(e) {
var t = e.umod(this.m);
return t === e ? t.clone() : t
}
,
S.prototype.convertFrom = function(e) {
var t = e.clone();
return t.red = null,
t
}
,
i.mont = function(e) {
return new k(e)
}
,
r(k, S),
k.prototype.convertTo = function(e) {
return this.imod(e.ushln(this.shift))
}
,
k.prototype.convertFrom = function(e) {
var t = this.imod(e.mul(this.rinv));
return t.red = null,
t
}
,
k.prototype.imul = function(e, t) {
if (e.isZero() || t.isZero())
return e.words[0] = 0,
e.length = 1,
e;
var n = e.imul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, i = n.isub(r).iushrn(this.shift)
, o = i;
return i.cmp(this.m) >= 0 ? o = i.isub(this.m) : i.cmpn(0) < 0 &&
(o = i.iadd(this.m)),
o._forceRed(this)
}
,
k.prototype.mul = function(e, t) {
if (e.isZero() || t.isZero())
return new i(0)._forceRed(this);
var n = e.mul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, o = n.isub(r).iushrn(this.shift)
, a = o;
return o.cmp(this.m) >= 0 ? a = o.isub(this.m) : o.cmpn(0) < 0
&& (a = o.iadd(this.m)),
a._forceRed(this)
}
,
k.prototype.invm = function(e) {
return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)
}
}(e, r)
}(Sl);
var kl = Sl.exports
, Ml = We;
function Cl(e) {
var t, n = e.modulus.byteLength();
do {
t = new kl(Ml(n))
} while (t.cmp(e.modulus) >= 0 || !t.umod(e.prime1) || !
t.umod(e.prime2));
return t
}
function xl(e, t) {
var n = function(e) {
var t = Cl(e);
return {
blinder: t.toRed(kl.mont(e.modulus)).redPow(new
kl(e.publicExponent)).fromRed(),
unblinder: t.invm(e.modulus)
}
}(t)
, r = t.modulus.byteLength()
, i = new kl(e).mul(n.blinder).umod(t.modulus)
, o = i.toRed(kl.mont(t.prime1))
, a = i.toRed(kl.mont(t.prime2))
, s = t.coefficient
, u = t.prime1
, l = t.prime2
, c = o.redPow(t.exponent1).fromRed()
, d = a.redPow(t.exponent2).fromRed()
, f = c.isub(d).imul(s).umod(u).imul(l);
return d.iadd(f).imul(n.unblinder).umod(t.modulus).toArrayLike(_, "be",
r)
}
xl.getr = Cl;
var Rl = xl
, Tl = {}
, Il = {
name: "elliptic",
version: "6.5.4",
description: "EC cryptography",
main: "lib/elliptic.js",
files: ["lib"],
scripts: {
lint: "eslint lib test",
"lint:fix": "npm run lint -- --fix",
unit: "istanbul test _mocha --reporter=spec test/index.js",
test: "npm run lint && npm run unit",
version: "grunt dist && git add dist/"
},
repository: {
type: "git",
url: "[email protected]:indutny/elliptic"
},
keywords: ["EC", "Elliptic", "curve", "Cryptography"],
author: "Fedor Indutny <[email protected]>",
license: "MIT",
bugs: {
url: "https://github.com/indutny/elliptic/issues"
},
homepage: "https://github.com/indutny/elliptic",
devDependencies: {
brfs: "^2.0.2",
coveralls: "^3.1.0",
eslint: "^7.6.0",
grunt: "^1.2.1",
"grunt-browserify": "^5.3.0",
"grunt-cli": "^1.3.2",
"grunt-contrib-connect": "^3.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-uglify": "^5.0.0",
"grunt-mocha-istanbul": "^5.0.2",
"grunt-saucelabs": "^9.0.1",
istanbul: "^0.4.5",
mocha: "^8.0.1"
},
dependencies: {
"bn.js": "^4.11.9",
brorand: "^1.1.0",
"hash.js": "^1.0.0",
"hmac-drbg": "^1.0.1",
inherits: "^2.0.4",
"minimalistic-assert": "^1.0.1",
"minimalistic-crypto-utils": "^1.0.1"
}
}
, Pl = {}
, Ll = {};
!function(e) {
var t = e;
function n(e) {
return 1 === e.length ? "0" + e : e
}
function r(e) {
for (var t = "", r = 0; r < e.length; r++)
t += n(e[r].toString(16));
return t
}
t.toArray = function(e, t) {
if (Array.isArray(e))
return e.slice();
if (!e)
return [];
var n = [];
if ("string" != typeof e) {
for (var r = 0; r < e.length; r++)
n[r] = 0 | e[r];
return n
}
if ("hex" === t)
for ((e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && (e = "0"
+ e),
r = 0; r < e.length; r += 2)
n.push(parseInt(e[r] + e[r + 1], 16));
else
for (r = 0; r < e.length; r++) {
var i = e.charCodeAt(r)
, o = i >> 8
, a = 255 & i;
o ? n.push(o, a) : n.push(a)
}
return n
}
,
t.zero2 = n,
t.toHex = r,
t.encode = function(e, t) {
return "hex" === t ? r(e) : e
}
}(Ll),
function(e) {
var t = e
, n = hl
, r = Va
, i = Ll;
t.assert = r,
t.toArray = i.toArray,
t.zero2 = i.zero2,
t.toHex = i.toHex,
t.encode = i.encode,
t.getNAF = function(e, t, n) {
var r = new Array(Math.max(e.bitLength(), n) + 1);
r.fill(0);
for (var i = 1 << t + 1, o = e.clone(), a = 0; a < r.length; a++) {
var s, u = o.andln(i - 1);
o.isOdd() ? (s = u > (i >> 1) - 1 ? (i >> 1) - u : u,
o.isubn(s)) : s = 0,
r[a] = s,
o.iushrn(1)
}
return r
}
,
t.getJSF = function(e, t) {
var n = [[], []];
e = e.clone(),
t = t.clone();
for (var r, i = 0, o = 0; e.cmpn(-i) > 0 || t.cmpn(-o) > 0; ) {
var a, s, u = e.andln(3) + i & 3, l = t.andln(3) + o & 3;
3 === u && (u = -1),
3 === l && (l = -1),
a = 0 == (1 & u) ? 0 : 3 !== (r = e.andln(7) + i & 7) && 5 !== r || 2
!== l ? u : -u,
n[0].push(a),
s = 0 == (1 & l) ? 0 : 3 !== (r = t.andln(7) + o & 7) && 5 !== r ||
2 !== u ? l : -l,
n[1].push(s),
2 * i === a + 1 && (i = 1 - i),
2 * o === s + 1 && (o = 1 - o),
e.iushrn(1),
t.iushrn(1)
}
return n
}
,
t.cachedProperty = function(e, t, n) {
var r = "_" + t;
e.prototype[t] = function() {
return void 0 !== this[r] ? this[r] : this[r] = n.call(this)
}
}
,
t.parseBytes = function(e) {
return "string" == typeof e ? t.toArray(e, "hex") : e
}
,
t.intFromLE = function(e) {
return new n(e,"hex","le")
}
}(Pl);
var Ol = {}
, Nl = hl
, Dl = Pl
, Bl = Dl.getNAF
, jl = Dl.getJSF
, zl = Dl.assert;
function Fl(e, t) {
this.type = e,
this.p = new Nl(t.p,16),
this.red = t.prime ? Nl.red(t.prime) : Nl.mont(this.p),
this.zero = new Nl(0).toRed(this.red),
this.one = new Nl(1).toRed(this.red),
this.two = new Nl(2).toRed(this.red),
this.n = t.n && new Nl(t.n,16),
this.g = t.g && this.pointFromJSON(t.g, t.gRed),
this._wnafT1 = new Array(4),
this._wnafT2 = new Array(4),
this._wnafT3 = new Array(4),
this._wnafT4 = new Array(4),
this._bitLength = this.n ? this.n.bitLength() : 0;
var n = this.n && this.p.div(this.n);
!n || n.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0,
this.redN = this.n.toRed(this.red))
}
var Ul = Fl;
function Kl(e, t) {
this.curve = e,
this.type = t,
this.precomputed = null
}
Fl.prototype.point = function() {
throw new Error("Not implemented")
}
,
Fl.prototype.validate = function() {
throw new Error("Not implemented")
}
,
Fl.prototype._fixedNafMul = function(e, t) {
zl(e.precomputed);
var n = e._getDoubles()
, r = Bl(t, 1, this._bitLength)
, i = (1 << n.step + 1) - (n.step % 2 == 0 ? 2 : 1);
i /= 3;
var o, a, s = [];
for (o = 0; o < r.length; o += n.step) {
a = 0;
for (var u = o + n.step - 1; u >= o; u--)
a = (a << 1) + r[u];
s.push(a)
}
for (var l = this.jpoint(null, null, null), c = this.jpoint(null, null, null), d = i;
d > 0; d--) {
for (o = 0; o < s.length; o++)
(a = s[o]) === d ? c = c.mixedAdd(n.points[o]) : a === -d && (c =
c.mixedAdd(n.points[o].neg()));
l = l.add(c)
}
return l.toP()
}
,
Fl.prototype._wnafMul = function(e, t) {
var n = 4
, r = e._getNAFPoints(n);
n = r.wnd;
for (var i = r.points, o = Bl(t, n, this._bitLength), a = this.jpoint(null, null,
null), s = o.length - 1; s >= 0; s--) {
for (var u = 0; s >= 0 && 0 === o[s]; s--)
u++;
if (s >= 0 && u++,
a = a.dblp(u),
s < 0)
break;
var l = o[s];
zl(0 !== l),
a = "affine" === e.type ? l > 0 ? a.mixedAdd(i[l - 1 >> 1]) :
a.mixedAdd(i[-l - 1 >> 1].neg()) : l > 0 ? a.add(i[l - 1 >> 1]) : a.add(i[-l - 1 >> 1].neg())
}
return "affine" === e.type ? a.toP() : a
}
,
Fl.prototype._wnafMulAdd = function(e, t, n, r, i) {
var o, a, s, u = this._wnafT1, l = this._wnafT2, c = this._wnafT3, d = 0;
for (o = 0; o < r; o++) {
var f = (s = t[o])._getNAFPoints(e);
u[o] = f.wnd,
l[o] = f.points
}
for (o = r - 1; o >= 1; o -= 2) {
var h = o - 1
, p = o;
if (1 === u[h] && 1 === u[p]) {
var m = [t[h], null, null, t[p]];
0 === t[h].y.cmp(t[p].y) ? (m[1] = t[h].add(t[p]),
m[2] = t[h].toJ().mixedAdd(t[p].neg())) : 0 ===
t[h].y.cmp(t[p].y.redNeg()) ? (m[1] = t[h].toJ().mixedAdd(t[p]),
m[2] = t[h].add(t[p].neg())) : (m[1] = t[h].toJ().mixedAdd(t[p]),
m[2] = t[h].toJ().mixedAdd(t[p].neg()));
var g = [-3, -1, -5, -7, 0, 7, 5, 1, 3]
, v = jl(n[h], n[p]);
for (d = Math.max(v[0].length, d),
c[h] = new Array(d),
c[p] = new Array(d),
a = 0; a < d; a++) {
var b = 0 | v[0][a]
, y = 0 | v[1][a];
c[h][a] = g[3 * (b + 1) + (y + 1)],
c[p][a] = 0,
l[h] = m
}
} else
c[h] = Bl(n[h], u[h], this._bitLength),
c[p] = Bl(n[p], u[p], this._bitLength),
d = Math.max(c[h].length, d),
d = Math.max(c[p].length, d)
}
var A = this.jpoint(null, null, null)
, w = this._wnafT4;
for (o = d; o >= 0; o--) {
for (var _ = 0; o >= 0; ) {
var E = !0;
for (a = 0; a < r; a++)
w[a] = 0 | c[a][o],
0 !== w[a] && (E = !1);
if (!E)
break;
_++,
o--
}
if (o >= 0 && _++,
A = A.dblp(_),
o < 0)
break;
for (a = 0; a < r; a++) {
var S = w[a];
0 !== S && (S > 0 ? s = l[a][S - 1 >> 1] : S < 0 && (s = l[a][-S - 1
>> 1].neg()),
A = "affine" === s.type ? A.mixedAdd(s) : A.add(s))
}
}
for (o = 0; o < r; o++)
l[o] = null;
return i ? A : A.toP()
}
,
Fl.BasePoint = Kl,
Kl.prototype.eq = function() {
throw new Error("Not implemented")
}
,
Kl.prototype.validate = function() {
return this.curve.validate(this)
}
,
Fl.prototype.decodePoint = function(e, t) {
e = Dl.toArray(e, t);
var n = this.p.byteLength();
if ((4 === e[0] || 6 === e[0] || 7 === e[0]) && e.length - 1 == 2 * n)
return 6 === e[0] ? zl(e[e.length - 1] % 2 == 0) : 7 === e[0] &&
zl(e[e.length - 1] % 2 == 1),
this.point(e.slice(1, 1 + n), e.slice(1 + n, 1 + 2 * n));
if ((2 === e[0] || 3 === e[0]) && e.length - 1 === n)
return this.pointFromX(e.slice(1, 1 + n), 3 === e[0]);
throw new Error("Unknown point format")
}
,
Kl.prototype.encodeCompressed = function(e) {
return this.encode(e, !0)
}
,
Kl.prototype._encode = function(e) {
var t = this.curve.p.byteLength()
, n = this.getX().toArray("be", t);
return e ? [this.getY().isEven() ? 2 : 3].concat(n) : [4].concat(n,
this.getY().toArray("be", t))
}
,
Kl.prototype.encode = function(e, t) {
return Dl.encode(this._encode(t), e)
}
,
Kl.prototype.precompute = function(e) {
if (this.precomputed)
return this;
var t = {
doubles: null,
naf: null,
beta: null
};
return t.naf = this._getNAFPoints(8),
t.doubles = this._getDoubles(4, e),
t.beta = this._getBeta(),
this.precomputed = t,
this
}
,
Kl.prototype._hasDoubles = function(e) {
if (!this.precomputed)
return !1;
var t = this.precomputed.doubles;
return !!t && t.points.length >= Math.ceil((e.bitLength() + 1) / t.step)
}
,
Kl.prototype._getDoubles = function(e, t) {
if (this.precomputed && this.precomputed.doubles)
return this.precomputed.doubles;
for (var n = [this], r = this, i = 0; i < t; i += e) {
for (var o = 0; o < e; o++)
r = r.dbl();
n.push(r)
}
return {
step: e,
points: n
}
}
,
Kl.prototype._getNAFPoints = function(e) {
if (this.precomputed && this.precomputed.naf)
return this.precomputed.naf;
for (var t = [this], n = (1 << e) - 1, r = 1 === n ? null : this.dbl(), i = 1; i <
n; i++)
t[i] = t[i - 1].add(r);
return {
wnd: e,
points: t
}
}
,
Kl.prototype._getBeta = function() {
return null
}
,
Kl.prototype.dblp = function(e) {
for (var t = this, n = 0; n < e; n++)
t = t.dbl();
return t
}
;
var ql = hl
, Hl = Ye
, Vl = Ul
, Wl = Pl.assert;
function $l(e) {
Vl.call(this, "short", e),
this.a = new ql(e.a,16).toRed(this.red),
this.b = new ql(e.b,16).toRed(this.red),
this.tinv = this.two.redInvm(),
this.zeroA = 0 === this.a.fromRed().cmpn(0),
this.threeA = 0 === this.a.fromRed().sub(this.p).cmpn(-3),
this.endo = this._getEndomorphism(e),
this._endoWnafT1 = new Array(4),
this._endoWnafT2 = new Array(4)
}
Hl($l, Vl);
var Yl = $l;
function Ql(e, t, n, r) {
Vl.BasePoint.call(this, e, "affine"),
null === t && null === n ? (this.x = null,
this.y = null,
this.inf = !0) : (this.x = new ql(t,16),
this.y = new ql(n,16),
r && (this.x.forceRed(this.curve.red),
this.y.forceRed(this.curve.red)),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.y.red || (this.y = this.y.toRed(this.curve.red)),
this.inf = !1)
}
function Zl(e, t, n, r) {
Vl.BasePoint.call(this, e, "jacobian"),
null === t && null === n && null === r ? (this.x = this.curve.one,
this.y = this.curve.one,
this.z = new ql(0)) : (this.x = new ql(t,16),
this.y = new ql(n,16),
this.z = new ql(r,16)),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.y.red || (this.y = this.y.toRed(this.curve.red)),
this.z.red || (this.z = this.z.toRed(this.curve.red)),
this.zOne = this.z === this.curve.one
}
$l.prototype._getEndomorphism = function(e) {
if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) {
var t, n;
if (e.beta)
t = new ql(e.beta,16).toRed(this.red);
else {
var r = this._getEndoRoots(this.p);
t = (t = r[0].cmp(r[1]) < 0 ? r[0] : r[1]).toRed(this.red)
}
if (e.lambda)
n = new ql(e.lambda,16);
else {
var i = this._getEndoRoots(this.n);
0 === this.g.mul(i[0]).x.cmp(this.g.x.redMul(t)) ? n = i[0] : (n =
i[1],
Wl(0 === this.g.mul(n).x.cmp(this.g.x.redMul(t))))
}
return {
beta: t,
lambda: n,
basis: e.basis ? e.basis.map((function(e) {
return {
a: new ql(e.a,16),
b: new ql(e.b,16)
}
}
)) : this._getEndoBasis(n)
}
}
}
,
$l.prototype._getEndoRoots = function(e) {
var t = e === this.p ? this.red : ql.mont(e)
, n = new ql(2).toRed(t).redInvm()
, r = n.redNeg()
, i = new ql(3).toRed(t).redNeg().redSqrt().redMul(n);
return [r.redAdd(i).fromRed(), r.redSub(i).fromRed()]
}
,
$l.prototype._getEndoBasis = function(e) {
for (var t, n, r, i, o, a, s, u, l, c =
this.n.ushrn(Math.floor(this.n.bitLength() / 2)), d = e, f = this.n.clone(), h = new ql(1), p =
new ql(0), m = new ql(0), g = new ql(1), v = 0; 0 !== d.cmpn(0); ) {
var b = f.div(d);
u = f.sub(b.mul(d)),
l = m.sub(b.mul(h));
var y = g.sub(b.mul(p));
if (!r && u.cmp(c) < 0)
t = s.neg(),
n = h,
r = u.neg(),
i = l;
else if (r && 2 == ++v)
break;
s = u,
f = d,
d = u,
m = h,
h = l,
g = p,
p=y
}
o = u.neg(),
a = l;
var A = r.sqr().add(i.sqr());
return o.sqr().add(a.sqr()).cmp(A) >= 0 && (o = t,
a = n),
r.negative && (r = r.neg(),
i = i.neg()),
o.negative && (o = o.neg(),
a = a.neg()),
[{
a: r,
b: i
}, {
a: o,
b: a
}]
}
,
$l.prototype._endoSplit = function(e) {
var t = this.endo.basis
, n = t[0]
, r = t[1]
, i = r.b.mul(e).divRound(this.n)
, o = n.b.neg().mul(e).divRound(this.n)
, a = i.mul(n.a)
, s = o.mul(r.a)
, u = i.mul(n.b)
, l = o.mul(r.b);
return {
k1: e.sub(a).sub(s),
k2: u.add(l).neg()
}
}
,
$l.prototype.pointFromX = function(e, t) {
(e = new ql(e,16)).red || (e = e.toRed(this.red));
var n = e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b)
, r = n.redSqrt();
if (0 !== r.redSqr().redSub(n).cmp(this.zero))
throw new Error("invalid point");
var i = r.fromRed().isOdd();
return (t && !i || !t && i) && (r = r.redNeg()),
this.point(e, r)
}
,
$l.prototype.validate = function(e) {
if (e.inf)
return !0;
var t = e.x
, n = e.y
, r = this.a.redMul(t)
, i = t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);
return 0 === n.redSqr().redISub(i).cmpn(0)
}
,
$l.prototype._endoWnafMulAdd = function(e, t, n) {
for (var r = this._endoWnafT1, i = this._endoWnafT2, o = 0; o <
e.length; o++) {
var a = this._endoSplit(t[o])
, s = e[o]
, u = s._getBeta();
a.k1.negative && (a.k1.ineg(),
s = s.neg(!0)),
a.k2.negative && (a.k2.ineg(),
u = u.neg(!0)),
r[2 * o] = s,
r[2 * o + 1] = u,
i[2 * o] = a.k1,
i[2 * o + 1] = a.k2
}
for (var l = this._wnafMulAdd(1, r, i, 2 * o, n), c = 0; c < 2 * o; c++)
r[c] = null,
i[c] = null;
return l
}
,
Hl(Ql, Vl.BasePoint),
$l.prototype.point = function(e, t, n) {
return new Ql(this,e,t,n)
}
,
$l.prototype.pointFromJSON = function(e, t) {
return Ql.fromJSON(this, e, t)
}
,
Ql.prototype._getBeta = function() {
if (this.curve.endo) {
var e = this.precomputed;
if (e && e.beta)
return e.beta;
var t = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
if (e) {
var n = this.curve
, r = function(e) {
return n.point(e.x.redMul(n.endo.beta), e.y)
};
e.beta = t,
t.precomputed = {
beta: null,
naf: e.naf && {
wnd: e.naf.wnd,
points: e.naf.points.map(r)
},
doubles: e.doubles && {
step: e.doubles.step,
points: e.doubles.points.map(r)
}
}
}
return t
}
}
,
Ql.prototype.toJSON = function() {
return this.precomputed ? [this.x, this.y, this.precomputed && {
doubles: this.precomputed.doubles && {
step: this.precomputed.doubles.step,
points: this.precomputed.doubles.points.slice(1)
},
naf: this.precomputed.naf && {
wnd: this.precomputed.naf.wnd,
points: this.precomputed.naf.points.slice(1)
}
}] : [this.x, this.y]
}
,
Ql.fromJSON = function(e, t, n) {
"string" == typeof t && (t = JSON.parse(t));
var r = e.point(t[0], t[1], n);
if (!t[2])
return r;
function i(t) {
return e.point(t[0], t[1], n)
}
var o = t[2];
return r.precomputed = {
beta: null,
doubles: o.doubles && {
step: o.doubles.step,
points: [r].concat(o.doubles.points.map(i))
},
naf: o.naf && {
wnd: o.naf.wnd,
points: [r].concat(o.naf.points.map(i))
}
},
r
}
,
Ql.prototype.inspect = function() {
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " +
this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + ">"
}
,
Ql.prototype.isInfinity = function() {
return this.inf
}
,
Ql.prototype.add = function(e) {
if (this.inf)
return e;
if (e.inf)
return this;
if (this.eq(e))
return this.dbl();
if (this.neg().eq(e))
return this.curve.point(null, null);
if (0 === this.x.cmp(e.x))
return this.curve.point(null, null);
var t = this.y.redSub(e.y);
0 !== t.cmpn(0) && (t = t.redMul(this.x.redSub(e.x).redInvm()));
var n = t.redSqr().redISub(this.x).redISub(e.x)
, r = t.redMul(this.x.redSub(n)).redISub(this.y);
return this.curve.point(n, r)
}
,
Ql.prototype.dbl = function() {
if (this.inf)
return this;
var e = this.y.redAdd(this.y);
if (0 === e.cmpn(0))
return this.curve.point(null, null);
var t = this.curve.a
, n = this.x.redSqr()
, r = e.redInvm()
, i = n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r)
, o = i.redSqr().redISub(this.x.redAdd(this.x))
, a = i.redMul(this.x.redSub(o)).redISub(this.y);
return this.curve.point(o, a)
}
,
Ql.prototype.getX = function() {
return this.x.fromRed()
}
,
Ql.prototype.getY = function() {
return this.y.fromRed()
}
,
Ql.prototype.mul = function(e) {
return e = new ql(e,16),
this.isInfinity() ? this : this._hasDoubles(e) ?
this.curve._fixedNafMul(this, e) : this.curve.endo ? this.curve._endoWnafMulAdd([this],
[e]) : this.curve._wnafMul(this, e)
}
,
Ql.prototype.mulAdd = function(e, t, n) {
var r = [this, t]
, i = [e, n];
return this.curve.endo ? this.curve._endoWnafMulAdd(r, i) :
this.curve._wnafMulAdd(1, r, i, 2)
}
,
Ql.prototype.jmulAdd = function(e, t, n) {
var r = [this, t]
, i = [e, n];
return this.curve.endo ? this.curve._endoWnafMulAdd(r, i, !0) :
this.curve._wnafMulAdd(1, r, i, 2, !0)
}
,
Ql.prototype.eq = function(e) {
return this === e || this.inf === e.inf && (this.inf || 0 === this.x.cmp(e.x)
&& 0 === this.y.cmp(e.y))
}
,
Ql.prototype.neg = function(e) {
if (this.inf)
return this;
var t = this.curve.point(this.x, this.y.redNeg());
if (e && this.precomputed) {
var n = this.precomputed
, r = function(e) {
return e.neg()
};
t.precomputed = {
naf: n.naf && {
wnd: n.naf.wnd,
points: n.naf.points.map(r)
},
doubles: n.doubles && {
step: n.doubles.step,
points: n.doubles.points.map(r)
}
}
}
return t
}
,
Ql.prototype.toJ = function() {
return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x,
this.y, this.curve.one)
}
,
Hl(Zl, Vl.BasePoint),
$l.prototype.jpoint = function(e, t, n) {
return new Zl(this,e,t,n)
}
,
Zl.prototype.toP = function() {
if (this.isInfinity())
return this.curve.point(null, null);
var e = this.z.redInvm()
, t = e.redSqr()
, n = this.x.redMul(t)
, r = this.y.redMul(t).redMul(e);
return this.curve.point(n, r)
}
,
Zl.prototype.neg = function() {
return this.curve.jpoint(this.x, this.y.redNeg(), this.z)
}
,
Zl.prototype.add = function(e) {
if (this.isInfinity())
return e;
if (e.isInfinity())
return this;
var t = e.z.redSqr()
, n = this.z.redSqr()
, r = this.x.redMul(t)
, i = e.x.redMul(n)
, o = this.y.redMul(t.redMul(e.z))
, a = e.y.redMul(n.redMul(this.z))
, s = r.redSub(i)
, u = o.redSub(a);
if (0 === s.cmpn(0))
return 0 !== u.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl();
var l = s.redSqr()
, c = l.redMul(s)
, d = r.redMul(l)
, f = u.redSqr().redIAdd(c).redISub(d).redISub(d)
, h = u.redMul(d.redISub(f)).redISub(o.redMul(c))
, p = this.z.redMul(e.z).redMul(s);
return this.curve.jpoint(f, h, p)
}
,
Zl.prototype.mixedAdd = function(e) {
if (this.isInfinity())
return e.toJ();
if (e.isInfinity())
return this;
var t = this.z.redSqr()
, n = this.x
, r = e.x.redMul(t)
, i = this.y
, o = e.y.redMul(t).redMul(this.z)
, a = n.redSub(r)
, s = i.redSub(o);
if (0 === a.cmpn(0))
return 0 !== s.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl();
var u = a.redSqr()
, l = u.redMul(a)
, c = n.redMul(u)
, d = s.redSqr().redIAdd(l).redISub(c).redISub(c)
, f = s.redMul(c.redISub(d)).redISub(i.redMul(l))
, h = this.z.redMul(a);
return this.curve.jpoint(d, f, h)
}
,
Zl.prototype.dblp = function(e) {
if (0 === e)
return this;
if (this.isInfinity())
return this;
if (!e)
return this.dbl();
var t;
if (this.curve.zeroA || this.curve.threeA) {
var n = this;
for (t = 0; t < e; t++)
n = n.dbl();
return n
}
var r = this.curve.a
, i = this.curve.tinv
, o = this.x
, a = this.y
, s = this.z
, u = s.redSqr().redSqr()
, l = a.redAdd(a);
for (t = 0; t < e; t++) {
var c = o.redSqr()
, d = l.redSqr()
, f = d.redSqr()
, h = c.redAdd(c).redIAdd(c).redIAdd(r.redMul(u))
, p = o.redMul(d)
, m = h.redSqr().redISub(p.redAdd(p))
, g = p.redISub(m)
, v = h.redMul(g);
v = v.redIAdd(v).redISub(f);
var b = l.redMul(s);
t + 1 < e && (u = u.redMul(f)),
o = m,
s = b,
l=v
}
return this.curve.jpoint(o, l.redMul(i), s)
}
,
Zl.prototype.dbl = function() {
return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() :
this.curve.threeA ? this._threeDbl() : this._dbl()
}
,
Zl.prototype._zeroDbl = function() {
var e, t, n;
if (this.zOne) {
var r = this.x.redSqr()
, i = this.y.redSqr()
, o = i.redSqr()
, a = this.x.redAdd(i).redSqr().redISub(r).redISub(o);
a = a.redIAdd(a);
var s = r.redAdd(r).redIAdd(r)
, u = s.redSqr().redISub(a).redISub(a)
, l = o.redIAdd(o);
l = (l = l.redIAdd(l)).redIAdd(l),
e = u,
t = s.redMul(a.redISub(u)).redISub(l),
n = this.y.redAdd(this.y)
} else {
var c = this.x.redSqr()
, d = this.y.redSqr()
, f = d.redSqr()
, h = this.x.redAdd(d).redSqr().redISub(c).redISub(f);
h = h.redIAdd(h);
var p = c.redAdd(c).redIAdd(c)
, m = p.redSqr()
, g = f.redIAdd(f);
g = (g = g.redIAdd(g)).redIAdd(g),
e = m.redISub(h).redISub(h),
t = p.redMul(h.redISub(e)).redISub(g),
n = (n = this.y.redMul(this.z)).redIAdd(n)
}
return this.curve.jpoint(e, t, n)
}
,
Zl.prototype._threeDbl = function() {
var e, t, n;
if (this.zOne) {
var r = this.x.redSqr()
, i = this.y.redSqr()
, o = i.redSqr()
, a = this.x.redAdd(i).redSqr().redISub(r).redISub(o);
a = a.redIAdd(a);
var s = r.redAdd(r).redIAdd(r).redIAdd(this.curve.a)
, u = s.redSqr().redISub(a).redISub(a);
e = u;
var l = o.redIAdd(o);
l = (l = l.redIAdd(l)).redIAdd(l),
t = s.redMul(a.redISub(u)).redISub(l),
n = this.y.redAdd(this.y)
} else {
var c = this.z.redSqr()
, d = this.y.redSqr()
, f = this.x.redMul(d)
, h = this.x.redSub(c).redMul(this.x.redAdd(c));
h = h.redAdd(h).redIAdd(h);
var p = f.redIAdd(f)
, m = (p = p.redIAdd(p)).redAdd(p);
e = h.redSqr().redISub(m),
n = this.y.redAdd(this.z).redSqr().redISub(d).redISub(c);
var g = d.redSqr();
g = (g = (g = g.redIAdd(g)).redIAdd(g)).redIAdd(g),
t = h.redMul(p.redISub(e)).redISub(g)
}
return this.curve.jpoint(e, t, n)
}
,
Zl.prototype._dbl = function() {
var e = this.curve.a
, t = this.x
, n = this.y
, r = this.z
, i = r.redSqr().redSqr()
, o = t.redSqr()
, a = n.redSqr()
, s = o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i))
, u = t.redAdd(t)
, l = (u = u.redIAdd(u)).redMul(a)
, c = s.redSqr().redISub(l.redAdd(l))
, d = l.redISub(c)
, f = a.redSqr();
f = (f = (f = f.redIAdd(f)).redIAdd(f)).redIAdd(f);
var h = s.redMul(d).redISub(f)
, p = n.redAdd(n).redMul(r);
return this.curve.jpoint(c, h, p)
}
,
Zl.prototype.trpl = function() {
if (!this.curve.zeroA)
return this.dbl().add(this);
var e = this.x.redSqr()
, t = this.y.redSqr()
, n = this.z.redSqr()
, r = t.redSqr()
, i = e.redAdd(e).redIAdd(e)
, o = i.redSqr()
, a = this.x.redAdd(t).redSqr().redISub(e).redISub(r)
, s = (a = (a = (a =
a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr()
, u = r.redIAdd(r);
u = (u = (u = u.redIAdd(u)).redIAdd(u)).redIAdd(u);
var l = i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u)
, c = t.redMul(l);
c = (c = c.redIAdd(c)).redIAdd(c);
var d = this.x.redMul(s).redISub(c);
d = (d = d.redIAdd(d)).redIAdd(d);
var f = this.y.redMul(l.redMul(u.redISub(l)).redISub(a.redMul(s)));
f = (f = (f = f.redIAdd(f)).redIAdd(f)).redIAdd(f);
var h = this.z.redAdd(a).redSqr().redISub(n).redISub(s);
return this.curve.jpoint(d, f, h)
}
,
Zl.prototype.mul = function(e, t) {
return e = new ql(e,t),
this.curve._wnafMul(this, e)
}
,
Zl.prototype.eq = function(e) {
if ("affine" === e.type)
return this.eq(e.toJ());
if (this === e)
return !0;
var t = this.z.redSqr()
, n = e.z.redSqr();
if (0 !== this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))
return !1;
var r = t.redMul(this.z)
, i = n.redMul(e.z);
return 0 === this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)
}
,
Zl.prototype.eqXToP = function(e) {
var t = this.z.redSqr()
, n = e.toRed(this.curve.red).redMul(t);
if (0 === this.x.cmp(n))
return !0;
for (var r = e.clone(), i = this.curve.redN.redMul(t); ; ) {
if (r.iadd(this.curve.n),
r.cmp(this.curve.p) >= 0)
return !1;
if (n.redIAdd(i),
0 === this.x.cmp(n))
return !0
}
}
,
Zl.prototype.inspect = function() {
return this.isInfinity() ? "<EC JPoint Infinity>" : "<EC JPoint x: " +
this.x.toString(16, 2) + " y: " + this.y.toString(16, 2) + " z: " + this.z.toString(16, 2) + ">"
}
,
Zl.prototype.isInfinity = function() {
return 0 === this.z.cmpn(0)
}
;
var Gl = hl
, Xl = Ye
, Jl = Ul
, ec = Pl;
function tc(e) {
Jl.call(this, "mont", e),
this.a = new Gl(e.a,16).toRed(this.red),
this.b = new Gl(e.b,16).toRed(this.red),
this.i4 = new Gl(4).toRed(this.red).redInvm(),
this.two = new Gl(2).toRed(this.red),
this.a24 = this.i4.redMul(this.a.redAdd(this.two))
}
Xl(tc, Jl);
var nc = tc;
function rc(e, t, n) {
Jl.BasePoint.call(this, e, "projective"),
null === t && null === n ? (this.x = this.curve.one,
this.z = this.curve.zero) : (this.x = new Gl(t,16),
this.z = new Gl(n,16),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.z.red || (this.z = this.z.toRed(this.curve.red)))
}
tc.prototype.validate = function(e) {
var t = e.normalize().x
, n = t.redSqr()
, r = n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);
return 0 === r.redSqrt().redSqr().cmp(r)
}
,
Xl(rc, Jl.BasePoint),
tc.prototype.decodePoint = function(e, t) {
return this.point(ec.toArray(e, t), 1)
}
,
tc.prototype.point = function(e, t) {
return new rc(this,e,t)
}
,
tc.prototype.pointFromJSON = function(e) {
return rc.fromJSON(this, e)
}
,
rc.prototype.precompute = function() {}
,
rc.prototype._encode = function() {
return this.getX().toArray("be", this.curve.p.byteLength())
}
,
rc.fromJSON = function(e, t) {
return new rc(e,t[0],t[1] || e.one)
}
,
rc.prototype.inspect = function() {
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " +
this.x.fromRed().toString(16, 2) + " z: " + this.z.fromRed().toString(16, 2) + ">"
}
,
rc.prototype.isInfinity = function() {
return 0 === this.z.cmpn(0)
}
,
rc.prototype.dbl = function() {
var e = this.x.redAdd(this.z).redSqr()
, t = this.x.redSub(this.z).redSqr()
, n = e.redSub(t)
, r = e.redMul(t)
, i = n.redMul(t.redAdd(this.curve.a24.redMul(n)));
return this.curve.point(r, i)
}
,
rc.prototype.add = function() {
throw new Error("Not supported on Montgomery curve")
}
,
rc.prototype.diffAdd = function(e, t) {
var n = this.x.redAdd(this.z)
, r = this.x.redSub(this.z)
, i = e.x.redAdd(e.z)
, o = e.x.redSub(e.z).redMul(n)
, a = i.redMul(r)
, s = t.z.redMul(o.redAdd(a).redSqr())
, u = t.x.redMul(o.redISub(a).redSqr());
return this.curve.point(s, u)
}
,
rc.prototype.mul = function(e) {
for (var t = e.clone(), n = this, r = this.curve.point(null, null), i = []; 0 !==
t.cmpn(0); t.iushrn(1))
i.push(t.andln(1));
for (var o = i.length - 1; o >= 0; o--)
0 === i[o] ? (n = n.diffAdd(r, this),
r = r.dbl()) : (r = n.diffAdd(r, this),
n = n.dbl());
return r
}
,
rc.prototype.mulAdd = function() {
throw new Error("Not supported on Montgomery curve")
}
,
rc.prototype.jumlAdd = function() {
throw new Error("Not supported on Montgomery curve")
}
,
rc.prototype.eq = function(e) {
return 0 === this.getX().cmp(e.getX())
}
,
rc.prototype.normalize = function() {
return this.x = this.x.redMul(this.z.redInvm()),
this.z = this.curve.one,
this
}
,
rc.prototype.getX = function() {
return this.normalize(),
this.x.fromRed()
}
;
var ic = hl
, oc = Ye
, ac = Ul
, sc = Pl.assert;
function uc(e) {
this.twisted = 1 != (0 | e.a),
this.mOneA = this.twisted && -1 == (0 | e.a),
this.extended = this.mOneA,
ac.call(this, "edwards", e),
this.a = new ic(e.a,16).umod(this.red.m),
this.a = this.a.toRed(this.red),
this.c = new ic(e.c,16).toRed(this.red),
this.c2 = this.c.redSqr(),
this.d = new ic(e.d,16).toRed(this.red),
this.dd = this.d.redAdd(this.d),
sc(!this.twisted || 0 === this.c.fromRed().cmpn(1)),
this.oneC = 1 == (0 | e.c)
}
oc(uc, ac);
var lc = uc;
function cc(e, t, n, r, i) {
ac.BasePoint.call(this, e, "projective"),
null === t && null === n && null === r ? (this.x = this.curve.zero,
this.y = this.curve.one,
this.z = this.curve.one,
this.t = this.curve.zero,
this.zOne = !0) : (this.x = new ic(t,16),
this.y = new ic(n,16),
this.z = r ? new ic(r,16) : this.curve.one,
this.t = i && new ic(i,16),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.y.red || (this.y = this.y.toRed(this.curve.red)),
this.z.red || (this.z = this.z.toRed(this.curve.red)),
this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)),
this.zOne = this.z === this.curve.one,
this.curve.extended && !this.t && (this.t = this.x.redMul(this.y),
this.zOne || (this.t = this.t.redMul(this.z.redInvm()))))
}
uc.prototype._mulA = function(e) {
return this.mOneA ? e.redNeg() : this.a.redMul(e)
}
,
uc.prototype._mulC = function(e) {
return this.oneC ? e : this.c.redMul(e)
}
,
uc.prototype.jpoint = function(e, t, n, r) {
return this.point(e, t, n, r)
}
,
uc.prototype.pointFromX = function(e, t) {
(e = new ic(e,16)).red || (e = e.toRed(this.red));
var n = e.redSqr()
, r = this.c2.redSub(this.a.redMul(n))
, i = this.one.redSub(this.c2.redMul(this.d).redMul(n))
, o = r.redMul(i.redInvm())
, a = o.redSqrt();
if (0 !== a.redSqr().redSub(o).cmp(this.zero))
throw new Error("invalid point");
var s = a.fromRed().isOdd();
return (t && !s || !t && s) && (a = a.redNeg()),
this.point(e, a)
}
,
uc.prototype.pointFromY = function(e, t) {
(e = new ic(e,16)).red || (e = e.toRed(this.red));
var n = e.redSqr()
, r = n.redSub(this.c2)
, i = n.redMul(this.d).redMul(this.c2).redSub(this.a)
, o = r.redMul(i.redInvm());
if (0 === o.cmp(this.zero)) {
if (t)
throw new Error("invalid point");
return this.point(this.zero, e)
}
var a = o.redSqrt();
if (0 !== a.redSqr().redSub(o).cmp(this.zero))
throw new Error("invalid point");
return a.fromRed().isOdd() !== t && (a = a.redNeg()),
this.point(a, e)
}
,
uc.prototype.validate = function(e) {
if (e.isInfinity())
return !0;
e.normalize();
var t = e.x.redSqr()
, n = e.y.redSqr()
, r = t.redMul(this.a).redAdd(n)
, i = this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));
return 0 === r.cmp(i)
}
,
oc(cc, ac.BasePoint),
uc.prototype.pointFromJSON = function(e) {
return cc.fromJSON(this, e)
}
,
uc.prototype.point = function(e, t, n, r) {
return new cc(this,e,t,n,r)
}
,
cc.fromJSON = function(e, t) {
return new cc(e,t[0],t[1],t[2])
}
,
cc.prototype.inspect = function() {
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " +
this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + " z: " +
this.z.fromRed().toString(16, 2) + ">"
}
,
cc.prototype.isInfinity = function() {
return 0 === this.x.cmpn(0) && (0 === this.y.cmp(this.z) || this.zOne &&
0 === this.y.cmp(this.curve.c))
}
,
cc.prototype._extDbl = function() {
var e = this.x.redSqr()
, t = this.y.redSqr()
, n = this.z.redSqr();
n = n.redIAdd(n);
var r = this.curve._mulA(e)
, i = this.x.redAdd(this.y).redSqr().redISub(e).redISub(t)
, o = r.redAdd(t)
, a = o.redSub(n)
, s = r.redSub(t)
, u = i.redMul(a)
, l = o.redMul(s)
, c = i.redMul(s)
, d = a.redMul(o);
return this.curve.point(u, l, d, c)
}
,
cc.prototype._projDbl = function() {
var e, t, n, r, i, o, a = this.x.redAdd(this.y).redSqr(), s = this.x.redSqr(), u
= this.y.redSqr();
if (this.curve.twisted) {
var l = (r = this.curve._mulA(s)).redAdd(u);
this.zOne ? (e =
a.redSub(s).redSub(u).redMul(l.redSub(this.curve.two)),
t = l.redMul(r.redSub(u)),
n = l.redSqr().redSub(l).redSub(l)) : (i = this.z.redSqr(),
o = l.redSub(i).redISub(i),
e = a.redSub(s).redISub(u).redMul(o),
t = l.redMul(r.redSub(u)),
n = l.redMul(o))
} else
r = s.redAdd(u),
i = this.curve._mulC(this.z).redSqr(),
o = r.redSub(i).redSub(i),
e = this.curve._mulC(a.redISub(r)).redMul(o),
t = this.curve._mulC(r).redMul(s.redISub(u)),
n = r.redMul(o);
return this.curve.point(e, t, n)
}
,
cc.prototype.dbl = function() {
return this.isInfinity() ? this : this.curve.extended ? this._extDbl() :
this._projDbl()
}
,
cc.prototype._extAdd = function(e) {
var t = this.y.redSub(this.x).redMul(e.y.redSub(e.x))
, n = this.y.redAdd(this.x).redMul(e.y.redAdd(e.x))
, r = this.t.redMul(this.curve.dd).redMul(e.t)
, i = this.z.redMul(e.z.redAdd(e.z))
, o = n.redSub(t)
, a = i.redSub(r)
, s = i.redAdd(r)
, u = n.redAdd(t)
, l = o.redMul(a)
, c = s.redMul(u)
, d = o.redMul(u)
, f = a.redMul(s);
return this.curve.point(l, c, f, d)
}
,
cc.prototype._projAdd = function(e) {
var t, n, r = this.z.redMul(e.z), i = r.redSqr(), o = this.x.redMul(e.x), a =
this.y.redMul(e.y), s = this.curve.d.redMul(o).redMul(a), u = i.redSub(s), l = i.redAdd(s),
c = this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a), d =
r.redMul(u).redMul(c);
return this.curve.twisted ? (t =
r.redMul(l).redMul(a.redSub(this.curve._mulA(o))),
n = u.redMul(l)) : (t = r.redMul(l).redMul(a.redSub(o)),
n = this.curve._mulC(u).redMul(l)),
this.curve.point(d, t, n)
}
,
cc.prototype.add = function(e) {
return this.isInfinity() ? e : e.isInfinity() ? this : this.curve.extended ?
this._extAdd(e) : this._projAdd(e)
}
,
cc.prototype.mul = function(e) {
return this._hasDoubles(e) ? this.curve._fixedNafMul(this, e) :
this.curve._wnafMul(this, e)
}
,
cc.prototype.mulAdd = function(e, t, n) {
return this.curve._wnafMulAdd(1, [this, t], [e, n], 2, !1)
}
,
cc.prototype.jmulAdd = function(e, t, n) {
return this.curve._wnafMulAdd(1, [this, t], [e, n], 2, !0)
}
,
cc.prototype.normalize = function() {
if (this.zOne)
return this;
var e = this.z.redInvm();
return this.x = this.x.redMul(e),
this.y = this.y.redMul(e),
this.t && (this.t = this.t.redMul(e)),
this.z = this.curve.one,
this.zOne = !0,
this
}
,
cc.prototype.neg = function() {
return this.curve.point(this.x.redNeg(), this.y, this.z, this.t &&
this.t.redNeg())
}
,
cc.prototype.getX = function() {
return this.normalize(),
this.x.fromRed()
}
,
cc.prototype.getY = function() {
return this.normalize(),
this.y.fromRed()
}
,
cc.prototype.eq = function(e) {
return this === e || 0 === this.getX().cmp(e.getX()) && 0 ===
this.getY().cmp(e.getY())
}
,
cc.prototype.eqXToP = function(e) {
var t = e.toRed(this.curve.red).redMul(this.z);
if (0 === this.x.cmp(t))
return !0;
for (var n = e.clone(), r = this.curve.redN.redMul(this.z); ; ) {
if (n.iadd(this.curve.n),
n.cmp(this.curve.p) >= 0)
return !1;
if (t.redIAdd(r),
0 === this.x.cmp(t))
return !0
}
}
,
cc.prototype.toP = cc.prototype.normalize,
cc.prototype.mixedAdd = cc.prototype.add,
function(e) {
var t = e;
t.base = Ul,
t.short = Yl,
t.mont = nc,
t.edwards = lc
}(Ol);
var dc = {}
, fc = {}
, hc = {}
, pc = Va
, mc = Ye;
function gc(e, t) {
return 55296 == (64512 & e.charCodeAt(t)) && !(t < 0 || t + 1 >=
e.length) && 56320 == (64512 & e.charCodeAt(t + 1))
}
function vc(e) {
return (e >>> 24 | e >>> 8 & 65280 | e << 8 & 16711680 | (255 & e) <<
24) >>> 0
}
function bc(e) {
return 1 === e.length ? "0" + e : e
}
function yc(e) {
return 7 === e.length ? "0" + e : 6 === e.length ? "00" + e : 5 ===
e.length ? "000" + e : 4 === e.length ? "0000" + e : 3 === e.length ? "00000" + e : 2 ===
e.length ? "000000" + e : 1 === e.length ? "0000000" + e : e
}
hc.inherits = mc,
hc.toArray = function(e, t) {
if (Array.isArray(e))
return e.slice();
if (!e)
return [];
var n = [];
if ("string" == typeof e)
if (t) {
if ("hex" === t)
for ((e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && (e
= "0" + e),
i = 0; i < e.length; i += 2)
n.push(parseInt(e[i] + e[i + 1], 16))
} else
for (var r = 0, i = 0; i < e.length; i++) {
var o = e.charCodeAt(i);
o < 128 ? n[r++] = o : o < 2048 ? (n[r++] = o >> 6 | 192,
n[r++] = 63 & o | 128) : gc(e, i) ? (o = 65536 + ((1023 & o)
<< 10) + (1023 & e.charCodeAt(++i)),
n[r++] = o >> 18 | 240,
n[r++] = o >> 12 & 63 | 128,
n[r++] = o >> 6 & 63 | 128,
n[r++] = 63 & o | 128) : (n[r++] = o >> 12 | 224,
n[r++] = o >> 6 & 63 | 128,
n[r++] = 63 & o | 128)
}
else
for (i = 0; i < e.length; i++)
n[i] = 0 | e[i];
return n
}
,
hc.toHex = function(e) {
for (var t = "", n = 0; n < e.length; n++)
t += bc(e[n].toString(16));
return t
}
,
hc.htonl = vc,
hc.toHex32 = function(e, t) {
for (var n = "", r = 0; r < e.length; r++) {
var i = e[r];
"little" === t && (i = vc(i)),
n += yc(i.toString(16))
}
return n
}
,
hc.zero2 = bc,
hc.zero8 = yc,
hc.join32 = function(e, t, n, r) {
var i = n - t;
pc(i % 4 == 0);
for (var o = new Array(i / 4), a = 0, s = t; a < o.length; a++,
s += 4) {
var u;
u = "big" === r ? e[s] << 24 | e[s + 1] << 16 | e[s + 2] << 8 | e[s + 3] :
e[s + 3] << 24 | e[s + 2] << 16 | e[s + 1] << 8 | e[s],
o[a] = u >>> 0
}
return o
}
,
hc.split32 = function(e, t) {
for (var n = new Array(4 * e.length), r = 0, i = 0; r < e.length; r++,
i += 4) {
var o = e[r];
"big" === t ? (n[i] = o >>> 24,
n[i + 1] = o >>> 16 & 255,
n[i + 2] = o >>> 8 & 255,
n[i + 3] = 255 & o) : (n[i + 3] = o >>> 24,
n[i + 2] = o >>> 16 & 255,
n[i + 1] = o >>> 8 & 255,
n[i] = 255 & o)
}
return n
}
,
hc.rotr32 = function(e, t) {
return e >>> t | e << 32 - t
}
,
hc.rotl32 = function(e, t) {
return e << t | e >>> 32 - t
}
,
hc.sum32 = function(e, t) {
return e + t >>> 0
}
,
hc.sum32_3 = function(e, t, n) {
return e + t + n >>> 0
}
,
hc.sum32_4 = function(e, t, n, r) {
return e + t + n + r >>> 0
}
,
hc.sum32_5 = function(e, t, n, r, i) {
return e + t + n + r + i >>> 0
}
,
hc.sum64 = function(e, t, n, r) {
var i = e[t]
, o = r + e[t + 1] >>> 0
, a = (o < r ? 1 : 0) + n + i;
e[t] = a >>> 0,
e[t + 1] = o
}
,
hc.sum64_hi = function(e, t, n, r) {
return (t + r >>> 0 < t ? 1 : 0) + e + n >>> 0
}
,
hc.sum64_lo = function(e, t, n, r) {
return t + r >>> 0
}
,
hc.sum64_4_hi = function(e, t, n, r, i, o, a, s) {
var u = 0
, l = t;
return u += (l = l + r >>> 0) < t ? 1 : 0,
u += (l = l + o >>> 0) < o ? 1 : 0,
e + n + i + a + (u += (l = l + s >>> 0) < s ? 1 : 0) >>> 0
}
,
hc.sum64_4_lo = function(e, t, n, r, i, o, a, s) {
return t + r + o + s >>> 0
}
,
hc.sum64_5_hi = function(e, t, n, r, i, o, a, s, u, l) {
var c = 0
, d = t;
return c += (d = d + r >>> 0) < t ? 1 : 0,
c += (d = d + o >>> 0) < o ? 1 : 0,
c += (d = d + s >>> 0) < s ? 1 : 0,
e + n + i + a + u + (c += (d = d + l >>> 0) < l ? 1 : 0) >>> 0
}
,
hc.sum64_5_lo = function(e, t, n, r, i, o, a, s, u, l) {
return t + r + o + s + l >>> 0
}
,
hc.rotr64_hi = function(e, t, n) {
return (t << 32 - n | e >>> n) >>> 0
}
,
hc.rotr64_lo = function(e, t, n) {
return (e << 32 - n | t >>> n) >>> 0
}
,
hc.shr64_hi = function(e, t, n) {
return e >>> n
}
,
hc.shr64_lo = function(e, t, n) {
return (e << 32 - n | t >>> n) >>> 0
}
;
var Ac = {}
, wc = hc
, _c = Va;
function Ec() {
this.pending = null,
this.pendingTotal = 0,
this.blockSize = this.constructor.blockSize,
this.outSize = this.constructor.outSize,
this.hmacStrength = this.constructor.hmacStrength,
this.padLength = this.constructor.padLength / 8,
this.endian = "big",
this._delta8 = this.blockSize / 8,
this._delta32 = this.blockSize / 32
}
Ac.BlockHash = Ec,
Ec.prototype.update = function(e, t) {
if (e = wc.toArray(e, t),
this.pending ? this.pending = this.pending.concat(e) : this.pending = e,
this.pendingTotal += e.length,
this.pending.length >= this._delta8) {
var n = (e = this.pending).length % this._delta8;
this.pending = e.slice(e.length - n, e.length),
0 === this.pending.length && (this.pending = null),
e = wc.join32(e, 0, e.length - n, this.endian);
for (var r = 0; r < e.length; r += this._delta32)
this._update(e, r, r + this._delta32)
}
return this
}
,
Ec.prototype.digest = function(e) {
return this.update(this._pad()),
_c(null === this.pending),
this._digest(e)
}
,
Ec.prototype._pad = function() {
var e = this.pendingTotal
, t = this._delta8
, n = t - (e + this.padLength) % t
, r = new Array(n + this.padLength);
r[0] = 128;
for (var i = 1; i < n; i++)
r[i] = 0;
if (e <<= 3,
"big" === this.endian) {
for (var o = 8; o < this.padLength; o++)
r[i++] = 0;
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
r[i++] = e >>> 24 & 255,
r[i++] = e >>> 16 & 255,
r[i++] = e >>> 8 & 255,
r[i++] = 255 & e
} else
for (r[i++] = 255 & e,
r[i++] = e >>> 8 & 255,
r[i++] = e >>> 16 & 255,
r[i++] = e >>> 24 & 255,
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
o = 8; o < this.padLength; o++)
r[i++] = 0;
return r
}
;
var Sc = {}
, kc = {}
, Mc = hc.rotr32;
function Cc(e, t, n) {
return e & t ^ ~e & n
}
function xc(e, t, n) {
return e & t ^ e & n ^ t & n
}
function Rc(e, t, n) {
return e ^ t ^ n
}
kc.ft_1 = function(e, t, n, r) {
return 0 === e ? Cc(t, n, r) : 1 === e || 3 === e ? Rc(t, n, r) : 2 === e ?
xc(t, n, r) : void 0
}
,
kc.ch32 = Cc,
kc.maj32 = xc,
kc.p32 = Rc,
kc.s0_256 = function(e) {
return Mc(e, 2) ^ Mc(e, 13) ^ Mc(e, 22)
}
,
kc.s1_256 = function(e) {
return Mc(e, 6) ^ Mc(e, 11) ^ Mc(e, 25)
}
,
kc.g0_256 = function(e) {
return Mc(e, 7) ^ Mc(e, 18) ^ e >>> 3
}
,
kc.g1_256 = function(e) {
return Mc(e, 17) ^ Mc(e, 19) ^ e >>> 10
}
;
var Tc = hc
, Ic = Ac
, Pc = kc
, Lc = Tc.rotl32
, Oc = Tc.sum32
, Nc = Tc.sum32_5
, Dc = Pc.ft_1
, Bc = Ic.BlockHash
, jc = [1518500249, 1859775393, 2400959708, 3395469782];
function zc() {
if (!(this instanceof zc))
return new zc;
Bc.call(this),
this.h = [1732584193, 4023233417, 2562383102, 271733878,
3285377520],
this.W = new Array(80)
}
Tc.inherits(zc, Bc);
var Fc = zc;
zc.blockSize = 512,
zc.outSize = 160,
zc.hmacStrength = 80,
zc.padLength = 64,
zc.prototype._update = function(e, t) {
for (var n = this.W, r = 0; r < 16; r++)
n[r] = e[t + r];
for (; r < n.length; r++)
n[r] = Lc(n[r - 3] ^ n[r - 8] ^ n[r - 14] ^ n[r - 16], 1);
var i = this.h[0]
, o = this.h[1]
, a = this.h[2]
, s = this.h[3]
, u = this.h[4];
for (r = 0; r < n.length; r++) {
var l = ~~(r / 20)
, c = Nc(Lc(i, 5), Dc(l, o, a, s), u, n[r], jc[l]);
u = s,
s = a,
a = Lc(o, 30),
o = i,
i=c
}
this.h[0] = Oc(this.h[0], i),
this.h[1] = Oc(this.h[1], o),
this.h[2] = Oc(this.h[2], a),
this.h[3] = Oc(this.h[3], s),
this.h[4] = Oc(this.h[4], u)
}
,
zc.prototype._digest = function(e) {
return "hex" === e ? Tc.toHex32(this.h, "big") : Tc.split32(this.h, "big")
}
;
var Uc = hc
, Kc = Ac
, qc = kc
, Hc = Va
, Vc = Uc.sum32
, Wc = Uc.sum32_4
, $c = Uc.sum32_5
, Yc = qc.ch32
, Qc = qc.maj32
, Zc = qc.s0_256
, Gc = qc.s1_256
, Xc = qc.g0_256
, Jc = qc.g1_256
, ed = Kc.BlockHash
, td = [1116352408, 1899447441, 3049323471, 3921009573, 961987163,
1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278,
1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401,
4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692,
1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891,
3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372,
1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921,
2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909,
275423344, 430227734, 506948616, 659060556, 883997877, 958139571,
1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452,
2361852424, 2428436474, 2756734187, 3204031479, 3329325298];
function nd() {
if (!(this instanceof nd))
return new nd;
ed.call(this),
this.h = [1779033703, 3144134277, 1013904242, 2773480762,
1359893119, 2600822924, 528734635, 1541459225],
this.k = td,
this.W = new Array(64)
}
Uc.inherits(nd, ed);
var rd = nd;
nd.blockSize = 512,
nd.outSize = 256,
nd.hmacStrength = 192,
nd.padLength = 64,
nd.prototype._update = function(e, t) {
for (var n = this.W, r = 0; r < 16; r++)
n[r] = e[t + r];
for (; r < n.length; r++)
n[r] = Wc(Jc(n[r - 2]), n[r - 7], Xc(n[r - 15]), n[r - 16]);
var i = this.h[0]
, o = this.h[1]
, a = this.h[2]
, s = this.h[3]
, u = this.h[4]
, l = this.h[5]
, c = this.h[6]
, d = this.h[7];
for (Hc(this.k.length === n.length),
r = 0; r < n.length; r++) {
var f = $c(d, Gc(u), Yc(u, l, c), this.k[r], n[r])
, h = Vc(Zc(i), Qc(i, o, a));
d = c,
c = l,
l = u,
u = Vc(s, f),
s = a,
a = o,
o = i,
i = Vc(f, h)
}
this.h[0] = Vc(this.h[0], i),
this.h[1] = Vc(this.h[1], o),
this.h[2] = Vc(this.h[2], a),
this.h[3] = Vc(this.h[3], s),
this.h[4] = Vc(this.h[4], u),
this.h[5] = Vc(this.h[5], l),
this.h[6] = Vc(this.h[6], c),
this.h[7] = Vc(this.h[7], d)
}
,
nd.prototype._digest = function(e) {
return "hex" === e ? Uc.toHex32(this.h, "big") : Uc.split32(this.h, "big")
}
;
var id = hc
, od = rd;
function ad() {
if (!(this instanceof ad))
return new ad;
od.call(this),
this.h = [3238371032, 914150663, 812702999, 4144912697,
4290775857, 1750603025, 1694076839, 3204075428]
}
id.inherits(ad, od);
var sd = ad;
ad.blockSize = 512,
ad.outSize = 224,
ad.hmacStrength = 192,
ad.padLength = 64,
ad.prototype._digest = function(e) {
return "hex" === e ? id.toHex32(this.h.slice(0, 7), "big") :
id.split32(this.h.slice(0, 7), "big")
}
;
var ud = hc
, ld = Ac
, cd = Va
, dd = ud.rotr64_hi
, fd = ud.rotr64_lo
, hd = ud.shr64_hi
, pd = ud.shr64_lo
, md = ud.sum64
, gd = ud.sum64_hi
, vd = ud.sum64_lo
, bd = ud.sum64_4_hi
, yd = ud.sum64_4_lo
, Ad = ud.sum64_5_hi
, wd = ud.sum64_5_lo
, _d = ld.BlockHash
, Ed = [1116352408, 3609767458, 1899447441, 602891725,
3049323471, 3964484399, 3921009573, 2173295548, 961987163, 4081628472,
1508970993, 3053834265, 2453635748, 2937671579, 2870763221, 3664609560,
3624381080, 2734883394, 310598401, 1164996542, 607225278, 1323610764,
1426881987, 3590304994, 1925078388, 4068182383, 2162078206, 991336113,
2614888103, 633803317, 3248222580, 3479774868, 3835390401, 2666613458,
4022224774, 944711139, 264347078, 2341262773, 604807628, 2007800933,
770255983, 1495990901, 1249150122, 1856431235, 1555081692, 3175218132,
1996064986, 2198950837, 2554220882, 3999719339, 2821834349, 766784016,
2952996808, 2566594879, 3210313671, 3203337956, 3336571891, 1034457026,
3584528711, 2466948901, 113926993, 3758326383, 338241895, 168717936,
666307205, 1188179964, 773529912, 1546045734, 1294757372, 1522805485,
1396182291, 2643833823, 1695183700, 2343527390, 1986661051, 1014477480,
2177026350, 1206759142, 2456956037, 344077627, 2730485921, 1290863460,
2820302411, 3158454273, 3259730800, 3505952657, 3345764771, 106217008,
3516065817, 3606008344, 3600352804, 1432725776, 4094571909, 1467031594,
275423344, 851169720, 430227734, 3100823752, 506948616, 1363258195,
659060556, 3750685593, 883997877, 3785050280, 958139571, 3318307427,
1322822218, 3812723403, 1537002063, 2003034995, 1747873779, 3602036899,
1955562222, 1575990012, 2024104815, 1125592928, 2227730452, 2716904306,
2361852424, 442776044, 2428436474, 593698344, 2756734187, 3733110249,
3204031479, 2999351573, 3329325298, 3815920427, 3391569614, 3928383900,
3515267271, 566280711, 3940187606, 3454069534, 4118630271, 4000239992,
116418474, 1914138554, 174292421, 2731055270, 289380356, 3203993006,
460393269, 320620315, 685471733, 587496836, 852142971, 1086792851,
1017036298, 365543100, 1126000580, 2618297676, 1288033470, 3409855158,
1501505948, 4234509866, 1607167915, 987167468, 1816402316, 1246189591];
function Sd() {
if (!(this instanceof Sd))
return new Sd;
_d.call(this),
this.h = [1779033703, 4089235720, 3144134277, 2227873595,
1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137,
2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209],
this.k = Ed,
this.W = new Array(160)
}
ud.inherits(Sd, _d);
var kd = Sd;
function Md(e, t, n, r, i) {
var o = e & n ^ ~e & i;
return o < 0 && (o += 4294967296),
o
}
function Cd(e, t, n, r, i, o) {
var a = t & r ^ ~t & o;
return a < 0 && (a += 4294967296),
a
}
function xd(e, t, n, r, i) {
var o = e & n ^ e & i ^ n & i;
return o < 0 && (o += 4294967296),
o
}
function Rd(e, t, n, r, i, o) {
var a = t & r ^ t & o ^ r & o;
return a < 0 && (a += 4294967296),
a
}
function Td(e, t) {
var n = dd(e, t, 28) ^ dd(t, e, 2) ^ dd(t, e, 7);
return n < 0 && (n += 4294967296),
n
}
function Id(e, t) {
var n = fd(e, t, 28) ^ fd(t, e, 2) ^ fd(t, e, 7);
return n < 0 && (n += 4294967296),
n
}
function Pd(e, t) {
var n = dd(e, t, 14) ^ dd(e, t, 18) ^ dd(t, e, 9);
return n < 0 && (n += 4294967296),
n
}
function Ld(e, t) {
var n = fd(e, t, 14) ^ fd(e, t, 18) ^ fd(t, e, 9);
return n < 0 && (n += 4294967296),
n
}
function Od(e, t) {
var n = dd(e, t, 1) ^ dd(e, t, 8) ^ hd(e, t, 7);
return n < 0 && (n += 4294967296),
n
}
function Nd(e, t) {
var n = fd(e, t, 1) ^ fd(e, t, 8) ^ pd(e, t, 7);
return n < 0 && (n += 4294967296),
n
}
function Dd(e, t) {
var n = dd(e, t, 19) ^ dd(t, e, 29) ^ hd(e, t, 6);
return n < 0 && (n += 4294967296),
n
}
function Bd(e, t) {
var n = fd(e, t, 19) ^ fd(t, e, 29) ^ pd(e, t, 6);
return n < 0 && (n += 4294967296),
n
}
Sd.blockSize = 1024,
Sd.outSize = 512,
Sd.hmacStrength = 192,
Sd.padLength = 128,
Sd.prototype._prepareBlock = function(e, t) {
for (var n = this.W, r = 0; r < 32; r++)
n[r] = e[t + r];
for (; r < n.length; r += 2) {
var i = Dd(n[r - 4], n[r - 3])
, o = Bd(n[r - 4], n[r - 3])
, a = n[r - 14]
, s = n[r - 13]
, u = Od(n[r - 30], n[r - 29])
, l = Nd(n[r - 30], n[r - 29])
, c = n[r - 32]
, d = n[r - 31];
n[r] = bd(i, o, a, s, u, l, c, d),
n[r + 1] = yd(i, o, a, s, u, l, c, d)
}
}
,
Sd.prototype._update = function(e, t) {
this._prepareBlock(e, t);
var n = this.W
, r = this.h[0]
, i = this.h[1]
, o = this.h[2]
, a = this.h[3]
, s = this.h[4]
, u = this.h[5]
, l = this.h[6]
, c = this.h[7]
, d = this.h[8]
, f = this.h[9]
, h = this.h[10]
, p = this.h[11]
, m = this.h[12]
, g = this.h[13]
, v = this.h[14]
, b = this.h[15];
cd(this.k.length === n.length);
for (var y = 0; y < n.length; y += 2) {
var A = v
,w=b
, _ = Pd(d, f)
, E = Ld(d, f)
, S = Md(d, f, h, p, m)
, k = Cd(d, f, h, p, m, g)
, M = this.k[y]
, C = this.k[y + 1]
, x = n[y]
, R = n[y + 1]
, T = Ad(A, w, _, E, S, k, M, C, x, R)
, I = wd(A, w, _, E, S, k, M, C, x, R);
A = Td(r, i),
w = Id(r, i),
_ = xd(r, i, o, a, s),
E = Rd(r, i, o, a, s, u);
var P = gd(A, w, _, E)
, L = vd(A, w, _, E);
v = m,
b = g,
m = h,
g = p,
h = d,
p = f,
d = gd(l, c, T, I),
f = vd(c, c, T, I),
l = s,
c = u,
s = o,
u = a,
o = r,
a = i,
r = gd(T, I, P, L),
i = vd(T, I, P, L)
}
md(this.h, 0, r, i),
md(this.h, 2, o, a),
md(this.h, 4, s, u),
md(this.h, 6, l, c),
md(this.h, 8, d, f),
md(this.h, 10, h, p),
md(this.h, 12, m, g),
md(this.h, 14, v, b)
}
,
Sd.prototype._digest = function(e) {
return "hex" === e ? ud.toHex32(this.h, "big") : ud.split32(this.h, "big")
}
;
var jd = hc
, zd = kd;
function Fd() {
if (!(this instanceof Fd))
return new Fd;
zd.call(this),
this.h = [3418070365, 3238371032, 1654270250, 914150663,
2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857,
2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428]
}
jd.inherits(Fd, zd);
var Ud = Fd;
Fd.blockSize = 1024,
Fd.outSize = 384,
Fd.hmacStrength = 192,
Fd.padLength = 128,
Fd.prototype._digest = function(e) {
return "hex" === e ? jd.toHex32(this.h.slice(0, 12), "big") :
jd.split32(this.h.slice(0, 12), "big")
}
,
Sc.sha1 = Fc,
Sc.sha224 = sd,
Sc.sha256 = rd,
Sc.sha384 = Ud,
Sc.sha512 = kd;
var Kd = {}
, qd = hc
, Hd = Ac
, Vd = qd.rotl32
, Wd = qd.sum32
, $d = qd.sum32_3
, Yd = qd.sum32_4
, Qd = Hd.BlockHash;
function Zd() {
if (!(this instanceof Zd))
return new Zd;
Qd.call(this),
this.h = [1732584193, 4023233417, 2562383102, 271733878,
3285377520],
this.endian = "little"
}
function Gd(e, t, n, r) {
return e <= 15 ? t ^ n ^ r : e <= 31 ? t & n | ~t & r : e <= 47 ? (t | ~n) ^ r :
e <= 63 ? t & r | n & ~r : t ^ (n | ~r)
}
function Xd(e) {
return e <= 15 ? 0 : e <= 31 ? 1518500249 : e <= 47 ? 1859775393 : e
<= 63 ? 2400959708 : 2840853838
}
function Jd(e) {
return e <= 15 ? 1352829926 : e <= 31 ? 1548603684 : e <= 47 ?
1836072691 : e <= 63 ? 2053994217 : 0
}
qd.inherits(Zd, Qd),
Kd.ripemd160 = Zd,
Zd.blockSize = 512,
Zd.outSize = 160,
Zd.hmacStrength = 192,
Zd.padLength = 64,
Zd.prototype._update = function(e, t) {
for (var n = this.h[0], r = this.h[1], i = this.h[2], o = this.h[3], a = this.h[4],
s = n, u = r, l = i, c = o, d = a, f = 0; f < 80; f++) {
var h = Wd(Vd(Yd(n, Gd(f, r, i, o), e[ef[f] + t], Xd(f)), nf[f]), a);
n = a,
a = o,
o = Vd(i, 10),
i = r,
r = h,
h = Wd(Vd(Yd(s, Gd(79 - f, u, l, c), e[tf[f] + t], Jd(f)), rf[f]), d),
s = d,
d = c,
c = Vd(l, 10),
l = u,
u=h
}
h = $d(this.h[1], i, c),
this.h[1] = $d(this.h[2], o, d),
this.h[2] = $d(this.h[3], a, s),
this.h[3] = $d(this.h[4], n, u),
this.h[4] = $d(this.h[0], r, l),
this.h[0] = h
}
,
Zd.prototype._digest = function(e) {
return "hex" === e ? qd.toHex32(this.h, "little") : qd.split32(this.h, "little")
}
;
var ef = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6,
15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11,
10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]
, tf = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5,
10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3,
11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]
, nf = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9,
7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11,
12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14,
11, 8, 5, 6]
, rf = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8,
9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5,
8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13,
11, 11]
, of = hc
, af = Va;
function sf(e, t, n) {
if (!(this instanceof sf))
return new sf(e,t,n);
this.Hash = e,
this.blockSize = e.blockSize / 8,
this.outSize = e.outSize / 8,
this.inner = null,
this.outer = null,
this._init(of.toArray(t, n))
}
var uf, lf, cf = sf;
sf.prototype._init = function(e) {
e.length > this.blockSize && (e = (new this.Hash).update(e).digest()),
af(e.length <= this.blockSize);
for (var t = e.length; t < this.blockSize; t++)
e.push(0);
for (t = 0; t < e.length; t++)
e[t] ^= 54;
for (this.inner = (new this.Hash).update(e),
t = 0; t < e.length; t++)
e[t] ^= 106;
this.outer = (new this.Hash).update(e)
}
,
sf.prototype.update = function(e, t) {
return this.inner.update(e, t),
this
}
,
sf.prototype.digest = function(e) {
return this.outer.update(this.inner.digest()),
this.outer.digest(e)
}
,
function(e) {
var t = e;
t.utils = hc,
t.common = Ac,
t.sha = Sc,
t.ripemd = Kd,
t.hmac = cf,
t.sha1 = t.sha.sha1,
t.sha256 = t.sha.sha256,
t.sha224 = t.sha.sha224,
t.sha384 = t.sha.sha384,
t.sha512 = t.sha.sha512,
t.ripemd160 = t.ripemd.ripemd160
}(fc),
function(e) {
var t, n = e, r = fc, i = Ol, o = Pl.assert;
function a(e) {
"short" === e.type ? this.curve = new i.short(e) : "edwards" ===
e.type ? this.curve = new i.edwards(e) : this.curve = new i.mont(e),
this.g = this.curve.g,
this.n = this.curve.n,
this.hash = e.hash,
o(this.g.validate(), "Invalid curve"),
o(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O")
}
function s(e, t) {
Object.defineProperty(n, e, {
configurable: !0,
enumerable: !0,
get: function() {
var r = new a(t);
return Object.defineProperty(n, e, {
configurable: !0,
enumerable: !0,
value: r
}),
r
}
})
}
n.PresetCurve = a,
s("p192", {
type: "short",
prime: "p192",
p: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",
a: "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",
b: "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",
n: "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",
hash: r.sha256,
gRed: !1,
g: ["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012",
"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]
}),
s("p224", {
type: "short",
prime: "p224",
p: "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",
a: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",
b: "b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943
2355ffb4",
n: "ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",
hash: r.sha256,
gRed: !1,
g: ["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6
115c1d21", "bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]
}),
s("p256", {
type: "short",
prime: null,
p: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff
ffffffff",
a: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff
fffffffc",
b: "5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6
3bce3c3e 27d2604b",
n: "ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2
fc632551",
hash: r.sha256,
gRed: !1,
g: ["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0
f4a13945 d898c296", "4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece
cbb64068 37bf51f5"]
}),
s("p384", {
type: "short",
prime: null,
p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000
00000000 ffffffff",
a: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000
00000000 fffffffc",
b: "b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112
0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",
n: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2
48b0a77a ecec196a ccc52973",
hash: r.sha384,
gRed: !1,
g: ["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98
59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7", "3617de4a 96262c6f
5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d
7a431d7c 90ea0e5f"]
}),
s("p521", {
type: "short",
prime: null,
p: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",
a: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",
b: "00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b
99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88
3d2c34f1 ef451fd4 6b503f00",
n: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783
bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",
hash: r.sha512,
gRed: !1,
g: ["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139
053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1
856a429b f97e7e31 c2e5bd66", "00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9
98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761
353c7086 a272c240 88be9476 9fd16650"]
}),
s("curve25519", {
type: "mont",
prime: "p25519",
p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
a: "76d06",
b: "1",
n: "1000000000000000 0000000000000000 14def9dea2f79cd6
5812631a5cf5d3ed",
hash: r.sha256,
gRed: !1,
g: ["9"]
}),
s("ed25519", {
type: "edwards",
prime: "p25519",
p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
a: "-1",
c: "1",
d: "52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab
75eb4dca135978a3",
n: "1000000000000000 0000000000000000 14def9dea2f79cd6
5812631a5cf5d3ed",
hash: r.sha256,
gRed: !1,
g:
["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a",
"6666666666666666666666666666666666666666666666666666666666666658"]
});
try {
t = lf ? uf : (lf = 1,
uf = {
doubles: {
step: 4,
points:
[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a",
"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],
["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",
"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],
["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739",
"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],
["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640",
"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],
["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c",
"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],
["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda",
"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],
["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa",
"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],
["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0",
"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],
["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d",
"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],
["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d",
"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],
["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1",
"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],
["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0",
"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],
["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047",
"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],
["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862",
"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],
["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7",
"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],
["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd",
"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],
["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83",
"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],
["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a",
"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],
["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8",
"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],
["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d",
"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],
["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725",
"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],
["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754",
"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],
["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c",
"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],
["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6",
"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],
["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39",
"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],
["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891",
"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],
["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b",
"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],
["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03",
"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],
["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d",
"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],
["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070",
"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],
["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4",
"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],
["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da",
"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],
["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11",
"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],
["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e",
"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],
["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41",
"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],
["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef",
"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],
["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8",
"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],
["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d",
"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],
["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96",
"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],
["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd",
"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],
["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5",
"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],
["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266",
"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],
["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71",
"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],
["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac",
"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],
["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751",
"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],
["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e",
"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],
["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241",
"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],
["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3",
"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],
["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f",
"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],
["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19",
"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],
["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be",
"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],
["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9",
"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],
["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2",
"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],
["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13",
"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],
["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c",
"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],
["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba",
"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],
["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151",
"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],
["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073",
"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],
["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458",
"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],
["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b",
"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],
["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366",
"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],
["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa",
"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],
["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0",
"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],
["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787",
"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],
["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e",
"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]
},
naf: {
wnd: 7,
points:
[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9",
"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],
["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4",
"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],
["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc",
"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],
["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe",
"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],
["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb",
"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],
["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8",
"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],
["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e",
"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],
["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34",
"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],
["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c",
"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],
["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5",
"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],
["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f",
"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],
["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714",
"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],
["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729",
"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],
["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db",
"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],
["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4",
"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],
["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5",
"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],
["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479",
"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],
["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d",
"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],
["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f",
"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],
["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb",
"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],
["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9",
"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],
["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963",
"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],
["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74",
"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],
["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530",
"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],
["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b",
"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],
["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247",
"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],
["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1",
"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],
["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120",
"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],
["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435",
"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],
["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18",
"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],
["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8",
"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],
["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb",
"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],
["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f",
"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],
["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143",
"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],
["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba",
"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],
["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45",
"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],
["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a",
"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],
["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e",
"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],
["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8",
"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],
["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c",
"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],
["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519",
"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],
["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab",
"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],
["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca",
"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],
["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf",
"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],
["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610",
"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],
["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4",
"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],
["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c",
"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],
["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940",
"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],
["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980",
"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],
["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3",
"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],
["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf",
"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],
["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63",
"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],
["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448",
"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],
["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf",
"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],
["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5",
"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],
["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6",
"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],
["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5",
"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],
["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99",
"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],
["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51",
"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],
["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5",
"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],
["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5",
"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],
["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997",
"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],
["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881",
"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],
["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5",
"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],
["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66",
"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],
["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726",
"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],
["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede",
"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],
["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94",
"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],
["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31",
"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],
["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51",
"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],
["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252",
"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],
["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5",
"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],
["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b",
"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],
["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4",
"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],
["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f",
"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],
["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889",
"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],
["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246",
"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],
["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984",
"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],
["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a",
"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],
["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030",
"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],
["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197",
"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],
["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593",
"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],
["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef",
"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],
["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38",
"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],
["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a",
"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],
["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111",
"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],
["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502",
"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],
["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea",
"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],
["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26",
"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],
["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986",
"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],
["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e",
"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],
["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4",
"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],
["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda",
"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],
["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859",
"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],
["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f",
"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],
["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c",
"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],
["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942",
"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],
["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a",
"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],
["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80",
"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],
["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d",
"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],
["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1",
"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],
["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63",
"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],
["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352",
"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],
["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193",
"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],
["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00",
"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],
["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58",
"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],
["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7",
"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],
["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8",
"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],
["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e",
"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],
["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d",
"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],
["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b",
"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],
["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f",
"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],
["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6",
"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],
["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297",
"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],
["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a",
"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],
["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c",
"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],
["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52",
"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],
["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb",
"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],
["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065",
"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],
["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917",
"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],
["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9",
"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],
["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3",
"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],
["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57",
"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],
["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66",
"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],
["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8",
"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],
["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721",
"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],
["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180",
"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]
}
})
} catch (e) {
t = void 0
}
s("secp256k1", {
type: "short",
prime: "k256",
p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",
a: "0",
b: "7",
n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",
h: "1",
hash: r.sha256,
beta:
"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",
lambda:
"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",
basis: [{
a: "3086d221a7d46bcde86c90e49284eb15",
b: "-e4437ed6010e88286f547fa90abfe4c3"
}, {
a: "114ca50f7a8e2f3f657c1108d9d44cfd8",
b: "3086d221a7d46bcde86c90e49284eb15"
}],
gRed: !1,
g:
["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", t]
})
}(dc);
var df = fc
, ff = Ll
, hf = Va;
function pf(e) {
if (!(this instanceof pf))
return new pf(e);
this.hash = e.hash,
this.predResist = !!e.predResist,
this.outLen = this.hash.outSize,
this.minEntropy = e.minEntropy || this.hash.hmacStrength,
this._reseed = null,
this.reseedInterval = null,
this.K = null,
this.V = null;
var t = ff.toArray(e.entropy, e.entropyEnc || "hex")
, n = ff.toArray(e.nonce, e.nonceEnc || "hex")
, r = ff.toArray(e.pers, e.persEnc || "hex");
hf(t.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " +
this.minEntropy + " bits"),
this._init(t, n, r)
}
var mf = pf;
pf.prototype._init = function(e, t, n) {
var r = e.concat(t).concat(n);
this.K = new Array(this.outLen / 8),
this.V = new Array(this.outLen / 8);
for (var i = 0; i < this.V.length; i++)
this.K[i] = 0,
this.V[i] = 1;
this._update(r),
this._reseed = 1,
this.reseedInterval = 281474976710656
}
,
pf.prototype._hmac = function() {
return new df.hmac(this.hash,this.K)
}
,
pf.prototype._update = function(e) {
var t = this._hmac().update(this.V).update([0]);
e && (t = t.update(e)),
this.K = t.digest(),
this.V = this._hmac().update(this.V).digest(),
e && (this.K =
this._hmac().update(this.V).update([1]).update(e).digest(),
this.V = this._hmac().update(this.V).digest())
}
,
pf.prototype.reseed = function(e, t, n, r) {
"string" != typeof t && (r = n,
n = t,
t = null),
e = ff.toArray(e, t),
n = ff.toArray(n, r),
hf(e.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " +
this.minEntropy + " bits"),
this._update(e.concat(n || [])),
this._reseed = 1
}
,
pf.prototype.generate = function(e, t, n, r) {
if (this._reseed > this.reseedInterval)
throw new Error("Reseed is required");
"string" != typeof t && (r = n,
n = t,
t = null),
n && (n = ff.toArray(n, r || "hex"),
this._update(n));
for (var i = []; i.length < e; )
this.V = this._hmac().update(this.V).digest(),
i = i.concat(this.V);
var o = i.slice(0, e);
return this._update(n),
this._reseed++,
ff.encode(o, t)
}
;
var gf = hl
, vf = Pl.assert;
function bf(e, t) {
this.ec = e,
this.priv = null,
this.pub = null,
t.priv && this._importPrivate(t.priv, t.privEnc),
t.pub && this._importPublic(t.pub, t.pubEnc)
}
var yf = bf;
bf.fromPublic = function(e, t, n) {
return t instanceof bf ? t : new bf(e,{
pub: t,
pubEnc: n
})
}
,
bf.fromPrivate = function(e, t, n) {
return t instanceof bf ? t : new bf(e,{
priv: t,
privEnc: n
})
}
,
bf.prototype.validate = function() {
var e = this.getPublic();
return e.isInfinity() ? {
result: !1,
reason: "Invalid public key"
} : e.validate() ? e.mul(this.ec.curve.n).isInfinity() ? {
result: !0,
reason: null
}:{
result: !1,
reason: "Public key * N != O"
}:{
result: !1,
reason: "Public key is not a point"
}
}
,
bf.prototype.getPublic = function(e, t) {
return "string" == typeof e && (t = e,
e = null),
this.pub || (this.pub = this.ec.g.mul(this.priv)),
t ? this.pub.encode(t, e) : this.pub
}
,
bf.prototype.getPrivate = function(e) {
return "hex" === e ? this.priv.toString(16, 2) : this.priv
}
,
bf.prototype._importPrivate = function(e, t) {
this.priv = new gf(e,t || 16),
this.priv = this.priv.umod(this.ec.curve.n)
}
,
bf.prototype._importPublic = function(e, t) {
if (e.x || e.y)
return "mont" === this.ec.curve.type ? vf(e.x, "Need x coordinate") :
"short" !== this.ec.curve.type && "edwards" !== this.ec.curve.type || vf(e.x && e.y, "Need
both x and y coordinate"),
void (this.pub = this.ec.curve.point(e.x, e.y));
this.pub = this.ec.curve.decodePoint(e, t)
}
,
bf.prototype.derive = function(e) {
return e.validate() || vf(e.validate(), "public point not validated"),
e.mul(this.priv).getX()
}
,
bf.prototype.sign = function(e, t, n) {
return this.ec.sign(e, this, t, n)
}
,
bf.prototype.verify = function(e, t) {
return this.ec.verify(e, t, this)
}
,
bf.prototype.inspect = function() {
return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " +
(this.pub && this.pub.inspect()) + " >"
}
;
var Af = hl
, wf = Pl
, _f = wf.assert;
function Ef(e, t) {
if (e instanceof Ef)
return e;
this._importDER(e, t) || (_f(e.r && e.s, "Signature without r or s"),
this.r = new Af(e.r,16),
this.s = new Af(e.s,16),
void 0 === e.recoveryParam ? this.recoveryParam = null :
this.recoveryParam = e.recoveryParam)
}
var Sf, kf, Mf = Ef;
function Cf() {
this.place = 0
}
function xf(e, t) {
var n = e[t.place++];
if (!(128 & n))
return n;
var r = 15 & n;
if (0 === r || r > 4)
return !1;
for (var i = 0, o = 0, a = t.place; o < r; o++,
a++)
i <<= 8,
i |= e[a],
i >>>= 0;
return !(i <= 127) && (t.place = a,
i)
}
function Rf(e) {
for (var t = 0, n = e.length - 1; !e[t] && !(128 & e[t + 1]) && t < n; )
t++;
return 0 === t ? e : e.slice(t)
}
function Tf(e, t) {
if (t < 128)
e.push(t);
else {
var n = 1 + (Math.log(t) / Math.LN2 >>> 3);
for (e.push(128 | n); --n; )
e.push(t >>> (n << 3) & 255);
e.push(t)
}
}
Ef.prototype._importDER = function(e, t) {
e = wf.toArray(e, t);
var n = new Cf;
if (48 !== e[n.place++])
return !1;
var r = xf(e, n);
if (!1 === r)
return !1;
if (r + n.place !== e.length)
return !1;
if (2 !== e[n.place++])
return !1;
var i = xf(e, n);
if (!1 === i)
return !1;
var o = e.slice(n.place, i + n.place);
if (n.place += i,
2 !== e[n.place++])
return !1;
var a = xf(e, n);
if (!1 === a)
return !1;
if (e.length !== a + n.place)
return !1;
var s = e.slice(n.place, a + n.place);
if (0 === o[0]) {
if (!(128 & o[1]))
return !1;
o = o.slice(1)
}
if (0 === s[0]) {
if (!(128 & s[1]))
return !1;
s = s.slice(1)
}
return this.r = new Af(o),
this.s = new Af(s),
this.recoveryParam = null,
!0
}
,
Ef.prototype.toDER = function(e) {
var t = this.r.toArray()
, n = this.s.toArray();
for (128 & t[0] && (t = [0].concat(t)),
128 & n[0] && (n = [0].concat(n)),
t = Rf(t),
n = Rf(n); !(n[0] || 128 & n[1]); )
n = n.slice(1);
var r = [2];
Tf(r, t.length),
(r = r.concat(t)).push(2),
Tf(r, n.length);
var i = r.concat(n)
, o = [48];
return Tf(o, i.length),
o = o.concat(i),
wf.encode(o, e)
}
;
var If = Pl
, Pf = If.assert
, Lf = If.parseBytes
, Of = If.cachedProperty;
function Nf(e, t) {
this.eddsa = e,
this._secret = Lf(t.secret),
e.isPoint(t.pub) ? this._pub = t.pub : this._pubBytes = Lf(t.pub)
}
Nf.fromPublic = function(e, t) {
return t instanceof Nf ? t : new Nf(e,{
pub: t
})
}
,
Nf.fromSecret = function(e, t) {
return t instanceof Nf ? t : new Nf(e,{
secret: t
})
}
,
Nf.prototype.secret = function() {
return this._secret
}
,
Of(Nf, "pubBytes", (function() {
return this.eddsa.encodePoint(this.pub())
}
)),
Of(Nf, "pub", (function() {
return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) :
this.eddsa.g.mul(this.priv())
}
)),
Of(Nf, "privBytes", (function() {
var e = this.eddsa
, t = this.hash()
, n = e.encodingLength - 1
, r = t.slice(0, e.encodingLength);
return r[0] &= 248,
r[n] &= 127,
r[n] |= 64,
r
}
)),
Of(Nf, "priv", (function() {
return this.eddsa.decodeInt(this.privBytes())
}
)),
Of(Nf, "hash", (function() {
return this.eddsa.hash().update(this.secret()).digest()
}
)),
Of(Nf, "messagePrefix", (function() {
return this.hash().slice(this.eddsa.encodingLength)
}
)),
Nf.prototype.sign = function(e) {
return Pf(this._secret, "KeyPair can only verify"),
this.eddsa.sign(e, this)
}
,
Nf.prototype.verify = function(e, t) {
return this.eddsa.verify(e, t, this)
}
,
Nf.prototype.getSecret = function(e) {
return Pf(this._secret, "KeyPair is public only"),
If.encode(this.secret(), e)
}
,
Nf.prototype.getPublic = function(e) {
return If.encode(this.pubBytes(), e)
}
;
var Df = Nf
, Bf = hl
, jf = Pl
, zf = jf.assert
, Ff = jf.cachedProperty
, Uf = jf.parseBytes;
function Kf(e, t) {
this.eddsa = e,
"object" != typeof t && (t = Uf(t)),
Array.isArray(t) && (t = {
R: t.slice(0, e.encodingLength),
S: t.slice(e.encodingLength)
}),
zf(t.R && t.S, "Signature without R or S"),
e.isPoint(t.R) && (this._R = t.R),
t.S instanceof Bf && (this._S = t.S),
this._Rencoded = Array.isArray(t.R) ? t.R : t.Rencoded,
this._Sencoded = Array.isArray(t.S) ? t.S : t.Sencoded
}
Ff(Kf, "S", (function() {
return this.eddsa.decodeInt(this.Sencoded())
}
)),
Ff(Kf, "R", (function() {
return this.eddsa.decodePoint(this.Rencoded())
}
)),
Ff(Kf, "Rencoded", (function() {
return this.eddsa.encodePoint(this.R())
}
)),
Ff(Kf, "Sencoded", (function() {
return this.eddsa.encodeInt(this.S())
}
)),
Kf.prototype.toBytes = function() {
return this.Rencoded().concat(this.Sencoded())
}
,
Kf.prototype.toHex = function() {
return jf.encode(this.toBytes(), "hex").toUpperCase()
}
;
var qf = Kf
, Hf = fc
, Vf = dc
, Wf = Pl
, $f = Wf.assert
, Yf = Wf.parseBytes
, Qf = Df
, Zf = qf;
function Gf(e) {
if ($f("ed25519" === e, "only tested with ed25519 so far"),
!(this instanceof Gf))
return new Gf(e);
e = Vf[e].curve,
this.curve = e,
this.g = e.g,
this.g.precompute(e.n.bitLength() + 1),
this.pointClass = e.point().constructor,
this.encodingLength = Math.ceil(e.n.bitLength() / 8),
this.hash = Hf.sha512
}
var Xf, Jf = Gf;
function eh() {
return Xf || (Xf = 1,
function(e) {
var t = e;
t.version = Il.version,
t.utils = Pl,
t.rand = ml(),
t.curve = Ol,
t.curves = dc,
t.ec = function() {
if (kf)
return Sf;
kf = 1;
var e = hl
, t = mf
, n = Pl
, r = dc
, i = ml()
, o = n.assert
, a = yf
, s = Mf;
function u(e) {
if (!(this instanceof u))
return new u(e);
"string" == typeof e &&
(o(Object.prototype.hasOwnProperty.call(r, e), "Unknown curve " + e),
e = r[e]),
e instanceof r.PresetCurve && (e = {
curve: e
}),
this.curve = e.curve.curve,
this.n = this.curve.n,
this.nh = this.n.ushrn(1),
this.g = this.curve.g,
this.g = e.curve.g,
this.g.precompute(e.curve.n.bitLength() + 1),
this.hash = e.hash || e.curve.hash
}
return Sf = u,
u.prototype.keyPair = function(e) {
return new a(this,e)
}
,
u.prototype.keyFromPrivate = function(e, t) {
return a.fromPrivate(this, e, t)
}
,
u.prototype.keyFromPublic = function(e, t) {
return a.fromPublic(this, e, t)
}
,
u.prototype.genKeyPair = function(n) {
n || (n = {});
for (var r = new t({
hash: this.hash,
pers: n.pers,
persEnc: n.persEnc || "utf8",
entropy: n.entropy || i(this.hash.hmacStrength),
entropyEnc: n.entropy && n.entropyEnc || "utf8",
nonce: this.n.toArray()
}), o = this.n.byteLength(), a = this.n.sub(new e(2)); ; ) {
var s = new e(r.generate(o));
if (!(s.cmp(a) > 0))
return s.iaddn(1),
this.keyFromPrivate(s)
}
}
,
u.prototype._truncateToN = function(e, t) {
var n = 8 * e.byteLength() - this.n.bitLength();
return n > 0 && (e = e.ushrn(n)),
!t && e.cmp(this.n) >= 0 ? e.sub(this.n) : e
}
,
u.prototype.sign = function(n, r, i, o) {
"object" == typeof i && (o = i,
i = null),
o || (o = {}),
r = this.keyFromPrivate(r, i),
n = this._truncateToN(new e(n,16));
for (var a = this.n.byteLength(), u =
r.getPrivate().toArray("be", a), l = n.toArray("be", a), c = new t({
hash: this.hash,
entropy: u,
nonce: l,
pers: o.pers,
persEnc: o.persEnc || "utf8"
}), d = this.n.sub(new e(1)), f = 0; ; f++) {
var h = o.k ? o.k(f) : new
e(c.generate(this.n.byteLength()));
if (!((h = this._truncateToN(h, !0)).cmpn(1) <= 0 ||
h.cmp(d) >= 0)) {
var p = this.g.mul(h);
if (!p.isInfinity()) {
var m = p.getX()
, g = m.umod(this.n);
if (0 !== g.cmpn(0)) {
var v =
h.invm(this.n).mul(g.mul(r.getPrivate()).iadd(n));
if (0 !== (v = v.umod(this.n)).cmpn(0)) {
var b = (p.getY().isOdd() ? 1 : 0) | (0 !==
m.cmp(g) ? 2 : 0);
return o.canonical && v.cmp(this.nh) >
0 && (v = this.n.sub(v),
b ^= 1),
new s({
r: g,
s: v,
recoveryParam: b
})
}
}
}
}
}
}
,
u.prototype.verify = function(t, n, r, i) {
t = this._truncateToN(new e(t,16)),
r = this.keyFromPublic(r, i);
var o = (n = new s(n,"hex")).r
, a = n.s;
if (o.cmpn(1) < 0 || o.cmp(this.n) >= 0)
return !1;
if (a.cmpn(1) < 0 || a.cmp(this.n) >= 0)
return !1;
var u, l = a.invm(this.n), c = l.mul(t).umod(this.n), d =
l.mul(o).umod(this.n);
return this.curve._maxwellTrick ? !(u = this.g.jmulAdd(c,
r.getPublic(), d)).isInfinity() && u.eqXToP(o) : !(u = this.g.mulAdd(c, r.getPublic(),
d)).isInfinity() && 0 === u.getX().umod(this.n).cmp(o)
}
,
u.prototype.recoverPubKey = function(t, n, r, i) {
o((3 & r) === r, "The recovery param is more than two bits"),
n = new s(n,i);
var a = this.n
, u = new e(t)
, l = n.r
, c = n.s
,d=1&r
, f = r >> 1;
if (l.cmp(this.curve.p.umod(this.curve.n)) >= 0 && f)
throw new Error("Unable to find sencond key
candinate");
l = f ? this.curve.pointFromX(l.add(this.curve.n), d) :
this.curve.pointFromX(l, d);
var h = n.r.invm(a)
, p = a.sub(u).mul(h).umod(a)
, m = c.mul(h).umod(a);
return this.g.mulAdd(p, l, m)
}
,
u.prototype.getKeyRecoveryParam = function(e, t, n, r) {
if (null !== (t = new s(t,r)).recoveryParam)
return t.recoveryParam;
for (var i = 0; i < 4; i++) {
var o;
try {
o = this.recoverPubKey(e, t, i)
} catch (e) {
continue
}
if (o.eq(n))
return i
}
throw new Error("Unable to find valid recovery factor")
}
,
Sf
}(),
t.eddsa = Jf
}(Tl)),
Tl
}
Gf.prototype.sign = function(e, t) {
e = Yf(e);
var n = this.keyFromSecret(t)
, r = this.hashInt(n.messagePrefix(), e)
, i = this.g.mul(r)
, o = this.encodePoint(i)
, a = this.hashInt(o, n.pubBytes(), e).mul(n.priv())
, s = r.add(a).umod(this.curve.n);
return this.makeSignature({
R: i,
S: s,
Rencoded: o
})
}
,
Gf.prototype.verify = function(e, t, n) {
e = Yf(e),
t = this.makeSignature(t);
var r = this.keyFromPublic(n)
, i = this.hashInt(t.Rencoded(), r.pubBytes(), e)
, o = this.g.mul(t.S());
return t.R().add(r.pub().mul(i)).eq(o)
}
,
Gf.prototype.hashInt = function() {
for (var e = this.hash(), t = 0; t < arguments.length; t++)
e.update(arguments[t]);
return Wf.intFromLE(e.digest()).umod(this.curve.n)
}
,
Gf.prototype.keyFromPublic = function(e) {
return Qf.fromPublic(this, e)
}
,
Gf.prototype.keyFromSecret = function(e) {
return Qf.fromSecret(this, e)
}
,
Gf.prototype.makeSignature = function(e) {
return e instanceof Zf ? e : new Zf(this,e)
}
,
Gf.prototype.encodePoint = function(e) {
var t = e.getY().toArray("le", this.encodingLength);
return t[this.encodingLength - 1] |= e.getX().isOdd() ? 128 : 0,
t
}
,
Gf.prototype.decodePoint = function(e) {
var t = (e = Wf.parseBytes(e)).length - 1
, n = e.slice(0, t).concat(-129 & e[t])
, r = 0 != (128 & e[t])
, i = Wf.intFromLE(n);
return this.curve.pointFromY(i, r)
}
,
Gf.prototype.encodeInt = function(e) {
return e.toArray("le", this.encodingLength)
}
,
Gf.prototype.decodeInt = function(e) {
return Wf.intFromLE(e)
}
,
Gf.prototype.isPoint = function(e) {
return e instanceof this.pointClass
}
;
var th = {
exports: {}
};
!function(e) {
!function(e, t) {
function n(e, t) {
if (!e)
throw new Error(t || "Assertion failed")
}
function r(e, t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
function i(e, t, n) {
if (i.isBN(e))
return e;
this.negative = 0,
this.words = null,
this.length = 0,
this.red = null,
null !== e && ("le" !== t && "be" !== t || (n = t,
t = 10),
this._init(e || 0, t || 10, n || "be"))
}
var o;
"object" == typeof e ? e.exports = i : t.BN = i,
i.BN = i,
i.wordSize = 26;
try {
o = "undefined" != typeof window && void 0 !== window.Buffer ?
window.Buffer : de.Buffer
} catch (e) {}
function a(e, t) {
var r = e.charCodeAt(t);
return r >= 48 && r <= 57 ? r - 48 : r >= 65 && r <= 70 ? r - 55 : r
>= 97 && r <= 102 ? r - 87 : void n(!1, "Invalid character in " + e)
}
function s(e, t, n) {
var r = a(e, n);
return n - 1 >= t && (r |= a(e, n - 1) << 4),
r
}
function u(e, t, r, i) {
for (var o = 0, a = 0, s = Math.min(e.length, r), u = t; u < s; u++)
{
var l = e.charCodeAt(u) - 48;
o *= i,
a = l >= 49 ? l - 49 + 10 : l >= 17 ? l - 17 + 10 : l,
n(l >= 0 && a < i, "Invalid character"),
o += a
}
return o
}
function l(e, t) {
e.words = t.words,
e.length = t.length,
e.negative = t.negative,
e.red = t.red
}
if (i.isBN = function(e) {
return e instanceof i || null !== e && "object" == typeof e &&
e.constructor.wordSize === i.wordSize && Array.isArray(e.words)
}
,
i.max = function(e, t) {
return e.cmp(t) > 0 ? e : t
}
,
i.min = function(e, t) {
return e.cmp(t) < 0 ? e : t
}
,
i.prototype._init = function(e, t, r) {
if ("number" == typeof e)
return this._initNumber(e, t, r);
if ("object" == typeof e)
return this._initArray(e, t, r);
"hex" === t && (t = 16),
n(t === (0 | t) && t >= 2 && t <= 36);
var i = 0;
"-" === (e = e.toString().replace(/\s+/g, ""))[0] && (i++,
this.negative = 1),
i < e.length && (16 === t ? this._parseHex(e, i, r) :
(this._parseBase(e, t, i),
"le" === r && this._initArray(this.toArray(), t, r)))
}
,
i.prototype._initNumber = function(e, t, r) {
e < 0 && (this.negative = 1,
e = -e),
e < 67108864 ? (this.words = [67108863 & e],
this.length = 1) : e < 4503599627370496 ? (this.words =
[67108863 & e, e / 67108864 & 67108863],
this.length = 2) : (n(e < 9007199254740992),
this.words = [67108863 & e, e / 67108864 & 67108863, 1],
this.length = 3),
"le" === r && this._initArray(this.toArray(), t, r)
}
,
i.prototype._initArray = function(e, t, r) {
if (n("number" == typeof e.length),
e.length <= 0)
return this.words = [0],
this.length = 1,
this;
this.length = Math.ceil(e.length / 3),
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++)
this.words[i] = 0;
var o, a, s = 0;
if ("be" === r)
for (i = e.length - 1,
o = 0; i >= 0; i -= 3)
a = e[i] | e[i - 1] << 8 | e[i - 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
else if ("le" === r)
for (i = 0,
o = 0; i < e.length; i += 3)
a = e[i] | e[i + 1] << 8 | e[i + 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
return this._strip()
}
,
i.prototype._parseHex = function(e, t, n) {
this.length = Math.ceil((e.length - t) / 6),
this.words = new Array(this.length);
for (var r = 0; r < this.length; r++)
this.words[r] = 0;
var i, o = 0, a = 0;
if ("be" === n)
for (r = e.length - 1; r >= t; r -= 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
else
for (r = (e.length - t) % 2 == 0 ? t + 1 : t; r < e.length; r += 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
this._strip()
}
,
i.prototype._parseBase = function(e, t, n) {
this.words = [0],
this.length = 1;
for (var r = 0, i = 1; i <= 67108863; i *= t)
r++;
r--,
i = i / t | 0;
for (var o = e.length - n, a = o % r, s = Math.min(o, o - a) + n, l =
0, c = n; c < s; c += r)
l = u(e, c, c + r, t),
this.imuln(i),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l);
if (0 !== a) {
var d = 1;
for (l = u(e, c, e.length, t),
c = 0; c < a; c++)
d *= t;
this.imuln(d),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l)
}
this._strip()
}
,
i.prototype.copy = function(e) {
e.words = new Array(this.length);
for (var t = 0; t < this.length; t++)
e.words[t] = this.words[t];
e.length = this.length,
e.negative = this.negative,
e.red = this.red
}
,
i.prototype._move = function(e) {
l(e, this)
}
,
i.prototype.clone = function() {
var e = new i(null);
return this.copy(e),
e
}
,
i.prototype._expand = function(e) {
for (; this.length < e; )
this.words[this.length++] = 0;
return this
}
,
i.prototype._strip = function() {
for (; this.length > 1 && 0 === this.words[this.length - 1]; )
this.length--;
return this._normSign()
}
,
i.prototype._normSign = function() {
return 1 === this.length && 0 === this.words[0] &&
(this.negative = 0),
this
}
,
"undefined" != typeof Symbol && "function" == typeof Symbol.for)
try {
i.prototype[Symbol.for("nodejs.util.inspect.custom")] = c
} catch (e) {
i.prototype.inspect = c
}
else
i.prototype.inspect = c;
function c() {
return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">"
}
var d = ["", "0", "00", "000", "0000", "00000", "000000", "0000000",
"00000000", "000000000", "0000000000", "00000000000", "000000000000",
"0000000000000", "00000000000000", "000000000000000", "0000000000000000",
"00000000000000000", "000000000000000000", "0000000000000000000",
"00000000000000000000", "000000000000000000000", "0000000000000000000000",
"00000000000000000000000", "000000000000000000000000",
"0000000000000000000000000"]
, f = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6, 5,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
, h = [0, 0, 33554432, 43046721, 16777216, 48828125,
60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517,
7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101,
5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];
function p(e, t, n) {
n.negative = t.negative ^ e.negative;
var r = e.length + t.length | 0;
n.length = r,
r = r - 1 | 0;
var i = 0 | e.words[0]
, o = 0 | t.words[0]
,a=i*o
, s = 67108863 & a
, u = a / 67108864 | 0;
n.words[0] = s;
for (var l = 1; l < r; l++) {
for (var c = u >>> 26, d = 67108863 & u, f = Math.min(l,
t.length - 1), h = Math.max(0, l - e.length + 1); h <= f; h++) {
var p = l - h | 0;
c += (a = (i = 0 | e.words[p]) * (o = 0 | t.words[h]) + d) /
67108864 | 0,
d = 67108863 & a
}
n.words[l] = 0 | d,
u=0|c
}
return 0 !== u ? n.words[l] = 0 | u : n.length--,
n._strip()
}
i.prototype.toString = function(e, t) {
var r;
if (t = 0 | t || 1,
16 === (e = e || 10) || "hex" === e) {
r = "";
for (var i = 0, o = 0, a = 0; a < this.length; a++) {
var s = this.words[a]
, u = (16777215 & (s << i | o)).toString(16);
o = s >>> 24 - i & 16777215,
(i += 2) >= 26 && (i -= 26,
a--),
r = 0 !== o || a !== this.length - 1 ? d[6 - u.length] + u + r
:u+r
}
for (0 !== o && (r = o.toString(16) + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
if (e === (0 | e) && e >= 2 && e <= 36) {
var l = f[e]
, c = h[e];
r = "";
var p = this.clone();
for (p.negative = 0; !p.isZero(); ) {
var m = p.modrn(c).toString(e);
r = (p = p.idivn(c)).isZero() ? m + r : d[l - m.length] + m +
r
}
for (this.isZero() && (r = "0" + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
n(!1, "Base should be between 2 and 36")
}
,
i.prototype.toNumber = function() {
var e = this.words[0];
return 2 === this.length ? e += 67108864 * this.words[1] : 3 ===
this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 *
this.words[1] : this.length > 2 && n(!1, "Number can only safely store up to 53 bits"),
0 !== this.negative ? -e : e
}
,
i.prototype.toJSON = function() {
return this.toString(16, 2)
}
,
o && (i.prototype.toBuffer = function(e, t) {
return this.toArrayLike(o, e, t)
}
),
i.prototype.toArray = function(e, t) {
return this.toArrayLike(Array, e, t)
}
,
i.prototype.toArrayLike = function(e, t, r) {
this._strip();
var i = this.byteLength()
, o = r || Math.max(1, i);
n(i <= o, "byte array longer than desired length"),
n(o > 0, "Requested array length <= 0");
var a = function(e, t) {
return e.allocUnsafe ? e.allocUnsafe(t) : new e(t)
}(e, o);
return this["_toArrayLike" + ("le" === t ? "LE" : "BE")](a, i),
a
}
,
i.prototype._toArrayLikeLE = function(e, t) {
for (var n = 0, r = 0, i = 0, o = 0; i < this.length; i++) {
var a = this.words[i] << o | r;
e[n++] = 255 & a,
n < e.length && (e[n++] = a >> 8 & 255),
n < e.length && (e[n++] = a >> 16 & 255),
6 === o ? (n < e.length && (e[n++] = a >> 24 & 255),
r = 0,
o = 0) : (r = a >>> 24,
o += 2)
}
if (n < e.length)
for (e[n++] = r; n < e.length; )
e[n++] = 0
}
,
i.prototype._toArrayLikeBE = function(e, t) {
for (var n = e.length - 1, r = 0, i = 0, o = 0; i < this.length; i++) {
var a = this.words[i] << o | r;
e[n--] = 255 & a,
n >= 0 && (e[n--] = a >> 8 & 255),
n >= 0 && (e[n--] = a >> 16 & 255),
6 === o ? (n >= 0 && (e[n--] = a >> 24 & 255),
r = 0,
o = 0) : (r = a >>> 24,
o += 2)
}
if (n >= 0)
for (e[n--] = r; n >= 0; )
e[n--] = 0
}
,
Math.clz32 ? i.prototype._countBits = function(e) {
return 32 - Math.clz32(e)
}
: i.prototype._countBits = function(e) {
var t = e
, n = 0;
return t >= 4096 && (n += 13,
t >>>= 13),
t >= 64 && (n += 7,
t >>>= 7),
t >= 8 && (n += 4,
t >>>= 4),
t >= 2 && (n += 2,
t >>>= 2),
n+t
}
,
i.prototype._zeroBits = function(e) {
if (0 === e)
return 26;
var t = e
, n = 0;
return 0 == (8191 & t) && (n += 13,
t >>>= 13),
0 == (127 & t) && (n += 7,
t >>>= 7),
0 == (15 & t) && (n += 4,
t >>>= 4),
0 == (3 & t) && (n += 2,
t >>>= 2),
0 == (1 & t) && n++,
n
}
,
i.prototype.bitLength = function() {
var e = this.words[this.length - 1]
, t = this._countBits(e);
return 26 * (this.length - 1) + t
}
,
i.prototype.zeroBits = function() {
if (this.isZero())
return 0;
for (var e = 0, t = 0; t < this.length; t++) {
var n = this._zeroBits(this.words[t]);
if (e += n,
26 !== n)
break
}
return e
}
,
i.prototype.byteLength = function() {
return Math.ceil(this.bitLength() / 8)
}
,
i.prototype.toTwos = function(e) {
return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) :
this.clone()
}
,
i.prototype.fromTwos = function(e) {
return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone()
}
,
i.prototype.isNeg = function() {
return 0 !== this.negative
}
,
i.prototype.neg = function() {
return this.clone().ineg()
}
,
i.prototype.ineg = function() {
return this.isZero() || (this.negative ^= 1),
this
}
,
i.prototype.iuor = function(e) {
for (; this.length < e.length; )
this.words[this.length++] = 0;
for (var t = 0; t < e.length; t++)
this.words[t] = this.words[t] | e.words[t];
return this._strip()
}
,
i.prototype.ior = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuor(e)
}
,
i.prototype.or = function(e) {
return this.length > e.length ? this.clone().ior(e) :
e.clone().ior(this)
}
,
i.prototype.uor = function(e) {
return this.length > e.length ? this.clone().iuor(e) :
e.clone().iuor(this)
}
,
i.prototype.iuand = function(e) {
var t;
t = this.length > e.length ? e : this;
for (var n = 0; n < t.length; n++)
this.words[n] = this.words[n] & e.words[n];
return this.length = t.length,
this._strip()
}
,
i.prototype.iand = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuand(e)
}
,
i.prototype.and = function(e) {
return this.length > e.length ? this.clone().iand(e) :
e.clone().iand(this)
}
,
i.prototype.uand = function(e) {
return this.length > e.length ? this.clone().iuand(e) :
e.clone().iuand(this)
}
,
i.prototype.iuxor = function(e) {
var t, n;
this.length > e.length ? (t = this,
n = e) : (t = e,
n = this);
for (var r = 0; r < n.length; r++)
this.words[r] = t.words[r] ^ n.words[r];
if (this !== t)
for (; r < t.length; r++)
this.words[r] = t.words[r];
return this.length = t.length,
this._strip()
}
,
i.prototype.ixor = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuxor(e)
}
,
i.prototype.xor = function(e) {
return this.length > e.length ? this.clone().ixor(e) :
e.clone().ixor(this)
}
,
i.prototype.uxor = function(e) {
return this.length > e.length ? this.clone().iuxor(e) :
e.clone().iuxor(this)
}
,
i.prototype.inotn = function(e) {
n("number" == typeof e && e >= 0);
var t = 0 | Math.ceil(e / 26)
, r = e % 26;
this._expand(t),
r > 0 && t--;
for (var i = 0; i < t; i++)
this.words[i] = 67108863 & ~this.words[i];
return r > 0 && (this.words[i] = ~this.words[i] & 67108863 >> 26
- r),
this._strip()
}
,
i.prototype.notn = function(e) {
return this.clone().inotn(e)
}
,
i.prototype.setn = function(e, t) {
n("number" == typeof e && e >= 0);
var r = e / 26 | 0
, i = e % 26;
return this._expand(r + 1),
this.words[r] = t ? this.words[r] | 1 << i : this.words[r] & ~(1 << i),
this._strip()
}
,
i.prototype.iadd = function(e) {
var t, n, r;
if (0 !== this.negative && 0 === e.negative)
return this.negative = 0,
t = this.isub(e),
this.negative ^= 1,
this._normSign();
if (0 === this.negative && 0 !== e.negative)
return e.negative = 0,
t = this.isub(e),
e.negative = 1,
t._normSign();
this.length > e.length ? (n = this,
r = e) : (n = e,
r = this);
for (var i = 0, o = 0; o < r.length; o++)
t = (0 | n.words[o]) + (0 | r.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
for (; 0 !== i && o < n.length; o++)
t = (0 | n.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
if (this.length = n.length,
0 !== i)
this.words[this.length] = i,
this.length++;
else if (n !== this)
for (; o < n.length; o++)
this.words[o] = n.words[o];
return this
}
,
i.prototype.add = function(e) {
var t;
return 0 !== e.negative && 0 === this.negative ? (e.negative =
0,
t = this.sub(e),
e.negative ^= 1,
t) : 0 === e.negative && 0 !== this.negative ? (this.negative = 0,
t = e.sub(this),
this.negative = 1,
t) : this.length > e.length ? this.clone().iadd(e) :
e.clone().iadd(this)
}
,
i.prototype.isub = function(e) {
if (0 !== e.negative) {
e.negative = 0;
var t = this.iadd(e);
return e.negative = 1,
t._normSign()
}
if (0 !== this.negative)
return this.negative = 0,
this.iadd(e),
this.negative = 1,
this._normSign();
var n, r, i = this.cmp(e);
if (0 === i)
return this.negative = 0,
this.length = 1,
this.words[0] = 0,
this;
i > 0 ? (n = this,
r = e) : (n = e,
r = this);
for (var o = 0, a = 0; a < r.length; a++)
o = (t = (0 | n.words[a]) - (0 | r.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
for (; 0 !== o && a < n.length; a++)
o = (t = (0 | n.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
if (0 === o && a < n.length && n !== this)
for (; a < n.length; a++)
this.words[a] = n.words[a];
return this.length = Math.max(this.length, a),
n !== this && (this.negative = 1),
this._strip()
}
,
i.prototype.sub = function(e) {
return this.clone().isub(e)
}
;
var m = function(e, t, n) {
var r, i, o, a = e.words, s = t.words, u = n.words, l = 0, c = 0 |
a[0], d = 8191 & c, f = c >>> 13, h = 0 | a[1], p = 8191 & h, m = h >>> 13, g = 0 | a[2], v
= 8191 & g, b = g >>> 13, y = 0 | a[3], A = 8191 & y, w = y >>> 13, _ = 0 | a[4], E = 8191
& _, S = _ >>> 13, k = 0 | a[5], M = 8191 & k, C = k >>> 13, x = 0 | a[6], R = 8191 & x, T
= x >>> 13, I = 0 | a[7], P = 8191 & I, L = I >>> 13, O = 0 | a[8], N = 8191 & O, D = O
>>> 13, B = 0 | a[9], j = 8191 & B, z = B >>> 13, F = 0 | s[0], U = 8191 & F, K = F >>>
13, q = 0 | s[1], H = 8191 & q, V = q >>> 13, W = 0 | s[2], $ = 8191 & W, Y = W >>> 13,
Q = 0 | s[3], Z = 8191 & Q, G = Q >>> 13, X = 0 | s[4], J = 8191 & X, ee = X >>> 13, te =
0 | s[5], ne = 8191 & te, re = te >>> 13, ie = 0 | s[6], oe = 8191 & ie, ae = ie >>> 13, se =
0 | s[7], ue = 8191 & se, le = se >>> 13, ce = 0 | s[8], de = 8191 & ce, fe = ce >>> 13, he
= 0 | s[9], pe = 8191 & he, me = he >>> 13;
n.negative = e.negative ^ t.negative,
n.length = 19;
var ge = (l + (r = Math.imul(d, U)) | 0) + ((8191 & (i = (i =
Math.imul(d, K)) + Math.imul(f, U) | 0)) << 13) | 0;
l = ((o = Math.imul(f, K)) + (i >>> 13) | 0) + (ge >>> 26) | 0,
ge &= 67108863,
r = Math.imul(p, U),
i = (i = Math.imul(p, K)) + Math.imul(m, U) | 0,
o = Math.imul(m, K);
var ve = (l + (r = r + Math.imul(d, H) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, V) | 0) + Math.imul(f, H) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, V) | 0) + (i >>> 13) | 0) + (ve >>> 26) |
0,
ve &= 67108863,
r = Math.imul(v, U),
i = (i = Math.imul(v, K)) + Math.imul(b, U) | 0,
o = Math.imul(b, K),
r = r + Math.imul(p, H) | 0,
i = (i = i + Math.imul(p, V) | 0) + Math.imul(m, H) | 0,
o = o + Math.imul(m, V) | 0;
var be = (l + (r = r + Math.imul(d, $) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, Y) | 0) + Math.imul(f, $) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, Y) | 0) + (i >>> 13) | 0) + (be >>> 26) |
0,
be &= 67108863,
r = Math.imul(A, U),
i = (i = Math.imul(A, K)) + Math.imul(w, U) | 0,
o = Math.imul(w, K),
r = r + Math.imul(v, H) | 0,
i = (i = i + Math.imul(v, V) | 0) + Math.imul(b, H) | 0,
o = o + Math.imul(b, V) | 0,
r = r + Math.imul(p, $) | 0,
i = (i = i + Math.imul(p, Y) | 0) + Math.imul(m, $) | 0,
o = o + Math.imul(m, Y) | 0;
var ye = (l + (r = r + Math.imul(d, Z) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, G) | 0) + Math.imul(f, Z) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, G) | 0) + (i >>> 13) | 0) + (ye >>> 26) |
0,
ye &= 67108863,
r = Math.imul(E, U),
i = (i = Math.imul(E, K)) + Math.imul(S, U) | 0,
o = Math.imul(S, K),
r = r + Math.imul(A, H) | 0,
i = (i = i + Math.imul(A, V) | 0) + Math.imul(w, H) | 0,
o = o + Math.imul(w, V) | 0,
r = r + Math.imul(v, $) | 0,
i = (i = i + Math.imul(v, Y) | 0) + Math.imul(b, $) | 0,
o = o + Math.imul(b, Y) | 0,
r = r + Math.imul(p, Z) | 0,
i = (i = i + Math.imul(p, G) | 0) + Math.imul(m, Z) | 0,
o = o + Math.imul(m, G) | 0;
var Ae = (l + (r = r + Math.imul(d, J) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, ee) | 0) + Math.imul(f, J) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ee) | 0) + (i >>> 13) | 0) + (Ae >>> 26) |
0,
Ae &= 67108863,
r = Math.imul(M, U),
i = (i = Math.imul(M, K)) + Math.imul(C, U) | 0,
o = Math.imul(C, K),
r = r + Math.imul(E, H) | 0,
i = (i = i + Math.imul(E, V) | 0) + Math.imul(S, H) | 0,
o = o + Math.imul(S, V) | 0,
r = r + Math.imul(A, $) | 0,
i = (i = i + Math.imul(A, Y) | 0) + Math.imul(w, $) | 0,
o = o + Math.imul(w, Y) | 0,
r = r + Math.imul(v, Z) | 0,
i = (i = i + Math.imul(v, G) | 0) + Math.imul(b, Z) | 0,
o = o + Math.imul(b, G) | 0,
r = r + Math.imul(p, J) | 0,
i = (i = i + Math.imul(p, ee) | 0) + Math.imul(m, J) | 0,
o = o + Math.imul(m, ee) | 0;
var we = (l + (r = r + Math.imul(d, ne) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, re) | 0) + Math.imul(f, ne) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, re) | 0) + (i >>> 13) | 0) + (we >>> 26) |
0,
we &= 67108863,
r = Math.imul(R, U),
i = (i = Math.imul(R, K)) + Math.imul(T, U) | 0,
o = Math.imul(T, K),
r = r + Math.imul(M, H) | 0,
i = (i = i + Math.imul(M, V) | 0) + Math.imul(C, H) | 0,
o = o + Math.imul(C, V) | 0,
r = r + Math.imul(E, $) | 0,
i = (i = i + Math.imul(E, Y) | 0) + Math.imul(S, $) | 0,
o = o + Math.imul(S, Y) | 0,
r = r + Math.imul(A, Z) | 0,
i = (i = i + Math.imul(A, G) | 0) + Math.imul(w, Z) | 0,
o = o + Math.imul(w, G) | 0,
r = r + Math.imul(v, J) | 0,
i = (i = i + Math.imul(v, ee) | 0) + Math.imul(b, J) | 0,
o = o + Math.imul(b, ee) | 0,
r = r + Math.imul(p, ne) | 0,
i = (i = i + Math.imul(p, re) | 0) + Math.imul(m, ne) | 0,
o = o + Math.imul(m, re) | 0;
var _e = (l + (r = r + Math.imul(d, oe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, ae) | 0) + Math.imul(f, oe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ae) | 0) + (i >>> 13) | 0) + (_e >>> 26) |
0,
_e &= 67108863,
r = Math.imul(P, U),
i = (i = Math.imul(P, K)) + Math.imul(L, U) | 0,
o = Math.imul(L, K),
r = r + Math.imul(R, H) | 0,
i = (i = i + Math.imul(R, V) | 0) + Math.imul(T, H) | 0,
o = o + Math.imul(T, V) | 0,
r = r + Math.imul(M, $) | 0,
i = (i = i + Math.imul(M, Y) | 0) + Math.imul(C, $) | 0,
o = o + Math.imul(C, Y) | 0,
r = r + Math.imul(E, Z) | 0,
i = (i = i + Math.imul(E, G) | 0) + Math.imul(S, Z) | 0,
o = o + Math.imul(S, G) | 0,
r = r + Math.imul(A, J) | 0,
i = (i = i + Math.imul(A, ee) | 0) + Math.imul(w, J) | 0,
o = o + Math.imul(w, ee) | 0,
r = r + Math.imul(v, ne) | 0,
i = (i = i + Math.imul(v, re) | 0) + Math.imul(b, ne) | 0,
o = o + Math.imul(b, re) | 0,
r = r + Math.imul(p, oe) | 0,
i = (i = i + Math.imul(p, ae) | 0) + Math.imul(m, oe) | 0,
o = o + Math.imul(m, ae) | 0;
var Ee = (l + (r = r + Math.imul(d, ue) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, le) | 0) + Math.imul(f, ue) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, le) | 0) + (i >>> 13) | 0) + (Ee >>> 26) |
0,
Ee &= 67108863,
r = Math.imul(N, U),
i = (i = Math.imul(N, K)) + Math.imul(D, U) | 0,
o = Math.imul(D, K),
r = r + Math.imul(P, H) | 0,
i = (i = i + Math.imul(P, V) | 0) + Math.imul(L, H) | 0,
o = o + Math.imul(L, V) | 0,
r = r + Math.imul(R, $) | 0,
i = (i = i + Math.imul(R, Y) | 0) + Math.imul(T, $) | 0,
o = o + Math.imul(T, Y) | 0,
r = r + Math.imul(M, Z) | 0,
i = (i = i + Math.imul(M, G) | 0) + Math.imul(C, Z) | 0,
o = o + Math.imul(C, G) | 0,
r = r + Math.imul(E, J) | 0,
i = (i = i + Math.imul(E, ee) | 0) + Math.imul(S, J) | 0,
o = o + Math.imul(S, ee) | 0,
r = r + Math.imul(A, ne) | 0,
i = (i = i + Math.imul(A, re) | 0) + Math.imul(w, ne) | 0,
o = o + Math.imul(w, re) | 0,
r = r + Math.imul(v, oe) | 0,
i = (i = i + Math.imul(v, ae) | 0) + Math.imul(b, oe) | 0,
o = o + Math.imul(b, ae) | 0,
r = r + Math.imul(p, ue) | 0,
i = (i = i + Math.imul(p, le) | 0) + Math.imul(m, ue) | 0,
o = o + Math.imul(m, le) | 0;
var Se = (l + (r = r + Math.imul(d, de) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, fe) | 0) + Math.imul(f, de) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, fe) | 0) + (i >>> 13) | 0) + (Se >>> 26) |
0,
Se &= 67108863,
r = Math.imul(j, U),
i = (i = Math.imul(j, K)) + Math.imul(z, U) | 0,
o = Math.imul(z, K),
r = r + Math.imul(N, H) | 0,
i = (i = i + Math.imul(N, V) | 0) + Math.imul(D, H) | 0,
o = o + Math.imul(D, V) | 0,
r = r + Math.imul(P, $) | 0,
i = (i = i + Math.imul(P, Y) | 0) + Math.imul(L, $) | 0,
o = o + Math.imul(L, Y) | 0,
r = r + Math.imul(R, Z) | 0,
i = (i = i + Math.imul(R, G) | 0) + Math.imul(T, Z) | 0,
o = o + Math.imul(T, G) | 0,
r = r + Math.imul(M, J) | 0,
i = (i = i + Math.imul(M, ee) | 0) + Math.imul(C, J) | 0,
o = o + Math.imul(C, ee) | 0,
r = r + Math.imul(E, ne) | 0,
i = (i = i + Math.imul(E, re) | 0) + Math.imul(S, ne) | 0,
o = o + Math.imul(S, re) | 0,
r = r + Math.imul(A, oe) | 0,
i = (i = i + Math.imul(A, ae) | 0) + Math.imul(w, oe) | 0,
o = o + Math.imul(w, ae) | 0,
r = r + Math.imul(v, ue) | 0,
i = (i = i + Math.imul(v, le) | 0) + Math.imul(b, ue) | 0,
o = o + Math.imul(b, le) | 0,
r = r + Math.imul(p, de) | 0,
i = (i = i + Math.imul(p, fe) | 0) + Math.imul(m, de) | 0,
o = o + Math.imul(m, fe) | 0;
var ke = (l + (r = r + Math.imul(d, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, me) | 0) + Math.imul(f, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, me) | 0) + (i >>> 13) | 0) + (ke >>> 26) |
0,
ke &= 67108863,
r = Math.imul(j, H),
i = (i = Math.imul(j, V)) + Math.imul(z, H) | 0,
o = Math.imul(z, V),
r = r + Math.imul(N, $) | 0,
i = (i = i + Math.imul(N, Y) | 0) + Math.imul(D, $) | 0,
o = o + Math.imul(D, Y) | 0,
r = r + Math.imul(P, Z) | 0,
i = (i = i + Math.imul(P, G) | 0) + Math.imul(L, Z) | 0,
o = o + Math.imul(L, G) | 0,
r = r + Math.imul(R, J) | 0,
i = (i = i + Math.imul(R, ee) | 0) + Math.imul(T, J) | 0,
o = o + Math.imul(T, ee) | 0,
r = r + Math.imul(M, ne) | 0,
i = (i = i + Math.imul(M, re) | 0) + Math.imul(C, ne) | 0,
o = o + Math.imul(C, re) | 0,
r = r + Math.imul(E, oe) | 0,
i = (i = i + Math.imul(E, ae) | 0) + Math.imul(S, oe) | 0,
o = o + Math.imul(S, ae) | 0,
r = r + Math.imul(A, ue) | 0,
i = (i = i + Math.imul(A, le) | 0) + Math.imul(w, ue) | 0,
o = o + Math.imul(w, le) | 0,
r = r + Math.imul(v, de) | 0,
i = (i = i + Math.imul(v, fe) | 0) + Math.imul(b, de) | 0,
o = o + Math.imul(b, fe) | 0;
var Me = (l + (r = r + Math.imul(p, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(p, me) | 0) + Math.imul(m, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(m, me) | 0) + (i >>> 13) | 0) + (Me >>>
26) | 0,
Me &= 67108863,
r = Math.imul(j, $),
i = (i = Math.imul(j, Y)) + Math.imul(z, $) | 0,
o = Math.imul(z, Y),
r = r + Math.imul(N, Z) | 0,
i = (i = i + Math.imul(N, G) | 0) + Math.imul(D, Z) | 0,
o = o + Math.imul(D, G) | 0,
r = r + Math.imul(P, J) | 0,
i = (i = i + Math.imul(P, ee) | 0) + Math.imul(L, J) | 0,
o = o + Math.imul(L, ee) | 0,
r = r + Math.imul(R, ne) | 0,
i = (i = i + Math.imul(R, re) | 0) + Math.imul(T, ne) | 0,
o = o + Math.imul(T, re) | 0,
r = r + Math.imul(M, oe) | 0,
i = (i = i + Math.imul(M, ae) | 0) + Math.imul(C, oe) | 0,
o = o + Math.imul(C, ae) | 0,
r = r + Math.imul(E, ue) | 0,
i = (i = i + Math.imul(E, le) | 0) + Math.imul(S, ue) | 0,
o = o + Math.imul(S, le) | 0,
r = r + Math.imul(A, de) | 0,
i = (i = i + Math.imul(A, fe) | 0) + Math.imul(w, de) | 0,
o = o + Math.imul(w, fe) | 0;
var Ce = (l + (r = r + Math.imul(v, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(v, me) | 0) + Math.imul(b, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(b, me) | 0) + (i >>> 13) | 0) + (Ce >>> 26)
| 0,
Ce &= 67108863,
r = Math.imul(j, Z),
i = (i = Math.imul(j, G)) + Math.imul(z, Z) | 0,
o = Math.imul(z, G),
r = r + Math.imul(N, J) | 0,
i = (i = i + Math.imul(N, ee) | 0) + Math.imul(D, J) | 0,
o = o + Math.imul(D, ee) | 0,
r = r + Math.imul(P, ne) | 0,
i = (i = i + Math.imul(P, re) | 0) + Math.imul(L, ne) | 0,
o = o + Math.imul(L, re) | 0,
r = r + Math.imul(R, oe) | 0,
i = (i = i + Math.imul(R, ae) | 0) + Math.imul(T, oe) | 0,
o = o + Math.imul(T, ae) | 0,
r = r + Math.imul(M, ue) | 0,
i = (i = i + Math.imul(M, le) | 0) + Math.imul(C, ue) | 0,
o = o + Math.imul(C, le) | 0,
r = r + Math.imul(E, de) | 0,
i = (i = i + Math.imul(E, fe) | 0) + Math.imul(S, de) | 0,
o = o + Math.imul(S, fe) | 0;
var xe = (l + (r = r + Math.imul(A, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(A, me) | 0) + Math.imul(w, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(w, me) | 0) + (i >>> 13) | 0) + (xe >>> 26)
| 0,
xe &= 67108863,
r = Math.imul(j, J),
i = (i = Math.imul(j, ee)) + Math.imul(z, J) | 0,
o = Math.imul(z, ee),
r = r + Math.imul(N, ne) | 0,
i = (i = i + Math.imul(N, re) | 0) + Math.imul(D, ne) | 0,
o = o + Math.imul(D, re) | 0,
r = r + Math.imul(P, oe) | 0,
i = (i = i + Math.imul(P, ae) | 0) + Math.imul(L, oe) | 0,
o = o + Math.imul(L, ae) | 0,
r = r + Math.imul(R, ue) | 0,
i = (i = i + Math.imul(R, le) | 0) + Math.imul(T, ue) | 0,
o = o + Math.imul(T, le) | 0,
r = r + Math.imul(M, de) | 0,
i = (i = i + Math.imul(M, fe) | 0) + Math.imul(C, de) | 0,
o = o + Math.imul(C, fe) | 0;
var Re = (l + (r = r + Math.imul(E, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(E, me) | 0) + Math.imul(S, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(S, me) | 0) + (i >>> 13) | 0) + (Re >>>
26) | 0,
Re &= 67108863,
r = Math.imul(j, ne),
i = (i = Math.imul(j, re)) + Math.imul(z, ne) | 0,
o = Math.imul(z, re),
r = r + Math.imul(N, oe) | 0,
i = (i = i + Math.imul(N, ae) | 0) + Math.imul(D, oe) | 0,
o = o + Math.imul(D, ae) | 0,
r = r + Math.imul(P, ue) | 0,
i = (i = i + Math.imul(P, le) | 0) + Math.imul(L, ue) | 0,
o = o + Math.imul(L, le) | 0,
r = r + Math.imul(R, de) | 0,
i = (i = i + Math.imul(R, fe) | 0) + Math.imul(T, de) | 0,
o = o + Math.imul(T, fe) | 0;
var Te = (l + (r = r + Math.imul(M, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(M, me) | 0) + Math.imul(C, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(C, me) | 0) + (i >>> 13) | 0) + (Te >>> 26)
| 0,
Te &= 67108863,
r = Math.imul(j, oe),
i = (i = Math.imul(j, ae)) + Math.imul(z, oe) | 0,
o = Math.imul(z, ae),
r = r + Math.imul(N, ue) | 0,
i = (i = i + Math.imul(N, le) | 0) + Math.imul(D, ue) | 0,
o = o + Math.imul(D, le) | 0,
r = r + Math.imul(P, de) | 0,
i = (i = i + Math.imul(P, fe) | 0) + Math.imul(L, de) | 0,
o = o + Math.imul(L, fe) | 0;
var Ie = (l + (r = r + Math.imul(R, pe) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(R, me) | 0) + Math.imul(T, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(T, me) | 0) + (i >>> 13) | 0) + (Ie >>> 26) |
0,
Ie &= 67108863,
r = Math.imul(j, ue),
i = (i = Math.imul(j, le)) + Math.imul(z, ue) | 0,
o = Math.imul(z, le),
r = r + Math.imul(N, de) | 0,
i = (i = i + Math.imul(N, fe) | 0) + Math.imul(D, de) | 0,
o = o + Math.imul(D, fe) | 0;
var Pe = (l + (r = r + Math.imul(P, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(P, me) | 0) + Math.imul(L, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(L, me) | 0) + (i >>> 13) | 0) + (Pe >>> 26)
| 0,
Pe &= 67108863,
r = Math.imul(j, de),
i = (i = Math.imul(j, fe)) + Math.imul(z, de) | 0,
o = Math.imul(z, fe);
var Le = (l + (r = r + Math.imul(N, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(N, me) | 0) + Math.imul(D, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(D, me) | 0) + (i >>> 13) | 0) + (Le >>> 26)
| 0,
Le &= 67108863;
var Oe = (l + (r = Math.imul(j, pe)) | 0) + ((8191 & (i = (i =
Math.imul(j, me)) + Math.imul(z, pe) | 0)) << 13) | 0;
return l = ((o = Math.imul(z, me)) + (i >>> 13) | 0) + (Oe >>> 26)
| 0,
Oe &= 67108863,
u[0] = ge,
u[1] = ve,
u[2] = be,
u[3] = ye,
u[4] = Ae,
u[5] = we,
u[6] = _e,
u[7] = Ee,
u[8] = Se,
u[9] = ke,
u[10] = Me,
u[11] = Ce,
u[12] = xe,
u[13] = Re,
u[14] = Te,
u[15] = Ie,
u[16] = Pe,
u[17] = Le,
u[18] = Oe,
0 !== l && (u[19] = l,
n.length++),
n
};
function g(e, t, n) {
n.negative = t.negative ^ e.negative,
n.length = e.length + t.length;
for (var r = 0, i = 0, o = 0; o < n.length - 1; o++) {
var a = i;
i = 0;
for (var s = 67108863 & r, u = Math.min(o, t.length - 1), l =
Math.max(0, o - e.length + 1); l <= u; l++) {
var c = o - l
, d = (0 | e.words[c]) * (0 | t.words[l])
, f = 67108863 & d;
s = 67108863 & (f = f + s | 0),
i += (a = (a = a + (d / 67108864 | 0) | 0) + (f >>> 26) | 0)
>>> 26,
a &= 67108863
}
n.words[o] = s,
r = a,
a=i
}
return 0 !== r ? n.words[o] = r : n.length--,
n._strip()
}
function v(e, t, n) {
return g(e, t, n)
}
Math.imul || (m = p),
i.prototype.mulTo = function(e, t) {
var n = this.length + e.length;
return 10 === this.length && 10 === e.length ? m(this, e, t) : n <
63 ? p(this, e, t) : n < 1024 ? g(this, e, t) : v(this, e, t)
}
,
i.prototype.mul = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
this.mulTo(e, t)
}
,
i.prototype.mulf = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
v(this, e, t)
}
,
i.prototype.imul = function(e) {
return this.clone().mulTo(e, this)
}
,
i.prototype.imuln = function(e) {
var t = e < 0;
t && (e = -e),
n("number" == typeof e),
n(e < 67108864);
for (var r = 0, i = 0; i < this.length; i++) {
var o = (0 | this.words[i]) * e
, a = (67108863 & o) + (67108863 & r);
r >>= 26,
r += o / 67108864 | 0,
r += a >>> 26,
this.words[i] = 67108863 & a
}
return 0 !== r && (this.words[i] = r,
this.length++),
t ? this.ineg() : this
}
,
i.prototype.muln = function(e) {
return this.clone().imuln(e)
}
,
i.prototype.sqr = function() {
return this.mul(this)
}
,
i.prototype.isqr = function() {
return this.imul(this.clone())
}
,
i.prototype.pow = function(e) {
var t = function(e) {
for (var t = new Array(e.bitLength()), n = 0; n < t.length; n++)
{
var r = n / 26 | 0
, i = n % 26;
t[n] = e.words[r] >>> i & 1
}
return t
}(e);
if (0 === t.length)
return new i(1);
for (var n = this, r = 0; r < t.length && 0 === t[r]; r++,
n = n.sqr())
;
if (++r < t.length)
for (var o = n.sqr(); r < t.length; r++,
o = o.sqr())
0 !== t[r] && (n = n.mul(o));
return n
}
,
i.prototype.iushln = function(e) {
n("number" == typeof e && e >= 0);
var t, r = e % 26, i = (e - r) / 26, o = 67108863 >>> 26 - r << 26 -
r;
if (0 !== r) {
var a = 0;
for (t = 0; t < this.length; t++) {
var s = this.words[t] & o
, u = (0 | this.words[t]) - s << r;
this.words[t] = u | a,
a = s >>> 26 - r
}
a && (this.words[t] = a,
this.length++)
}
if (0 !== i) {
for (t = this.length - 1; t >= 0; t--)
this.words[t + i] = this.words[t];
for (t = 0; t < i; t++)
this.words[t] = 0;
this.length += i
}
return this._strip()
}
,
i.prototype.ishln = function(e) {
return n(0 === this.negative),
this.iushln(e)
}
,
i.prototype.iushrn = function(e, t, r) {
var i;
n("number" == typeof e && e >= 0),
i = t ? (t - t % 26) / 26 : 0;
var o = e % 26
, a = Math.min((e - o) / 26, this.length)
, s = 67108863 ^ 67108863 >>> o << o
, u = r;
if (i -= a,
i = Math.max(0, i),
u) {
for (var l = 0; l < a; l++)
u.words[l] = this.words[l];
u.length = a
}
if (0 === a)
;
else if (this.length > a)
for (this.length -= a,
l = 0; l < this.length; l++)
this.words[l] = this.words[l + a];
else
this.words[0] = 0,
this.length = 1;
var c = 0;
for (l = this.length - 1; l >= 0 && (0 !== c || l >= i); l--) {
var d = 0 | this.words[l];
this.words[l] = c << 26 - o | d >>> o,
c=d&s
}
return u && 0 !== c && (u.words[u.length++] = c),
0 === this.length && (this.words[0] = 0,
this.length = 1),
this._strip()
}
,
i.prototype.ishrn = function(e, t, r) {
return n(0 === this.negative),
this.iushrn(e, t, r)
}
,
i.prototype.shln = function(e) {
return this.clone().ishln(e)
}
,
i.prototype.ushln = function(e) {
return this.clone().iushln(e)
}
,
i.prototype.shrn = function(e) {
return this.clone().ishrn(e)
}
,
i.prototype.ushrn = function(e) {
return this.clone().iushrn(e)
}
,
i.prototype.testn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
return !(this.length <= r) && !!(this.words[r] & i)
}
,
i.prototype.imaskn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26;
if (n(0 === this.negative, "imaskn works only with positive
numbers"),
this.length <= r)
return this;
if (0 !== t && r++,
this.length = Math.min(r, this.length),
0 !== t) {
var i = 67108863 ^ 67108863 >>> t << t;
this.words[this.length - 1] &= i
}
return this._strip()
}
,
i.prototype.maskn = function(e) {
return this.clone().imaskn(e)
}
,
i.prototype.iaddn = function(e) {
return n("number" == typeof e),
n(e < 67108864),
e < 0 ? this.isubn(-e) : 0 !== this.negative ? 1 === this.length &&
(0 | this.words[0]) <= e ? (this.words[0] = e - (0 | this.words[0]),
this.negative = 0,
this) : (this.negative = 0,
this.isubn(e),
this.negative = 1,
this) : this._iaddn(e)
}
,
i.prototype._iaddn = function(e) {
this.words[0] += e;
for (var t = 0; t < this.length && this.words[t] >= 67108864; t++)
this.words[t] -= 67108864,
t === this.length - 1 ? this.words[t + 1] = 1 : this.words[t +
1]++;
return this.length = Math.max(this.length, t + 1),
this
}
,
i.prototype.isubn = function(e) {
if (n("number" == typeof e),
n(e < 67108864),
e < 0)
return this.iaddn(-e);
if (0 !== this.negative)
return this.negative = 0,
this.iaddn(e),
this.negative = 1,
this;
if (this.words[0] -= e,
1 === this.length && this.words[0] < 0)
this.words[0] = -this.words[0],
this.negative = 1;
else
for (var t = 0; t < this.length && this.words[t] < 0; t++)
this.words[t] += 67108864,
this.words[t + 1] -= 1;
return this._strip()
}
,
i.prototype.addn = function(e) {
return this.clone().iaddn(e)
}
,
i.prototype.subn = function(e) {
return this.clone().isubn(e)
}
,
i.prototype.iabs = function() {
return this.negative = 0,
this
}
,
i.prototype.abs = function() {
return this.clone().iabs()
}
,
i.prototype._ishlnsubmul = function(e, t, r) {
var i, o, a = e.length + r;
this._expand(a);
var s = 0;
for (i = 0; i < e.length; i++) {
o = (0 | this.words[i + r]) + s;
var u = (0 | e.words[i]) * t;
s = ((o -= 67108863 & u) >> 26) - (u / 67108864 | 0),
this.words[i + r] = 67108863 & o
}
for (; i < this.length - r; i++)
s = (o = (0 | this.words[i + r]) + s) >> 26,
this.words[i + r] = 67108863 & o;
if (0 === s)
return this._strip();
for (n(-1 === s),
s = 0,
i = 0; i < this.length; i++)
s = (o = -(0 | this.words[i]) + s) >> 26,
this.words[i] = 67108863 & o;
return this.negative = 1,
this._strip()
}
,
i.prototype._wordDiv = function(e, t) {
var n = (this.length,
e.length)
, r = this.clone()
,o=e
, a = 0 | o.words[o.length - 1];
0 !== (n = 26 - this._countBits(a)) && (o = o.ushln(n),
r.iushln(n),
a = 0 | o.words[o.length - 1]);
var s, u = r.length - o.length;
if ("mod" !== t) {
(s = new i(null)).length = u + 1,
s.words = new Array(s.length);
for (var l = 0; l < s.length; l++)
s.words[l] = 0
}
var c = r.clone()._ishlnsubmul(o, 1, u);
0 === c.negative && (r = c,
s && (s.words[u] = 1));
for (var d = u - 1; d >= 0; d--) {
var f = 67108864 * (0 | r.words[o.length + d]) + (0 |
r.words[o.length + d - 1]);
for (f = Math.min(f / a | 0, 67108863),
r._ishlnsubmul(o, f, d); 0 !== r.negative; )
f--,
r.negative = 0,
r._ishlnsubmul(o, 1, d),
r.isZero() || (r.negative ^= 1);
s && (s.words[d] = f)
}
return s && s._strip(),
r._strip(),
"div" !== t && 0 !== n && r.iushrn(n),
{
div: s || null,
mod: r
}
}
,
i.prototype.divmod = function(e, t, r) {
return n(!e.isZero()),
this.isZero() ? {
div: new i(0),
mod: new i(0)
} : 0 !== this.negative && 0 === e.negative ? (s =
this.neg().divmod(e, t),
"mod" !== t && (o = s.div.neg()),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.iadd(e)),
{
div: o,
mod: a
}) : 0 === this.negative && 0 !== e.negative ? (s =
this.divmod(e.neg(), t),
"mod" !== t && (o = s.div.neg()),
{
div: o,
mod: s.mod
}) : 0 != (this.negative & e.negative) ? (s =
this.neg().divmod(e.neg(), t),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.isub(e)),
{
div: s.div,
mod: a
}) : e.length > this.length || this.cmp(e) < 0 ? {
div: new i(0),
mod: this
} : 1 === e.length ? "div" === t ? {
div: this.divn(e.words[0]),
mod: null
} : "mod" === t ? {
div: null,
mod: new i(this.modrn(e.words[0]))
}:{
div: this.divn(e.words[0]),
mod: new i(this.modrn(e.words[0]))
} : this._wordDiv(e, t);
var o, a, s
}
,
i.prototype.div = function(e) {
return this.divmod(e, "div", !1).div
}
,
i.prototype.mod = function(e) {
return this.divmod(e, "mod", !1).mod
}
,
i.prototype.umod = function(e) {
return this.divmod(e, "mod", !0).mod
}
,
i.prototype.divRound = function(e) {
var t = this.divmod(e);
if (t.mod.isZero())
return t.div;
var n = 0 !== t.div.negative ? t.mod.isub(e) : t.mod
, r = e.ushrn(1)
, i = e.andln(1)
, o = n.cmp(r);
return o < 0 || 1 === i && 0 === o ? t.div : 0 !== t.div.negative ?
t.div.isubn(1) : t.div.iaddn(1)
}
,
i.prototype.modrn = function(e) {
var t = e < 0;
t && (e = -e),
n(e <= 67108863);
for (var r = (1 << 26) % e, i = 0, o = this.length - 1; o >= 0; o--)
i = (r * i + (0 | this.words[o])) % e;
return t ? -i : i
}
,
i.prototype.modn = function(e) {
return this.modrn(e)
}
,
i.prototype.idivn = function(e) {
var t = e < 0;
t && (e = -e),
n(e <= 67108863);
for (var r = 0, i = this.length - 1; i >= 0; i--) {
var o = (0 | this.words[i]) + 67108864 * r;
this.words[i] = o / e | 0,
r=o%e
}
return this._strip(),
t ? this.ineg() : this
}
,
i.prototype.divn = function(e) {
return this.clone().idivn(e)
}
,
i.prototype.egcd = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o = new i(1), a = new i(0), s = new i(0), u = new i(1), l =
0; t.isEven() && r.isEven(); )
t.iushrn(1),
r.iushrn(1),
++l;
for (var c = r.clone(), d = t.clone(); !t.isZero(); ) {
for (var f = 0, h = 1; 0 == (t.words[0] & h) && f < 26; ++f,
h <<= 1)
;
if (f > 0)
for (t.iushrn(f); f-- > 0; )
(o.isOdd() || a.isOdd()) && (o.iadd(c),
a.isub(d)),
o.iushrn(1),
a.iushrn(1);
for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p,
m <<= 1)
;
if (p > 0)
for (r.iushrn(p); p-- > 0; )
(s.isOdd() || u.isOdd()) && (s.iadd(c),
u.isub(d)),
s.iushrn(1),
u.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
o.isub(s),
a.isub(u)) : (r.isub(t),
s.isub(o),
u.isub(a))
}
return {
a: s,
b: u,
gcd: r.iushln(l)
}
}
,
i.prototype._invmp = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o, a = new i(1), s = new i(0), u = r.clone(); t.cmpn(1) > 0
&& r.cmpn(1) > 0; ) {
for (var l = 0, c = 1; 0 == (t.words[0] & c) && l < 26; ++l,
c <<= 1)
;
if (l > 0)
for (t.iushrn(l); l-- > 0; )
a.isOdd() && a.iadd(u),
a.iushrn(1);
for (var d = 0, f = 1; 0 == (r.words[0] & f) && d < 26; ++d,
f <<= 1)
;
if (d > 0)
for (r.iushrn(d); d-- > 0; )
s.isOdd() && s.iadd(u),
s.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
a.isub(s)) : (r.isub(t),
s.isub(a))
}
return (o = 0 === t.cmpn(1) ? a : s).cmpn(0) < 0 && o.iadd(e),
o
}
,
i.prototype.gcd = function(e) {
if (this.isZero())
return e.abs();
if (e.isZero())
return this.abs();
var t = this.clone()
, n = e.clone();
t.negative = 0,
n.negative = 0;
for (var r = 0; t.isEven() && n.isEven(); r++)
t.iushrn(1),
n.iushrn(1);
for (; ; ) {
for (; t.isEven(); )
t.iushrn(1);
for (; n.isEven(); )
n.iushrn(1);
var i = t.cmp(n);
if (i < 0) {
var o = t;
t = n,
n=o
} else if (0 === i || 0 === n.cmpn(1))
break;
t.isub(n)
}
return n.iushln(r)
}
,
i.prototype.invm = function(e) {
return this.egcd(e).a.umod(e)
}
,
i.prototype.isEven = function() {
return 0 == (1 & this.words[0])
}
,
i.prototype.isOdd = function() {
return 1 == (1 & this.words[0])
}
,
i.prototype.andln = function(e) {
return this.words[0] & e
}
,
i.prototype.bincn = function(e) {
n("number" == typeof e);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
if (this.length <= r)
return this._expand(r + 1),
this.words[r] |= i,
this;
for (var o = i, a = r; 0 !== o && a < this.length; a++) {
var s = 0 | this.words[a];
o = (s += o) >>> 26,
s &= 67108863,
this.words[a] = s
}
return 0 !== o && (this.words[a] = o,
this.length++),
this
}
,
i.prototype.isZero = function() {
return 1 === this.length && 0 === this.words[0]
}
,
i.prototype.cmpn = function(e) {
var t, r = e < 0;
if (0 !== this.negative && !r)
return -1;
if (0 === this.negative && r)
return 1;
if (this._strip(),
this.length > 1)
t = 1;
else {
r && (e = -e),
n(e <= 67108863, "Number is too big");
var i = 0 | this.words[0];
t = i === e ? 0 : i < e ? -1 : 1
}
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.cmp = function(e) {
if (0 !== this.negative && 0 === e.negative)
return -1;
if (0 === this.negative && 0 !== e.negative)
return 1;
var t = this.ucmp(e);
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.ucmp = function(e) {
if (this.length > e.length)
return 1;
if (this.length < e.length)
return -1;
for (var t = 0, n = this.length - 1; n >= 0; n--) {
var r = 0 | this.words[n]
, i = 0 | e.words[n];
if (r !== i) {
r < i ? t = -1 : r > i && (t = 1);
break
}
}
return t
}
,
i.prototype.gtn = function(e) {
return 1 === this.cmpn(e)
}
,
i.prototype.gt = function(e) {
return 1 === this.cmp(e)
}
,
i.prototype.gten = function(e) {
return this.cmpn(e) >= 0
}
,
i.prototype.gte = function(e) {
return this.cmp(e) >= 0
}
,
i.prototype.ltn = function(e) {
return -1 === this.cmpn(e)
}
,
i.prototype.lt = function(e) {
return -1 === this.cmp(e)
}
,
i.prototype.lten = function(e) {
return this.cmpn(e) <= 0
}
,
i.prototype.lte = function(e) {
return this.cmp(e) <= 0
}
,
i.prototype.eqn = function(e) {
return 0 === this.cmpn(e)
}
,
i.prototype.eq = function(e) {
return 0 === this.cmp(e)
}
,
i.red = function(e) {
return new S(e)
}
,
i.prototype.toRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
n(0 === this.negative, "red works only with positives"),
e.convertTo(this)._forceRed(e)
}
,
i.prototype.fromRed = function() {
return n(this.red, "fromRed works only with numbers in
reduction context"),
this.red.convertFrom(this)
}
,
i.prototype._forceRed = function(e) {
return this.red = e,
this
}
,
i.prototype.forceRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
this._forceRed(e)
}
,
i.prototype.redAdd = function(e) {
return n(this.red, "redAdd works only with red numbers"),
this.red.add(this, e)
}
,
i.prototype.redIAdd = function(e) {
return n(this.red, "redIAdd works only with red numbers"),
this.red.iadd(this, e)
}
,
i.prototype.redSub = function(e) {
return n(this.red, "redSub works only with red numbers"),
this.red.sub(this, e)
}
,
i.prototype.redISub = function(e) {
return n(this.red, "redISub works only with red numbers"),
this.red.isub(this, e)
}
,
i.prototype.redShl = function(e) {
return n(this.red, "redShl works only with red numbers"),
this.red.shl(this, e)
}
,
i.prototype.redMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.mul(this, e)
}
,
i.prototype.redIMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.imul(this, e)
}
,
i.prototype.redSqr = function() {
return n(this.red, "redSqr works only with red numbers"),
this.red._verify1(this),
this.red.sqr(this)
}
,
i.prototype.redISqr = function() {
return n(this.red, "redISqr works only with red numbers"),
this.red._verify1(this),
this.red.isqr(this)
}
,
i.prototype.redSqrt = function() {
return n(this.red, "redSqrt works only with red numbers"),
this.red._verify1(this),
this.red.sqrt(this)
}
,
i.prototype.redInvm = function() {
return n(this.red, "redInvm works only with red numbers"),
this.red._verify1(this),
this.red.invm(this)
}
,
i.prototype.redNeg = function() {
return n(this.red, "redNeg works only with red numbers"),
this.red._verify1(this),
this.red.neg(this)
}
,
i.prototype.redPow = function(e) {
return n(this.red && !e.red, "redPow(normalNum)"),
this.red._verify1(this),
this.red.pow(this, e)
}
;
var b = {
k256: null,
p224: null,
p192: null,
p25519: null
};
function y(e, t) {
this.name = e,
this.p = new i(t,16),
this.n = this.p.bitLength(),
this.k = new i(1).iushln(this.n).isub(this.p),
this.tmp = this._tmp()
}
function A() {
y.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
fffffc2f")
}
function w() {
y.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000
00000001")
}
function _() {
y.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")
}
function E() {
y.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")
}
function S(e) {
if ("string" == typeof e) {
var t = i._prime(e);
this.m = t.p,
this.prime = t
} else
n(e.gtn(1), "modulus must be greater than 1"),
this.m = e,
this.prime = null
}
function k(e) {
S.call(this, e),
this.shift = this.m.bitLength(),
this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26),
this.r = new i(1).iushln(this.shift),
this.r2 = this.imod(this.r.sqr()),
this.rinv = this.r._invmp(this.m),
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m),
this.minv = this.minv.umod(this.r),
this.minv = this.r.sub(this.minv)
}
y.prototype._tmp = function() {
var e = new i(null);
return e.words = new Array(Math.ceil(this.n / 13)),
e
}
,
y.prototype.ireduce = function(e) {
var t, n = e;
do {
this.split(n, this.tmp),
t = (n = (n = this.imulK(n)).iadd(this.tmp)).bitLength()
} while (t > this.n);
var r = t < this.n ? -1 : n.ucmp(this.p);
return 0 === r ? (n.words[0] = 0,
n.length = 1) : r > 0 ? n.isub(this.p) : void 0 !== n.strip ?
n.strip() : n._strip(),
n
}
,
y.prototype.split = function(e, t) {
e.iushrn(this.n, 0, t)
}
,
y.prototype.imulK = function(e) {
return e.imul(this.k)
}
,
r(A, y),
A.prototype.split = function(e, t) {
for (var n = 4194303, r = Math.min(e.length, 9), i = 0; i < r; i++)
t.words[i] = e.words[i];
if (t.length = r,
e.length <= 9)
return e.words[0] = 0,
void (e.length = 1);
var o = e.words[9];
for (t.words[t.length++] = o & n,
i = 10; i < e.length; i++) {
var a = 0 | e.words[i];
e.words[i - 10] = (a & n) << 4 | o >>> 22,
o=a
}
o >>>= 22,
e.words[i - 10] = o,
0 === o && e.length > 10 ? e.length -= 10 : e.length -= 9
}
,
A.prototype.imulK = function(e) {
e.words[e.length] = 0,
e.words[e.length + 1] = 0,
e.length += 2;
for (var t = 0, n = 0; n < e.length; n++) {
var r = 0 | e.words[n];
t += 977 * r,
e.words[n] = 67108863 & t,
t = 64 * r + (t / 67108864 | 0)
}
return 0 === e.words[e.length - 1] && (e.length--,
0 === e.words[e.length - 1] && e.length--),
e
}
,
r(w, y),
r(_, y),
r(E, y),
E.prototype.imulK = function(e) {
for (var t = 0, n = 0; n < e.length; n++) {
var r = 19 * (0 | e.words[n]) + t
, i = 67108863 & r;
r >>>= 26,
e.words[n] = i,
t=r
}
return 0 !== t && (e.words[e.length++] = t),
e
}
,
i._prime = function(e) {
if (b[e])
return b[e];
var t;
if ("k256" === e)
t = new A;
else if ("p224" === e)
t = new w;
else if ("p192" === e)
t = new _;
else {
if ("p25519" !== e)
throw new Error("Unknown prime " + e);
t = new E
}
return b[e] = t,
t
}
,
S.prototype._verify1 = function(e) {
n(0 === e.negative, "red works only with positives"),
n(e.red, "red works only with red numbers")
}
,
S.prototype._verify2 = function(e, t) {
n(0 == (e.negative | t.negative), "red works only with positives"),
n(e.red && e.red === t.red, "red works only with red numbers")
}
,
S.prototype.imod = function(e) {
return this.prime ? this.prime.ireduce(e)._forceRed(this) : (l(e,
e.umod(this.m)._forceRed(this)),
e)
}
,
S.prototype.neg = function(e) {
return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this)
}
,
S.prototype.add = function(e, t) {
this._verify2(e, t);
var n = e.add(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n._forceRed(this)
}
,
S.prototype.iadd = function(e, t) {
this._verify2(e, t);
var n = e.iadd(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n
}
,
S.prototype.sub = function(e, t) {
this._verify2(e, t);
var n = e.sub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n._forceRed(this)
}
,
S.prototype.isub = function(e, t) {
this._verify2(e, t);
var n = e.isub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n
}
,
S.prototype.shl = function(e, t) {
return this._verify1(e),
this.imod(e.ushln(t))
}
,
S.prototype.imul = function(e, t) {
return this._verify2(e, t),
this.imod(e.imul(t))
}
,
S.prototype.mul = function(e, t) {
return this._verify2(e, t),
this.imod(e.mul(t))
}
,
S.prototype.isqr = function(e) {
return this.imul(e, e.clone())
}
,
S.prototype.sqr = function(e) {
return this.mul(e, e)
}
,
S.prototype.sqrt = function(e) {
if (e.isZero())
return e.clone();
var t = this.m.andln(3);
if (n(t % 2 == 1),
3 === t) {
var r = this.m.add(new i(1)).iushrn(2);
return this.pow(e, r)
}
for (var o = this.m.subn(1), a = 0; !o.isZero() && 0 ===
o.andln(1); )
a++,
o.iushrn(1);
n(!o.isZero());
var s = new i(1).toRed(this)
, u = s.redNeg()
, l = this.m.subn(1).iushrn(1)
, c = this.m.bitLength();
for (c = new i(2 * c * c).toRed(this); 0 !== this.pow(c, l).cmp(u); )
c.redIAdd(u);
for (var d = this.pow(c, o), f = this.pow(e, o.addn(1).iushrn(1)), h
= this.pow(e, o), p = a; 0 !== h.cmp(s); ) {
for (var m = h, g = 0; 0 !== m.cmp(s); g++)
m = m.redSqr();
n(g < p);
var v = this.pow(d, new i(1).iushln(p - g - 1));
f = f.redMul(v),
d = v.redSqr(),
h = h.redMul(d),
p=g
}
return f
}
,
S.prototype.invm = function(e) {
var t = e._invmp(this.m);
return 0 !== t.negative ? (t.negative = 0,
this.imod(t).redNeg()) : this.imod(t)
}
,
S.prototype.pow = function(e, t) {
if (t.isZero())
return new i(1).toRed(this);
if (0 === t.cmpn(1))
return e.clone();
var n = new Array(16);
n[0] = new i(1).toRed(this),
n[1] = e;
for (var r = 2; r < n.length; r++)
n[r] = this.mul(n[r - 1], e);
var o = n[0]
,a=0
,s=0
, u = t.bitLength() % 26;
for (0 === u && (u = 26),
r = t.length - 1; r >= 0; r--) {
for (var l = t.words[r], c = u - 1; c >= 0; c--) {
var d = l >> c & 1;
o !== n[0] && (o = this.sqr(o)),
0 !== d || 0 !== a ? (a <<= 1,
a |= d,
(4 === ++s || 0 === r && 0 === c) && (o = this.mul(o,
n[a]),
s = 0,
a = 0)) : s = 0
}
u = 26
}
return o
}
,
S.prototype.convertTo = function(e) {
var t = e.umod(this.m);
return t === e ? t.clone() : t
}
,
S.prototype.convertFrom = function(e) {
var t = e.clone();
return t.red = null,
t
}
,
i.mont = function(e) {
return new k(e)
}
,
r(k, S),
k.prototype.convertTo = function(e) {
return this.imod(e.ushln(this.shift))
}
,
k.prototype.convertFrom = function(e) {
var t = this.imod(e.mul(this.rinv));
return t.red = null,
t
}
,
k.prototype.imul = function(e, t) {
if (e.isZero() || t.isZero())
return e.words[0] = 0,
e.length = 1,
e;
var n = e.imul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, i = n.isub(r).iushrn(this.shift)
, o = i;
return i.cmp(this.m) >= 0 ? o = i.isub(this.m) : i.cmpn(0) < 0 &&
(o = i.iadd(this.m)),
o._forceRed(this)
}
,
k.prototype.mul = function(e, t) {
if (e.isZero() || t.isZero())
return new i(0)._forceRed(this);
var n = e.mul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, o = n.isub(r).iushrn(this.shift)
, a = o;
return o.cmp(this.m) >= 0 ? a = o.isub(this.m) : o.cmpn(0) < 0
&& (a = o.iadd(this.m)),
a._forceRed(this)
}
,
k.prototype.invm = function(e) {
return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)
}
}(e, r)
}(th);
var nh, rh = th.exports, ih = {}, oh = {}, ah = {}, sh = {}, uh = de, lh =
uh.Buffer, ch = {};
for (nh in uh)
uh.hasOwnProperty(nh) && "SlowBuffer" !== nh && "Buffer" !== nh &&
(ch[nh] = uh[nh]);
var dh = ch.Buffer = {};
for (nh in lh)
lh.hasOwnProperty(nh) && "allocUnsafe" !== nh && "allocUnsafeSlow" !
== nh && (dh[nh] = lh[nh]);
if (ch.Buffer.prototype = lh.prototype,
dh.from && dh.from !== Uint8Array.from || (dh.from = function(e, t, n) {
if ("number" == typeof e)
throw new TypeError('The "value" argument must not be of type
number. Received type ' + typeof e);
if (e && void 0 === e.length)
throw new TypeError("The first argument must be one of type string,
Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
return lh(e, t, n)
}
),
dh.alloc || (dh.alloc = function(e, t, n) {
if ("number" != typeof e)
throw new TypeError('The "size" argument must be of type number.
Received type ' + typeof e);
if (e < 0 || e >= 2 * (1 << 30))
throw new RangeError('The value "' + e + '" is invalid for option
"size"');
var r = lh(e);
return t && 0 !== t.length ? "string" == typeof n ? r.fill(t, n) : r.fill(t) :
r.fill(0),
r
}
),
!ch.kStringMaxLength)
try {
ch.kStringMaxLength = je.binding("buffer").kStringMaxLength
} catch (s) {}
ch.constants || (ch.constants = {
MAX_LENGTH: ch.kMaxLength
},
ch.kStringMaxLength && (ch.constants.MAX_STRING_LENGTH =
ch.kStringMaxLength));
var fh = ch
, hh = {};
const ph = Ye;
function mh(e) {
this._reporterState = {
obj: null,
path: [],
options: e || {},
errors: []
}
}
function gh(e, t) {
this.path = e,
this.rethrow(t)
}
hh.Reporter = mh,
mh.prototype.isError = function(e) {
return e instanceof gh
}
,
mh.prototype.save = function() {
const e = this._reporterState;
return {
obj: e.obj,
pathLen: e.path.length
}
}
,
mh.prototype.restore = function(e) {
const t = this._reporterState;
t.obj = e.obj,
t.path = t.path.slice(0, e.pathLen)
}
,
mh.prototype.enterKey = function(e) {
return this._reporterState.path.push(e)
}
,
mh.prototype.exitKey = function(e) {
const t = this._reporterState;
t.path = t.path.slice(0, e - 1)
}
,
mh.prototype.leaveKey = function(e, t, n) {
const r = this._reporterState;
this.exitKey(e),
null !== r.obj && (r.obj[t] = n)
}
,
mh.prototype.path = function() {
return this._reporterState.path.join("/")
}
,
mh.prototype.enterObject = function() {
const e = this._reporterState
, t = e.obj;
return e.obj = {},
t
}
,
mh.prototype.leaveObject = function(e) {
const t = this._reporterState
, n = t.obj;
return t.obj = e,
n
}
,
mh.prototype.error = function(e) {
let t;
const n = this._reporterState
, r = e instanceof gh;
if (t = r ? e : new gh(n.path.map((function(e) {
return "[" + JSON.stringify(e) + "]"
}
)).join(""),e.message || e,e.stack),
!n.options.partial)
throw t;
return r || n.errors.push(t),
t
}
,
mh.prototype.wrapResult = function(e) {
const t = this._reporterState;
return t.options.partial ? {
result: this.isError(e) ? null : e,
errors: t.errors
}:e
}
,
ph(gh, Error),
gh.prototype.rethrow = function(e) {
if (this.message = e + " at: " + (this.path || "(shallow)"),
Error.captureStackTrace && Error.captureStackTrace(this, gh),
!this.stack)
try {
throw new Error(this.message)
} catch (e) {
this.stack = e.stack
}
return this
}
;
var vh = {};
const bh = Ye
, yh = hh.Reporter
, Ah = fh.Buffer;
function wh(e, t) {
yh.call(this, t),
Ah.isBuffer(e) ? (this.base = e,
this.offset = 0,
this.length = e.length) : this.error("Input not Buffer")
}
function _h(e, t) {
if (Array.isArray(e))
this.length = 0,
this.value = e.map((function(e) {
return _h.isEncoderBuffer(e) || (e = new _h(e,t)),
this.length += e.length,
e
}
), this);
else if ("number" == typeof e) {
if (!(0 <= e && e <= 255))
return t.error("non-byte EncoderBuffer value");
this.value = e,
this.length = 1
} else if ("string" == typeof e)
this.value = e,
this.length = Ah.byteLength(e);
else {
if (!Ah.isBuffer(e))
return t.error("Unsupported type: " + typeof e);
this.value = e,
this.length = e.length
}
}
bh(wh, yh),
vh.DecoderBuffer = wh,
wh.isDecoderBuffer = function(e) {
return e instanceof wh || "object" == typeof e && Ah.isBuffer(e.base) &&
"DecoderBuffer" === e.constructor.name && "number" == typeof e.offset && "number"
== typeof e.length && "function" == typeof e.save && "function" == typeof e.restore &&
"function" == typeof e.isEmpty && "function" == typeof e.readUInt8 && "function" ==
typeof e.skip && "function" == typeof e.raw
}
,
wh.prototype.save = function() {
return {
offset: this.offset,
reporter: yh.prototype.save.call(this)
}
}
,
wh.prototype.restore = function(e) {
const t = new wh(this.base);
return t.offset = e.offset,
t.length = this.offset,
this.offset = e.offset,
yh.prototype.restore.call(this, e.reporter),
t
}
,
wh.prototype.isEmpty = function() {
return this.offset === this.length
}
,
wh.prototype.readUInt8 = function(e) {
return this.offset + 1 <= this.length ? this.base.readUInt8(this.offset++, !
0) : this.error(e || "DecoderBuffer overrun")
}
,
wh.prototype.skip = function(e, t) {
if (!(this.offset + e <= this.length))
return this.error(t || "DecoderBuffer overrun");
const n = new wh(this.base);
return n._reporterState = this._reporterState,
n.offset = this.offset,
n.length = this.offset + e,
this.offset += e,
n
}
,
wh.prototype.raw = function(e) {
return this.base.slice(e ? e.offset : this.offset, this.length)
}
,
vh.EncoderBuffer = _h,
_h.isEncoderBuffer = function(e) {
return e instanceof _h || "object" == typeof e && "EncoderBuffer" ===
e.constructor.name && "number" == typeof e.length && "function" == typeof e.join
}
,
_h.prototype.join = function(e, t) {
return e || (e = Ah.alloc(this.length)),
t || (t = 0),
0 === this.length || (Array.isArray(this.value) ?
this.value.forEach((function(n) {
n.join(e, t),
t += n.length
}
)) : ("number" == typeof this.value ? e[t] = this.value : "string" == typeof
this.value ? e.write(this.value, t) : Ah.isBuffer(this.value) && this.value.copy(e, t),
t += this.length)),
e
}
;
const Eh = hh.Reporter
, Sh = vh.EncoderBuffer
, kh = vh.DecoderBuffer
, Mh = Va
, Ch = ["seq", "seqof", "set", "setof", "objid", "bool", "gentime", "utctime",
"null_", "enum", "int", "objDesc", "bitstr", "bmpstr", "charstr", "genstr", "graphstr", "ia5str",
"iso646str", "numstr", "octstr", "printstr", "t61str", "unistr", "utf8str", "videostr"]
, xh = ["key", "obj", "use", "optional", "explicit", "implicit", "def", "choice",
"any", "contains"].concat(Ch);
function Rh(e, t, n) {
const r = {};
this._baseState = r,
r.name = n,
r.enc = e,
r.parent = t || null,
r.children = null,
r.tag = null,
r.args = null,
r.reverseArgs = null,
r.choice = null,
r.optional = !1,
r.any = !1,
r.obj = !1,
r.use = null,
r.useDecoder = null,
r.key = null,
r.default = null,
r.explicit = null,
r.implicit = null,
r.contains = null,
r.parent || (r.children = [],
this._wrap())
}
var Th = Rh;
const Ih = ["enc", "parent", "children", "tag", "args", "reverseArgs", "choice",
"optional", "any", "obj", "use", "alteredUse", "key", "default", "explicit", "implicit",
"contains"];
Rh.prototype.clone = function() {
const e = this._baseState
, t = {};
Ih.forEach((function(n) {
t[n] = e[n]
}
));
const n = new this.constructor(t.parent);
return n._baseState = t,
n
}
,
Rh.prototype._wrap = function() {
const e = this._baseState;
xh.forEach((function(t) {
this[t] = function() {
const n = new this.constructor(this);
return e.children.push(n),
n[t].apply(n, arguments)
}
}
), this)
}
,
Rh.prototype._init = function(e) {
const t = this._baseState;
Mh(null === t.parent),
e.call(this),
t.children = t.children.filter((function(e) {
return e._baseState.parent === this
}
), this),
Mh.equal(t.children.length, 1, "Root node can have only one child")
}
,
Rh.prototype._useArgs = function(e) {
const t = this._baseState
, n = e.filter((function(e) {
return e instanceof this.constructor
}
), this);
e = e.filter((function(e) {
return !(e instanceof this.constructor)
}
), this),
0 !== n.length && (Mh(null === t.children),
t.children = n,
n.forEach((function(e) {
e._baseState.parent = this
}
), this)),
0 !== e.length && (Mh(null === t.args),
t.args = e,
t.reverseArgs = e.map((function(e) {
if ("object" != typeof e || e.constructor !== Object)
return e;
const t = {};
return Object.keys(e).forEach((function(n) {
n == (0 | n) && (n |= 0);
const r = e[n];
t[r] = n
}
)),
t
}
)))
}
,
["_peekTag", "_decodeTag", "_use", "_decodeStr", "_decodeObjid",
"_decodeTime", "_decodeNull", "_decodeInt", "_decodeBool", "_decodeList",
"_encodeComposite", "_encodeStr", "_encodeObjid", "_encodeTime", "_encodeNull",
"_encodeInt", "_encodeBool"].forEach((function(e) {
Rh.prototype[e] = function() {
const t = this._baseState;
throw new Error(e + " not implemented for encoding: " + t.enc)
}
}
)),
Ch.forEach((function(e) {
Rh.prototype[e] = function() {
const t = this._baseState
, n = Array.prototype.slice.call(arguments);
return Mh(null === t.tag),
t.tag = e,
this._useArgs(n),
this
}
}
)),
Rh.prototype.use = function(e) {
Mh(e);
const t = this._baseState;
return Mh(null === t.use),
t.use = e,
this
}
,
Rh.prototype.optional = function() {
return this._baseState.optional = !0,
this
}
,
Rh.prototype.def = function(e) {
const t = this._baseState;
return Mh(null === t.default),
t.default = e,
t.optional = !0,
this
}
,
Rh.prototype.explicit = function(e) {
const t = this._baseState;
return Mh(null === t.explicit && null === t.implicit),
t.explicit = e,
this
}
,
Rh.prototype.implicit = function(e) {
const t = this._baseState;
return Mh(null === t.explicit && null === t.implicit),
t.implicit = e,
this
}
,
Rh.prototype.obj = function() {
const e = this._baseState
, t = Array.prototype.slice.call(arguments);
return e.obj = !0,
0 !== t.length && this._useArgs(t),
this
}
,
Rh.prototype.key = function(e) {
const t = this._baseState;
return Mh(null === t.key),
t.key = e,
this
}
,
Rh.prototype.any = function() {
return this._baseState.any = !0,
this
}
,
Rh.prototype.choice = function(e) {
const t = this._baseState;
return Mh(null === t.choice),
t.choice = e,
this._useArgs(Object.keys(e).map((function(t) {
return e[t]
}
))),
this
}
,
Rh.prototype.contains = function(e) {
const t = this._baseState;
return Mh(null === t.use),
t.contains = e,
this
}
,
Rh.prototype._decode = function(e, t) {
const n = this._baseState;
if (null === n.parent)
return e.wrapResult(n.children[0]._decode(e, t));
let r, i = n.default, o = !0, a = null;
if (null !== n.key && (a = e.enterKey(n.key)),
n.optional) {
let r = null;
if (null !== n.explicit ? r = n.explicit : null !== n.implicit ? r =
n.implicit : null !== n.tag && (r = n.tag),
null !== r || n.any) {
if (o = this._peekTag(e, r, n.any),
e.isError(o))
return o
} else {
const r = e.save();
try {
null === n.choice ? this._decodeGeneric(n.tag, e, t) :
this._decodeChoice(e, t),
o = !0
} catch (e) {
o = !1
}
e.restore(r)
}
}
if (n.obj && o && (r = e.enterObject()),
o) {
if (null !== n.explicit) {
const t = this._decodeTag(e, n.explicit);
if (e.isError(t))
return t;
e=t
}
const r = e.offset;
if (null === n.use && null === n.choice) {
let t;
n.any && (t = e.save());
const r = this._decodeTag(e, null !== n.implicit ? n.implicit :
n.tag, n.any);
if (e.isError(r))
return r;
n.any ? i = e.raw(t) : e = r
}
if (t && t.track && null !== n.tag && t.track(e.path(), r, e.length,
"tagged"),
t && t.track && null !== n.tag && t.track(e.path(), e.offset, e.length,
"content"),
n.any || (i = null === n.choice ? this._decodeGeneric(n.tag, e, t) :
this._decodeChoice(e, t)),
e.isError(i))
return i;
if (n.any || null !== n.choice || null === n.children ||
n.children.forEach((function(n) {
n._decode(e, t)
}
)),
n.contains && ("octstr" === n.tag || "bitstr" === n.tag)) {
const r = new kh(i);
i = this._getUse(n.contains, e._reporterState.obj)._decode(r, t)
}
}
return n.obj && o && (i = e.leaveObject(r)),
null === n.key || null === i && !0 !== o ? null !== a && e.exitKey(a) :
e.leaveKey(a, n.key, i),
i
}
,
Rh.prototype._decodeGeneric = function(e, t, n) {
const r = this._baseState;
return "seq" === e || "set" === e ? null : "seqof" === e || "setof" === e ?
this._decodeList(t, e, r.args[0], n) : /str$/.test(e) ? this._decodeStr(t, e, n) : "objid" === e
&& r.args ? this._decodeObjid(t, r.args[0], r.args[1], n) : "objid" === e ?
this._decodeObjid(t, null, null, n) : "gentime" === e || "utctime" === e ?
this._decodeTime(t, e, n) : "null_" === e ? this._decodeNull(t, n) : "bool" === e ?
this._decodeBool(t, n) : "objDesc" === e ? this._decodeStr(t, e, n) : "int" === e || "enum"
=== e ? this._decodeInt(t, r.args && r.args[0], n) : null !== r.use ? this._getUse(r.use,
t._reporterState.obj)._decode(t, n) : t.error("unknown tag: " + e)
}
,
Rh.prototype._getUse = function(e, t) {
const n = this._baseState;
return n.useDecoder = this._use(e, t),
Mh(null === n.useDecoder._baseState.parent),
n.useDecoder = n.useDecoder._baseState.children[0],
n.implicit !== n.useDecoder._baseState.implicit && (n.useDecoder =
n.useDecoder.clone(),
n.useDecoder._baseState.implicit = n.implicit),
n.useDecoder
}
,
Rh.prototype._decodeChoice = function(e, t) {
const n = this._baseState;
let r = null
, i = !1;
return Object.keys(n.choice).some((function(o) {
const a = e.save()
, s = n.choice[o];
try {
const n = s._decode(e, t);
if (e.isError(n))
return !1;
r={
type: o,
value: n
},
i = !0
} catch (t) {
return e.restore(a),
!1
}
return !0
}
), this),
i ? r : e.error("Choice not matched")
}
,
Rh.prototype._createEncoderBuffer = function(e) {
return new Sh(e,this.reporter)
}
,
Rh.prototype._encode = function(e, t, n) {
const r = this._baseState;
if (null !== r.default && r.default === e)
return;
const i = this._encodeValue(e, t, n);
return void 0 === i || this._skipDefault(i, t, n) ? void 0 : i
}
,
Rh.prototype._encodeValue = function(e, t, n) {
const r = this._baseState;
if (null === r.parent)
return r.children[0]._encode(e, t || new Eh);
let i = null;
if (this.reporter = t,
r.optional && void 0 === e) {
if (null === r.default)
return;
e = r.default
}
let o = null
, a = !1;
if (r.any)
i = this._createEncoderBuffer(e);
else if (r.choice)
i = this._encodeChoice(e, t);
else if (r.contains)
o = this._getUse(r.contains, n)._encode(e, t),
a = !0;
else if (r.children)
o = r.children.map((function(n) {
if ("null_" === n._baseState.tag)
return n._encode(null, t, e);
if (null === n._baseState.key)
return t.error("Child should have a key");
const r = t.enterKey(n._baseState.key);
if ("object" != typeof e)
return t.error("Child expected, but input is not object");
const i = n._encode(e[n._baseState.key], t, e);
return t.leaveKey(r),
i
}
), this).filter((function(e) {
return e
}
)),
o = this._createEncoderBuffer(o);
else if ("seqof" === r.tag || "setof" === r.tag) {
if (!r.args || 1 !== r.args.length)
return t.error("Too many args for : " + r.tag);
if (!Array.isArray(e))
return t.error("seqof/setof, but data is not Array");
const n = this.clone();
n._baseState.implicit = null,
o = this._createEncoderBuffer(e.map((function(n) {
const r = this._baseState;
return this._getUse(r.args[0], e)._encode(n, t)
}
), n))
} else
null !== r.use ? i = this._getUse(r.use, n)._encode(e, t) : (o =
this._encodePrimitive(r.tag, e),
a = !0);
if (!r.any && null === r.choice) {
const e = null !== r.implicit ? r.implicit : r.tag
, n = null === r.implicit ? "universal" : "context";
null === e ? null === r.use && t.error("Tag could be omitted only
for .use()") : null === r.use && (i = this._encodeComposite(e, a, n, o))
}
return null !== r.explicit && (i = this._encodeComposite(r.explicit, !1,
"context", i)),
i
}
,
Rh.prototype._encodeChoice = function(e, t) {
const n = this._baseState
, r = n.choice[e.type];
return r || Mh(!1, e.type + " not found in " +
JSON.stringify(Object.keys(n.choice))),
r._encode(e.value, t)
}
,
Rh.prototype._encodePrimitive = function(e, t) {
const n = this._baseState;
if (/str$/.test(e))
return this._encodeStr(t, e);
if ("objid" === e && n.args)
return this._encodeObjid(t, n.reverseArgs[0], n.args[1]);
if ("objid" === e)
return this._encodeObjid(t, null, null);
if ("gentime" === e || "utctime" === e)
return this._encodeTime(t, e);
if ("null_" === e)
return this._encodeNull();
if ("int" === e || "enum" === e)
return this._encodeInt(t, n.args && n.reverseArgs[0]);
if ("bool" === e)
return this._encodeBool(t);
if ("objDesc" === e)
return this._encodeStr(t, e);
throw new Error("Unsupported tag: " + e)
}
,
Rh.prototype._isNumstr = function(e) {
return /^[0-9 ]*$/.test(e)
}
,
Rh.prototype._isPrintstr = function(e) {
return /^[A-Za-z0-9 '()+,-./:=?]*$/.test(e)
}
;
var Ph = {};
!function(e) {
function t(e) {
const t = {};
return Object.keys(e).forEach((function(n) {
(0 | n) == n && (n |= 0);
const r = e[n];
t[r] = n
}
)),
t
}
e.tagClass = {
0: "universal",
1: "application",
2: "context",
3: "private"
},
e.tagClassByName = t(e.tagClass),
e.tag = {
0: "end",
1: "bool",
2: "int",
3: "bitstr",
4: "octstr",
5: "null_",
6: "objid",
7: "objDesc",
8: "external",
9: "real",
10: "enum",
11: "embed",
12: "utf8str",
13: "relativeOid",
16: "seq",
17: "set",
18: "numstr",
19: "printstr",
20: "t61str",
21: "videostr",
22: "ia5str",
23: "utctime",
24: "gentime",
25: "graphstr",
26: "iso646str",
27: "genstr",
28: "unistr",
29: "charstr",
30: "bmpstr"
},
e.tagByName = t(e.tag)
}(Ph);
const Lh = Ye
, Oh = fh.Buffer
, Nh = Th
, Dh = Ph;
function Bh(e) {
this.enc = "der",
this.name = e.name,
this.entity = e,
this.tree = new zh,
this.tree._init(e.body)
}
var jh = Bh;
function zh(e) {
Nh.call(this, "der", e)
}
function Fh(e) {
return e < 10 ? "0" + e : e
}
Bh.prototype.encode = function(e, t) {
return this.tree._encode(e, t).join()
}
,
Lh(zh, Nh),
zh.prototype._encodeComposite = function(e, t, n, r) {
const i = function(e, t, n, r) {
let i;
if ("seqof" === e ? e = "seq" : "setof" === e && (e = "set"),
Dh.tagByName.hasOwnProperty(e))
i = Dh.tagByName[e];
else {
if ("number" != typeof e || (0 | e) !== e)
return r.error("Unknown tag: " + e);
i=e
}
return i >= 31 ? r.error("Multi-octet tag encoding unsupported") : (t ||
(i |= 32),
i |= Dh.tagClassByName[n || "universal"] << 6,
i)
}(e, t, n, this.reporter);
if (r.length < 128) {
const e = Oh.alloc(2);
return e[0] = i,
e[1] = r.length,
this._createEncoderBuffer([e, r])
}
let o = 1;
for (let s = r.length; s >= 256; s >>= 8)
o++;
const a = Oh.alloc(2 + o);
a[0] = i,
a[1] = 128 | o;
for (let s = 1 + o, u = r.length; u > 0; s--,
u >>= 8)
a[s] = 255 & u;
return this._createEncoderBuffer([a, r])
}
,
zh.prototype._encodeStr = function(e, t) {
if ("bitstr" === t)
return this._createEncoderBuffer([0 | e.unused, e.data]);
if ("bmpstr" === t) {
const t = Oh.alloc(2 * e.length);
for (let n = 0; n < e.length; n++)
t.writeUInt16BE(e.charCodeAt(n), 2 * n);
return this._createEncoderBuffer(t)
}
return "numstr" === t ? this._isNumstr(e) ? this._createEncoderBuffer(e)
: this.reporter.error("Encoding of string type: numstr supports only digits and space") :
"printstr" === t ? this._isPrintstr(e) ? this._createEncoderBuffer(e) :
this.reporter.error("Encoding of string type: printstr supports only latin upper and lower
case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma,
hyphen, dot, slash, colon, equal sign, question mark") : /str$/.test(t) || "objDesc" === t ?
this._createEncoderBuffer(e) : this.reporter.error("Encoding of string type: " + t + "
unsupported")
}
,
zh.prototype._encodeObjid = function(e, t, n) {
if ("string" == typeof e) {
if (!t)
return this.reporter.error("string objid given, but no values map
found");
if (!t.hasOwnProperty(e))
return this.reporter.error("objid not found in values map");
e = t[e].split(/[\s.]+/g);
for (let t = 0; t < e.length; t++)
e[t] |= 0
} else if (Array.isArray(e)) {
e = e.slice();
for (let t = 0; t < e.length; t++)
e[t] |= 0
}
if (!Array.isArray(e))
return this.reporter.error("objid() should be either array or string, got:
" + JSON.stringify(e));
if (!n) {
if (e[1] >= 40)
return this.reporter.error("Second objid identifier OOB");
e.splice(0, 2, 40 * e[0] + e[1])
}
let r = 0;
for (let a = 0; a < e.length; a++) {
let t = e[a];
for (r++; t >= 128; t >>= 7)
r++
}
const i = Oh.alloc(r);
let o = i.length - 1;
for (let a = e.length - 1; a >= 0; a--) {
let t = e[a];
for (i[o--] = 127 & t; (t >>= 7) > 0; )
i[o--] = 128 | 127 & t
}
return this._createEncoderBuffer(i)
}
,
zh.prototype._encodeTime = function(e, t) {
let n;
const r = new Date(e);
return "gentime" === t ? n = [Fh(r.getUTCFullYear()),
Fh(r.getUTCMonth() + 1), Fh(r.getUTCDate()), Fh(r.getUTCHours()),
Fh(r.getUTCMinutes()), Fh(r.getUTCSeconds()), "Z"].join("") : "utctime" === t ? n =
[Fh(r.getUTCFullYear() % 100), Fh(r.getUTCMonth() + 1), Fh(r.getUTCDate()),
Fh(r.getUTCHours()), Fh(r.getUTCMinutes()), Fh(r.getUTCSeconds()), "Z"].join("") :
this.reporter.error("Encoding " + t + " time is not supported yet"),
this._encodeStr(n, "octstr")
}
,
zh.prototype._encodeNull = function() {
return this._createEncoderBuffer("")
}
,
zh.prototype._encodeInt = function(e, t) {
if ("string" == typeof e) {
if (!t)
return this.reporter.error("String int or enum given, but no values
map");
if (!t.hasOwnProperty(e))
return this.reporter.error("Values map doesn't contain: " +
JSON.stringify(e));
e = t[e]
}
if ("number" != typeof e && !Oh.isBuffer(e)) {
const t = e.toArray();
!e.sign && 128 & t[0] && t.unshift(0),
e = Oh.from(t)
}
if (Oh.isBuffer(e)) {
let t = e.length;
0 === e.length && t++;
const n = Oh.alloc(t);
return e.copy(n),
0 === e.length && (n[0] = 0),
this._createEncoderBuffer(n)
}
if (e < 128)
return this._createEncoderBuffer(e);
if (e < 256)
return this._createEncoderBuffer([0, e]);
let n = 1;
for (let i = e; i >= 256; i >>= 8)
n++;
const r = new Array(n);
for (let i = r.length - 1; i >= 0; i--)
r[i] = 255 & e,
e >>= 8;
return 128 & r[0] && r.unshift(0),
this._createEncoderBuffer(Oh.from(r))
}
,
zh.prototype._encodeBool = function(e) {
return this._createEncoderBuffer(e ? 255 : 0)
}
,
zh.prototype._use = function(e, t) {
return "function" == typeof e && (e = e(t)),
e._getEncoder("der").tree
}
,
zh.prototype._skipDefault = function(e, t, n) {
const r = this._baseState;
let i;
if (null === r.default)
return !1;
const o = e.join();
if (void 0 === r.defaultBuffer && (r.defaultBuffer =
this._encodeValue(r.default, t, n).join()),
o.length !== r.defaultBuffer.length)
return !1;
for (i = 0; i < o.length; i++)
if (o[i] !== r.defaultBuffer[i])
return !1;
return !0
}
;
const Uh = jh;
function Kh(e) {
Uh.call(this, e),
this.enc = "pem"
}
Ye(Kh, Uh);
var qh = Kh;
Kh.prototype.encode = function(e, t) {
const n = Uh.prototype.encode.call(this, e).toString("base64")
, r = ["-----BEGIN " + t.label + "-----"];
for (let i = 0; i < n.length; i += 64)
r.push(n.slice(i, i + 64));
return r.push("-----END " + t.label + "-----"),
r.join("\n")
}
,
function(e) {
const t = e;
t.der = jh,
t.pem = qh
}(sh);
var Hh = {};
const Vh = Ye
, Wh = hl
, $h = vh.DecoderBuffer
, Yh = Th
, Qh = Ph;
function Zh(e) {
this.enc = "der",
this.name = e.name,
this.entity = e,
this.tree = new Xh,
this.tree._init(e.body)
}
var Gh = Zh;
function Xh(e) {
Yh.call(this, "der", e)
}
function Jh(e, t) {
let n = e.readUInt8(t);
if (e.isError(n))
return n;
const r = Qh.tagClass[n >> 6]
, i = 0 == (32 & n);
if (31 == (31 & n)) {
let r = n;
for (n = 0; 128 == (128 & r); ) {
if (r = e.readUInt8(t),
e.isError(r))
return r;
n <<= 7,
n |= 127 & r
}
} else
n &= 31;
return {
cls: r,
primitive: i,
tag: n,
tagStr: Qh.tag[n]
}
}
function ep(e, t, n) {
let r = e.readUInt8(n);
if (e.isError(r))
return r;
if (!t && 128 === r)
return null;
if (0 == (128 & r))
return r;
const i = 127 & r;
if (i > 4)
return e.error("length octect is too long");
r = 0;
for (let o = 0; o < i; o++) {
r <<= 8;
const t = e.readUInt8(n);
if (e.isError(t))
return t;
r |= t
}
return r
}
Zh.prototype.decode = function(e, t) {
return $h.isDecoderBuffer(e) || (e = new $h(e,t)),
this.tree._decode(e, t)
}
,
Vh(Xh, Yh),
Xh.prototype._peekTag = function(e, t, n) {
if (e.isEmpty())
return !1;
const r = e.save()
, i = Jh(e, 'Failed to peek tag: "' + t + '"');
return e.isError(i) ? i : (e.restore(r),
i.tag === t || i.tagStr === t || i.tagStr + "of" === t || n)
}
,
Xh.prototype._decodeTag = function(e, t, n) {
const r = Jh(e, 'Failed to decode tag of "' + t + '"');
if (e.isError(r))
return r;
let i = ep(e, r.primitive, 'Failed to get length of "' + t + '"');
if (e.isError(i))
return i;
if (!n && r.tag !== t && r.tagStr !== t && r.tagStr + "of" !== t)
return e.error('Failed to match tag: "' + t + '"');
if (r.primitive || null !== i)
return e.skip(i, 'Failed to match body of: "' + t + '"');
const o = e.save()
, a = this._skipUntilEnd(e, 'Failed to skip indefinite length body: "' +
this.tag + '"');
return e.isError(a) ? a : (i = e.offset - o.offset,
e.restore(o),
e.skip(i, 'Failed to match body of: "' + t + '"'))
}
,
Xh.prototype._skipUntilEnd = function(e, t) {
for (; ; ) {
const n = Jh(e, t);
if (e.isError(n))
return n;
const r = ep(e, n.primitive, t);
if (e.isError(r))
return r;
let i;
if (i = n.primitive || null !== r ? e.skip(r) : this._skipUntilEnd(e, t),
e.isError(i))
return i;
if ("end" === n.tagStr)
break
}
}
,
Xh.prototype._decodeList = function(e, t, n, r) {
const i = [];
for (; !e.isEmpty(); ) {
const t = this._peekTag(e, "end");
if (e.isError(t))
return t;
const o = n.decode(e, "der", r);
if (e.isError(o) && t)
break;
i.push(o)
}
return i
}
,
Xh.prototype._decodeStr = function(e, t) {
if ("bitstr" === t) {
const t = e.readUInt8();
return e.isError(t) ? t : {
unused: t,
data: e.raw()
}
}
if ("bmpstr" === t) {
const t = e.raw();
if (t.length % 2 == 1)
return e.error("Decoding of string type: bmpstr length
mismatch");
let n = "";
for (let e = 0; e < t.length / 2; e++)
n += String.fromCharCode(t.readUInt16BE(2 * e));
return n
}
if ("numstr" === t) {
const t = e.raw().toString("ascii");
return this._isNumstr(t) ? t : e.error("Decoding of string type: numstr
unsupported characters")
}
if ("octstr" === t)
return e.raw();
if ("objDesc" === t)
return e.raw();
if ("printstr" === t) {
const t = e.raw().toString("ascii");
return this._isPrintstr(t) ? t : e.error("Decoding of string type: printstr
unsupported characters")
}
return /str$/.test(t) ? e.raw().toString() : e.error("Decoding of string type:
" + t + " unsupported")
}
,
Xh.prototype._decodeObjid = function(e, t, n) {
let r;
const i = [];
let o = 0
, a = 0;
for (; !e.isEmpty(); )
a = e.readUInt8(),
o <<= 7,
o |= 127 & a,
0 == (128 & a) && (i.push(o),
o = 0);
128 & a && i.push(o);
const s = i[0] / 40 | 0
, u = i[0] % 40;
if (r = n ? i : [s, u].concat(i.slice(1)),
t) {
let e = t[r.join(" ")];
void 0 === e && (e = t[r.join(".")]),
void 0 !== e && (r = e)
}
return r
}
,
Xh.prototype._decodeTime = function(e, t) {
const n = e.raw().toString();
let r, i, o, a, s, u;
if ("gentime" === t)
r = 0 | n.slice(0, 4),
i = 0 | n.slice(4, 6),
o = 0 | n.slice(6, 8),
a = 0 | n.slice(8, 10),
s = 0 | n.slice(10, 12),
u = 0 | n.slice(12, 14);
else {
if ("utctime" !== t)
return e.error("Decoding " + t + " time is not supported yet");
r = 0 | n.slice(0, 2),
i = 0 | n.slice(2, 4),
o = 0 | n.slice(4, 6),
a = 0 | n.slice(6, 8),
s = 0 | n.slice(8, 10),
u = 0 | n.slice(10, 12),
r = r < 70 ? 2e3 + r : 1900 + r
}
return Date.UTC(r, i - 1, o, a, s, u, 0)
}
,
Xh.prototype._decodeNull = function() {
return null
}
,
Xh.prototype._decodeBool = function(e) {
const t = e.readUInt8();
return e.isError(t) ? t : 0 !== t
}
,
Xh.prototype._decodeInt = function(e, t) {
const n = e.raw();
let r = new Wh(n);
return t && (r = t[r.toString(10)] || r),
r
}
,
Xh.prototype._use = function(e, t) {
return "function" == typeof e && (e = e(t)),
e._getDecoder("der").tree
}
;
const tp = Ye
, np = fh.Buffer
, rp = Gh;
function ip(e) {
rp.call(this, e),
this.enc = "pem"
}
tp(ip, rp);
var op = ip;
ip.prototype.decode = function(e, t) {
const n = e.toString().split(/[\r\n]+/g)
, r = t.label.toUpperCase()
, i = /^-----(BEGIN|END) ([^-]+)-----$/;
let o = -1
, a = -1;
for (let l = 0; l < n.length; l++) {
const e = n[l].match(i);
if (null !== e && e[2] === r) {
if (-1 !== o) {
if ("END" !== e[1])
break;
a = l;
break
}
if ("BEGIN" !== e[1])
break;
o=l
}
}
if (-1 === o || -1 === a)
throw new Error("PEM section not found for: " + r);
const s = n.slice(o + 1, a).join("");
s.replace(/[^a-z0-9+/=]+/gi, "");
const u = np.from(s, "base64");
return rp.prototype.decode.call(this, u, t)
}
,
function(e) {
const t = e;
t.der = Gh,
t.pem = op
}(Hh),
function(e) {
const t = sh
, n = Hh
, r = Ye;
function i(e, t) {
this.name = e,
this.body = t,
this.decoders = {},
this.encoders = {}
}
e.define = function(e, t) {
return new i(e,t)
}
,
i.prototype._createNamed = function(e) {
const t = this.name;
function n(e) {
this._initNamed(e, t)
}
return r(n, e),
n.prototype._initNamed = function(t, n) {
e.call(this, t, n)
}
,
new n(this)
}
,
i.prototype._getDecoder = function(e) {
return e = e || "der",
this.decoders.hasOwnProperty(e) || (this.decoders[e] =
this._createNamed(n[e])),
this.decoders[e]
}
,
i.prototype.decode = function(e, t, n) {
return this._getDecoder(t).decode(e, n)
}
,
i.prototype._getEncoder = function(e) {
return e = e || "der",
this.encoders.hasOwnProperty(e) || (this.encoders[e] =
this._createNamed(t[e])),
this.encoders[e]
}
,
i.prototype.encode = function(e, t, n) {
return this._getEncoder(t).encode(e, n)
}
}(ah);
var ap = {};
!function(e) {
const t = e;
t.Reporter = hh.Reporter,
t.DecoderBuffer = vh.DecoderBuffer,
t.EncoderBuffer = vh.EncoderBuffer,
t.Node = Th
}(ap);
var sp = {};
!function(e) {
const t = e;
t._reverse = function(e) {
const t = {};
return Object.keys(e).forEach((function(n) {
(0 | n) == n && (n |= 0);
const r = e[n];
t[r] = n
}
)),
t
}
,
t.der = Ph
}(sp),
function(e) {
const t = e;
t.bignum = hl,
t.define = ah.define,
t.base = ap,
t.constants = sp,
t.decoders = Hh,
t.encoders = sh
}(oh);
var up = oh
, lp = up.define("Time", (function() {
this.choice({
utcTime: this.utctime(),
generalTime: this.gentime()
})
}
))
, cp = up.define("AttributeTypeValue", (function() {
this.seq().obj(this.key("type").objid(), this.key("value").any())
}
))
, dp = up.define("AlgorithmIdentifier", (function() {
this.seq().obj(this.key("algorithm").objid(),
this.key("parameters").optional(), this.key("curve").objid().optional())
}
))
, fp = up.define("SubjectPublicKeyInfo", (function() {
this.seq().obj(this.key("algorithm").use(dp),
this.key("subjectPublicKey").bitstr())
}
))
, hp = up.define("RelativeDistinguishedName", (function() {
this.setof(cp)
}
))
, pp = up.define("RDNSequence", (function() {
this.seqof(hp)
}
))
, mp = up.define("Name", (function() {
this.choice({
rdnSequence: this.use(pp)
})
}
))
, gp = up.define("Validity", (function() {
this.seq().obj(this.key("notBefore").use(lp), this.key("notAfter").use(lp))
}
))
, vp = up.define("Extension", (function() {
this.seq().obj(this.key("extnID").objid(), this.key("critical").bool().def(!1),
this.key("extnValue").octstr())
}
))
, bp = up.define("TBSCertificate", (function() {
this.seq().obj(this.key("version").explicit(0).int().optional(),
this.key("serialNumber").int(), this.key("signature").use(dp), this.key("issuer").use(mp),
this.key("validity").use(gp), this.key("subject").use(mp),
this.key("subjectPublicKeyInfo").use(fp),
this.key("issuerUniqueID").implicit(1).bitstr().optional(),
this.key("subjectUniqueID").implicit(2).bitstr().optional(),
this.key("extensions").explicit(3).seqof(vp).optional())
}
))
, yp = up.define("X509Certificate", (function() {
this.seq().obj(this.key("tbsCertificate").use(bp),
this.key("signatureAlgorithm").use(dp), this.key("signatureValue").bitstr())
}
))
, Ap = oh;
ih.certificate = yp;
var wp = Ap.define("RSAPrivateKey", (function() {
this.seq().obj(this.key("version").int(), this.key("modulus").int(),
this.key("publicExponent").int(), this.key("privateExponent").int(), this.key("prime1").int(),
this.key("prime2").int(), this.key("exponent1").int(), this.key("exponent2").int(),
this.key("coefficient").int())
}
));
ih.RSAPrivateKey = wp;
var _p = Ap.define("RSAPublicKey", (function() {
this.seq().obj(this.key("modulus").int(), this.key("publicExponent").int())
}
));
ih.RSAPublicKey = _p;
var Ep = Ap.define("SubjectPublicKeyInfo", (function() {
this.seq().obj(this.key("algorithm").use(Sp),
this.key("subjectPublicKey").bitstr())
}
));
ih.PublicKey = Ep;
var Sp = Ap.define("AlgorithmIdentifier", (function() {
this.seq().obj(this.key("algorithm").objid(),
this.key("none").null_().optional(), this.key("curve").objid().optional(),
this.key("params").seq().obj(this.key("p").int(), this.key("q").int(),
this.key("g").int()).optional())
}
))
, kp = Ap.define("PrivateKeyInfo", (function() {
this.seq().obj(this.key("version").int(), this.key("algorithm").use(Sp),
this.key("subjectPrivateKey").octstr())
}
));
ih.PrivateKey = kp;
var Mp = Ap.define("EncryptedPrivateKeyInfo", (function() {
this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),
this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),
this.key("kdeparams").seq().obj(this.key("salt").octstr(), this.key("iters").int())),
this.key("cipher").seq().obj(this.key("algo").objid(), this.key("iv").octstr()))),
this.key("subjectPrivateKey").octstr())
}
));
ih.EncryptedPrivateKey = Mp;
var Cp = Ap.define("DSAPrivateKey", (function() {
this.seq().obj(this.key("version").int(), this.key("p").int(),
this.key("q").int(), this.key("g").int(), this.key("pub_key").int(), this.key("priv_key").int())
}
));
ih.DSAPrivateKey = Cp,
ih.DSAparam = Ap.define("DSAparam", (function() {
this.int()
}
));
var xp = Ap.define("ECPrivateKey", (function() {
this.seq().obj(this.key("version").int(), this.key("privateKey").octstr(),
this.key("parameters").optional().explicit(0).use(Rp),
this.key("publicKey").optional().explicit(1).bitstr())
}
));
ih.ECPrivateKey = xp;
var Rp = Ap.define("ECParameters", (function() {
this.choice({
namedCurve: this.objid()
})
}
));
ih.signature = Ap.define("signature", (function() {
this.seq().obj(this.key("r").int(), this.key("s").int())
}
));
var Tp = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|
(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m
, Ip = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m
, Pp = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----
END \1-----$/m
, Lp = Mu
, Op = ws
, Np = Ue().Buffer
, Dp = ih
, Bp = {
"2.16.840.1.101.3.4.1.1": "aes-128-ecb",
"2.16.840.1.101.3.4.1.2": "aes-128-cbc",
"2.16.840.1.101.3.4.1.3": "aes-128-ofb",
"2.16.840.1.101.3.4.1.4": "aes-128-cfb",
"2.16.840.1.101.3.4.1.21": "aes-192-ecb",
"2.16.840.1.101.3.4.1.22": "aes-192-cbc",
"2.16.840.1.101.3.4.1.23": "aes-192-ofb",
"2.16.840.1.101.3.4.1.24": "aes-192-cfb",
"2.16.840.1.101.3.4.1.41": "aes-256-ecb",
"2.16.840.1.101.3.4.1.42": "aes-256-cbc",
"2.16.840.1.101.3.4.1.43": "aes-256-ofb",
"2.16.840.1.101.3.4.1.44": "aes-256-cfb"
}
, jp = function(e, t) {
var n, r = e.toString(), i = r.match(Tp);
if (i) {
var o = "aes" + i[1]
, a = Np.from(i[2], "hex")
, s = Np.from(i[3].replace(/[\r\n]/g, ""), "base64")
, u = Lp(t, a.slice(0, 8), parseInt(i[1], 10)).key
, l = []
, c = Op.createDecipheriv(o, u, a);
l.push(c.update(s)),
l.push(c.final()),
n = Np.concat(l)
} else {
var d = r.match(Pp);
n = Np.from(d[2].replace(/[\r\n]/g, ""), "base64")
}
return {
tag: r.match(Ip)[1],
data: n
}
}
, zp = ws
, Fp = ca
, Up = Ue().Buffer
, Kp = qp;
function qp(e) {
var t;
"object" != typeof e || Up.isBuffer(e) || (t = e.passphrase,
e = e.key),
"string" == typeof e && (e = Up.from(e));
var n, r, i = jp(e, t), o = i.tag, a = i.data;
switch (o) {
case "CERTIFICATE":
r = Dp.certificate.decode(a,
"der").tbsCertificate.subjectPublicKeyInfo;
case "PUBLIC KEY":
switch (r || (r = Dp.PublicKey.decode(a, "der")),
n = r.algorithm.algorithm.join(".")) {
case "1.2.840.113549.1.1.1":
return Dp.RSAPublicKey.decode(r.subjectPublicKey.data,
"der");
case "1.2.840.10045.2.1":
return r.subjectPrivateKey = r.subjectPublicKey,
{
type: "ec",
data: r
};
case "1.2.840.10040.4.1":
return r.algorithm.params.pub_key =
Dp.DSAparam.decode(r.subjectPublicKey.data, "der"),
{
type: "dsa",
data: r.algorithm.params
};
default:
throw new Error("unknown key id " + n)
}
case "ENCRYPTED PRIVATE KEY":
a = function(e, t) {
var n = e.algorithm.decrypt.kde.kdeparams.salt
,r=
parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(), 10)
, i = Bp[e.algorithm.decrypt.cipher.algo.join(".")]
, o = e.algorithm.decrypt.cipher.iv
, a = e.subjectPrivateKey
, s = parseInt(i.split("-")[1], 10) / 8
, u = Fp.pbkdf2Sync(t, n, r, s, "sha1")
, l = zp.createDecipheriv(i, u, o)
, c = [];
return c.push(l.update(a)),
c.push(l.final()),
Up.concat(c)
}(a = Dp.EncryptedPrivateKey.decode(a, "der"), t);
case "PRIVATE KEY":
switch (n = (r = Dp.PrivateKey.decode(a,
"der")).algorithm.algorithm.join(".")) {
case "1.2.840.113549.1.1.1":
return Dp.RSAPrivateKey.decode(r.subjectPrivateKey, "der");
case "1.2.840.10045.2.1":
return {
curve: r.algorithm.curve,
privateKey: Dp.ECPrivateKey.decode(r.subjectPrivateKey,
"der").privateKey
};
case "1.2.840.10040.4.1":
return r.algorithm.params.priv_key =
Dp.DSAparam.decode(r.subjectPrivateKey, "der"),
{
type: "dsa",
params: r.algorithm.params
};
default:
throw new Error("unknown key id " + n)
}
case "RSA PUBLIC KEY":
return Dp.RSAPublicKey.decode(a, "der");
case "RSA PRIVATE KEY":
return Dp.RSAPrivateKey.decode(a, "der");
case "DSA PRIVATE KEY":
return {
type: "dsa",
params: Dp.DSAPrivateKey.decode(a, "der")
};
case "EC PRIVATE KEY":
return {
curve: (a = Dp.ECPrivateKey.decode(a,
"der")).parameters.value,
privateKey: a.privateKey
};
default:
throw new Error("unknown key type " + o)
}
}
qp.signature = Dp.signature;
var Hp, Vp, Wp, $p, Yp, Qp, Zp, Gp = {
"1.3.132.0.10": "secp256k1",
"1.3.132.0.33": "p224",
"1.2.840.10045.3.1.1": "p192",
"1.2.840.10045.3.1.7": "p256",
"1.3.132.0.34": "p384",
"1.3.132.0.35": "p521"
};
function Xp() {
if (Hp)
return El.exports;
Hp = 1;
var e = Ue().Buffer
, t = sa
, n = Rl
, r = eh().ec
, i = rh
, o = Kp
, a = Gp;
function s(n, r, i, o) {
if ((n = e.from(n.toArray())).length < r.byteLength()) {
var a = e.alloc(r.byteLength() - n.length);
n = e.concat([a, n])
}
var s = i.length
, l = function(t, n) {
t = (t = u(t, n)).mod(n);
var r = e.from(t.toArray());
if (r.length < n.byteLength()) {
var i = e.alloc(n.byteLength() - r.length);
r = e.concat([i, r])
}
return r
}(i, r)
, c = e.alloc(s);
c.fill(1);
var d = e.alloc(s);
return d = t(o,
d).update(c).update(e.from([0])).update(n).update(l).digest(),
c = t(o, d).update(c).digest(),
{
k: d = t(o,
d).update(c).update(e.from([1])).update(n).update(l).digest(),
v: c = t(o, d).update(c).digest()
}
}
function u(e, t) {
var n = new i(e)
, r = (e.length << 3) - t.bitLength();
return r > 0 && n.ishrn(r),
n
}
function l(n, r, i) {
var o, a;
do {
for (o = e.alloc(0); 8 * o.length < n.bitLength(); )
r.v = t(i, r.k).update(r.v).digest(),
o = e.concat([o, r.v]);
a = u(o, n),
r.k = t(i, r.k).update(r.v).update(e.from([0])).digest(),
r.v = t(i, r.k).update(r.v).digest()
} while (-1 !== a.cmp(n));
return a
}
function c(e, t, n, r) {
return e.toRed(i.mont(n)).redPow(t).fromRed().mod(r)
}
return El.exports = function(t, d, f, h, p) {
var m = o(d);
if (m.curve) {
if ("ecdsa" !== h && "ecdsa/rsa" !== h)
throw new Error("wrong private key type");
return function(t, n) {
var i = a[n.curve.join(".")];
if (!i)
throw new Error("unknown curve " + n.curve.join("."));
var o = new r(i).keyFromPrivate(n.privateKey).sign(t);
return e.from(o.toDER())
}(t, m)
}
if ("dsa" === m.type) {
if ("dsa" !== h)
throw new Error("wrong private key type");
return function(t, n, r) {
for (var o, a = n.params.priv_key, d = n.params.p, f =
n.params.q, h = n.params.g, p = new i(0), m = u(t, f).mod(f), g = !1, v = s(a, f, t, r); !1
=== g; )
p = c(h, o = l(f, v, r), d, f),
0 === (g =
o.invm(f).imul(m.add(a.mul(p))).mod(f)).cmpn(0) && (g = !1,
p = new i(0));
return function(t, n) {
t = t.toArray(),
n = n.toArray(),
128 & t[0] && (t = [0].concat(t)),
128 & n[0] && (n = [0].concat(n));
var r = [48, t.length + n.length + 4, 2, t.length];
return r = r.concat(t, [2, n.length], n),
e.from(r)
}(p, g)
}(t, m, f)
}
if ("rsa" !== h && "ecdsa/rsa" !== h)
throw new Error("wrong private key type");
t = e.concat([p, t]);
for (var g = m.modulus.byteLength(), v = [0, 1]; t.length + v.length +
1 < g; )
v.push(255);
v.push(0);
for (var b = -1; ++b < t.length; )
v.push(t[b]);
return n(v, m)
}
,
El.exports.getKey = s,
El.exports.makeKey = l,
El.exports
}
function Jp() {
if (Wp)
return Vp;
Wp = 1;
var e = Ue().Buffer
, t = rh
, n = eh().ec
, r = Kp
, i = Gp;
function o(e, t) {
if (e.cmpn(0) <= 0)
throw new Error("invalid sig");
if (e.cmp(t) >= t)
throw new Error("invalid sig")
}
return Vp = function(a, s, u, l, c) {
var d = r(u);
if ("ec" === d.type) {
if ("ecdsa" !== l && "ecdsa/rsa" !== l)
throw new Error("wrong public key type");
return function(e, t, r) {
var o = i[r.data.algorithm.curve.join(".")];
if (!o)
throw new Error("unknown curve " +
r.data.algorithm.curve.join("."));
var a = new n(o)
, s = r.data.subjectPrivateKey.data;
return a.verify(t, e, s)
}(a, s, d)
}
if ("dsa" === d.type) {
if ("dsa" !== l)
throw new Error("wrong public key type");
return function(e, n, i) {
var a = i.data.p
, s = i.data.q
, u = i.data.g
, l = i.data.pub_key
, c = r.signature.decode(e, "der")
, d = c.s
, f = c.r;
o(d, s),
o(f, s);
var h = t.mont(a)
, p = d.invm(s);
return 0 === u.toRed(h).redPow(new
t(n).mul(p).mod(s)).fromRed().mul(l.toRed(h).redPow(f.mul(p).mod(s)).fromRed()).mod(
a).mod(s).cmp(f)
}(a, s, d)
}
if ("rsa" !== l && "ecdsa/rsa" !== l)
throw new Error("wrong public key type");
s = e.concat([c, s]);
for (var f = d.modulus.byteLength(), h = [1], p = 0; s.length +
h.length + 2 < f; )
h.push(255),
p++;
h.push(0);
for (var m = -1; ++m < s.length; )
h.push(s[m]);
h = e.from(h);
var g = t.mont(d.modulus);
a = (a = new t(a).toRed(g)).redPow(new t(d.publicExponent)),
a = e.from(a.fromRed().toArray());
var v = p < 8 ? 1 : 0;
for (f = Math.min(a.length, h.length),
a.length !== h.length && (v = 1),
m = -1; ++m < f; )
v |= a[m] ^ h[m];
return 0 === v
}
,
Vp
}
var em = {}
, tm = qo
, nm = Ue().Buffer
, rm = function(e, t) {
for (var n, r = nm.alloc(0), i = 0; r.length < t; )
n = im(i++),
r = nm.concat([r, tm("sha1").update(e).update(n).digest()]);
return r.slice(0, t)
};
function im(e) {
var t = nm.allocUnsafe(4);
return t.writeUInt32BE(e, 0),
t
}
var om = function(e, t) {
for (var n = e.length, r = -1; ++r < n; )
e[r] ^= t[r];
return e
}
, am = hl
, sm = Ue().Buffer
, um = function(e, t) {
return sm.from(e.toRed(am.mont(t.modulus)).redPow(new
am(t.publicExponent)).fromRed().toArray())
}
, lm = Kp
, cm = We
, dm = qo
, fm = rm
, hm = om
, pm = hl
, mm = um
, gm = Rl
, vm = Ue().Buffer
, bm = function(e, t, n) {
var r;
r = e.padding ? e.padding : n ? 1 : 4;
var i, o = lm(e);
if (4 === r)
i = function(e, t) {
var n = e.modulus.byteLength()
, r = t.length
, i = dm("sha1").update(vm.alloc(0)).digest()
, o = i.length
, a = 2 * o;
if (r > n - a - 2)
throw new Error("message too long");
var s = vm.alloc(n - r - a - 2)
,u=n-o-1
, l = cm(o)
, c = hm(vm.concat([i, s, vm.alloc(1, 1), t], u), fm(l, u))
, d = hm(l, fm(c, o));
return new pm(vm.concat([vm.alloc(1), d, c], n))
}(o, t);
else if (1 === r)
i = function(e, t, n) {
var r, i = t.length, o = e.modulus.byteLength();
if (i > o - 11)
throw new Error("message too long");
return r = n ? vm.alloc(o - i - 3, 255) : function(e) {
for (var t, n = vm.allocUnsafe(e), r = 0, i = cm(2 * e), o = 0; r
< e; )
o === i.length && (i = cm(2 * e),
o = 0),
(t = i[o++]) && (n[r++] = t);
return n
}(o - i - 3),
new pm(vm.concat([vm.from([0, n ? 1 : 2]), r, vm.alloc(1), t], o))
}(o, t, n);
else {
if (3 !== r)
throw new Error("unknown padding");
if ((i = new pm(t)).cmp(o.modulus) >= 0)
throw new Error("data too long for modulus")
}
return n ? gm(i, o) : mm(i, o)
}
, ym = Kp
, Am = rm
, wm = om
, _m = hl
, Em = Rl
, Sm = qo
, km = um
, Mm = Ue().Buffer
, Cm = function(e, t, n) {
var r;
r = e.padding ? e.padding : n ? 1 : 4;
var i, o = ym(e), a = o.modulus.byteLength();
if (t.length > a || new _m(t).cmp(o.modulus) >= 0)
throw new Error("decryption error");
i = n ? km(new _m(t), o) : Em(t, o);
var s = Mm.alloc(a - i.length);
if (i = Mm.concat([s, i], a),
4 === r)
return function(e, t) {
var n = e.modulus.byteLength()
, r = Sm("sha1").update(Mm.alloc(0)).digest()
, i = r.length;
if (0 !== t[0])
throw new Error("decryption error");
var o = t.slice(1, i + 1)
, a = t.slice(i + 1)
, s = wm(o, Am(a, i))
, u = wm(a, Am(s, n - i - 1));
if (function(e, t) {
e = Mm.from(e),
t = Mm.from(t);
var n = 0
, r = e.length;
e.length !== t.length && (n++,
r = Math.min(e.length, t.length));
for (var i = -1; ++i < r; )
n += e[i] ^ t[i];
return n
}(r, u.slice(0, i)))
throw new Error("decryption error");
for (var l = i; 0 === u[l]; )
l++;
if (1 !== u[l++])
throw new Error("decryption error");
return u.slice(l)
}(o, i);
if (1 === r)
return function(e, t, n) {
for (var r = t.slice(0, 2), i = 2, o = 0; 0 !== t[i++]; )
if (i >= t.length) {
o++;
break
}
var a = t.slice(2, i - 1);
if (("0002" !== r.toString("hex") && !n || "0001" !==
r.toString("hex") && n) && o++,
a.length < 8 && o++,
o)
throw new Error("decryption error");
return t.slice(i)
}(0, i, n);
if (3 === r)
return i;
throw new Error("unknown padding")
};
!function(e) {
e.publicEncrypt = bm,
e.privateDecrypt = Cm,
e.privateEncrypt = function(t, n) {
return e.publicEncrypt(t, n, !0)
}
,
e.publicDecrypt = function(t, n) {
return e.privateDecrypt(t, n, !0)
}
}(em);
var xm = {};
function Rm() {
throw new Error("secure random number generation not supported by
this browser\nuse chrome, FireFox or Internet Explorer 11")
}
var Tm, Im = Ue(), Pm = Im.Buffer, Lm = Im.kMaxLength, Om = r.crypto ||
r.msCrypto, Nm = Math.pow(2, 32) - 1;
function Dm(e, t) {
if ("number" != typeof e || e != e)
throw new TypeError("offset must be a number");
if (e > Nm || e < 0)
throw new TypeError("offset must be a uint32");
if (e > Lm || e > t)
throw new RangeError("offset out of range")
}
function Bm(e, t, n) {
if ("number" != typeof e || e != e)
throw new TypeError("size must be a number");
if (e > Nm || e < 0)
throw new TypeError("size must be a uint32");
if (e + t > n || e > Lm)
throw new RangeError("buffer too small")
}
function jm(e, t, n, r) {
var i = e.buffer
, o = new Uint8Array(i,t,n);
return Om.getRandomValues(o),
r ? void Se((function() {
r(null, e)
}
)) : e
}
function zm() {
if (Tm)
return fe;
Tm = 1,
fe.randomBytes = fe.rng = fe.pseudoRandomBytes = fe.prng = We,
fe.createHash = fe.Hash = qo,
fe.createHmac = fe.Hmac = sa;
var e = la
, t = Object.keys(e)
, n = ["sha1", "sha224", "sha256", "sha384", "sha512", "md5",
"rmd160"].concat(t);
fe.getHashes = function() {
return n
}
;
var r = ca;
fe.pbkdf2 = r.pbkdf2,
fe.pbkdf2Sync = r.pbkdf2Sync;
var i = za;
fe.Cipher = i.Cipher,
fe.createCipher = i.createCipher,
fe.Cipheriv = i.Cipheriv,
fe.createCipheriv = i.createCipheriv,
fe.Decipher = i.Decipher,
fe.createDecipher = i.createDecipher,
fe.Decipheriv = i.Decipheriv,
fe.createDecipheriv = i.createDecipheriv,
fe.getCiphers = i.getCiphers,
fe.listCiphers = i.listCiphers;
var o = function() {
if (Al)
return al;
Al = 1;
var e = vl()
, t = wl
, n = _l()
,r={
binary: !0,
hex: !0,
base64: !0
};
return al.DiffieHellmanGroup = al.createDiffieHellmanGroup =
al.getDiffieHellman = function(e) {
var r = new _(t[e].prime,"hex")
, i = new _(t[e].gen,"hex");
return new n(r,i)
}
,
al.createDiffieHellman = al.DiffieHellman = function t(i, o, a, s) {
return oe(o) || void 0 === r[o] ? t(i, "binary", o, a) : (o = o ||
"binary",
s = s || "binary",
oe(a = a || new _([2])) || (a = new _(a,s)),
"number" == typeof i ? new n(e(i, a),a,!0) : (oe(i) || (i = new
_(i,o)),
new n(i,a,!0)))
}
,
al
}();
fe.DiffieHellmanGroup = o.DiffieHellmanGroup,
fe.createDiffieHellmanGroup = o.createDiffieHellmanGroup,
fe.getDiffieHellman = o.getDiffieHellman,
fe.createDiffieHellman = o.createDiffieHellman,
fe.DiffieHellman = o.DiffieHellman;
var a = function() {
if (Yp)
return $p;
Yp = 1;
var e = Ue().Buffer
, t = qo
, n = Vn
, r = Ye
, i = Xp()
, o = Jp()
, a = ua;
function s(e) {
n.Writable.call(this);
var r = a[e];
if (!r)
throw new Error("Unknown message digest");
this._hashType = r.hash,
this._hash = t(r.hash),
this._tag = r.id,
this._signType = r.sign
}
function u(e) {
n.Writable.call(this);
var r = a[e];
if (!r)
throw new Error("Unknown message digest");
this._hash = t(r.hash),
this._tag = r.id,
this._signType = r.sign
}
function l(e) {
return new s(e)
}
function c(e) {
return new u(e)
}
return Object.keys(a).forEach((function(t) {
a[t].id = e.from(a[t].id, "hex"),
a[t.toLowerCase()] = a[t]
}
)),
r(s, n.Writable),
s.prototype._write = function(e, t, n) {
this._hash.update(e),
n()
}
,
s.prototype.update = function(t, n) {
return "string" == typeof t && (t = e.from(t, n)),
this._hash.update(t),
this
}
,
s.prototype.sign = function(e, t) {
this.end();
var n = this._hash.digest()
, r = i(n, e, this._hashType, this._signType, this._tag);
return t ? r.toString(t) : r
}
,
r(u, n.Writable),
u.prototype._write = function(e, t, n) {
this._hash.update(e),
n()
}
,
u.prototype.update = function(t, n) {
return "string" == typeof t && (t = e.from(t, n)),
this._hash.update(t),
this
}
,
u.prototype.verify = function(t, n, r) {
"string" == typeof n && (n = e.from(n, r)),
this.end();
var i = this._hash.digest();
return o(n, i, t, this._signType, this._tag)
}
,
$p = {
Sign: l,
Verify: c,
createSign: l,
createVerify: c
}
}();
fe.createSign = a.createSign,
fe.Sign = a.Sign,
fe.createVerify = a.createVerify,
fe.Verify = a.Verify,
fe.createECDH = function() {
if (Zp)
return Qp;
Zp = 1;
var e = eh()
, t = hl;
Qp = function(e) {
return new r(e)
}
;
var n = {
secp256k1: {
name: "secp256k1",
byteLength: 32
},
secp224r1: {
name: "p224",
byteLength: 28
},
prime256v1: {
name: "p256",
byteLength: 32
},
prime192v1: {
name: "p192",
byteLength: 24
},
ed25519: {
name: "ed25519",
byteLength: 32
},
secp384r1: {
name: "p384",
byteLength: 48
},
secp521r1: {
name: "p521",
byteLength: 66
}
};
function r(t) {
this.curveType = n[t],
this.curveType || (this.curveType = {
name: t
}),
this.curve = new e.ec(this.curveType.name),
this.keys = void 0
}
function i(e, t, n) {
Array.isArray(e) || (e = e.toArray());
var r = new _(e);
if (n && r.length < n) {
var i = new _(n - r.length);
i.fill(0),
r = _.concat([i, r])
}
return t ? r.toString(t) : r
}
return n.p224 = n.secp224r1,
n.p256 = n.secp256r1 = n.prime256v1,
n.p192 = n.secp192r1 = n.prime192v1,
n.p384 = n.secp384r1,
n.p521 = n.secp521r1,
r.prototype.generateKeys = function(e, t) {
return this.keys = this.curve.genKeyPair(),
this.getPublicKey(e, t)
}
,
r.prototype.computeSecret = function(e, t, n) {
return t = t || "utf8",
oe(e) || (e = new _(e,t)),
i(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(), n,
this.curveType.byteLength)
}
,
r.prototype.getPublicKey = function(e, t) {
var n = this.keys.getPublic("compressed" === t, !0);
return "hybrid" === t && (n[n.length - 1] % 2 ? n[0] = 7 : n[0] =
6),
i(n, e)
}
,
r.prototype.getPrivateKey = function(e) {
return i(this.keys.getPrivate(), e)
}
,
r.prototype.setPublicKey = function(e, t) {
return t = t || "utf8",
oe(e) || (e = new _(e,t)),
this.keys._importPublic(e),
this
}
,
r.prototype.setPrivateKey = function(e, n) {
n = n || "utf8",
oe(e) || (e = new _(e,n));
var r = new t(e);
return r = r.toString(16),
this.keys = this.curve.genKeyPair(),
this.keys._importPrivate(r),
this
}
,
Qp
}();
var s = em;
fe.publicEncrypt = s.publicEncrypt,
fe.privateEncrypt = s.privateEncrypt,
fe.publicDecrypt = s.publicDecrypt,
fe.privateDecrypt = s.privateDecrypt;
var u = xm;
return fe.randomFill = u.randomFill,
fe.randomFillSync = u.randomFillSync,
fe.createCredentials = function() {
throw new Error(["sorry, createCredentials is not implemented yet",
"we accept pull requests", "https://github.com/crypto-browserify/crypto-
browserify"].join("\n"))
}
,
fe.constants = {
DH_CHECK_P_NOT_SAFE_PRIME: 2,
DH_CHECK_P_NOT_PRIME: 1,
DH_UNABLE_TO_CHECK_GENERATOR: 4,
DH_NOT_SUITABLE_GENERATOR: 8,
NPN_ENABLED: 1,
ALPN_ENABLED: 1,
RSA_PKCS1_PADDING: 1,
RSA_SSLV23_PADDING: 2,
RSA_NO_PADDING: 3,
RSA_PKCS1_OAEP_PADDING: 4,
RSA_X931_PADDING: 5,
RSA_PKCS1_PSS_PADDING: 6,
POINT_CONVERSION_COMPRESSED: 2,
POINT_CONVERSION_UNCOMPRESSED: 4,
POINT_CONVERSION_HYBRID: 6
},
fe
}
Om && Om.getRandomValues ? (xm.randomFill = function(e, t, n, i) {
if (!(Pm.isBuffer(e) || e instanceof r.Uint8Array))
throw new TypeError('"buf" argument must be a Buffer or
Uint8Array');
if ("function" == typeof t)
i = t,
t = 0,
n = e.length;
else if ("function" == typeof n)
i = n,
n = e.length - t;
else if ("function" != typeof i)
throw new TypeError('"cb" argument must be a function');
return Dm(t, e.length),
Bm(n, t, e.length),
jm(e, t, n, i)
}
,
xm.randomFillSync = function(e, t, n) {
if (void 0 === t && (t = 0),
!(Pm.isBuffer(e) || e instanceof r.Uint8Array))
throw new TypeError('"buf" argument must be a Buffer or
Uint8Array');
return Dm(t, e.length),
void 0 === n && (n = e.length - t),
Bm(n, t, e.length),
jm(e, t, n)
}
) : (xm.randomFill = Rm,
xm.randomFillSync = Rm);
const {Buffer: Fm} = de
, {createHash: Um, createHmac: Km} = zm()
, qm = {}
, Hm = e => {
switch (e) {
case "sha256":
case "sha3-256":
case "blake2s256":
return 32;
case "sha512":
case "sha3-512":
case "blake2b512":
return 64;
case "sha224":
case "sha3-224":
return 28;
case "sha384":
case "sha3-384":
return 48;
case "sha1":
return 20;
case "md5":
return 16;
default:
{
let t = qm[e];
return void 0 === t && (t = Um(e).digest().length,
qm[e] = t),
t
}
}
}
, Vm = (e, t, n, r) => {
const i = Fm.isBuffer(n) ? n : Fm.from(n)
, o = r && r.length ? Fm.from(r) : Fm.alloc(t, 0);
return Km(e, o).update(i).digest()
}
, Wm = (e, t, n, r, i) => {
const o = Fm.isBuffer(i) ? i : Fm.from(i || "")
, a = o.length
, s = Math.ceil(r / t);
if (s > 255)
throw new Error(`OKM length ${r} is too long for ${e} hash`);
const u = Fm.alloc(t * s + a + 1);
for (let l = 1, c = 0, d = 0; l <= s; ++l)
o.copy(u, d),
u[d + a] = l,
Km(e, n).update(u.slice(c, d + a + 1)).digest().copy(u, d),
c = d,
d += t;
return u.slice(0, r)
}
;
function $m(e, t) {
let {salt: n="", info: r="", hash: i="SHA-256"} = arguments.length > 2 &&
void 0 !== arguments[2] ? arguments[2] : {};
i = i.toLowerCase().replace("-", "");
const o = Hm(i)
, a = Vm(i, o, e, n);
return Wm(i, o, a, t, r)
}
Object.defineProperties($m, {
hash_length: {
configurable: !1,
enumerable: !1,
writable: !1,
value: Hm
},
extract: {
configurable: !1,
enumerable: !1,
writable: !1,
value: Vm
},
expand: {
configurable: !1,
enumerable: !1,
writable: !1,
value: Wm
}
});
var Ym = $m;
const Qm = "Impossible case. Please create issue."
, Zm = "The tweak was out of range or the resulted private key is invalid"
, Gm = "The tweak was out of range or equal to zero"
, Xm = "Unknow error on context randomization"
, Jm = "Private Key is invalid"
, eg = "Public Key could not be parsed"
, tg = "Public Key serialization error"
, ng = "The sum of the public keys is not valid"
, rg = "Signature could not be parsed"
, ig = "The nonce generation function failed, or the private key was invalid"
, og = "Public key could not be recover"
, ag = "Scalar was invalid (zero or overflow)";
function sg(e, t) {
if (!e)
throw new Error(t)
}
function ug(e, t, n) {
if (sg(t instanceof Uint8Array, `Expected ${e} to be an Uint8Array`),
void 0 !== n)
if (Array.isArray(n)) {
const r = `Expected ${e} to be an Uint8Array with length [$
{n.join(", ")}]`;
sg(n.includes(t.length), r)
} else {
const r = `Expected ${e} to be an Uint8Array with length ${n}`;
sg(t.length === n, r)
}
}
function lg(e) {
sg("Boolean" === dg(e), "Expected compressed to be a Boolean")
}
function cg() {
let e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0]
: e => new Uint8Array(e)
, t = arguments.length > 1 ? arguments[1] : void 0;
return "function" == typeof e && (e = e(t)),
ug("output", e, t),
e
}
function dg(e) {
return Object.prototype.toString.call(e).slice(8, -1)
}
var fg = {}
, hg = "6.5.4"
, pg = {}
, mg = {
exports: {}
};
!function(e) {
!function(e, t) {
function n(e, t) {
if (!e)
throw new Error(t || "Assertion failed")
}
function r(e, t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
function i(e, t, n) {
if (i.isBN(e))
return e;
this.negative = 0,
this.words = null,
this.length = 0,
this.red = null,
null !== e && ("le" !== t && "be" !== t || (n = t,
t = 10),
this._init(e || 0, t || 10, n || "be"))
}
var o;
"object" == typeof e ? e.exports = i : t.BN = i,
i.BN = i,
i.wordSize = 26;
try {
o = "undefined" != typeof window && void 0 !== window.Buffer ?
window.Buffer : de.Buffer
} catch (e) {}
function a(e, t) {
var n = e.charCodeAt(t);
return n >= 65 && n <= 70 ? n - 55 : n >= 97 && n <= 102 ? n -
87 : n - 48 & 15
}
function s(e, t, n) {
var r = a(e, n);
return n - 1 >= t && (r |= a(e, n - 1) << 4),
r
}
function u(e, t, n, r) {
for (var i = 0, o = Math.min(e.length, n), a = t; a < o; a++) {
var s = e.charCodeAt(a) - 48;
i *= r,
i += s >= 49 ? s - 49 + 10 : s >= 17 ? s - 17 + 10 : s
}
return i
}
i.isBN = function(e) {
return e instanceof i || null !== e && "object" == typeof e &&
e.constructor.wordSize === i.wordSize && Array.isArray(e.words)
}
,
i.max = function(e, t) {
return e.cmp(t) > 0 ? e : t
}
,
i.min = function(e, t) {
return e.cmp(t) < 0 ? e : t
}
,
i.prototype._init = function(e, t, r) {
if ("number" == typeof e)
return this._initNumber(e, t, r);
if ("object" == typeof e)
return this._initArray(e, t, r);
"hex" === t && (t = 16),
n(t === (0 | t) && t >= 2 && t <= 36);
var i = 0;
"-" === (e = e.toString().replace(/\s+/g, ""))[0] && (i++,
this.negative = 1),
i < e.length && (16 === t ? this._parseHex(e, i, r) :
(this._parseBase(e, t, i),
"le" === r && this._initArray(this.toArray(), t, r)))
}
,
i.prototype._initNumber = function(e, t, r) {
e < 0 && (this.negative = 1,
e = -e),
e < 67108864 ? (this.words = [67108863 & e],
this.length = 1) : e < 4503599627370496 ? (this.words =
[67108863 & e, e / 67108864 & 67108863],
this.length = 2) : (n(e < 9007199254740992),
this.words = [67108863 & e, e / 67108864 & 67108863, 1],
this.length = 3),
"le" === r && this._initArray(this.toArray(), t, r)
}
,
i.prototype._initArray = function(e, t, r) {
if (n("number" == typeof e.length),
e.length <= 0)
return this.words = [0],
this.length = 1,
this;
this.length = Math.ceil(e.length / 3),
this.words = new Array(this.length);
for (var i = 0; i < this.length; i++)
this.words[i] = 0;
var o, a, s = 0;
if ("be" === r)
for (i = e.length - 1,
o = 0; i >= 0; i -= 3)
a = e[i] | e[i - 1] << 8 | e[i - 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
else if ("le" === r)
for (i = 0,
o = 0; i < e.length; i += 3)
a = e[i] | e[i + 1] << 8 | e[i + 2] << 16,
this.words[o] |= a << s & 67108863,
this.words[o + 1] = a >>> 26 - s & 67108863,
(s += 24) >= 26 && (s -= 26,
o++);
return this.strip()
}
,
i.prototype._parseHex = function(e, t, n) {
this.length = Math.ceil((e.length - t) / 6),
this.words = new Array(this.length);
for (var r = 0; r < this.length; r++)
this.words[r] = 0;
var i, o = 0, a = 0;
if ("be" === n)
for (r = e.length - 1; r >= t; r -= 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
else
for (r = (e.length - t) % 2 == 0 ? t + 1 : t; r < e.length; r += 2)
i = s(e, t, r) << o,
this.words[a] |= 67108863 & i,
o >= 18 ? (o -= 18,
a += 1,
this.words[a] |= i >>> 26) : o += 8;
this.strip()
}
,
i.prototype._parseBase = function(e, t, n) {
this.words = [0],
this.length = 1;
for (var r = 0, i = 1; i <= 67108863; i *= t)
r++;
r--,
i = i / t | 0;
for (var o = e.length - n, a = o % r, s = Math.min(o, o - a) + n, l =
0, c = n; c < s; c += r)
l = u(e, c, c + r, t),
this.imuln(i),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l);
if (0 !== a) {
var d = 1;
for (l = u(e, c, e.length, t),
c = 0; c < a; c++)
d *= t;
this.imuln(d),
this.words[0] + l < 67108864 ? this.words[0] += l :
this._iaddn(l)
}
this.strip()
}
,
i.prototype.copy = function(e) {
e.words = new Array(this.length);
for (var t = 0; t < this.length; t++)
e.words[t] = this.words[t];
e.length = this.length,
e.negative = this.negative,
e.red = this.red
}
,
i.prototype.clone = function() {
var e = new i(null);
return this.copy(e),
e
}
,
i.prototype._expand = function(e) {
for (; this.length < e; )
this.words[this.length++] = 0;
return this
}
,
i.prototype.strip = function() {
for (; this.length > 1 && 0 === this.words[this.length - 1]; )
this.length--;
return this._normSign()
}
,
i.prototype._normSign = function() {
return 1 === this.length && 0 === this.words[0] &&
(this.negative = 0),
this
}
,
i.prototype.inspect = function() {
return (this.red ? "<BN-R: " : "<BN: ") + this.toString(16) + ">"
}
;
var l = ["", "0", "00", "000", "0000", "00000", "000000", "0000000",
"00000000", "000000000", "0000000000", "00000000000", "000000000000",
"0000000000000", "00000000000000", "000000000000000", "0000000000000000",
"00000000000000000", "000000000000000000", "0000000000000000000",
"00000000000000000000", "000000000000000000000", "0000000000000000000000",
"00000000000000000000000", "000000000000000000000000",
"0000000000000000000000000"]
, c = [0, 0, 25, 16, 12, 11, 10, 9, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 6, 6, 6,
5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5]
, d = [0, 0, 33554432, 43046721, 16777216, 48828125,
60466176, 40353607, 16777216, 43046721, 1e7, 19487171, 35831808, 62748517,
7529536, 11390625, 16777216, 24137569, 34012224, 47045881, 64e6, 4084101,
5153632, 6436343, 7962624, 9765625, 11881376, 14348907, 17210368, 20511149,
243e5, 28629151, 33554432, 39135393, 45435424, 52521875, 60466176];
function f(e, t, n) {
n.negative = t.negative ^ e.negative;
var r = e.length + t.length | 0;
n.length = r,
r = r - 1 | 0;
var i = 0 | e.words[0]
, o = 0 | t.words[0]
,a=i*o
, s = 67108863 & a
, u = a / 67108864 | 0;
n.words[0] = s;
for (var l = 1; l < r; l++) {
for (var c = u >>> 26, d = 67108863 & u, f = Math.min(l,
t.length - 1), h = Math.max(0, l - e.length + 1); h <= f; h++) {
var p = l - h | 0;
c += (a = (i = 0 | e.words[p]) * (o = 0 | t.words[h]) + d) /
67108864 | 0,
d = 67108863 & a
}
n.words[l] = 0 | d,
u=0|c
}
return 0 !== u ? n.words[l] = 0 | u : n.length--,
n.strip()
}
i.prototype.toString = function(e, t) {
var r;
if (t = 0 | t || 1,
16 === (e = e || 10) || "hex" === e) {
r = "";
for (var i = 0, o = 0, a = 0; a < this.length; a++) {
var s = this.words[a]
, u = (16777215 & (s << i | o)).toString(16);
r = 0 !== (o = s >>> 24 - i & 16777215) || a !==
this.length - 1 ? l[6 - u.length] + u + r : u + r,
(i += 2) >= 26 && (i -= 26,
a--)
}
for (0 !== o && (r = o.toString(16) + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
if (e === (0 | e) && e >= 2 && e <= 36) {
var f = c[e]
, h = d[e];
r = "";
var p = this.clone();
for (p.negative = 0; !p.isZero(); ) {
var m = p.modn(h).toString(e);
r = (p = p.idivn(h)).isZero() ? m + r : l[f - m.length] + m +
r
}
for (this.isZero() && (r = "0" + r); r.length % t != 0; )
r = "0" + r;
return 0 !== this.negative && (r = "-" + r),
r
}
n(!1, "Base should be between 2 and 36")
}
,
i.prototype.toNumber = function() {
var e = this.words[0];
return 2 === this.length ? e += 67108864 * this.words[1] : 3 ===
this.length && 1 === this.words[2] ? e += 4503599627370496 + 67108864 *
this.words[1] : this.length > 2 && n(!1, "Number can only safely store up to 53 bits"),
0 !== this.negative ? -e : e
}
,
i.prototype.toJSON = function() {
return this.toString(16)
}
,
i.prototype.toBuffer = function(e, t) {
return n(void 0 !== o),
this.toArrayLike(o, e, t)
}
,
i.prototype.toArray = function(e, t) {
return this.toArrayLike(Array, e, t)
}
,
i.prototype.toArrayLike = function(e, t, r) {
var i = this.byteLength()
, o = r || Math.max(1, i);
n(i <= o, "byte array longer than desired length"),
n(o > 0, "Requested array length <= 0"),
this.strip();
var a, s, u = "le" === t, l = new e(o), c = this.clone();
if (u) {
for (s = 0; !c.isZero(); s++)
a = c.andln(255),
c.iushrn(8),
l[s] = a;
for (; s < o; s++)
l[s] = 0
} else {
for (s = 0; s < o - i; s++)
l[s] = 0;
for (s = 0; !c.isZero(); s++)
a = c.andln(255),
c.iushrn(8),
l[o - s - 1] = a
}
return l
}
,
Math.clz32 ? i.prototype._countBits = function(e) {
return 32 - Math.clz32(e)
}
: i.prototype._countBits = function(e) {
var t = e
, n = 0;
return t >= 4096 && (n += 13,
t >>>= 13),
t >= 64 && (n += 7,
t >>>= 7),
t >= 8 && (n += 4,
t >>>= 4),
t >= 2 && (n += 2,
t >>>= 2),
n+t
}
,
i.prototype._zeroBits = function(e) {
if (0 === e)
return 26;
var t = e
, n = 0;
return 0 == (8191 & t) && (n += 13,
t >>>= 13),
0 == (127 & t) && (n += 7,
t >>>= 7),
0 == (15 & t) && (n += 4,
t >>>= 4),
0 == (3 & t) && (n += 2,
t >>>= 2),
0 == (1 & t) && n++,
n
}
,
i.prototype.bitLength = function() {
var e = this.words[this.length - 1]
, t = this._countBits(e);
return 26 * (this.length - 1) + t
}
,
i.prototype.zeroBits = function() {
if (this.isZero())
return 0;
for (var e = 0, t = 0; t < this.length; t++) {
var n = this._zeroBits(this.words[t]);
if (e += n,
26 !== n)
break
}
return e
}
,
i.prototype.byteLength = function() {
return Math.ceil(this.bitLength() / 8)
}
,
i.prototype.toTwos = function(e) {
return 0 !== this.negative ? this.abs().inotn(e).iaddn(1) :
this.clone()
}
,
i.prototype.fromTwos = function(e) {
return this.testn(e - 1) ? this.notn(e).iaddn(1).ineg() : this.clone()
}
,
i.prototype.isNeg = function() {
return 0 !== this.negative
}
,
i.prototype.neg = function() {
return this.clone().ineg()
}
,
i.prototype.ineg = function() {
return this.isZero() || (this.negative ^= 1),
this
}
,
i.prototype.iuor = function(e) {
for (; this.length < e.length; )
this.words[this.length++] = 0;
for (var t = 0; t < e.length; t++)
this.words[t] = this.words[t] | e.words[t];
return this.strip()
}
,
i.prototype.ior = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuor(e)
}
,
i.prototype.or = function(e) {
return this.length > e.length ? this.clone().ior(e) :
e.clone().ior(this)
}
,
i.prototype.uor = function(e) {
return this.length > e.length ? this.clone().iuor(e) :
e.clone().iuor(this)
}
,
i.prototype.iuand = function(e) {
var t;
t = this.length > e.length ? e : this;
for (var n = 0; n < t.length; n++)
this.words[n] = this.words[n] & e.words[n];
return this.length = t.length,
this.strip()
}
,
i.prototype.iand = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuand(e)
}
,
i.prototype.and = function(e) {
return this.length > e.length ? this.clone().iand(e) :
e.clone().iand(this)
}
,
i.prototype.uand = function(e) {
return this.length > e.length ? this.clone().iuand(e) :
e.clone().iuand(this)
}
,
i.prototype.iuxor = function(e) {
var t, n;
this.length > e.length ? (t = this,
n = e) : (t = e,
n = this);
for (var r = 0; r < n.length; r++)
this.words[r] = t.words[r] ^ n.words[r];
if (this !== t)
for (; r < t.length; r++)
this.words[r] = t.words[r];
return this.length = t.length,
this.strip()
}
,
i.prototype.ixor = function(e) {
return n(0 == (this.negative | e.negative)),
this.iuxor(e)
}
,
i.prototype.xor = function(e) {
return this.length > e.length ? this.clone().ixor(e) :
e.clone().ixor(this)
}
,
i.prototype.uxor = function(e) {
return this.length > e.length ? this.clone().iuxor(e) :
e.clone().iuxor(this)
}
,
i.prototype.inotn = function(e) {
n("number" == typeof e && e >= 0);
var t = 0 | Math.ceil(e / 26)
, r = e % 26;
this._expand(t),
r > 0 && t--;
for (var i = 0; i < t; i++)
this.words[i] = 67108863 & ~this.words[i];
return r > 0 && (this.words[i] = ~this.words[i] & 67108863 >> 26
- r),
this.strip()
}
,
i.prototype.notn = function(e) {
return this.clone().inotn(e)
}
,
i.prototype.setn = function(e, t) {
n("number" == typeof e && e >= 0);
var r = e / 26 | 0
, i = e % 26;
return this._expand(r + 1),
this.words[r] = t ? this.words[r] | 1 << i : this.words[r] & ~(1 << i),
this.strip()
}
,
i.prototype.iadd = function(e) {
var t, n, r;
if (0 !== this.negative && 0 === e.negative)
return this.negative = 0,
t = this.isub(e),
this.negative ^= 1,
this._normSign();
if (0 === this.negative && 0 !== e.negative)
return e.negative = 0,
t = this.isub(e),
e.negative = 1,
t._normSign();
this.length > e.length ? (n = this,
r = e) : (n = e,
r = this);
for (var i = 0, o = 0; o < r.length; o++)
t = (0 | n.words[o]) + (0 | r.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
for (; 0 !== i && o < n.length; o++)
t = (0 | n.words[o]) + i,
this.words[o] = 67108863 & t,
i = t >>> 26;
if (this.length = n.length,
0 !== i)
this.words[this.length] = i,
this.length++;
else if (n !== this)
for (; o < n.length; o++)
this.words[o] = n.words[o];
return this
}
,
i.prototype.add = function(e) {
var t;
return 0 !== e.negative && 0 === this.negative ? (e.negative =
0,
t = this.sub(e),
e.negative ^= 1,
t) : 0 === e.negative && 0 !== this.negative ? (this.negative = 0,
t = e.sub(this),
this.negative = 1,
t) : this.length > e.length ? this.clone().iadd(e) :
e.clone().iadd(this)
}
,
i.prototype.isub = function(e) {
if (0 !== e.negative) {
e.negative = 0;
var t = this.iadd(e);
return e.negative = 1,
t._normSign()
}
if (0 !== this.negative)
return this.negative = 0,
this.iadd(e),
this.negative = 1,
this._normSign();
var n, r, i = this.cmp(e);
if (0 === i)
return this.negative = 0,
this.length = 1,
this.words[0] = 0,
this;
i > 0 ? (n = this,
r = e) : (n = e,
r = this);
for (var o = 0, a = 0; a < r.length; a++)
o = (t = (0 | n.words[a]) - (0 | r.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
for (; 0 !== o && a < n.length; a++)
o = (t = (0 | n.words[a]) + o) >> 26,
this.words[a] = 67108863 & t;
if (0 === o && a < n.length && n !== this)
for (; a < n.length; a++)
this.words[a] = n.words[a];
return this.length = Math.max(this.length, a),
n !== this && (this.negative = 1),
this.strip()
}
,
i.prototype.sub = function(e) {
return this.clone().isub(e)
}
;
var h = function(e, t, n) {
var r, i, o, a = e.words, s = t.words, u = n.words, l = 0, c = 0 |
a[0], d = 8191 & c, f = c >>> 13, h = 0 | a[1], p = 8191 & h, m = h >>> 13, g = 0 | a[2], v
= 8191 & g, b = g >>> 13, y = 0 | a[3], A = 8191 & y, w = y >>> 13, _ = 0 | a[4], E = 8191
& _, S = _ >>> 13, k = 0 | a[5], M = 8191 & k, C = k >>> 13, x = 0 | a[6], R = 8191 & x, T
= x >>> 13, I = 0 | a[7], P = 8191 & I, L = I >>> 13, O = 0 | a[8], N = 8191 & O, D = O
>>> 13, B = 0 | a[9], j = 8191 & B, z = B >>> 13, F = 0 | s[0], U = 8191 & F, K = F >>>
13, q = 0 | s[1], H = 8191 & q, V = q >>> 13, W = 0 | s[2], $ = 8191 & W, Y = W >>> 13,
Q = 0 | s[3], Z = 8191 & Q, G = Q >>> 13, X = 0 | s[4], J = 8191 & X, ee = X >>> 13, te =
0 | s[5], ne = 8191 & te, re = te >>> 13, ie = 0 | s[6], oe = 8191 & ie, ae = ie >>> 13, se =
0 | s[7], ue = 8191 & se, le = se >>> 13, ce = 0 | s[8], de = 8191 & ce, fe = ce >>> 13, he
= 0 | s[9], pe = 8191 & he, me = he >>> 13;
n.negative = e.negative ^ t.negative,
n.length = 19;
var ge = (l + (r = Math.imul(d, U)) | 0) + ((8191 & (i = (i =
Math.imul(d, K)) + Math.imul(f, U) | 0)) << 13) | 0;
l = ((o = Math.imul(f, K)) + (i >>> 13) | 0) + (ge >>> 26) | 0,
ge &= 67108863,
r = Math.imul(p, U),
i = (i = Math.imul(p, K)) + Math.imul(m, U) | 0,
o = Math.imul(m, K);
var ve = (l + (r = r + Math.imul(d, H) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, V) | 0) + Math.imul(f, H) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, V) | 0) + (i >>> 13) | 0) + (ve >>> 26) |
0,
ve &= 67108863,
r = Math.imul(v, U),
i = (i = Math.imul(v, K)) + Math.imul(b, U) | 0,
o = Math.imul(b, K),
r = r + Math.imul(p, H) | 0,
i = (i = i + Math.imul(p, V) | 0) + Math.imul(m, H) | 0,
o = o + Math.imul(m, V) | 0;
var be = (l + (r = r + Math.imul(d, $) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, Y) | 0) + Math.imul(f, $) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, Y) | 0) + (i >>> 13) | 0) + (be >>> 26) |
0,
be &= 67108863,
r = Math.imul(A, U),
i = (i = Math.imul(A, K)) + Math.imul(w, U) | 0,
o = Math.imul(w, K),
r = r + Math.imul(v, H) | 0,
i = (i = i + Math.imul(v, V) | 0) + Math.imul(b, H) | 0,
o = o + Math.imul(b, V) | 0,
r = r + Math.imul(p, $) | 0,
i = (i = i + Math.imul(p, Y) | 0) + Math.imul(m, $) | 0,
o = o + Math.imul(m, Y) | 0;
var ye = (l + (r = r + Math.imul(d, Z) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, G) | 0) + Math.imul(f, Z) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, G) | 0) + (i >>> 13) | 0) + (ye >>> 26) |
0,
ye &= 67108863,
r = Math.imul(E, U),
i = (i = Math.imul(E, K)) + Math.imul(S, U) | 0,
o = Math.imul(S, K),
r = r + Math.imul(A, H) | 0,
i = (i = i + Math.imul(A, V) | 0) + Math.imul(w, H) | 0,
o = o + Math.imul(w, V) | 0,
r = r + Math.imul(v, $) | 0,
i = (i = i + Math.imul(v, Y) | 0) + Math.imul(b, $) | 0,
o = o + Math.imul(b, Y) | 0,
r = r + Math.imul(p, Z) | 0,
i = (i = i + Math.imul(p, G) | 0) + Math.imul(m, Z) | 0,
o = o + Math.imul(m, G) | 0;
var Ae = (l + (r = r + Math.imul(d, J) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(d, ee) | 0) + Math.imul(f, J) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ee) | 0) + (i >>> 13) | 0) + (Ae >>> 26) |
0,
Ae &= 67108863,
r = Math.imul(M, U),
i = (i = Math.imul(M, K)) + Math.imul(C, U) | 0,
o = Math.imul(C, K),
r = r + Math.imul(E, H) | 0,
i = (i = i + Math.imul(E, V) | 0) + Math.imul(S, H) | 0,
o = o + Math.imul(S, V) | 0,
r = r + Math.imul(A, $) | 0,
i = (i = i + Math.imul(A, Y) | 0) + Math.imul(w, $) | 0,
o = o + Math.imul(w, Y) | 0,
r = r + Math.imul(v, Z) | 0,
i = (i = i + Math.imul(v, G) | 0) + Math.imul(b, Z) | 0,
o = o + Math.imul(b, G) | 0,
r = r + Math.imul(p, J) | 0,
i = (i = i + Math.imul(p, ee) | 0) + Math.imul(m, J) | 0,
o = o + Math.imul(m, ee) | 0;
var we = (l + (r = r + Math.imul(d, ne) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, re) | 0) + Math.imul(f, ne) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, re) | 0) + (i >>> 13) | 0) + (we >>> 26) |
0,
we &= 67108863,
r = Math.imul(R, U),
i = (i = Math.imul(R, K)) + Math.imul(T, U) | 0,
o = Math.imul(T, K),
r = r + Math.imul(M, H) | 0,
i = (i = i + Math.imul(M, V) | 0) + Math.imul(C, H) | 0,
o = o + Math.imul(C, V) | 0,
r = r + Math.imul(E, $) | 0,
i = (i = i + Math.imul(E, Y) | 0) + Math.imul(S, $) | 0,
o = o + Math.imul(S, Y) | 0,
r = r + Math.imul(A, Z) | 0,
i = (i = i + Math.imul(A, G) | 0) + Math.imul(w, Z) | 0,
o = o + Math.imul(w, G) | 0,
r = r + Math.imul(v, J) | 0,
i = (i = i + Math.imul(v, ee) | 0) + Math.imul(b, J) | 0,
o = o + Math.imul(b, ee) | 0,
r = r + Math.imul(p, ne) | 0,
i = (i = i + Math.imul(p, re) | 0) + Math.imul(m, ne) | 0,
o = o + Math.imul(m, re) | 0;
var _e = (l + (r = r + Math.imul(d, oe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, ae) | 0) + Math.imul(f, oe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, ae) | 0) + (i >>> 13) | 0) + (_e >>> 26) |
0,
_e &= 67108863,
r = Math.imul(P, U),
i = (i = Math.imul(P, K)) + Math.imul(L, U) | 0,
o = Math.imul(L, K),
r = r + Math.imul(R, H) | 0,
i = (i = i + Math.imul(R, V) | 0) + Math.imul(T, H) | 0,
o = o + Math.imul(T, V) | 0,
r = r + Math.imul(M, $) | 0,
i = (i = i + Math.imul(M, Y) | 0) + Math.imul(C, $) | 0,
o = o + Math.imul(C, Y) | 0,
r = r + Math.imul(E, Z) | 0,
i = (i = i + Math.imul(E, G) | 0) + Math.imul(S, Z) | 0,
o = o + Math.imul(S, G) | 0,
r = r + Math.imul(A, J) | 0,
i = (i = i + Math.imul(A, ee) | 0) + Math.imul(w, J) | 0,
o = o + Math.imul(w, ee) | 0,
r = r + Math.imul(v, ne) | 0,
i = (i = i + Math.imul(v, re) | 0) + Math.imul(b, ne) | 0,
o = o + Math.imul(b, re) | 0,
r = r + Math.imul(p, oe) | 0,
i = (i = i + Math.imul(p, ae) | 0) + Math.imul(m, oe) | 0,
o = o + Math.imul(m, ae) | 0;
var Ee = (l + (r = r + Math.imul(d, ue) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, le) | 0) + Math.imul(f, ue) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, le) | 0) + (i >>> 13) | 0) + (Ee >>> 26) |
0,
Ee &= 67108863,
r = Math.imul(N, U),
i = (i = Math.imul(N, K)) + Math.imul(D, U) | 0,
o = Math.imul(D, K),
r = r + Math.imul(P, H) | 0,
i = (i = i + Math.imul(P, V) | 0) + Math.imul(L, H) | 0,
o = o + Math.imul(L, V) | 0,
r = r + Math.imul(R, $) | 0,
i = (i = i + Math.imul(R, Y) | 0) + Math.imul(T, $) | 0,
o = o + Math.imul(T, Y) | 0,
r = r + Math.imul(M, Z) | 0,
i = (i = i + Math.imul(M, G) | 0) + Math.imul(C, Z) | 0,
o = o + Math.imul(C, G) | 0,
r = r + Math.imul(E, J) | 0,
i = (i = i + Math.imul(E, ee) | 0) + Math.imul(S, J) | 0,
o = o + Math.imul(S, ee) | 0,
r = r + Math.imul(A, ne) | 0,
i = (i = i + Math.imul(A, re) | 0) + Math.imul(w, ne) | 0,
o = o + Math.imul(w, re) | 0,
r = r + Math.imul(v, oe) | 0,
i = (i = i + Math.imul(v, ae) | 0) + Math.imul(b, oe) | 0,
o = o + Math.imul(b, ae) | 0,
r = r + Math.imul(p, ue) | 0,
i = (i = i + Math.imul(p, le) | 0) + Math.imul(m, ue) | 0,
o = o + Math.imul(m, le) | 0;
var Se = (l + (r = r + Math.imul(d, de) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, fe) | 0) + Math.imul(f, de) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, fe) | 0) + (i >>> 13) | 0) + (Se >>> 26) |
0,
Se &= 67108863,
r = Math.imul(j, U),
i = (i = Math.imul(j, K)) + Math.imul(z, U) | 0,
o = Math.imul(z, K),
r = r + Math.imul(N, H) | 0,
i = (i = i + Math.imul(N, V) | 0) + Math.imul(D, H) | 0,
o = o + Math.imul(D, V) | 0,
r = r + Math.imul(P, $) | 0,
i = (i = i + Math.imul(P, Y) | 0) + Math.imul(L, $) | 0,
o = o + Math.imul(L, Y) | 0,
r = r + Math.imul(R, Z) | 0,
i = (i = i + Math.imul(R, G) | 0) + Math.imul(T, Z) | 0,
o = o + Math.imul(T, G) | 0,
r = r + Math.imul(M, J) | 0,
i = (i = i + Math.imul(M, ee) | 0) + Math.imul(C, J) | 0,
o = o + Math.imul(C, ee) | 0,
r = r + Math.imul(E, ne) | 0,
i = (i = i + Math.imul(E, re) | 0) + Math.imul(S, ne) | 0,
o = o + Math.imul(S, re) | 0,
r = r + Math.imul(A, oe) | 0,
i = (i = i + Math.imul(A, ae) | 0) + Math.imul(w, oe) | 0,
o = o + Math.imul(w, ae) | 0,
r = r + Math.imul(v, ue) | 0,
i = (i = i + Math.imul(v, le) | 0) + Math.imul(b, ue) | 0,
o = o + Math.imul(b, le) | 0,
r = r + Math.imul(p, de) | 0,
i = (i = i + Math.imul(p, fe) | 0) + Math.imul(m, de) | 0,
o = o + Math.imul(m, fe) | 0;
var ke = (l + (r = r + Math.imul(d, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(d, me) | 0) + Math.imul(f, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(f, me) | 0) + (i >>> 13) | 0) + (ke >>> 26) |
0,
ke &= 67108863,
r = Math.imul(j, H),
i = (i = Math.imul(j, V)) + Math.imul(z, H) | 0,
o = Math.imul(z, V),
r = r + Math.imul(N, $) | 0,
i = (i = i + Math.imul(N, Y) | 0) + Math.imul(D, $) | 0,
o = o + Math.imul(D, Y) | 0,
r = r + Math.imul(P, Z) | 0,
i = (i = i + Math.imul(P, G) | 0) + Math.imul(L, Z) | 0,
o = o + Math.imul(L, G) | 0,
r = r + Math.imul(R, J) | 0,
i = (i = i + Math.imul(R, ee) | 0) + Math.imul(T, J) | 0,
o = o + Math.imul(T, ee) | 0,
r = r + Math.imul(M, ne) | 0,
i = (i = i + Math.imul(M, re) | 0) + Math.imul(C, ne) | 0,
o = o + Math.imul(C, re) | 0,
r = r + Math.imul(E, oe) | 0,
i = (i = i + Math.imul(E, ae) | 0) + Math.imul(S, oe) | 0,
o = o + Math.imul(S, ae) | 0,
r = r + Math.imul(A, ue) | 0,
i = (i = i + Math.imul(A, le) | 0) + Math.imul(w, ue) | 0,
o = o + Math.imul(w, le) | 0,
r = r + Math.imul(v, de) | 0,
i = (i = i + Math.imul(v, fe) | 0) + Math.imul(b, de) | 0,
o = o + Math.imul(b, fe) | 0;
var Me = (l + (r = r + Math.imul(p, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(p, me) | 0) + Math.imul(m, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(m, me) | 0) + (i >>> 13) | 0) + (Me >>>
26) | 0,
Me &= 67108863,
r = Math.imul(j, $),
i = (i = Math.imul(j, Y)) + Math.imul(z, $) | 0,
o = Math.imul(z, Y),
r = r + Math.imul(N, Z) | 0,
i = (i = i + Math.imul(N, G) | 0) + Math.imul(D, Z) | 0,
o = o + Math.imul(D, G) | 0,
r = r + Math.imul(P, J) | 0,
i = (i = i + Math.imul(P, ee) | 0) + Math.imul(L, J) | 0,
o = o + Math.imul(L, ee) | 0,
r = r + Math.imul(R, ne) | 0,
i = (i = i + Math.imul(R, re) | 0) + Math.imul(T, ne) | 0,
o = o + Math.imul(T, re) | 0,
r = r + Math.imul(M, oe) | 0,
i = (i = i + Math.imul(M, ae) | 0) + Math.imul(C, oe) | 0,
o = o + Math.imul(C, ae) | 0,
r = r + Math.imul(E, ue) | 0,
i = (i = i + Math.imul(E, le) | 0) + Math.imul(S, ue) | 0,
o = o + Math.imul(S, le) | 0,
r = r + Math.imul(A, de) | 0,
i = (i = i + Math.imul(A, fe) | 0) + Math.imul(w, de) | 0,
o = o + Math.imul(w, fe) | 0;
var Ce = (l + (r = r + Math.imul(v, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(v, me) | 0) + Math.imul(b, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(b, me) | 0) + (i >>> 13) | 0) + (Ce >>> 26)
| 0,
Ce &= 67108863,
r = Math.imul(j, Z),
i = (i = Math.imul(j, G)) + Math.imul(z, Z) | 0,
o = Math.imul(z, G),
r = r + Math.imul(N, J) | 0,
i = (i = i + Math.imul(N, ee) | 0) + Math.imul(D, J) | 0,
o = o + Math.imul(D, ee) | 0,
r = r + Math.imul(P, ne) | 0,
i = (i = i + Math.imul(P, re) | 0) + Math.imul(L, ne) | 0,
o = o + Math.imul(L, re) | 0,
r = r + Math.imul(R, oe) | 0,
i = (i = i + Math.imul(R, ae) | 0) + Math.imul(T, oe) | 0,
o = o + Math.imul(T, ae) | 0,
r = r + Math.imul(M, ue) | 0,
i = (i = i + Math.imul(M, le) | 0) + Math.imul(C, ue) | 0,
o = o + Math.imul(C, le) | 0,
r = r + Math.imul(E, de) | 0,
i = (i = i + Math.imul(E, fe) | 0) + Math.imul(S, de) | 0,
o = o + Math.imul(S, fe) | 0;
var xe = (l + (r = r + Math.imul(A, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(A, me) | 0) + Math.imul(w, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(w, me) | 0) + (i >>> 13) | 0) + (xe >>> 26)
| 0,
xe &= 67108863,
r = Math.imul(j, J),
i = (i = Math.imul(j, ee)) + Math.imul(z, J) | 0,
o = Math.imul(z, ee),
r = r + Math.imul(N, ne) | 0,
i = (i = i + Math.imul(N, re) | 0) + Math.imul(D, ne) | 0,
o = o + Math.imul(D, re) | 0,
r = r + Math.imul(P, oe) | 0,
i = (i = i + Math.imul(P, ae) | 0) + Math.imul(L, oe) | 0,
o = o + Math.imul(L, ae) | 0,
r = r + Math.imul(R, ue) | 0,
i = (i = i + Math.imul(R, le) | 0) + Math.imul(T, ue) | 0,
o = o + Math.imul(T, le) | 0,
r = r + Math.imul(M, de) | 0,
i = (i = i + Math.imul(M, fe) | 0) + Math.imul(C, de) | 0,
o = o + Math.imul(C, fe) | 0;
var Re = (l + (r = r + Math.imul(E, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(E, me) | 0) + Math.imul(S, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(S, me) | 0) + (i >>> 13) | 0) + (Re >>>
26) | 0,
Re &= 67108863,
r = Math.imul(j, ne),
i = (i = Math.imul(j, re)) + Math.imul(z, ne) | 0,
o = Math.imul(z, re),
r = r + Math.imul(N, oe) | 0,
i = (i = i + Math.imul(N, ae) | 0) + Math.imul(D, oe) | 0,
o = o + Math.imul(D, ae) | 0,
r = r + Math.imul(P, ue) | 0,
i = (i = i + Math.imul(P, le) | 0) + Math.imul(L, ue) | 0,
o = o + Math.imul(L, le) | 0,
r = r + Math.imul(R, de) | 0,
i = (i = i + Math.imul(R, fe) | 0) + Math.imul(T, de) | 0,
o = o + Math.imul(T, fe) | 0;
var Te = (l + (r = r + Math.imul(M, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(M, me) | 0) + Math.imul(C, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(C, me) | 0) + (i >>> 13) | 0) + (Te >>> 26)
| 0,
Te &= 67108863,
r = Math.imul(j, oe),
i = (i = Math.imul(j, ae)) + Math.imul(z, oe) | 0,
o = Math.imul(z, ae),
r = r + Math.imul(N, ue) | 0,
i = (i = i + Math.imul(N, le) | 0) + Math.imul(D, ue) | 0,
o = o + Math.imul(D, le) | 0,
r = r + Math.imul(P, de) | 0,
i = (i = i + Math.imul(P, fe) | 0) + Math.imul(L, de) | 0,
o = o + Math.imul(L, fe) | 0;
var Ie = (l + (r = r + Math.imul(R, pe) | 0) | 0) + ((8191 & (i = (i = i
+ Math.imul(R, me) | 0) + Math.imul(T, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(T, me) | 0) + (i >>> 13) | 0) + (Ie >>> 26) |
0,
Ie &= 67108863,
r = Math.imul(j, ue),
i = (i = Math.imul(j, le)) + Math.imul(z, ue) | 0,
o = Math.imul(z, le),
r = r + Math.imul(N, de) | 0,
i = (i = i + Math.imul(N, fe) | 0) + Math.imul(D, de) | 0,
o = o + Math.imul(D, fe) | 0;
var Pe = (l + (r = r + Math.imul(P, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(P, me) | 0) + Math.imul(L, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(L, me) | 0) + (i >>> 13) | 0) + (Pe >>> 26)
| 0,
Pe &= 67108863,
r = Math.imul(j, de),
i = (i = Math.imul(j, fe)) + Math.imul(z, de) | 0,
o = Math.imul(z, fe);
var Le = (l + (r = r + Math.imul(N, pe) | 0) | 0) + ((8191 & (i = (i =
i + Math.imul(N, me) | 0) + Math.imul(D, pe) | 0)) << 13) | 0;
l = ((o = o + Math.imul(D, me) | 0) + (i >>> 13) | 0) + (Le >>> 26)
| 0,
Le &= 67108863;
var Oe = (l + (r = Math.imul(j, pe)) | 0) + ((8191 & (i = (i =
Math.imul(j, me)) + Math.imul(z, pe) | 0)) << 13) | 0;
return l = ((o = Math.imul(z, me)) + (i >>> 13) | 0) + (Oe >>> 26)
| 0,
Oe &= 67108863,
u[0] = ge,
u[1] = ve,
u[2] = be,
u[3] = ye,
u[4] = Ae,
u[5] = we,
u[6] = _e,
u[7] = Ee,
u[8] = Se,
u[9] = ke,
u[10] = Me,
u[11] = Ce,
u[12] = xe,
u[13] = Re,
u[14] = Te,
u[15] = Ie,
u[16] = Pe,
u[17] = Le,
u[18] = Oe,
0 !== l && (u[19] = l,
n.length++),
n
};
function p(e, t, n) {
return (new m).mulp(e, t, n)
}
function m(e, t) {
this.x = e,
this.y = t
}
Math.imul || (h = f),
i.prototype.mulTo = function(e, t) {
var n, r = this.length + e.length;
return n = 10 === this.length && 10 === e.length ? h(this, e, t) :
r < 63 ? f(this, e, t) : r < 1024 ? function(e, t, n) {
n.negative = t.negative ^ e.negative,
n.length = e.length + t.length;
for (var r = 0, i = 0, o = 0; o < n.length - 1; o++) {
var a = i;
i = 0;
for (var s = 67108863 & r, u = Math.min(o, t.length - 1), l
= Math.max(0, o - e.length + 1); l <= u; l++) {
var c = o - l
, d = (0 | e.words[c]) * (0 | t.words[l])
, f = 67108863 & d;
s = 67108863 & (f = f + s | 0),
i += (a = (a = a + (d / 67108864 | 0) | 0) + (f >>> 26)
| 0) >>> 26,
a &= 67108863
}
n.words[o] = s,
r = a,
a=i
}
return 0 !== r ? n.words[o] = r : n.length--,
n.strip()
}(this, e, t) : p(this, e, t),
n
}
,
m.prototype.makeRBT = function(e) {
for (var t = new Array(e), n = i.prototype._countBits(e) - 1, r = 0;
r < e; r++)
t[r] = this.revBin(r, n, e);
return t
}
,
m.prototype.revBin = function(e, t, n) {
if (0 === e || e === n - 1)
return e;
for (var r = 0, i = 0; i < t; i++)
r |= (1 & e) << t - i - 1,
e >>= 1;
return r
}
,
m.prototype.permute = function(e, t, n, r, i, o) {
for (var a = 0; a < o; a++)
r[a] = t[e[a]],
i[a] = n[e[a]]
}
,
m.prototype.transform = function(e, t, n, r, i, o) {
this.permute(o, e, t, n, r, i);
for (var a = 1; a < i; a <<= 1)
for (var s = a << 1, u = Math.cos(2 * Math.PI / s), l =
Math.sin(2 * Math.PI / s), c = 0; c < i; c += s)
for (var d = u, f = l, h = 0; h < a; h++) {
var p = n[c + h]
, m = r[c + h]
, g = n[c + h + a]
, v = r[c + h + a]
, b = d * g - f * v;
v = d * v + f * g,
g = b,
n[c + h] = p + g,
r[c + h] = m + v,
n[c + h + a] = p - g,
r[c + h + a] = m - v,
h !== s && (b = u * d - l * f,
f = u * f + l * d,
d = b)
}
}
,
m.prototype.guessLen13b = function(e, t) {
var n = 1 | Math.max(t, e)
,r=1&n
, i = 0;
for (n = n / 2 | 0; n; n >>>= 1)
i++;
return 1 << i + 1 + r
}
,
m.prototype.conjugate = function(e, t, n) {
if (!(n <= 1))
for (var r = 0; r < n / 2; r++) {
var i = e[r];
e[r] = e[n - r - 1],
e[n - r - 1] = i,
i = t[r],
t[r] = -t[n - r - 1],
t[n - r - 1] = -i
}
}
,
m.prototype.normalize13b = function(e, t) {
for (var n = 0, r = 0; r < t / 2; r++) {
var i = 8192 * Math.round(e[2 * r + 1] / t) + Math.round(e[2 *
r] / t) + n;
e[r] = 67108863 & i,
n = i < 67108864 ? 0 : i / 67108864 | 0
}
return e
}
,
m.prototype.convert13b = function(e, t, r, i) {
for (var o = 0, a = 0; a < t; a++)
o += 0 | e[a],
r[2 * a] = 8191 & o,
o >>>= 13,
r[2 * a + 1] = 8191 & o,
o >>>= 13;
for (a = 2 * t; a < i; ++a)
r[a] = 0;
n(0 === o),
n(0 == (-8192 & o))
}
,
m.prototype.stub = function(e) {
for (var t = new Array(e), n = 0; n < e; n++)
t[n] = 0;
return t
}
,
m.prototype.mulp = function(e, t, n) {
var r = 2 * this.guessLen13b(e.length, t.length)
, i = this.makeRBT(r)
, o = this.stub(r)
, a = new Array(r)
, s = new Array(r)
, u = new Array(r)
, l = new Array(r)
, c = new Array(r)
, d = new Array(r)
, f = n.words;
f.length = r,
this.convert13b(e.words, e.length, a, r),
this.convert13b(t.words, t.length, l, r),
this.transform(a, o, s, u, r, i),
this.transform(l, o, c, d, r, i);
for (var h = 0; h < r; h++) {
var p = s[h] * c[h] - u[h] * d[h];
u[h] = s[h] * d[h] + u[h] * c[h],
s[h] = p
}
return this.conjugate(s, u, r),
this.transform(s, u, f, o, r, i),
this.conjugate(f, o, r),
this.normalize13b(f, r),
n.negative = e.negative ^ t.negative,
n.length = e.length + t.length,
n.strip()
}
,
i.prototype.mul = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
this.mulTo(e, t)
}
,
i.prototype.mulf = function(e) {
var t = new i(null);
return t.words = new Array(this.length + e.length),
p(this, e, t)
}
,
i.prototype.imul = function(e) {
return this.clone().mulTo(e, this)
}
,
i.prototype.imuln = function(e) {
n("number" == typeof e),
n(e < 67108864);
for (var t = 0, r = 0; r < this.length; r++) {
var i = (0 | this.words[r]) * e
, o = (67108863 & i) + (67108863 & t);
t >>= 26,
t += i / 67108864 | 0,
t += o >>> 26,
this.words[r] = 67108863 & o
}
return 0 !== t && (this.words[r] = t,
this.length++),
this
}
,
i.prototype.muln = function(e) {
return this.clone().imuln(e)
}
,
i.prototype.sqr = function() {
return this.mul(this)
}
,
i.prototype.isqr = function() {
return this.imul(this.clone())
}
,
i.prototype.pow = function(e) {
var t = function(e) {
for (var t = new Array(e.bitLength()), n = 0; n < t.length; n++)
{
var r = n / 26 | 0
, i = n % 26;
t[n] = (e.words[r] & 1 << i) >>> i
}
return t
}(e);
if (0 === t.length)
return new i(1);
for (var n = this, r = 0; r < t.length && 0 === t[r]; r++,
n = n.sqr())
;
if (++r < t.length)
for (var o = n.sqr(); r < t.length; r++,
o = o.sqr())
0 !== t[r] && (n = n.mul(o));
return n
}
,
i.prototype.iushln = function(e) {
n("number" == typeof e && e >= 0);
var t, r = e % 26, i = (e - r) / 26, o = 67108863 >>> 26 - r << 26 -
r;
if (0 !== r) {
var a = 0;
for (t = 0; t < this.length; t++) {
var s = this.words[t] & o
, u = (0 | this.words[t]) - s << r;
this.words[t] = u | a,
a = s >>> 26 - r
}
a && (this.words[t] = a,
this.length++)
}
if (0 !== i) {
for (t = this.length - 1; t >= 0; t--)
this.words[t + i] = this.words[t];
for (t = 0; t < i; t++)
this.words[t] = 0;
this.length += i
}
return this.strip()
}
,
i.prototype.ishln = function(e) {
return n(0 === this.negative),
this.iushln(e)
}
,
i.prototype.iushrn = function(e, t, r) {
var i;
n("number" == typeof e && e >= 0),
i = t ? (t - t % 26) / 26 : 0;
var o = e % 26
, a = Math.min((e - o) / 26, this.length)
, s = 67108863 ^ 67108863 >>> o << o
, u = r;
if (i -= a,
i = Math.max(0, i),
u) {
for (var l = 0; l < a; l++)
u.words[l] = this.words[l];
u.length = a
}
if (0 === a)
;
else if (this.length > a)
for (this.length -= a,
l = 0; l < this.length; l++)
this.words[l] = this.words[l + a];
else
this.words[0] = 0,
this.length = 1;
var c = 0;
for (l = this.length - 1; l >= 0 && (0 !== c || l >= i); l--) {
var d = 0 | this.words[l];
this.words[l] = c << 26 - o | d >>> o,
c=d&s
}
return u && 0 !== c && (u.words[u.length++] = c),
0 === this.length && (this.words[0] = 0,
this.length = 1),
this.strip()
}
,
i.prototype.ishrn = function(e, t, r) {
return n(0 === this.negative),
this.iushrn(e, t, r)
}
,
i.prototype.shln = function(e) {
return this.clone().ishln(e)
}
,
i.prototype.ushln = function(e) {
return this.clone().iushln(e)
}
,
i.prototype.shrn = function(e) {
return this.clone().ishrn(e)
}
,
i.prototype.ushrn = function(e) {
return this.clone().iushrn(e)
}
,
i.prototype.testn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
return !(this.length <= r) && !!(this.words[r] & i)
}
,
i.prototype.imaskn = function(e) {
n("number" == typeof e && e >= 0);
var t = e % 26
, r = (e - t) / 26;
if (n(0 === this.negative, "imaskn works only with positive
numbers"),
this.length <= r)
return this;
if (0 !== t && r++,
this.length = Math.min(r, this.length),
0 !== t) {
var i = 67108863 ^ 67108863 >>> t << t;
this.words[this.length - 1] &= i
}
return this.strip()
}
,
i.prototype.maskn = function(e) {
return this.clone().imaskn(e)
}
,
i.prototype.iaddn = function(e) {
return n("number" == typeof e),
n(e < 67108864),
e < 0 ? this.isubn(-e) : 0 !== this.negative ? 1 === this.length &&
(0 | this.words[0]) < e ? (this.words[0] = e - (0 | this.words[0]),
this.negative = 0,
this) : (this.negative = 0,
this.isubn(e),
this.negative = 1,
this) : this._iaddn(e)
}
,
i.prototype._iaddn = function(e) {
this.words[0] += e;
for (var t = 0; t < this.length && this.words[t] >= 67108864; t++)
this.words[t] -= 67108864,
t === this.length - 1 ? this.words[t + 1] = 1 : this.words[t +
1]++;
return this.length = Math.max(this.length, t + 1),
this
}
,
i.prototype.isubn = function(e) {
if (n("number" == typeof e),
n(e < 67108864),
e < 0)
return this.iaddn(-e);
if (0 !== this.negative)
return this.negative = 0,
this.iaddn(e),
this.negative = 1,
this;
if (this.words[0] -= e,
1 === this.length && this.words[0] < 0)
this.words[0] = -this.words[0],
this.negative = 1;
else
for (var t = 0; t < this.length && this.words[t] < 0; t++)
this.words[t] += 67108864,
this.words[t + 1] -= 1;
return this.strip()
}
,
i.prototype.addn = function(e) {
return this.clone().iaddn(e)
}
,
i.prototype.subn = function(e) {
return this.clone().isubn(e)
}
,
i.prototype.iabs = function() {
return this.negative = 0,
this
}
,
i.prototype.abs = function() {
return this.clone().iabs()
}
,
i.prototype._ishlnsubmul = function(e, t, r) {
var i, o, a = e.length + r;
this._expand(a);
var s = 0;
for (i = 0; i < e.length; i++) {
o = (0 | this.words[i + r]) + s;
var u = (0 | e.words[i]) * t;
s = ((o -= 67108863 & u) >> 26) - (u / 67108864 | 0),
this.words[i + r] = 67108863 & o
}
for (; i < this.length - r; i++)
s = (o = (0 | this.words[i + r]) + s) >> 26,
this.words[i + r] = 67108863 & o;
if (0 === s)
return this.strip();
for (n(-1 === s),
s = 0,
i = 0; i < this.length; i++)
s = (o = -(0 | this.words[i]) + s) >> 26,
this.words[i] = 67108863 & o;
return this.negative = 1,
this.strip()
}
,
i.prototype._wordDiv = function(e, t) {
var n = (this.length,
e.length)
, r = this.clone()
,o=e
, a = 0 | o.words[o.length - 1];
0 !== (n = 26 - this._countBits(a)) && (o = o.ushln(n),
r.iushln(n),
a = 0 | o.words[o.length - 1]);
var s, u = r.length - o.length;
if ("mod" !== t) {
(s = new i(null)).length = u + 1,
s.words = new Array(s.length);
for (var l = 0; l < s.length; l++)
s.words[l] = 0
}
var c = r.clone()._ishlnsubmul(o, 1, u);
0 === c.negative && (r = c,
s && (s.words[u] = 1));
for (var d = u - 1; d >= 0; d--) {
var f = 67108864 * (0 | r.words[o.length + d]) + (0 |
r.words[o.length + d - 1]);
for (f = Math.min(f / a | 0, 67108863),
r._ishlnsubmul(o, f, d); 0 !== r.negative; )
f--,
r.negative = 0,
r._ishlnsubmul(o, 1, d),
r.isZero() || (r.negative ^= 1);
s && (s.words[d] = f)
}
return s && s.strip(),
r.strip(),
"div" !== t && 0 !== n && r.iushrn(n),
{
div: s || null,
mod: r
}
}
,
i.prototype.divmod = function(e, t, r) {
return n(!e.isZero()),
this.isZero() ? {
div: new i(0),
mod: new i(0)
} : 0 !== this.negative && 0 === e.negative ? (s =
this.neg().divmod(e, t),
"mod" !== t && (o = s.div.neg()),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.iadd(e)),
{
div: o,
mod: a
}) : 0 === this.negative && 0 !== e.negative ? (s =
this.divmod(e.neg(), t),
"mod" !== t && (o = s.div.neg()),
{
div: o,
mod: s.mod
}) : 0 != (this.negative & e.negative) ? (s =
this.neg().divmod(e.neg(), t),
"div" !== t && (a = s.mod.neg(),
r && 0 !== a.negative && a.isub(e)),
{
div: s.div,
mod: a
}) : e.length > this.length || this.cmp(e) < 0 ? {
div: new i(0),
mod: this
} : 1 === e.length ? "div" === t ? {
div: this.divn(e.words[0]),
mod: null
} : "mod" === t ? {
div: null,
mod: new i(this.modn(e.words[0]))
}:{
div: this.divn(e.words[0]),
mod: new i(this.modn(e.words[0]))
} : this._wordDiv(e, t);
var o, a, s
}
,
i.prototype.div = function(e) {
return this.divmod(e, "div", !1).div
}
,
i.prototype.mod = function(e) {
return this.divmod(e, "mod", !1).mod
}
,
i.prototype.umod = function(e) {
return this.divmod(e, "mod", !0).mod
}
,
i.prototype.divRound = function(e) {
var t = this.divmod(e);
if (t.mod.isZero())
return t.div;
var n = 0 !== t.div.negative ? t.mod.isub(e) : t.mod
, r = e.ushrn(1)
, i = e.andln(1)
, o = n.cmp(r);
return o < 0 || 1 === i && 0 === o ? t.div : 0 !== t.div.negative ?
t.div.isubn(1) : t.div.iaddn(1)
}
,
i.prototype.modn = function(e) {
n(e <= 67108863);
for (var t = (1 << 26) % e, r = 0, i = this.length - 1; i >= 0; i--)
r = (t * r + (0 | this.words[i])) % e;
return r
}
,
i.prototype.idivn = function(e) {
n(e <= 67108863);
for (var t = 0, r = this.length - 1; r >= 0; r--) {
var i = (0 | this.words[r]) + 67108864 * t;
this.words[r] = i / e | 0,
t=i%e
}
return this.strip()
}
,
i.prototype.divn = function(e) {
return this.clone().idivn(e)
}
,
i.prototype.egcd = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o = new i(1), a = new i(0), s = new i(0), u = new i(1), l =
0; t.isEven() && r.isEven(); )
t.iushrn(1),
r.iushrn(1),
++l;
for (var c = r.clone(), d = t.clone(); !t.isZero(); ) {
for (var f = 0, h = 1; 0 == (t.words[0] & h) && f < 26; ++f,
h <<= 1)
;
if (f > 0)
for (t.iushrn(f); f-- > 0; )
(o.isOdd() || a.isOdd()) && (o.iadd(c),
a.isub(d)),
o.iushrn(1),
a.iushrn(1);
for (var p = 0, m = 1; 0 == (r.words[0] & m) && p < 26; ++p,
m <<= 1)
;
if (p > 0)
for (r.iushrn(p); p-- > 0; )
(s.isOdd() || u.isOdd()) && (s.iadd(c),
u.isub(d)),
s.iushrn(1),
u.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
o.isub(s),
a.isub(u)) : (r.isub(t),
s.isub(o),
u.isub(a))
}
return {
a: s,
b: u,
gcd: r.iushln(l)
}
}
,
i.prototype._invmp = function(e) {
n(0 === e.negative),
n(!e.isZero());
var t = this
, r = e.clone();
t = 0 !== t.negative ? t.umod(e) : t.clone();
for (var o, a = new i(1), s = new i(0), u = r.clone(); t.cmpn(1) > 0
&& r.cmpn(1) > 0; ) {
for (var l = 0, c = 1; 0 == (t.words[0] & c) && l < 26; ++l,
c <<= 1)
;
if (l > 0)
for (t.iushrn(l); l-- > 0; )
a.isOdd() && a.iadd(u),
a.iushrn(1);
for (var d = 0, f = 1; 0 == (r.words[0] & f) && d < 26; ++d,
f <<= 1)
;
if (d > 0)
for (r.iushrn(d); d-- > 0; )
s.isOdd() && s.iadd(u),
s.iushrn(1);
t.cmp(r) >= 0 ? (t.isub(r),
a.isub(s)) : (r.isub(t),
s.isub(a))
}
return (o = 0 === t.cmpn(1) ? a : s).cmpn(0) < 0 && o.iadd(e),
o
}
,
i.prototype.gcd = function(e) {
if (this.isZero())
return e.abs();
if (e.isZero())
return this.abs();
var t = this.clone()
, n = e.clone();
t.negative = 0,
n.negative = 0;
for (var r = 0; t.isEven() && n.isEven(); r++)
t.iushrn(1),
n.iushrn(1);
for (; ; ) {
for (; t.isEven(); )
t.iushrn(1);
for (; n.isEven(); )
n.iushrn(1);
var i = t.cmp(n);
if (i < 0) {
var o = t;
t = n,
n=o
} else if (0 === i || 0 === n.cmpn(1))
break;
t.isub(n)
}
return n.iushln(r)
}
,
i.prototype.invm = function(e) {
return this.egcd(e).a.umod(e)
}
,
i.prototype.isEven = function() {
return 0 == (1 & this.words[0])
}
,
i.prototype.isOdd = function() {
return 1 == (1 & this.words[0])
}
,
i.prototype.andln = function(e) {
return this.words[0] & e
}
,
i.prototype.bincn = function(e) {
n("number" == typeof e);
var t = e % 26
, r = (e - t) / 26
, i = 1 << t;
if (this.length <= r)
return this._expand(r + 1),
this.words[r] |= i,
this;
for (var o = i, a = r; 0 !== o && a < this.length; a++) {
var s = 0 | this.words[a];
o = (s += o) >>> 26,
s &= 67108863,
this.words[a] = s
}
return 0 !== o && (this.words[a] = o,
this.length++),
this
}
,
i.prototype.isZero = function() {
return 1 === this.length && 0 === this.words[0]
}
,
i.prototype.cmpn = function(e) {
var t, r = e < 0;
if (0 !== this.negative && !r)
return -1;
if (0 === this.negative && r)
return 1;
if (this.strip(),
this.length > 1)
t = 1;
else {
r && (e = -e),
n(e <= 67108863, "Number is too big");
var i = 0 | this.words[0];
t = i === e ? 0 : i < e ? -1 : 1
}
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.cmp = function(e) {
if (0 !== this.negative && 0 === e.negative)
return -1;
if (0 === this.negative && 0 !== e.negative)
return 1;
var t = this.ucmp(e);
return 0 !== this.negative ? 0 | -t : t
}
,
i.prototype.ucmp = function(e) {
if (this.length > e.length)
return 1;
if (this.length < e.length)
return -1;
for (var t = 0, n = this.length - 1; n >= 0; n--) {
var r = 0 | this.words[n]
, i = 0 | e.words[n];
if (r !== i) {
r < i ? t = -1 : r > i && (t = 1);
break
}
}
return t
}
,
i.prototype.gtn = function(e) {
return 1 === this.cmpn(e)
}
,
i.prototype.gt = function(e) {
return 1 === this.cmp(e)
}
,
i.prototype.gten = function(e) {
return this.cmpn(e) >= 0
}
,
i.prototype.gte = function(e) {
return this.cmp(e) >= 0
}
,
i.prototype.ltn = function(e) {
return -1 === this.cmpn(e)
}
,
i.prototype.lt = function(e) {
return -1 === this.cmp(e)
}
,
i.prototype.lten = function(e) {
return this.cmpn(e) <= 0
}
,
i.prototype.lte = function(e) {
return this.cmp(e) <= 0
}
,
i.prototype.eqn = function(e) {
return 0 === this.cmpn(e)
}
,
i.prototype.eq = function(e) {
return 0 === this.cmp(e)
}
,
i.red = function(e) {
return new _(e)
}
,
i.prototype.toRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
n(0 === this.negative, "red works only with positives"),
e.convertTo(this)._forceRed(e)
}
,
i.prototype.fromRed = function() {
return n(this.red, "fromRed works only with numbers in
reduction context"),
this.red.convertFrom(this)
}
,
i.prototype._forceRed = function(e) {
return this.red = e,
this
}
,
i.prototype.forceRed = function(e) {
return n(!this.red, "Already a number in reduction context"),
this._forceRed(e)
}
,
i.prototype.redAdd = function(e) {
return n(this.red, "redAdd works only with red numbers"),
this.red.add(this, e)
}
,
i.prototype.redIAdd = function(e) {
return n(this.red, "redIAdd works only with red numbers"),
this.red.iadd(this, e)
}
,
i.prototype.redSub = function(e) {
return n(this.red, "redSub works only with red numbers"),
this.red.sub(this, e)
}
,
i.prototype.redISub = function(e) {
return n(this.red, "redISub works only with red numbers"),
this.red.isub(this, e)
}
,
i.prototype.redShl = function(e) {
return n(this.red, "redShl works only with red numbers"),
this.red.shl(this, e)
}
,
i.prototype.redMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.mul(this, e)
}
,
i.prototype.redIMul = function(e) {
return n(this.red, "redMul works only with red numbers"),
this.red._verify2(this, e),
this.red.imul(this, e)
}
,
i.prototype.redSqr = function() {
return n(this.red, "redSqr works only with red numbers"),
this.red._verify1(this),
this.red.sqr(this)
}
,
i.prototype.redISqr = function() {
return n(this.red, "redISqr works only with red numbers"),
this.red._verify1(this),
this.red.isqr(this)
}
,
i.prototype.redSqrt = function() {
return n(this.red, "redSqrt works only with red numbers"),
this.red._verify1(this),
this.red.sqrt(this)
}
,
i.prototype.redInvm = function() {
return n(this.red, "redInvm works only with red numbers"),
this.red._verify1(this),
this.red.invm(this)
}
,
i.prototype.redNeg = function() {
return n(this.red, "redNeg works only with red numbers"),
this.red._verify1(this),
this.red.neg(this)
}
,
i.prototype.redPow = function(e) {
return n(this.red && !e.red, "redPow(normalNum)"),
this.red._verify1(this),
this.red.pow(this, e)
}
;
var g = {
k256: null,
p224: null,
p192: null,
p25519: null
};
function v(e, t) {
this.name = e,
this.p = new i(t,16),
this.n = this.p.bitLength(),
this.k = new i(1).iushln(this.n).isub(this.p),
this.tmp = this._tmp()
}
function b() {
v.call(this, "k256", "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe
fffffc2f")
}
function y() {
v.call(this, "p224", "ffffffff ffffffff ffffffff ffffffff 00000000 00000000
00000001")
}
function A() {
v.call(this, "p192", "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")
}
function w() {
v.call(this, "25519", "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")
}
function _(e) {
if ("string" == typeof e) {
var t = i._prime(e);
this.m = t.p,
this.prime = t
} else
n(e.gtn(1), "modulus must be greater than 1"),
this.m = e,
this.prime = null
}
function E(e) {
_.call(this, e),
this.shift = this.m.bitLength(),
this.shift % 26 != 0 && (this.shift += 26 - this.shift % 26),
this.r = new i(1).iushln(this.shift),
this.r2 = this.imod(this.r.sqr()),
this.rinv = this.r._invmp(this.m),
this.minv = this.rinv.mul(this.r).isubn(1).div(this.m),
this.minv = this.minv.umod(this.r),
this.minv = this.r.sub(this.minv)
}
v.prototype._tmp = function() {
var e = new i(null);
return e.words = new Array(Math.ceil(this.n / 13)),
e
}
,
v.prototype.ireduce = function(e) {
var t, n = e;
do {
this.split(n, this.tmp),
t = (n = (n = this.imulK(n)).iadd(this.tmp)).bitLength()
} while (t > this.n);
var r = t < this.n ? -1 : n.ucmp(this.p);
return 0 === r ? (n.words[0] = 0,
n.length = 1) : r > 0 ? n.isub(this.p) : void 0 !== n.strip ?
n.strip() : n._strip(),
n
}
,
v.prototype.split = function(e, t) {
e.iushrn(this.n, 0, t)
}
,
v.prototype.imulK = function(e) {
return e.imul(this.k)
}
,
r(b, v),
b.prototype.split = function(e, t) {
for (var n = 4194303, r = Math.min(e.length, 9), i = 0; i < r; i++)
t.words[i] = e.words[i];
if (t.length = r,
e.length <= 9)
return e.words[0] = 0,
void (e.length = 1);
var o = e.words[9];
for (t.words[t.length++] = o & n,
i = 10; i < e.length; i++) {
var a = 0 | e.words[i];
e.words[i - 10] = (a & n) << 4 | o >>> 22,
o=a
}
o >>>= 22,
e.words[i - 10] = o,
0 === o && e.length > 10 ? e.length -= 10 : e.length -= 9
}
,
b.prototype.imulK = function(e) {
e.words[e.length] = 0,
e.words[e.length + 1] = 0,
e.length += 2;
for (var t = 0, n = 0; n < e.length; n++) {
var r = 0 | e.words[n];
t += 977 * r,
e.words[n] = 67108863 & t,
t = 64 * r + (t / 67108864 | 0)
}
return 0 === e.words[e.length - 1] && (e.length--,
0 === e.words[e.length - 1] && e.length--),
e
}
,
r(y, v),
r(A, v),
r(w, v),
w.prototype.imulK = function(e) {
for (var t = 0, n = 0; n < e.length; n++) {
var r = 19 * (0 | e.words[n]) + t
, i = 67108863 & r;
r >>>= 26,
e.words[n] = i,
t=r
}
return 0 !== t && (e.words[e.length++] = t),
e
}
,
i._prime = function(e) {
if (g[e])
return g[e];
var t;
if ("k256" === e)
t = new b;
else if ("p224" === e)
t = new y;
else if ("p192" === e)
t = new A;
else {
if ("p25519" !== e)
throw new Error("Unknown prime " + e);
t = new w
}
return g[e] = t,
t
}
,
_.prototype._verify1 = function(e) {
n(0 === e.negative, "red works only with positives"),
n(e.red, "red works only with red numbers")
}
,
_.prototype._verify2 = function(e, t) {
n(0 == (e.negative | t.negative), "red works only with positives"),
n(e.red && e.red === t.red, "red works only with red numbers")
}
,
_.prototype.imod = function(e) {
return this.prime ? this.prime.ireduce(e)._forceRed(this) :
e.umod(this.m)._forceRed(this)
}
,
_.prototype.neg = function(e) {
return e.isZero() ? e.clone() : this.m.sub(e)._forceRed(this)
}
,
_.prototype.add = function(e, t) {
this._verify2(e, t);
var n = e.add(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n._forceRed(this)
}
,
_.prototype.iadd = function(e, t) {
this._verify2(e, t);
var n = e.iadd(t);
return n.cmp(this.m) >= 0 && n.isub(this.m),
n
}
,
_.prototype.sub = function(e, t) {
this._verify2(e, t);
var n = e.sub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n._forceRed(this)
}
,
_.prototype.isub = function(e, t) {
this._verify2(e, t);
var n = e.isub(t);
return n.cmpn(0) < 0 && n.iadd(this.m),
n
}
,
_.prototype.shl = function(e, t) {
return this._verify1(e),
this.imod(e.ushln(t))
}
,
_.prototype.imul = function(e, t) {
return this._verify2(e, t),
this.imod(e.imul(t))
}
,
_.prototype.mul = function(e, t) {
return this._verify2(e, t),
this.imod(e.mul(t))
}
,
_.prototype.isqr = function(e) {
return this.imul(e, e.clone())
}
,
_.prototype.sqr = function(e) {
return this.mul(e, e)
}
,
_.prototype.sqrt = function(e) {
if (e.isZero())
return e.clone();
var t = this.m.andln(3);
if (n(t % 2 == 1),
3 === t) {
var r = this.m.add(new i(1)).iushrn(2);
return this.pow(e, r)
}
for (var o = this.m.subn(1), a = 0; !o.isZero() && 0 ===
o.andln(1); )
a++,
o.iushrn(1);
n(!o.isZero());
var s = new i(1).toRed(this)
, u = s.redNeg()
, l = this.m.subn(1).iushrn(1)
, c = this.m.bitLength();
for (c = new i(2 * c * c).toRed(this); 0 !== this.pow(c, l).cmp(u); )
c.redIAdd(u);
for (var d = this.pow(c, o), f = this.pow(e, o.addn(1).iushrn(1)), h
= this.pow(e, o), p = a; 0 !== h.cmp(s); ) {
for (var m = h, g = 0; 0 !== m.cmp(s); g++)
m = m.redSqr();
n(g < p);
var v = this.pow(d, new i(1).iushln(p - g - 1));
f = f.redMul(v),
d = v.redSqr(),
h = h.redMul(d),
p=g
}
return f
}
,
_.prototype.invm = function(e) {
var t = e._invmp(this.m);
return 0 !== t.negative ? (t.negative = 0,
this.imod(t).redNeg()) : this.imod(t)
}
,
_.prototype.pow = function(e, t) {
if (t.isZero())
return new i(1).toRed(this);
if (0 === t.cmpn(1))
return e.clone();
var n = new Array(16);
n[0] = new i(1).toRed(this),
n[1] = e;
for (var r = 2; r < n.length; r++)
n[r] = this.mul(n[r - 1], e);
var o = n[0]
,a=0
,s=0
, u = t.bitLength() % 26;
for (0 === u && (u = 26),
r = t.length - 1; r >= 0; r--) {
for (var l = t.words[r], c = u - 1; c >= 0; c--) {
var d = l >> c & 1;
o !== n[0] && (o = this.sqr(o)),
0 !== d || 0 !== a ? (a <<= 1,
a |= d,
(4 === ++s || 0 === r && 0 === c) && (o = this.mul(o,
n[a]),
s = 0,
a = 0)) : s = 0
}
u = 26
}
return o
}
,
_.prototype.convertTo = function(e) {
var t = e.umod(this.m);
return t === e ? t.clone() : t
}
,
_.prototype.convertFrom = function(e) {
var t = e.clone();
return t.red = null,
t
}
,
i.mont = function(e) {
return new E(e)
}
,
r(E, _),
E.prototype.convertTo = function(e) {
return this.imod(e.ushln(this.shift))
}
,
E.prototype.convertFrom = function(e) {
var t = this.imod(e.mul(this.rinv));
return t.red = null,
t
}
,
E.prototype.imul = function(e, t) {
if (e.isZero() || t.isZero())
return e.words[0] = 0,
e.length = 1,
e;
var n = e.imul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, i = n.isub(r).iushrn(this.shift)
, o = i;
return i.cmp(this.m) >= 0 ? o = i.isub(this.m) : i.cmpn(0) < 0 &&
(o = i.iadd(this.m)),
o._forceRed(this)
}
,
E.prototype.mul = function(e, t) {
if (e.isZero() || t.isZero())
return new i(0)._forceRed(this);
var n = e.mul(t)
,r=
n.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m)
, o = n.isub(r).iushrn(this.shift)
, a = o;
return o.cmp(this.m) >= 0 ? a = o.isub(this.m) : o.cmpn(0) < 0
&& (a = o.iadd(this.m)),
a._forceRed(this)
}
,
E.prototype.invm = function(e) {
return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)
}
}(e, r)
}(mg);
var gg = mg.exports
, vg = bg;
function bg(e, t) {
if (!e)
throw new Error(t || "Assertion failed")
}
bg.equal = function(e, t, n) {
if (e != t)
throw new Error(n || "Assertion failed: " + e + " != " + t)
}
;
var yg = {};
!function(e) {
var t = e;
function n(e) {
return 1 === e.length ? "0" + e : e
}
function r(e) {
for (var t = "", r = 0; r < e.length; r++)
t += n(e[r].toString(16));
return t
}
t.toArray = function(e, t) {
if (Array.isArray(e))
return e.slice();
if (!e)
return [];
var n = [];
if ("string" != typeof e) {
for (var r = 0; r < e.length; r++)
n[r] = 0 | e[r];
return n
}
if ("hex" === t)
for ((e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && (e = "0"
+ e),
r = 0; r < e.length; r += 2)
n.push(parseInt(e[r] + e[r + 1], 16));
else
for (r = 0; r < e.length; r++) {
var i = e.charCodeAt(r)
, o = i >> 8
, a = 255 & i;
o ? n.push(o, a) : n.push(a)
}
return n
}
,
t.zero2 = n,
t.toHex = r,
t.encode = function(e, t) {
return "hex" === t ? r(e) : e
}
}(yg),
function(e) {
var t = e
, n = gg
, r = vg
, i = yg;
t.assert = r,
t.toArray = i.toArray,
t.zero2 = i.zero2,
t.toHex = i.toHex,
t.encode = i.encode,
t.getNAF = function(e, t, n) {
var r = new Array(Math.max(e.bitLength(), n) + 1);
r.fill(0);
for (var i = 1 << t + 1, o = e.clone(), a = 0; a < r.length; a++) {
var s, u = o.andln(i - 1);
o.isOdd() ? (s = u > (i >> 1) - 1 ? (i >> 1) - u : u,
o.isubn(s)) : s = 0,
r[a] = s,
o.iushrn(1)
}
return r
}
,
t.getJSF = function(e, t) {
var n = [[], []];
e = e.clone(),
t = t.clone();
for (var r, i = 0, o = 0; e.cmpn(-i) > 0 || t.cmpn(-o) > 0; ) {
var a, s, u = e.andln(3) + i & 3, l = t.andln(3) + o & 3;
3 === u && (u = -1),
3 === l && (l = -1),
a = 0 == (1 & u) ? 0 : 3 !== (r = e.andln(7) + i & 7) && 5 !== r || 2
!== l ? u : -u,
n[0].push(a),
s = 0 == (1 & l) ? 0 : 3 !== (r = t.andln(7) + o & 7) && 5 !== r ||
2 !== u ? l : -l,
n[1].push(s),
2 * i === a + 1 && (i = 1 - i),
2 * o === s + 1 && (o = 1 - o),
e.iushrn(1),
t.iushrn(1)
}
return n
}
,
t.cachedProperty = function(e, t, n) {
var r = "_" + t;
e.prototype[t] = function() {
return void 0 !== this[r] ? this[r] : this[r] = n.call(this)
}
}
,
t.parseBytes = function(e) {
return "string" == typeof e ? t.toArray(e, "hex") : e
}
,
t.intFromLE = function(e) {
return new n(e,"hex","le")
}
}(pg);
var Ag, wg = {
exports: {}
};
function _g(e) {
this.rand = e
}
if (wg.exports = function(e) {
return Ag || (Ag = new _g(null)),
Ag.generate(e)
}
,
wg.exports.Rand = _g,
_g.prototype.generate = function(e) {
return this._rand(e)
}
,
_g.prototype._rand = function(e) {
if (this.rand.getBytes)
return this.rand.getBytes(e);
for (var t = new Uint8Array(e), n = 0; n < t.length; n++)
t[n] = this.rand.getByte();
return t
}
,
"object" == typeof self)
self.crypto && self.crypto.getRandomValues ? _g.prototype._rand =
function(e) {
var t = new Uint8Array(e);
return self.crypto.getRandomValues(t),
t
}
: self.msCrypto && self.msCrypto.getRandomValues ?
_g.prototype._rand = function(e) {
var t = new Uint8Array(e);
return self.msCrypto.getRandomValues(t),
t
}
: "object" == typeof window && (_g.prototype._rand = function() {
throw new Error("Not implemented yet")
}
);
else
try {
var Eg = zm();
if ("function" != typeof Eg.randomBytes)
throw new Error("Not supported");
_g.prototype._rand = function(e) {
return Eg.randomBytes(e)
}
} catch (s) {}
var Sg = wg.exports
, kg = {}
, Mg = gg
, Cg = pg
, xg = Cg.getNAF
, Rg = Cg.getJSF
, Tg = Cg.assert;
function Ig(e, t) {
this.type = e,
this.p = new Mg(t.p,16),
this.red = t.prime ? Mg.red(t.prime) : Mg.mont(this.p),
this.zero = new Mg(0).toRed(this.red),
this.one = new Mg(1).toRed(this.red),
this.two = new Mg(2).toRed(this.red),
this.n = t.n && new Mg(t.n,16),
this.g = t.g && this.pointFromJSON(t.g, t.gRed),
this._wnafT1 = new Array(4),
this._wnafT2 = new Array(4),
this._wnafT3 = new Array(4),
this._wnafT4 = new Array(4),
this._bitLength = this.n ? this.n.bitLength() : 0;
var n = this.n && this.p.div(this.n);
!n || n.cmpn(100) > 0 ? this.redN = null : (this._maxwellTrick = !0,
this.redN = this.n.toRed(this.red))
}
var Pg = Ig;
function Lg(e, t) {
this.curve = e,
this.type = t,
this.precomputed = null
}
Ig.prototype.point = function() {
throw new Error("Not implemented")
}
,
Ig.prototype.validate = function() {
throw new Error("Not implemented")
}
,
Ig.prototype._fixedNafMul = function(e, t) {
Tg(e.precomputed);
var n = e._getDoubles()
, r = xg(t, 1, this._bitLength)
, i = (1 << n.step + 1) - (n.step % 2 == 0 ? 2 : 1);
i /= 3;
var o, a, s = [];
for (o = 0; o < r.length; o += n.step) {
a = 0;
for (var u = o + n.step - 1; u >= o; u--)
a = (a << 1) + r[u];
s.push(a)
}
for (var l = this.jpoint(null, null, null), c = this.jpoint(null, null, null), d = i;
d > 0; d--) {
for (o = 0; o < s.length; o++)
(a = s[o]) === d ? c = c.mixedAdd(n.points[o]) : a === -d && (c =
c.mixedAdd(n.points[o].neg()));
l = l.add(c)
}
return l.toP()
}
,
Ig.prototype._wnafMul = function(e, t) {
var n = 4
, r = e._getNAFPoints(n);
n = r.wnd;
for (var i = r.points, o = xg(t, n, this._bitLength), a = this.jpoint(null, null,
null), s = o.length - 1; s >= 0; s--) {
for (var u = 0; s >= 0 && 0 === o[s]; s--)
u++;
if (s >= 0 && u++,
a = a.dblp(u),
s < 0)
break;
var l = o[s];
Tg(0 !== l),
a = "affine" === e.type ? l > 0 ? a.mixedAdd(i[l - 1 >> 1]) :
a.mixedAdd(i[-l - 1 >> 1].neg()) : l > 0 ? a.add(i[l - 1 >> 1]) : a.add(i[-l - 1 >> 1].neg())
}
return "affine" === e.type ? a.toP() : a
}
,
Ig.prototype._wnafMulAdd = function(e, t, n, r, i) {
var o, a, s, u = this._wnafT1, l = this._wnafT2, c = this._wnafT3, d = 0;
for (o = 0; o < r; o++) {
var f = (s = t[o])._getNAFPoints(e);
u[o] = f.wnd,
l[o] = f.points
}
for (o = r - 1; o >= 1; o -= 2) {
var h = o - 1
, p = o;
if (1 === u[h] && 1 === u[p]) {
var m = [t[h], null, null, t[p]];
0 === t[h].y.cmp(t[p].y) ? (m[1] = t[h].add(t[p]),
m[2] = t[h].toJ().mixedAdd(t[p].neg())) : 0 ===
t[h].y.cmp(t[p].y.redNeg()) ? (m[1] = t[h].toJ().mixedAdd(t[p]),
m[2] = t[h].add(t[p].neg())) : (m[1] = t[h].toJ().mixedAdd(t[p]),
m[2] = t[h].toJ().mixedAdd(t[p].neg()));
var g = [-3, -1, -5, -7, 0, 7, 5, 1, 3]
, v = Rg(n[h], n[p]);
for (d = Math.max(v[0].length, d),
c[h] = new Array(d),
c[p] = new Array(d),
a = 0; a < d; a++) {
var b = 0 | v[0][a]
, y = 0 | v[1][a];
c[h][a] = g[3 * (b + 1) + (y + 1)],
c[p][a] = 0,
l[h] = m
}
} else
c[h] = xg(n[h], u[h], this._bitLength),
c[p] = xg(n[p], u[p], this._bitLength),
d = Math.max(c[h].length, d),
d = Math.max(c[p].length, d)
}
var A = this.jpoint(null, null, null)
, w = this._wnafT4;
for (o = d; o >= 0; o--) {
for (var _ = 0; o >= 0; ) {
var E = !0;
for (a = 0; a < r; a++)
w[a] = 0 | c[a][o],
0 !== w[a] && (E = !1);
if (!E)
break;
_++,
o--
}
if (o >= 0 && _++,
A = A.dblp(_),
o < 0)
break;
for (a = 0; a < r; a++) {
var S = w[a];
0 !== S && (S > 0 ? s = l[a][S - 1 >> 1] : S < 0 && (s = l[a][-S - 1
>> 1].neg()),
A = "affine" === s.type ? A.mixedAdd(s) : A.add(s))
}
}
for (o = 0; o < r; o++)
l[o] = null;
return i ? A : A.toP()
}
,
Ig.BasePoint = Lg,
Lg.prototype.eq = function() {
throw new Error("Not implemented")
}
,
Lg.prototype.validate = function() {
return this.curve.validate(this)
}
,
Ig.prototype.decodePoint = function(e, t) {
e = Cg.toArray(e, t);
var n = this.p.byteLength();
if ((4 === e[0] || 6 === e[0] || 7 === e[0]) && e.length - 1 == 2 * n)
return 6 === e[0] ? Tg(e[e.length - 1] % 2 == 0) : 7 === e[0] &&
Tg(e[e.length - 1] % 2 == 1),
this.point(e.slice(1, 1 + n), e.slice(1 + n, 1 + 2 * n));
if ((2 === e[0] || 3 === e[0]) && e.length - 1 === n)
return this.pointFromX(e.slice(1, 1 + n), 3 === e[0]);
throw new Error("Unknown point format")
}
,
Lg.prototype.encodeCompressed = function(e) {
return this.encode(e, !0)
}
,
Lg.prototype._encode = function(e) {
var t = this.curve.p.byteLength()
, n = this.getX().toArray("be", t);
return e ? [this.getY().isEven() ? 2 : 3].concat(n) : [4].concat(n,
this.getY().toArray("be", t))
}
,
Lg.prototype.encode = function(e, t) {
return Cg.encode(this._encode(t), e)
}
,
Lg.prototype.precompute = function(e) {
if (this.precomputed)
return this;
var t = {
doubles: null,
naf: null,
beta: null
};
return t.naf = this._getNAFPoints(8),
t.doubles = this._getDoubles(4, e),
t.beta = this._getBeta(),
this.precomputed = t,
this
}
,
Lg.prototype._hasDoubles = function(e) {
if (!this.precomputed)
return !1;
var t = this.precomputed.doubles;
return !!t && t.points.length >= Math.ceil((e.bitLength() + 1) / t.step)
}
,
Lg.prototype._getDoubles = function(e, t) {
if (this.precomputed && this.precomputed.doubles)
return this.precomputed.doubles;
for (var n = [this], r = this, i = 0; i < t; i += e) {
for (var o = 0; o < e; o++)
r = r.dbl();
n.push(r)
}
return {
step: e,
points: n
}
}
,
Lg.prototype._getNAFPoints = function(e) {
if (this.precomputed && this.precomputed.naf)
return this.precomputed.naf;
for (var t = [this], n = (1 << e) - 1, r = 1 === n ? null : this.dbl(), i = 1; i <
n; i++)
t[i] = t[i - 1].add(r);
return {
wnd: e,
points: t
}
}
,
Lg.prototype._getBeta = function() {
return null
}
,
Lg.prototype.dblp = function(e) {
for (var t = this, n = 0; n < e; n++)
t = t.dbl();
return t
}
;
var Og = {
exports: {}
};
"function" == typeof Object.create ? Og.exports = function(e, t) {
t && (e.super_ = t,
e.prototype = Object.create(t.prototype, {
constructor: {
value: e,
enumerable: !1,
writable: !0,
configurable: !0
}
}))
}
: Og.exports = function(e, t) {
if (t) {
e.super_ = t;
var n = function() {};
n.prototype = t.prototype,
e.prototype = new n,
e.prototype.constructor = e
}
}
;
var Ng = Og.exports
, Dg = gg
, Bg = Ng
, jg = Pg
, zg = pg.assert;
function Fg(e) {
jg.call(this, "short", e),
this.a = new Dg(e.a,16).toRed(this.red),
this.b = new Dg(e.b,16).toRed(this.red),
this.tinv = this.two.redInvm(),
this.zeroA = 0 === this.a.fromRed().cmpn(0),
this.threeA = 0 === this.a.fromRed().sub(this.p).cmpn(-3),
this.endo = this._getEndomorphism(e),
this._endoWnafT1 = new Array(4),
this._endoWnafT2 = new Array(4)
}
Bg(Fg, jg);
var Ug = Fg;
function Kg(e, t, n, r) {
jg.BasePoint.call(this, e, "affine"),
null === t && null === n ? (this.x = null,
this.y = null,
this.inf = !0) : (this.x = new Dg(t,16),
this.y = new Dg(n,16),
r && (this.x.forceRed(this.curve.red),
this.y.forceRed(this.curve.red)),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.y.red || (this.y = this.y.toRed(this.curve.red)),
this.inf = !1)
}
function qg(e, t, n, r) {
jg.BasePoint.call(this, e, "jacobian"),
null === t && null === n && null === r ? (this.x = this.curve.one,
this.y = this.curve.one,
this.z = new Dg(0)) : (this.x = new Dg(t,16),
this.y = new Dg(n,16),
this.z = new Dg(r,16)),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.y.red || (this.y = this.y.toRed(this.curve.red)),
this.z.red || (this.z = this.z.toRed(this.curve.red)),
this.zOne = this.z === this.curve.one
}
Fg.prototype._getEndomorphism = function(e) {
if (this.zeroA && this.g && this.n && 1 === this.p.modn(3)) {
var t, n;
if (e.beta)
t = new Dg(e.beta,16).toRed(this.red);
else {
var r = this._getEndoRoots(this.p);
t = (t = r[0].cmp(r[1]) < 0 ? r[0] : r[1]).toRed(this.red)
}
if (e.lambda)
n = new Dg(e.lambda,16);
else {
var i = this._getEndoRoots(this.n);
0 === this.g.mul(i[0]).x.cmp(this.g.x.redMul(t)) ? n = i[0] : (n =
i[1],
zg(0 === this.g.mul(n).x.cmp(this.g.x.redMul(t))))
}
return {
beta: t,
lambda: n,
basis: e.basis ? e.basis.map((function(e) {
return {
a: new Dg(e.a,16),
b: new Dg(e.b,16)
}
}
)) : this._getEndoBasis(n)
}
}
}
,
Fg.prototype._getEndoRoots = function(e) {
var t = e === this.p ? this.red : Dg.mont(e)
, n = new Dg(2).toRed(t).redInvm()
, r = n.redNeg()
, i = new Dg(3).toRed(t).redNeg().redSqrt().redMul(n);
return [r.redAdd(i).fromRed(), r.redSub(i).fromRed()]
}
,
Fg.prototype._getEndoBasis = function(e) {
for (var t, n, r, i, o, a, s, u, l, c =
this.n.ushrn(Math.floor(this.n.bitLength() / 2)), d = e, f = this.n.clone(), h = new Dg(1), p
= new Dg(0), m = new Dg(0), g = new Dg(1), v = 0; 0 !== d.cmpn(0); ) {
var b = f.div(d);
u = f.sub(b.mul(d)),
l = m.sub(b.mul(h));
var y = g.sub(b.mul(p));
if (!r && u.cmp(c) < 0)
t = s.neg(),
n = h,
r = u.neg(),
i = l;
else if (r && 2 == ++v)
break;
s = u,
f = d,
d = u,
m = h,
h = l,
g = p,
p=y
}
o = u.neg(),
a = l;
var A = r.sqr().add(i.sqr());
return o.sqr().add(a.sqr()).cmp(A) >= 0 && (o = t,
a = n),
r.negative && (r = r.neg(),
i = i.neg()),
o.negative && (o = o.neg(),
a = a.neg()),
[{
a: r,
b: i
}, {
a: o,
b: a
}]
}
,
Fg.prototype._endoSplit = function(e) {
var t = this.endo.basis
, n = t[0]
, r = t[1]
, i = r.b.mul(e).divRound(this.n)
, o = n.b.neg().mul(e).divRound(this.n)
, a = i.mul(n.a)
, s = o.mul(r.a)
, u = i.mul(n.b)
, l = o.mul(r.b);
return {
k1: e.sub(a).sub(s),
k2: u.add(l).neg()
}
}
,
Fg.prototype.pointFromX = function(e, t) {
(e = new Dg(e,16)).red || (e = e.toRed(this.red));
var n = e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b)
, r = n.redSqrt();
if (0 !== r.redSqr().redSub(n).cmp(this.zero))
throw new Error("invalid point");
var i = r.fromRed().isOdd();
return (t && !i || !t && i) && (r = r.redNeg()),
this.point(e, r)
}
,
Fg.prototype.validate = function(e) {
if (e.inf)
return !0;
var t = e.x
, n = e.y
, r = this.a.redMul(t)
, i = t.redSqr().redMul(t).redIAdd(r).redIAdd(this.b);
return 0 === n.redSqr().redISub(i).cmpn(0)
}
,
Fg.prototype._endoWnafMulAdd = function(e, t, n) {
for (var r = this._endoWnafT1, i = this._endoWnafT2, o = 0; o <
e.length; o++) {
var a = this._endoSplit(t[o])
, s = e[o]
, u = s._getBeta();
a.k1.negative && (a.k1.ineg(),
s = s.neg(!0)),
a.k2.negative && (a.k2.ineg(),
u = u.neg(!0)),
r[2 * o] = s,
r[2 * o + 1] = u,
i[2 * o] = a.k1,
i[2 * o + 1] = a.k2
}
for (var l = this._wnafMulAdd(1, r, i, 2 * o, n), c = 0; c < 2 * o; c++)
r[c] = null,
i[c] = null;
return l
}
,
Bg(Kg, jg.BasePoint),
Fg.prototype.point = function(e, t, n) {
return new Kg(this,e,t,n)
}
,
Fg.prototype.pointFromJSON = function(e, t) {
return Kg.fromJSON(this, e, t)
}
,
Kg.prototype._getBeta = function() {
if (this.curve.endo) {
var e = this.precomputed;
if (e && e.beta)
return e.beta;
var t = this.curve.point(this.x.redMul(this.curve.endo.beta), this.y);
if (e) {
var n = this.curve
, r = function(e) {
return n.point(e.x.redMul(n.endo.beta), e.y)
};
e.beta = t,
t.precomputed = {
beta: null,
naf: e.naf && {
wnd: e.naf.wnd,
points: e.naf.points.map(r)
},
doubles: e.doubles && {
step: e.doubles.step,
points: e.doubles.points.map(r)
}
}
}
return t
}
}
,
Kg.prototype.toJSON = function() {
return this.precomputed ? [this.x, this.y, this.precomputed && {
doubles: this.precomputed.doubles && {
step: this.precomputed.doubles.step,
points: this.precomputed.doubles.points.slice(1)
},
naf: this.precomputed.naf && {
wnd: this.precomputed.naf.wnd,
points: this.precomputed.naf.points.slice(1)
}
}] : [this.x, this.y]
}
,
Kg.fromJSON = function(e, t, n) {
"string" == typeof t && (t = JSON.parse(t));
var r = e.point(t[0], t[1], n);
if (!t[2])
return r;
function i(t) {
return e.point(t[0], t[1], n)
}
var o = t[2];
return r.precomputed = {
beta: null,
doubles: o.doubles && {
step: o.doubles.step,
points: [r].concat(o.doubles.points.map(i))
},
naf: o.naf && {
wnd: o.naf.wnd,
points: [r].concat(o.naf.points.map(i))
}
},
r
}
,
Kg.prototype.inspect = function() {
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " +
this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + ">"
}
,
Kg.prototype.isInfinity = function() {
return this.inf
}
,
Kg.prototype.add = function(e) {
if (this.inf)
return e;
if (e.inf)
return this;
if (this.eq(e))
return this.dbl();
if (this.neg().eq(e))
return this.curve.point(null, null);
if (0 === this.x.cmp(e.x))
return this.curve.point(null, null);
var t = this.y.redSub(e.y);
0 !== t.cmpn(0) && (t = t.redMul(this.x.redSub(e.x).redInvm()));
var n = t.redSqr().redISub(this.x).redISub(e.x)
, r = t.redMul(this.x.redSub(n)).redISub(this.y);
return this.curve.point(n, r)
}
,
Kg.prototype.dbl = function() {
if (this.inf)
return this;
var e = this.y.redAdd(this.y);
if (0 === e.cmpn(0))
return this.curve.point(null, null);
var t = this.curve.a
, n = this.x.redSqr()
, r = e.redInvm()
, i = n.redAdd(n).redIAdd(n).redIAdd(t).redMul(r)
, o = i.redSqr().redISub(this.x.redAdd(this.x))
, a = i.redMul(this.x.redSub(o)).redISub(this.y);
return this.curve.point(o, a)
}
,
Kg.prototype.getX = function() {
return this.x.fromRed()
}
,
Kg.prototype.getY = function() {
return this.y.fromRed()
}
,
Kg.prototype.mul = function(e) {
return e = new Dg(e,16),
this.isInfinity() ? this : this._hasDoubles(e) ?
this.curve._fixedNafMul(this, e) : this.curve.endo ? this.curve._endoWnafMulAdd([this],
[e]) : this.curve._wnafMul(this, e)
}
,
Kg.prototype.mulAdd = function(e, t, n) {
var r = [this, t]
, i = [e, n];
return this.curve.endo ? this.curve._endoWnafMulAdd(r, i) :
this.curve._wnafMulAdd(1, r, i, 2)
}
,
Kg.prototype.jmulAdd = function(e, t, n) {
var r = [this, t]
, i = [e, n];
return this.curve.endo ? this.curve._endoWnafMulAdd(r, i, !0) :
this.curve._wnafMulAdd(1, r, i, 2, !0)
}
,
Kg.prototype.eq = function(e) {
return this === e || this.inf === e.inf && (this.inf || 0 === this.x.cmp(e.x)
&& 0 === this.y.cmp(e.y))
}
,
Kg.prototype.neg = function(e) {
if (this.inf)
return this;
var t = this.curve.point(this.x, this.y.redNeg());
if (e && this.precomputed) {
var n = this.precomputed
, r = function(e) {
return e.neg()
};
t.precomputed = {
naf: n.naf && {
wnd: n.naf.wnd,
points: n.naf.points.map(r)
},
doubles: n.doubles && {
step: n.doubles.step,
points: n.doubles.points.map(r)
}
}
}
return t
}
,
Kg.prototype.toJ = function() {
return this.inf ? this.curve.jpoint(null, null, null) : this.curve.jpoint(this.x,
this.y, this.curve.one)
}
,
Bg(qg, jg.BasePoint),
Fg.prototype.jpoint = function(e, t, n) {
return new qg(this,e,t,n)
}
,
qg.prototype.toP = function() {
if (this.isInfinity())
return this.curve.point(null, null);
var e = this.z.redInvm()
, t = e.redSqr()
, n = this.x.redMul(t)
, r = this.y.redMul(t).redMul(e);
return this.curve.point(n, r)
}
,
qg.prototype.neg = function() {
return this.curve.jpoint(this.x, this.y.redNeg(), this.z)
}
,
qg.prototype.add = function(e) {
if (this.isInfinity())
return e;
if (e.isInfinity())
return this;
var t = e.z.redSqr()
, n = this.z.redSqr()
, r = this.x.redMul(t)
, i = e.x.redMul(n)
, o = this.y.redMul(t.redMul(e.z))
, a = e.y.redMul(n.redMul(this.z))
, s = r.redSub(i)
, u = o.redSub(a);
if (0 === s.cmpn(0))
return 0 !== u.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl();
var l = s.redSqr()
, c = l.redMul(s)
, d = r.redMul(l)
, f = u.redSqr().redIAdd(c).redISub(d).redISub(d)
, h = u.redMul(d.redISub(f)).redISub(o.redMul(c))
, p = this.z.redMul(e.z).redMul(s);
return this.curve.jpoint(f, h, p)
}
,
qg.prototype.mixedAdd = function(e) {
if (this.isInfinity())
return e.toJ();
if (e.isInfinity())
return this;
var t = this.z.redSqr()
, n = this.x
, r = e.x.redMul(t)
, i = this.y
, o = e.y.redMul(t).redMul(this.z)
, a = n.redSub(r)
, s = i.redSub(o);
if (0 === a.cmpn(0))
return 0 !== s.cmpn(0) ? this.curve.jpoint(null, null, null) : this.dbl();
var u = a.redSqr()
, l = u.redMul(a)
, c = n.redMul(u)
, d = s.redSqr().redIAdd(l).redISub(c).redISub(c)
, f = s.redMul(c.redISub(d)).redISub(i.redMul(l))
, h = this.z.redMul(a);
return this.curve.jpoint(d, f, h)
}
,
qg.prototype.dblp = function(e) {
if (0 === e)
return this;
if (this.isInfinity())
return this;
if (!e)
return this.dbl();
var t;
if (this.curve.zeroA || this.curve.threeA) {
var n = this;
for (t = 0; t < e; t++)
n = n.dbl();
return n
}
var r = this.curve.a
, i = this.curve.tinv
, o = this.x
, a = this.y
, s = this.z
, u = s.redSqr().redSqr()
, l = a.redAdd(a);
for (t = 0; t < e; t++) {
var c = o.redSqr()
, d = l.redSqr()
, f = d.redSqr()
, h = c.redAdd(c).redIAdd(c).redIAdd(r.redMul(u))
, p = o.redMul(d)
, m = h.redSqr().redISub(p.redAdd(p))
, g = p.redISub(m)
, v = h.redMul(g);
v = v.redIAdd(v).redISub(f);
var b = l.redMul(s);
t + 1 < e && (u = u.redMul(f)),
o = m,
s = b,
l=v
}
return this.curve.jpoint(o, l.redMul(i), s)
}
,
qg.prototype.dbl = function() {
return this.isInfinity() ? this : this.curve.zeroA ? this._zeroDbl() :
this.curve.threeA ? this._threeDbl() : this._dbl()
}
,
qg.prototype._zeroDbl = function() {
var e, t, n;
if (this.zOne) {
var r = this.x.redSqr()
, i = this.y.redSqr()
, o = i.redSqr()
, a = this.x.redAdd(i).redSqr().redISub(r).redISub(o);
a = a.redIAdd(a);
var s = r.redAdd(r).redIAdd(r)
, u = s.redSqr().redISub(a).redISub(a)
, l = o.redIAdd(o);
l = (l = l.redIAdd(l)).redIAdd(l),
e = u,
t = s.redMul(a.redISub(u)).redISub(l),
n = this.y.redAdd(this.y)
} else {
var c = this.x.redSqr()
, d = this.y.redSqr()
, f = d.redSqr()
, h = this.x.redAdd(d).redSqr().redISub(c).redISub(f);
h = h.redIAdd(h);
var p = c.redAdd(c).redIAdd(c)
, m = p.redSqr()
, g = f.redIAdd(f);
g = (g = g.redIAdd(g)).redIAdd(g),
e = m.redISub(h).redISub(h),
t = p.redMul(h.redISub(e)).redISub(g),
n = (n = this.y.redMul(this.z)).redIAdd(n)
}
return this.curve.jpoint(e, t, n)
}
,
qg.prototype._threeDbl = function() {
var e, t, n;
if (this.zOne) {
var r = this.x.redSqr()
, i = this.y.redSqr()
, o = i.redSqr()
, a = this.x.redAdd(i).redSqr().redISub(r).redISub(o);
a = a.redIAdd(a);
var s = r.redAdd(r).redIAdd(r).redIAdd(this.curve.a)
, u = s.redSqr().redISub(a).redISub(a);
e = u;
var l = o.redIAdd(o);
l = (l = l.redIAdd(l)).redIAdd(l),
t = s.redMul(a.redISub(u)).redISub(l),
n = this.y.redAdd(this.y)
} else {
var c = this.z.redSqr()
, d = this.y.redSqr()
, f = this.x.redMul(d)
, h = this.x.redSub(c).redMul(this.x.redAdd(c));
h = h.redAdd(h).redIAdd(h);
var p = f.redIAdd(f)
, m = (p = p.redIAdd(p)).redAdd(p);
e = h.redSqr().redISub(m),
n = this.y.redAdd(this.z).redSqr().redISub(d).redISub(c);
var g = d.redSqr();
g = (g = (g = g.redIAdd(g)).redIAdd(g)).redIAdd(g),
t = h.redMul(p.redISub(e)).redISub(g)
}
return this.curve.jpoint(e, t, n)
}
,
qg.prototype._dbl = function() {
var e = this.curve.a
, t = this.x
, n = this.y
, r = this.z
, i = r.redSqr().redSqr()
, o = t.redSqr()
, a = n.redSqr()
, s = o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i))
, u = t.redAdd(t)
, l = (u = u.redIAdd(u)).redMul(a)
, c = s.redSqr().redISub(l.redAdd(l))
, d = l.redISub(c)
, f = a.redSqr();
f = (f = (f = f.redIAdd(f)).redIAdd(f)).redIAdd(f);
var h = s.redMul(d).redISub(f)
, p = n.redAdd(n).redMul(r);
return this.curve.jpoint(c, h, p)
}
,
qg.prototype.trpl = function() {
if (!this.curve.zeroA)
return this.dbl().add(this);
var e = this.x.redSqr()
, t = this.y.redSqr()
, n = this.z.redSqr()
, r = t.redSqr()
, i = e.redAdd(e).redIAdd(e)
, o = i.redSqr()
, a = this.x.redAdd(t).redSqr().redISub(e).redISub(r)
, s = (a = (a = (a =
a.redIAdd(a)).redAdd(a).redIAdd(a)).redISub(o)).redSqr()
, u = r.redIAdd(r);
u = (u = (u = u.redIAdd(u)).redIAdd(u)).redIAdd(u);
var l = i.redIAdd(a).redSqr().redISub(o).redISub(s).redISub(u)
, c = t.redMul(l);
c = (c = c.redIAdd(c)).redIAdd(c);
var d = this.x.redMul(s).redISub(c);
d = (d = d.redIAdd(d)).redIAdd(d);
var f = this.y.redMul(l.redMul(u.redISub(l)).redISub(a.redMul(s)));
f = (f = (f = f.redIAdd(f)).redIAdd(f)).redIAdd(f);
var h = this.z.redAdd(a).redSqr().redISub(n).redISub(s);
return this.curve.jpoint(d, f, h)
}
,
qg.prototype.mul = function(e, t) {
return e = new Dg(e,t),
this.curve._wnafMul(this, e)
}
,
qg.prototype.eq = function(e) {
if ("affine" === e.type)
return this.eq(e.toJ());
if (this === e)
return !0;
var t = this.z.redSqr()
, n = e.z.redSqr();
if (0 !== this.x.redMul(n).redISub(e.x.redMul(t)).cmpn(0))
return !1;
var r = t.redMul(this.z)
, i = n.redMul(e.z);
return 0 === this.y.redMul(i).redISub(e.y.redMul(r)).cmpn(0)
}
,
qg.prototype.eqXToP = function(e) {
var t = this.z.redSqr()
, n = e.toRed(this.curve.red).redMul(t);
if (0 === this.x.cmp(n))
return !0;
for (var r = e.clone(), i = this.curve.redN.redMul(t); ; ) {
if (r.iadd(this.curve.n),
r.cmp(this.curve.p) >= 0)
return !1;
if (n.redIAdd(i),
0 === this.x.cmp(n))
return !0
}
}
,
qg.prototype.inspect = function() {
return this.isInfinity() ? "<EC JPoint Infinity>" : "<EC JPoint x: " +
this.x.toString(16, 2) + " y: " + this.y.toString(16, 2) + " z: " + this.z.toString(16, 2) + ">"
}
,
qg.prototype.isInfinity = function() {
return 0 === this.z.cmpn(0)
}
;
var Hg = gg
, Vg = Ng
, Wg = Pg
, $g = pg;
function Yg(e) {
Wg.call(this, "mont", e),
this.a = new Hg(e.a,16).toRed(this.red),
this.b = new Hg(e.b,16).toRed(this.red),
this.i4 = new Hg(4).toRed(this.red).redInvm(),
this.two = new Hg(2).toRed(this.red),
this.a24 = this.i4.redMul(this.a.redAdd(this.two))
}
Vg(Yg, Wg);
var Qg = Yg;
function Zg(e, t, n) {
Wg.BasePoint.call(this, e, "projective"),
null === t && null === n ? (this.x = this.curve.one,
this.z = this.curve.zero) : (this.x = new Hg(t,16),
this.z = new Hg(n,16),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.z.red || (this.z = this.z.toRed(this.curve.red)))
}
Yg.prototype.validate = function(e) {
var t = e.normalize().x
, n = t.redSqr()
, r = n.redMul(t).redAdd(n.redMul(this.a)).redAdd(t);
return 0 === r.redSqrt().redSqr().cmp(r)
}
,
Vg(Zg, Wg.BasePoint),
Yg.prototype.decodePoint = function(e, t) {
return this.point($g.toArray(e, t), 1)
}
,
Yg.prototype.point = function(e, t) {
return new Zg(this,e,t)
}
,
Yg.prototype.pointFromJSON = function(e) {
return Zg.fromJSON(this, e)
}
,
Zg.prototype.precompute = function() {}
,
Zg.prototype._encode = function() {
return this.getX().toArray("be", this.curve.p.byteLength())
}
,
Zg.fromJSON = function(e, t) {
return new Zg(e,t[0],t[1] || e.one)
}
,
Zg.prototype.inspect = function() {
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " +
this.x.fromRed().toString(16, 2) + " z: " + this.z.fromRed().toString(16, 2) + ">"
}
,
Zg.prototype.isInfinity = function() {
return 0 === this.z.cmpn(0)
}
,
Zg.prototype.dbl = function() {
var e = this.x.redAdd(this.z).redSqr()
, t = this.x.redSub(this.z).redSqr()
, n = e.redSub(t)
, r = e.redMul(t)
, i = n.redMul(t.redAdd(this.curve.a24.redMul(n)));
return this.curve.point(r, i)
}
,
Zg.prototype.add = function() {
throw new Error("Not supported on Montgomery curve")
}
,
Zg.prototype.diffAdd = function(e, t) {
var n = this.x.redAdd(this.z)
, r = this.x.redSub(this.z)
, i = e.x.redAdd(e.z)
, o = e.x.redSub(e.z).redMul(n)
, a = i.redMul(r)
, s = t.z.redMul(o.redAdd(a).redSqr())
, u = t.x.redMul(o.redISub(a).redSqr());
return this.curve.point(s, u)
}
,
Zg.prototype.mul = function(e) {
for (var t = e.clone(), n = this, r = this.curve.point(null, null), i = []; 0 !==
t.cmpn(0); t.iushrn(1))
i.push(t.andln(1));
for (var o = i.length - 1; o >= 0; o--)
0 === i[o] ? (n = n.diffAdd(r, this),
r = r.dbl()) : (r = n.diffAdd(r, this),
n = n.dbl());
return r
}
,
Zg.prototype.mulAdd = function() {
throw new Error("Not supported on Montgomery curve")
}
,
Zg.prototype.jumlAdd = function() {
throw new Error("Not supported on Montgomery curve")
}
,
Zg.prototype.eq = function(e) {
return 0 === this.getX().cmp(e.getX())
}
,
Zg.prototype.normalize = function() {
return this.x = this.x.redMul(this.z.redInvm()),
this.z = this.curve.one,
this
}
,
Zg.prototype.getX = function() {
return this.normalize(),
this.x.fromRed()
}
;
var Gg = gg
, Xg = Ng
, Jg = Pg
, ev = pg.assert;
function tv(e) {
this.twisted = 1 != (0 | e.a),
this.mOneA = this.twisted && -1 == (0 | e.a),
this.extended = this.mOneA,
Jg.call(this, "edwards", e),
this.a = new Gg(e.a,16).umod(this.red.m),
this.a = this.a.toRed(this.red),
this.c = new Gg(e.c,16).toRed(this.red),
this.c2 = this.c.redSqr(),
this.d = new Gg(e.d,16).toRed(this.red),
this.dd = this.d.redAdd(this.d),
ev(!this.twisted || 0 === this.c.fromRed().cmpn(1)),
this.oneC = 1 == (0 | e.c)
}
Xg(tv, Jg);
var nv = tv;
function rv(e, t, n, r, i) {
Jg.BasePoint.call(this, e, "projective"),
null === t && null === n && null === r ? (this.x = this.curve.zero,
this.y = this.curve.one,
this.z = this.curve.one,
this.t = this.curve.zero,
this.zOne = !0) : (this.x = new Gg(t,16),
this.y = new Gg(n,16),
this.z = r ? new Gg(r,16) : this.curve.one,
this.t = i && new Gg(i,16),
this.x.red || (this.x = this.x.toRed(this.curve.red)),
this.y.red || (this.y = this.y.toRed(this.curve.red)),
this.z.red || (this.z = this.z.toRed(this.curve.red)),
this.t && !this.t.red && (this.t = this.t.toRed(this.curve.red)),
this.zOne = this.z === this.curve.one,
this.curve.extended && !this.t && (this.t = this.x.redMul(this.y),
this.zOne || (this.t = this.t.redMul(this.z.redInvm()))))
}
tv.prototype._mulA = function(e) {
return this.mOneA ? e.redNeg() : this.a.redMul(e)
}
,
tv.prototype._mulC = function(e) {
return this.oneC ? e : this.c.redMul(e)
}
,
tv.prototype.jpoint = function(e, t, n, r) {
return this.point(e, t, n, r)
}
,
tv.prototype.pointFromX = function(e, t) {
(e = new Gg(e,16)).red || (e = e.toRed(this.red));
var n = e.redSqr()
, r = this.c2.redSub(this.a.redMul(n))
, i = this.one.redSub(this.c2.redMul(this.d).redMul(n))
, o = r.redMul(i.redInvm())
, a = o.redSqrt();
if (0 !== a.redSqr().redSub(o).cmp(this.zero))
throw new Error("invalid point");
var s = a.fromRed().isOdd();
return (t && !s || !t && s) && (a = a.redNeg()),
this.point(e, a)
}
,
tv.prototype.pointFromY = function(e, t) {
(e = new Gg(e,16)).red || (e = e.toRed(this.red));
var n = e.redSqr()
, r = n.redSub(this.c2)
, i = n.redMul(this.d).redMul(this.c2).redSub(this.a)
, o = r.redMul(i.redInvm());
if (0 === o.cmp(this.zero)) {
if (t)
throw new Error("invalid point");
return this.point(this.zero, e)
}
var a = o.redSqrt();
if (0 !== a.redSqr().redSub(o).cmp(this.zero))
throw new Error("invalid point");
return a.fromRed().isOdd() !== t && (a = a.redNeg()),
this.point(a, e)
}
,
tv.prototype.validate = function(e) {
if (e.isInfinity())
return !0;
e.normalize();
var t = e.x.redSqr()
, n = e.y.redSqr()
, r = t.redMul(this.a).redAdd(n)
, i = this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(n)));
return 0 === r.cmp(i)
}
,
Xg(rv, Jg.BasePoint),
tv.prototype.pointFromJSON = function(e) {
return rv.fromJSON(this, e)
}
,
tv.prototype.point = function(e, t, n, r) {
return new rv(this,e,t,n,r)
}
,
rv.fromJSON = function(e, t) {
return new rv(e,t[0],t[1],t[2])
}
,
rv.prototype.inspect = function() {
return this.isInfinity() ? "<EC Point Infinity>" : "<EC Point x: " +
this.x.fromRed().toString(16, 2) + " y: " + this.y.fromRed().toString(16, 2) + " z: " +
this.z.fromRed().toString(16, 2) + ">"
}
,
rv.prototype.isInfinity = function() {
return 0 === this.x.cmpn(0) && (0 === this.y.cmp(this.z) || this.zOne &&
0 === this.y.cmp(this.curve.c))
}
,
rv.prototype._extDbl = function() {
var e = this.x.redSqr()
, t = this.y.redSqr()
, n = this.z.redSqr();
n = n.redIAdd(n);
var r = this.curve._mulA(e)
, i = this.x.redAdd(this.y).redSqr().redISub(e).redISub(t)
, o = r.redAdd(t)
, a = o.redSub(n)
, s = r.redSub(t)
, u = i.redMul(a)
, l = o.redMul(s)
, c = i.redMul(s)
, d = a.redMul(o);
return this.curve.point(u, l, d, c)
}
,
rv.prototype._projDbl = function() {
var e, t, n, r, i, o, a = this.x.redAdd(this.y).redSqr(), s = this.x.redSqr(), u
= this.y.redSqr();
if (this.curve.twisted) {
var l = (r = this.curve._mulA(s)).redAdd(u);
this.zOne ? (e =
a.redSub(s).redSub(u).redMul(l.redSub(this.curve.two)),
t = l.redMul(r.redSub(u)),
n = l.redSqr().redSub(l).redSub(l)) : (i = this.z.redSqr(),
o = l.redSub(i).redISub(i),
e = a.redSub(s).redISub(u).redMul(o),
t = l.redMul(r.redSub(u)),
n = l.redMul(o))
} else
r = s.redAdd(u),
i = this.curve._mulC(this.z).redSqr(),
o = r.redSub(i).redSub(i),
e = this.curve._mulC(a.redISub(r)).redMul(o),
t = this.curve._mulC(r).redMul(s.redISub(u)),
n = r.redMul(o);
return this.curve.point(e, t, n)
}
,
rv.prototype.dbl = function() {
return this.isInfinity() ? this : this.curve.extended ? this._extDbl() :
this._projDbl()
}
,
rv.prototype._extAdd = function(e) {
var t = this.y.redSub(this.x).redMul(e.y.redSub(e.x))
, n = this.y.redAdd(this.x).redMul(e.y.redAdd(e.x))
, r = this.t.redMul(this.curve.dd).redMul(e.t)
, i = this.z.redMul(e.z.redAdd(e.z))
, o = n.redSub(t)
, a = i.redSub(r)
, s = i.redAdd(r)
, u = n.redAdd(t)
, l = o.redMul(a)
, c = s.redMul(u)
, d = o.redMul(u)
, f = a.redMul(s);
return this.curve.point(l, c, f, d)
}
,
rv.prototype._projAdd = function(e) {
var t, n, r = this.z.redMul(e.z), i = r.redSqr(), o = this.x.redMul(e.x), a =
this.y.redMul(e.y), s = this.curve.d.redMul(o).redMul(a), u = i.redSub(s), l = i.redAdd(s),
c = this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(a), d =
r.redMul(u).redMul(c);
return this.curve.twisted ? (t =
r.redMul(l).redMul(a.redSub(this.curve._mulA(o))),
n = u.redMul(l)) : (t = r.redMul(l).redMul(a.redSub(o)),
n = this.curve._mulC(u).redMul(l)),
this.curve.point(d, t, n)
}
,
rv.prototype.add = function(e) {
return this.isInfinity() ? e : e.isInfinity() ? this : this.curve.extended ?
this._extAdd(e) : this._projAdd(e)
}
,
rv.prototype.mul = function(e) {
return this._hasDoubles(e) ? this.curve._fixedNafMul(this, e) :
this.curve._wnafMul(this, e)
}
,
rv.prototype.mulAdd = function(e, t, n) {
return this.curve._wnafMulAdd(1, [this, t], [e, n], 2, !1)
}
,
rv.prototype.jmulAdd = function(e, t, n) {
return this.curve._wnafMulAdd(1, [this, t], [e, n], 2, !0)
}
,
rv.prototype.normalize = function() {
if (this.zOne)
return this;
var e = this.z.redInvm();
return this.x = this.x.redMul(e),
this.y = this.y.redMul(e),
this.t && (this.t = this.t.redMul(e)),
this.z = this.curve.one,
this.zOne = !0,
this
}
,
rv.prototype.neg = function() {
return this.curve.point(this.x.redNeg(), this.y, this.z, this.t &&
this.t.redNeg())
}
,
rv.prototype.getX = function() {
return this.normalize(),
this.x.fromRed()
}
,
rv.prototype.getY = function() {
return this.normalize(),
this.y.fromRed()
}
,
rv.prototype.eq = function(e) {
return this === e || 0 === this.getX().cmp(e.getX()) && 0 ===
this.getY().cmp(e.getY())
}
,
rv.prototype.eqXToP = function(e) {
var t = e.toRed(this.curve.red).redMul(this.z);
if (0 === this.x.cmp(t))
return !0;
for (var n = e.clone(), r = this.curve.redN.redMul(this.z); ; ) {
if (n.iadd(this.curve.n),
n.cmp(this.curve.p) >= 0)
return !1;
if (t.redIAdd(r),
0 === this.x.cmp(t))
return !0
}
}
,
rv.prototype.toP = rv.prototype.normalize,
rv.prototype.mixedAdd = rv.prototype.add,
function(e) {
var t = e;
t.base = Pg,
t.short = Ug,
t.mont = Qg,
t.edwards = nv
}(kg);
var iv = {}
, ov = {}
, av = {}
, sv = vg
, uv = Ng;
function lv(e, t) {
return 55296 == (64512 & e.charCodeAt(t)) && !(t < 0 || t + 1 >=
e.length) && 56320 == (64512 & e.charCodeAt(t + 1))
}
function cv(e) {
return (e >>> 24 | e >>> 8 & 65280 | e << 8 & 16711680 | (255 & e) <<
24) >>> 0
}
function dv(e) {
return 1 === e.length ? "0" + e : e
}
function fv(e) {
return 7 === e.length ? "0" + e : 6 === e.length ? "00" + e : 5 ===
e.length ? "000" + e : 4 === e.length ? "0000" + e : 3 === e.length ? "00000" + e : 2 ===
e.length ? "000000" + e : 1 === e.length ? "0000000" + e : e
}
av.inherits = uv,
av.toArray = function(e, t) {
if (Array.isArray(e))
return e.slice();
if (!e)
return [];
var n = [];
if ("string" == typeof e)
if (t) {
if ("hex" === t)
for ((e = e.replace(/[^a-z0-9]+/gi, "")).length % 2 != 0 && (e
= "0" + e),
i = 0; i < e.length; i += 2)
n.push(parseInt(e[i] + e[i + 1], 16))
} else
for (var r = 0, i = 0; i < e.length; i++) {
var o = e.charCodeAt(i);
o < 128 ? n[r++] = o : o < 2048 ? (n[r++] = o >> 6 | 192,
n[r++] = 63 & o | 128) : lv(e, i) ? (o = 65536 + ((1023 & o) <<
10) + (1023 & e.charCodeAt(++i)),
n[r++] = o >> 18 | 240,
n[r++] = o >> 12 & 63 | 128,
n[r++] = o >> 6 & 63 | 128,
n[r++] = 63 & o | 128) : (n[r++] = o >> 12 | 224,
n[r++] = o >> 6 & 63 | 128,
n[r++] = 63 & o | 128)
}
else
for (i = 0; i < e.length; i++)
n[i] = 0 | e[i];
return n
}
,
av.toHex = function(e) {
for (var t = "", n = 0; n < e.length; n++)
t += dv(e[n].toString(16));
return t
}
,
av.htonl = cv,
av.toHex32 = function(e, t) {
for (var n = "", r = 0; r < e.length; r++) {
var i = e[r];
"little" === t && (i = cv(i)),
n += fv(i.toString(16))
}
return n
}
,
av.zero2 = dv,
av.zero8 = fv,
av.join32 = function(e, t, n, r) {
var i = n - t;
sv(i % 4 == 0);
for (var o = new Array(i / 4), a = 0, s = t; a < o.length; a++,
s += 4) {
var u;
u = "big" === r ? e[s] << 24 | e[s + 1] << 16 | e[s + 2] << 8 | e[s + 3] :
e[s + 3] << 24 | e[s + 2] << 16 | e[s + 1] << 8 | e[s],
o[a] = u >>> 0
}
return o
}
,
av.split32 = function(e, t) {
for (var n = new Array(4 * e.length), r = 0, i = 0; r < e.length; r++,
i += 4) {
var o = e[r];
"big" === t ? (n[i] = o >>> 24,
n[i + 1] = o >>> 16 & 255,
n[i + 2] = o >>> 8 & 255,
n[i + 3] = 255 & o) : (n[i + 3] = o >>> 24,
n[i + 2] = o >>> 16 & 255,
n[i + 1] = o >>> 8 & 255,
n[i] = 255 & o)
}
return n
}
,
av.rotr32 = function(e, t) {
return e >>> t | e << 32 - t
}
,
av.rotl32 = function(e, t) {
return e << t | e >>> 32 - t
}
,
av.sum32 = function(e, t) {
return e + t >>> 0
}
,
av.sum32_3 = function(e, t, n) {
return e + t + n >>> 0
}
,
av.sum32_4 = function(e, t, n, r) {
return e + t + n + r >>> 0
}
,
av.sum32_5 = function(e, t, n, r, i) {
return e + t + n + r + i >>> 0
}
,
av.sum64 = function(e, t, n, r) {
var i = e[t]
, o = r + e[t + 1] >>> 0
, a = (o < r ? 1 : 0) + n + i;
e[t] = a >>> 0,
e[t + 1] = o
}
,
av.sum64_hi = function(e, t, n, r) {
return (t + r >>> 0 < t ? 1 : 0) + e + n >>> 0
}
,
av.sum64_lo = function(e, t, n, r) {
return t + r >>> 0
}
,
av.sum64_4_hi = function(e, t, n, r, i, o, a, s) {
var u = 0
, l = t;
return u += (l = l + r >>> 0) < t ? 1 : 0,
u += (l = l + o >>> 0) < o ? 1 : 0,
e + n + i + a + (u += (l = l + s >>> 0) < s ? 1 : 0) >>> 0
}
,
av.sum64_4_lo = function(e, t, n, r, i, o, a, s) {
return t + r + o + s >>> 0
}
,
av.sum64_5_hi = function(e, t, n, r, i, o, a, s, u, l) {
var c = 0
, d = t;
return c += (d = d + r >>> 0) < t ? 1 : 0,
c += (d = d + o >>> 0) < o ? 1 : 0,
c += (d = d + s >>> 0) < s ? 1 : 0,
e + n + i + a + u + (c += (d = d + l >>> 0) < l ? 1 : 0) >>> 0
}
,
av.sum64_5_lo = function(e, t, n, r, i, o, a, s, u, l) {
return t + r + o + s + l >>> 0
}
,
av.rotr64_hi = function(e, t, n) {
return (t << 32 - n | e >>> n) >>> 0
}
,
av.rotr64_lo = function(e, t, n) {
return (e << 32 - n | t >>> n) >>> 0
}
,
av.shr64_hi = function(e, t, n) {
return e >>> n
}
,
av.shr64_lo = function(e, t, n) {
return (e << 32 - n | t >>> n) >>> 0
}
;
var hv = {}
, pv = av
, mv = vg;
function gv() {
this.pending = null,
this.pendingTotal = 0,
this.blockSize = this.constructor.blockSize,
this.outSize = this.constructor.outSize,
this.hmacStrength = this.constructor.hmacStrength,
this.padLength = this.constructor.padLength / 8,
this.endian = "big",
this._delta8 = this.blockSize / 8,
this._delta32 = this.blockSize / 32
}
hv.BlockHash = gv,
gv.prototype.update = function(e, t) {
if (e = pv.toArray(e, t),
this.pending ? this.pending = this.pending.concat(e) : this.pending = e,
this.pendingTotal += e.length,
this.pending.length >= this._delta8) {
var n = (e = this.pending).length % this._delta8;
this.pending = e.slice(e.length - n, e.length),
0 === this.pending.length && (this.pending = null),
e = pv.join32(e, 0, e.length - n, this.endian);
for (var r = 0; r < e.length; r += this._delta32)
this._update(e, r, r + this._delta32)
}
return this
}
,
gv.prototype.digest = function(e) {
return this.update(this._pad()),
mv(null === this.pending),
this._digest(e)
}
,
gv.prototype._pad = function() {
var e = this.pendingTotal
, t = this._delta8
, n = t - (e + this.padLength) % t
, r = new Array(n + this.padLength);
r[0] = 128;
for (var i = 1; i < n; i++)
r[i] = 0;
if (e <<= 3,
"big" === this.endian) {
for (var o = 8; o < this.padLength; o++)
r[i++] = 0;
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
r[i++] = e >>> 24 & 255,
r[i++] = e >>> 16 & 255,
r[i++] = e >>> 8 & 255,
r[i++] = 255 & e
} else
for (r[i++] = 255 & e,
r[i++] = e >>> 8 & 255,
r[i++] = e >>> 16 & 255,
r[i++] = e >>> 24 & 255,
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
r[i++] = 0,
o = 8; o < this.padLength; o++)
r[i++] = 0;
return r
}
;
var vv = {}
, bv = {}
, yv = av.rotr32;
function Av(e, t, n) {
return e & t ^ ~e & n
}
function wv(e, t, n) {
return e & t ^ e & n ^ t & n
}
function _v(e, t, n) {
return e ^ t ^ n
}
bv.ft_1 = function(e, t, n, r) {
return 0 === e ? Av(t, n, r) : 1 === e || 3 === e ? _v(t, n, r) : 2 === e ?
wv(t, n, r) : void 0
}
,
bv.ch32 = Av,
bv.maj32 = wv,
bv.p32 = _v,
bv.s0_256 = function(e) {
return yv(e, 2) ^ yv(e, 13) ^ yv(e, 22)
}
,
bv.s1_256 = function(e) {
return yv(e, 6) ^ yv(e, 11) ^ yv(e, 25)
}
,
bv.g0_256 = function(e) {
return yv(e, 7) ^ yv(e, 18) ^ e >>> 3
}
,
bv.g1_256 = function(e) {
return yv(e, 17) ^ yv(e, 19) ^ e >>> 10
}
;
var Ev = av
, Sv = hv
, kv = bv
, Mv = Ev.rotl32
, Cv = Ev.sum32
, xv = Ev.sum32_5
, Rv = kv.ft_1
, Tv = Sv.BlockHash
, Iv = [1518500249, 1859775393, 2400959708, 3395469782];
function Pv() {
if (!(this instanceof Pv))
return new Pv;
Tv.call(this),
this.h = [1732584193, 4023233417, 2562383102, 271733878,
3285377520],
this.W = new Array(80)
}
Ev.inherits(Pv, Tv);
var Lv = Pv;
Pv.blockSize = 512,
Pv.outSize = 160,
Pv.hmacStrength = 80,
Pv.padLength = 64,
Pv.prototype._update = function(e, t) {
for (var n = this.W, r = 0; r < 16; r++)
n[r] = e[t + r];
for (; r < n.length; r++)
n[r] = Mv(n[r - 3] ^ n[r - 8] ^ n[r - 14] ^ n[r - 16], 1);
var i = this.h[0]
, o = this.h[1]
, a = this.h[2]
, s = this.h[3]
, u = this.h[4];
for (r = 0; r < n.length; r++) {
var l = ~~(r / 20)
, c = xv(Mv(i, 5), Rv(l, o, a, s), u, n[r], Iv[l]);
u = s,
s = a,
a = Mv(o, 30),
o = i,
i=c
}
this.h[0] = Cv(this.h[0], i),
this.h[1] = Cv(this.h[1], o),
this.h[2] = Cv(this.h[2], a),
this.h[3] = Cv(this.h[3], s),
this.h[4] = Cv(this.h[4], u)
}
,
Pv.prototype._digest = function(e) {
return "hex" === e ? Ev.toHex32(this.h, "big") : Ev.split32(this.h, "big")
}
;
var Ov = av
, Nv = hv
, Dv = bv
, Bv = vg
, jv = Ov.sum32
, zv = Ov.sum32_4
, Fv = Ov.sum32_5
, Uv = Dv.ch32
, Kv = Dv.maj32
, qv = Dv.s0_256
, Hv = Dv.s1_256
, Vv = Dv.g0_256
, Wv = Dv.g1_256
, $v = Nv.BlockHash
, Yv = [1116352408, 1899447441, 3049323471, 3921009573, 961987163,
1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278,
1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401,
4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692,
1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891,
3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372,
1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921,
2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909,
275423344, 430227734, 506948616, 659060556, 883997877, 958139571,
1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452,
2361852424, 2428436474, 2756734187, 3204031479, 3329325298];
function Qv() {
if (!(this instanceof Qv))
return new Qv;
$v.call(this),
this.h = [1779033703, 3144134277, 1013904242, 2773480762,
1359893119, 2600822924, 528734635, 1541459225],
this.k = Yv,
this.W = new Array(64)
}
Ov.inherits(Qv, $v);
var Zv = Qv;
Qv.blockSize = 512,
Qv.outSize = 256,
Qv.hmacStrength = 192,
Qv.padLength = 64,
Qv.prototype._update = function(e, t) {
for (var n = this.W, r = 0; r < 16; r++)
n[r] = e[t + r];
for (; r < n.length; r++)
n[r] = zv(Wv(n[r - 2]), n[r - 7], Vv(n[r - 15]), n[r - 16]);
var i = this.h[0]
, o = this.h[1]
, a = this.h[2]
, s = this.h[3]
, u = this.h[4]
, l = this.h[5]
, c = this.h[6]
, d = this.h[7];
for (Bv(this.k.length === n.length),
r = 0; r < n.length; r++) {
var f = Fv(d, Hv(u), Uv(u, l, c), this.k[r], n[r])
, h = jv(qv(i), Kv(i, o, a));
d = c,
c = l,
l = u,
u = jv(s, f),
s = a,
a = o,
o = i,
i = jv(f, h)
}
this.h[0] = jv(this.h[0], i),
this.h[1] = jv(this.h[1], o),
this.h[2] = jv(this.h[2], a),
this.h[3] = jv(this.h[3], s),
this.h[4] = jv(this.h[4], u),
this.h[5] = jv(this.h[5], l),
this.h[6] = jv(this.h[6], c),
this.h[7] = jv(this.h[7], d)
}
,
Qv.prototype._digest = function(e) {
return "hex" === e ? Ov.toHex32(this.h, "big") : Ov.split32(this.h, "big")
}
;
var Gv = av
, Xv = Zv;
function Jv() {
if (!(this instanceof Jv))
return new Jv;
Xv.call(this),
this.h = [3238371032, 914150663, 812702999, 4144912697,
4290775857, 1750603025, 1694076839, 3204075428]
}
Gv.inherits(Jv, Xv);
var eb = Jv;
Jv.blockSize = 512,
Jv.outSize = 224,
Jv.hmacStrength = 192,
Jv.padLength = 64,
Jv.prototype._digest = function(e) {
return "hex" === e ? Gv.toHex32(this.h.slice(0, 7), "big") :
Gv.split32(this.h.slice(0, 7), "big")
}
;
var tb = av
, nb = hv
, rb = vg
, ib = tb.rotr64_hi
, ob = tb.rotr64_lo
, ab = tb.shr64_hi
, sb = tb.shr64_lo
, ub = tb.sum64
, lb = tb.sum64_hi
, cb = tb.sum64_lo
, db = tb.sum64_4_hi
, fb = tb.sum64_4_lo
, hb = tb.sum64_5_hi
, pb = tb.sum64_5_lo
, mb = nb.BlockHash
, gb = [1116352408, 3609767458, 1899447441, 602891725, 3049323471,
3964484399, 3921009573, 2173295548, 961987163, 4081628472, 1508970993,
3053834265, 2453635748, 2937671579, 2870763221, 3664609560, 3624381080,
2734883394, 310598401, 1164996542, 607225278, 1323610764, 1426881987,
3590304994, 1925078388, 4068182383, 2162078206, 991336113, 2614888103,
633803317, 3248222580, 3479774868, 3835390401, 2666613458, 4022224774,
944711139, 264347078, 2341262773, 604807628, 2007800933, 770255983,
1495990901, 1249150122, 1856431235, 1555081692, 3175218132, 1996064986,
2198950837, 2554220882, 3999719339, 2821834349, 766784016, 2952996808,
2566594879, 3210313671, 3203337956, 3336571891, 1034457026, 3584528711,
2466948901, 113926993, 3758326383, 338241895, 168717936, 666307205,
1188179964, 773529912, 1546045734, 1294757372, 1522805485, 1396182291,
2643833823, 1695183700, 2343527390, 1986661051, 1014477480, 2177026350,
1206759142, 2456956037, 344077627, 2730485921, 1290863460, 2820302411,
3158454273, 3259730800, 3505952657, 3345764771, 106217008, 3516065817,
3606008344, 3600352804, 1432725776, 4094571909, 1467031594, 275423344,
851169720, 430227734, 3100823752, 506948616, 1363258195, 659060556,
3750685593, 883997877, 3785050280, 958139571, 3318307427, 1322822218,
3812723403, 1537002063, 2003034995, 1747873779, 3602036899, 1955562222,
1575990012, 2024104815, 1125592928, 2227730452, 2716904306, 2361852424,
442776044, 2428436474, 593698344, 2756734187, 3733110249, 3204031479,
2999351573, 3329325298, 3815920427, 3391569614, 3928383900, 3515267271,
566280711, 3940187606, 3454069534, 4118630271, 4000239992, 116418474,
1914138554, 174292421, 2731055270, 289380356, 3203993006, 460393269,
320620315, 685471733, 587496836, 852142971, 1086792851, 1017036298,
365543100, 1126000580, 2618297676, 1288033470, 3409855158, 1501505948,
4234509866, 1607167915, 987167468, 1816402316, 1246189591];
function vb() {
if (!(this instanceof vb))
return new vb;
mb.call(this),
this.h = [1779033703, 4089235720, 3144134277, 2227873595,
1013904242, 4271175723, 2773480762, 1595750129, 1359893119, 2917565137,
2600822924, 725511199, 528734635, 4215389547, 1541459225, 327033209],
this.k = gb,
this.W = new Array(160)
}
tb.inherits(vb, mb);
var bb = vb;
function yb(e, t, n, r, i) {
var o = e & n ^ ~e & i;
return o < 0 && (o += 4294967296),
o
}
function Ab(e, t, n, r, i, o) {
var a = t & r ^ ~t & o;
return a < 0 && (a += 4294967296),
a
}
function wb(e, t, n, r, i) {
var o = e & n ^ e & i ^ n & i;
return o < 0 && (o += 4294967296),
o
}
function _b(e, t, n, r, i, o) {
var a = t & r ^ t & o ^ r & o;
return a < 0 && (a += 4294967296),
a
}
function Eb(e, t) {
var n = ib(e, t, 28) ^ ib(t, e, 2) ^ ib(t, e, 7);
return n < 0 && (n += 4294967296),
n
}
function Sb(e, t) {
var n = ob(e, t, 28) ^ ob(t, e, 2) ^ ob(t, e, 7);
return n < 0 && (n += 4294967296),
n
}
function kb(e, t) {
var n = ib(e, t, 14) ^ ib(e, t, 18) ^ ib(t, e, 9);
return n < 0 && (n += 4294967296),
n
}
function Mb(e, t) {
var n = ob(e, t, 14) ^ ob(e, t, 18) ^ ob(t, e, 9);
return n < 0 && (n += 4294967296),
n
}
function Cb(e, t) {
var n = ib(e, t, 1) ^ ib(e, t, 8) ^ ab(e, t, 7);
return n < 0 && (n += 4294967296),
n
}
function xb(e, t) {
var n = ob(e, t, 1) ^ ob(e, t, 8) ^ sb(e, t, 7);
return n < 0 && (n += 4294967296),
n
}
function Rb(e, t) {
var n = ib(e, t, 19) ^ ib(t, e, 29) ^ ab(e, t, 6);
return n < 0 && (n += 4294967296),
n
}
function Tb(e, t) {
var n = ob(e, t, 19) ^ ob(t, e, 29) ^ sb(e, t, 6);
return n < 0 && (n += 4294967296),
n
}
vb.blockSize = 1024,
vb.outSize = 512,
vb.hmacStrength = 192,
vb.padLength = 128,
vb.prototype._prepareBlock = function(e, t) {
for (var n = this.W, r = 0; r < 32; r++)
n[r] = e[t + r];
for (; r < n.length; r += 2) {
var i = Rb(n[r - 4], n[r - 3])
, o = Tb(n[r - 4], n[r - 3])
, a = n[r - 14]
, s = n[r - 13]
, u = Cb(n[r - 30], n[r - 29])
, l = xb(n[r - 30], n[r - 29])
, c = n[r - 32]
, d = n[r - 31];
n[r] = db(i, o, a, s, u, l, c, d),
n[r + 1] = fb(i, o, a, s, u, l, c, d)
}
}
,
vb.prototype._update = function(e, t) {
this._prepareBlock(e, t);
var n = this.W
, r = this.h[0]
, i = this.h[1]
, o = this.h[2]
, a = this.h[3]
, s = this.h[4]
, u = this.h[5]
, l = this.h[6]
, c = this.h[7]
, d = this.h[8]
, f = this.h[9]
, h = this.h[10]
, p = this.h[11]
, m = this.h[12]
, g = this.h[13]
, v = this.h[14]
, b = this.h[15];
rb(this.k.length === n.length);
for (var y = 0; y < n.length; y += 2) {
var A = v
,w=b
, _ = kb(d, f)
, E = Mb(d, f)
, S = yb(d, f, h, p, m)
, k = Ab(d, f, h, p, m, g)
, M = this.k[y]
, C = this.k[y + 1]
, x = n[y]
, R = n[y + 1]
, T = hb(A, w, _, E, S, k, M, C, x, R)
, I = pb(A, w, _, E, S, k, M, C, x, R);
A = Eb(r, i),
w = Sb(r, i),
_ = wb(r, i, o, a, s),
E = _b(r, i, o, a, s, u);
var P = lb(A, w, _, E)
, L = cb(A, w, _, E);
v = m,
b = g,
m = h,
g = p,
h = d,
p = f,
d = lb(l, c, T, I),
f = cb(c, c, T, I),
l = s,
c = u,
s = o,
u = a,
o = r,
a = i,
r = lb(T, I, P, L),
i = cb(T, I, P, L)
}
ub(this.h, 0, r, i),
ub(this.h, 2, o, a),
ub(this.h, 4, s, u),
ub(this.h, 6, l, c),
ub(this.h, 8, d, f),
ub(this.h, 10, h, p),
ub(this.h, 12, m, g),
ub(this.h, 14, v, b)
}
,
vb.prototype._digest = function(e) {
return "hex" === e ? tb.toHex32(this.h, "big") : tb.split32(this.h, "big")
}
;
var Ib = av
, Pb = bb;
function Lb() {
if (!(this instanceof Lb))
return new Lb;
Pb.call(this),
this.h = [3418070365, 3238371032, 1654270250, 914150663,
2438529370, 812702999, 355462360, 4144912697, 1731405415, 4290775857,
2394180231, 1750603025, 3675008525, 1694076839, 1203062813, 3204075428]
}
Ib.inherits(Lb, Pb);
var Ob = Lb;
Lb.blockSize = 1024,
Lb.outSize = 384,
Lb.hmacStrength = 192,
Lb.padLength = 128,
Lb.prototype._digest = function(e) {
return "hex" === e ? Ib.toHex32(this.h.slice(0, 12), "big") :
Ib.split32(this.h.slice(0, 12), "big")
}
,
vv.sha1 = Lv,
vv.sha224 = eb,
vv.sha256 = Zv,
vv.sha384 = Ob,
vv.sha512 = bb;
var Nb = {}
, Db = av
, Bb = hv
, jb = Db.rotl32
, zb = Db.sum32
, Fb = Db.sum32_3
, Ub = Db.sum32_4
, Kb = Bb.BlockHash;
function qb() {
if (!(this instanceof qb))
return new qb;
Kb.call(this),
this.h = [1732584193, 4023233417, 2562383102, 271733878,
3285377520],
this.endian = "little"
}
function Hb(e, t, n, r) {
return e <= 15 ? t ^ n ^ r : e <= 31 ? t & n | ~t & r : e <= 47 ? (t | ~n) ^ r :
e <= 63 ? t & r | n & ~r : t ^ (n | ~r)
}
function Vb(e) {
return e <= 15 ? 0 : e <= 31 ? 1518500249 : e <= 47 ? 1859775393 : e
<= 63 ? 2400959708 : 2840853838
}
function Wb(e) {
return e <= 15 ? 1352829926 : e <= 31 ? 1548603684 : e <= 47 ?
1836072691 : e <= 63 ? 2053994217 : 0
}
Db.inherits(qb, Kb),
Nb.ripemd160 = qb,
qb.blockSize = 512,
qb.outSize = 160,
qb.hmacStrength = 192,
qb.padLength = 64,
qb.prototype._update = function(e, t) {
for (var n = this.h[0], r = this.h[1], i = this.h[2], o = this.h[3], a = this.h[4],
s = n, u = r, l = i, c = o, d = a, f = 0; f < 80; f++) {
var h = zb(jb(Ub(n, Hb(f, r, i, o), e[$b[f] + t], Vb(f)), Qb[f]), a);
n = a,
a = o,
o = jb(i, 10),
i = r,
r = h,
h = zb(jb(Ub(s, Hb(79 - f, u, l, c), e[Yb[f] + t], Wb(f)), Zb[f]), d),
s = d,
d = c,
c = jb(l, 10),
l = u,
u=h
}
h = Fb(this.h[1], i, c),
this.h[1] = Fb(this.h[2], o, d),
this.h[2] = Fb(this.h[3], a, s),
this.h[3] = Fb(this.h[4], n, u),
this.h[4] = Fb(this.h[0], r, l),
this.h[0] = h
}
,
qb.prototype._digest = function(e) {
return "hex" === e ? Db.toHex32(this.h, "little") : Db.split32(this.h,
"little")
}
;
var $b = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6,
15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11,
10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]
, Yb = [5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5,
10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3,
11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]
, Qb = [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11,
9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11,
12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14,
11, 8, 5, 6]
, Zb = [8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12,
8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15,
5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15,
13, 11, 11]
, Gb = av
, Xb = vg;
function Jb(e, t, n) {
if (!(this instanceof Jb))
return new Jb(e,t,n);
this.Hash = e,
this.blockSize = e.blockSize / 8,
this.outSize = e.outSize / 8,
this.inner = null,
this.outer = null,
this._init(Gb.toArray(t, n))
}
var ey, ty, ny = Jb;
Jb.prototype._init = function(e) {
e.length > this.blockSize && (e = (new this.Hash).update(e).digest()),
Xb(e.length <= this.blockSize);
for (var t = e.length; t < this.blockSize; t++)
e.push(0);
for (t = 0; t < e.length; t++)
e[t] ^= 54;
for (this.inner = (new this.Hash).update(e),
t = 0; t < e.length; t++)
e[t] ^= 106;
this.outer = (new this.Hash).update(e)
}
,
Jb.prototype.update = function(e, t) {
return this.inner.update(e, t),
this
}
,
Jb.prototype.digest = function(e) {
return this.outer.update(this.inner.digest()),
this.outer.digest(e)
}
,
function(e) {
var t = e;
t.utils = av,
t.common = hv,
t.sha = vv,
t.ripemd = Nb,
t.hmac = ny,
t.sha1 = t.sha.sha1,
t.sha256 = t.sha.sha256,
t.sha224 = t.sha.sha224,
t.sha384 = t.sha.sha384,
t.sha512 = t.sha.sha512,
t.ripemd160 = t.ripemd.ripemd160
}(ov),
function(e) {
var t, n = e, r = ov, i = kg, o = pg.assert;
function a(e) {
"short" === e.type ? this.curve = new i.short(e) : "edwards" ===
e.type ? this.curve = new i.edwards(e) : this.curve = new i.mont(e),
this.g = this.curve.g,
this.n = this.curve.n,
this.hash = e.hash,
o(this.g.validate(), "Invalid curve"),
o(this.g.mul(this.n).isInfinity(), "Invalid curve, G*N != O")
}
function s(e, t) {
Object.defineProperty(n, e, {
configurable: !0,
enumerable: !0,
get: function() {
var r = new a(t);
return Object.defineProperty(n, e, {
configurable: !0,
enumerable: !0,
value: r
}),
r
}
})
}
n.PresetCurve = a,
s("p192", {
type: "short",
prime: "p192",
p: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",
a: "ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",
b: "64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",
n: "ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",
hash: r.sha256,
gRed: !1,
g: ["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012",
"07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]
}),
s("p224", {
type: "short",
prime: "p224",
p: "ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",
a: "ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",
b: "b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943
2355ffb4",
n: "ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",
hash: r.sha256,
gRed: !1,
g: ["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6
115c1d21", "bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]
}),
s("p256", {
type: "short",
prime: null,
p: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff
ffffffff",
a: "ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff
fffffffc",
b: "5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6
3bce3c3e 27d2604b",
n: "ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2
fc632551",
hash: r.sha256,
gRed: !1,
g: ["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0
f4a13945 d898c296", "4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece
cbb64068 37bf51f5"]
}),
s("p384", {
type: "short",
prime: null,
p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000
00000000 ffffffff",
a: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000
00000000 fffffffc",
b: "b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112
0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",
n: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2
48b0a77a ecec196a ccc52973",
hash: r.sha384,
gRed: !1,
g: ["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98
59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7", "3617de4a 96262c6f
5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d
7a431d7c 90ea0e5f"]
}),
s("p521", {
type: "short",
prime: null,
p: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",
a: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff
ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",
b: "00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b
99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88
3d2c34f1 ef451fd4 6b503f00",
n: "000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783
bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",
hash: r.sha512,
gRed: !1,
g: ["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139
053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1
856a429b f97e7e31 c2e5bd66", "00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9
98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761
353c7086 a272c240 88be9476 9fd16650"]
}),
s("curve25519", {
type: "mont",
prime: "p25519",
p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
a: "76d06",
b: "1",
n: "1000000000000000 0000000000000000 14def9dea2f79cd6
5812631a5cf5d3ed",
hash: r.sha256,
gRed: !1,
g: ["9"]
}),
s("ed25519", {
type: "edwards",
prime: "p25519",
p: "7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",
a: "-1",
c: "1",
d: "52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab
75eb4dca135978a3",
n: "1000000000000000 0000000000000000 14def9dea2f79cd6
5812631a5cf5d3ed",
hash: r.sha256,
gRed: !1,
g:
["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a",
"6666666666666666666666666666666666666666666666666666666666666658"]
});
try {
t = ty ? ey : (ty = 1,
ey = {
doubles: {
step: 4,
points:
[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a",
"f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],
["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508",
"11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],
["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739",
"d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],
["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640",
"4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],
["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c",
"4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],
["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda",
"96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],
["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa",
"5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],
["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0",
"cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],
["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d",
"9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],
["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d",
"e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],
["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1",
"9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],
["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0",
"5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],
["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047",
"10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],
["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862",
"283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],
["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7",
"7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],
["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd",
"56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],
["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83",
"7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],
["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a",
"53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],
["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8",
"bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],
["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d",
"4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],
["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725",
"7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],
["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754",
"4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],
["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c",
"17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],
["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6",
"6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],
["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39",
"c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],
["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891",
"893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],
["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b",
"febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],
["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03",
"2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],
["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d",
"eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],
["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070",
"7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],
["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4",
"e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],
["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da",
"662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],
["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11",
"1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],
["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e",
"efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],
["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41",
"2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],
["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef",
"67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],
["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8",
"db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],
["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d",
"648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],
["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96",
"35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],
["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd",
"ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],
["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5",
"9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],
["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266",
"40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],
["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71",
"34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],
["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac",
"c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],
["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751",
"1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],
["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e",
"493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],
["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241",
"c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],
["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3",
"be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],
["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f",
"4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],
["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19",
"aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],
["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be",
"b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],
["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9",
"6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],
["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2",
"8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],
["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13",
"7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],
["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c",
"ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],
["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba",
"2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],
["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151",
"e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],
["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073",
"d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],
["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458",
"38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],
["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b",
"69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],
["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366",
"d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],
["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa",
"40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],
["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0",
"620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],
["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787",
"7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],
["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e",
"ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]
},
naf: {
wnd: 7,
points:
[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9",
"388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],
["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4",
"d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],
["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc",
"6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],
["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe",
"cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],
["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb",
"d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],
["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8",
"ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],
["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e",
"581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],
["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34",
"4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],
["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c",
"85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],
["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5",
"321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],
["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f",
"2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],
["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714",
"73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],
["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729",
"a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],
["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db",
"2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],
["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4",
"e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],
["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5",
"b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],
["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479",
"2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],
["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d",
"80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],
["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f",
"1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],
["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb",
"d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],
["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9",
"eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],
["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963",
"758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],
["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74",
"958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],
["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530",
"e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],
["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b",
"5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],
["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247",
"cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],
["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1",
"cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],
["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120",
"4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],
["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435",
"91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],
["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18",
"673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],
["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8",
"59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],
["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb",
"3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],
["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f",
"55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],
["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143",
"efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],
["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba",
"e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],
["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45",
"f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],
["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a",
"744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],
["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e",
"c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],
["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8",
"e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],
["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c",
"30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],
["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519",
"e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],
["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab",
"100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],
["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca",
"ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],
["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf",
"8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],
["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610",
"68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],
["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4",
"f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],
["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c",
"d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],
["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940",
"edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],
["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980",
"a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],
["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3",
"66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],
["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf",
"9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],
["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63",
"4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],
["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448",
"fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],
["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf",
"5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],
["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5",
"8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],
["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6",
"8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],
["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5",
"5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],
["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99",
"f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],
["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51",
"f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],
["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5",
"42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],
["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5",
"204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],
["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997",
"4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],
["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881",
"73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],
["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5",
"39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],
["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66",
"d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],
["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726",
"ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],
["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede",
"6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],
["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94",
"60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],
["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31",
"3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],
["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51",
"b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],
["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252",
"ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],
["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5",
"cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],
["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b",
"6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],
["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4",
"322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],
["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f",
"6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],
["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889",
"2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],
["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246",
"b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],
["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984",
"998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],
["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a",
"b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],
["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030",
"bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],
["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197",
"6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],
["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593",
"c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],
["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef",
"21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],
["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38",
"60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],
["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a",
"49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],
["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111",
"5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],
["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502",
"7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],
["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea",
"be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],
["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26",
"8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],
["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986",
"39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],
["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e",
"62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],
["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4",
"25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],
["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda",
"ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],
["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859",
"cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],
["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f",
"f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],
["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c",
"6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],
["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942",
"fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],
["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a",
"1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],
["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80",
"5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],
["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d",
"438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],
["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1",
"cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],
["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63",
"c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],
["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352",
"6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],
["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193",
"ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],
["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00",
"9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],
["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58",
"ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],
["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7",
"d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],
["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8",
"c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],
["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e",
"67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],
["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d",
"cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],
["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b",
"299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],
["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f",
"f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],
["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6",
"462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],
["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297",
"62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],
["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a",
"7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],
["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c",
"ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],
["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52",
"4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],
["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb",
"bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],
["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065",
"bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],
["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917",
"603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],
["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9",
"cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],
["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3",
"553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],
["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57",
"712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],
["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66",
"ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],
["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8",
"9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],
["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721",
"9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],
["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180",
"4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]
}
})
} catch (e) {
t = void 0
}
s("secp256k1", {
type: "short",
prime: "k256",
p: "ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",
a: "0",
b: "7",
n: "ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",
h: "1",
hash: r.sha256,
beta:
"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",
lambda:
"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",
basis: [{
a: "3086d221a7d46bcde86c90e49284eb15",
b: "-e4437ed6010e88286f547fa90abfe4c3"
}, {
a: "114ca50f7a8e2f3f657c1108d9d44cfd8",
b: "3086d221a7d46bcde86c90e49284eb15"
}],
gRed: !1,
g:
["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",
"483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8", t]
})
}(iv);
var ry = ov
, iy = yg
, oy = vg;
function ay(e) {
if (!(this instanceof ay))
return new ay(e);
this.hash = e.hash,
this.predResist = !!e.predResist,
this.outLen = this.hash.outSize,
this.minEntropy = e.minEntropy || this.hash.hmacStrength,
this._reseed = null,
this.reseedInterval = null,
this.K = null,
this.V = null;
var t = iy.toArray(e.entropy, e.entropyEnc || "hex")
, n = iy.toArray(e.nonce, e.nonceEnc || "hex")
, r = iy.toArray(e.pers, e.persEnc || "hex");
oy(t.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: " +
this.minEntropy + " bits"),
this._init(t, n, r)
}
var sy = ay;
ay.prototype._init = function(e, t, n) {
var r = e.concat(t).concat(n);
this.K = new Array(this.outLen / 8),
this.V = new Array(this.outLen / 8);
for (var i = 0; i < this.V.length; i++)
this.K[i] = 0,
this.V[i] = 1;
this._update(r),
this._reseed = 1,
this.reseedInterval = 281474976710656
}
,
ay.prototype._hmac = function() {
return new ry.hmac(this.hash,this.K)
}
,
ay.prototype._update = function(e) {
var t = this._hmac().update(this.V).update([0]);
e && (t = t.update(e)),
this.K = t.digest(),
this.V = this._hmac().update(this.V).digest(),
e && (this.K =
this._hmac().update(this.V).update([1]).update(e).digest(),
this.V = this._hmac().update(this.V).digest())
}
,
ay.prototype.reseed = function(e, t, n, r) {
"string" != typeof t && (r = n,
n = t,
t = null),
e = iy.toArray(e, t),
n = iy.toArray(n, r),
oy(e.length >= this.minEntropy / 8, "Not enough entropy. Minimum is: "
+ this.minEntropy + " bits"),
this._update(e.concat(n || [])),
this._reseed = 1
}
,
ay.prototype.generate = function(e, t, n, r) {
if (this._reseed > this.reseedInterval)
throw new Error("Reseed is required");
"string" != typeof t && (r = n,
n = t,
t = null),
n && (n = iy.toArray(n, r || "hex"),
this._update(n));
for (var i = []; i.length < e; )
this.V = this._hmac().update(this.V).digest(),
i = i.concat(this.V);
var o = i.slice(0, e);
return this._update(n),
this._reseed++,
iy.encode(o, t)
}
;
var uy = gg
, ly = pg.assert;
function cy(e, t) {
this.ec = e,
this.priv = null,
this.pub = null,
t.priv && this._importPrivate(t.priv, t.privEnc),
t.pub && this._importPublic(t.pub, t.pubEnc)
}
var dy = cy;
cy.fromPublic = function(e, t, n) {
return t instanceof cy ? t : new cy(e,{
pub: t,
pubEnc: n
})
}
,
cy.fromPrivate = function(e, t, n) {
return t instanceof cy ? t : new cy(e,{
priv: t,
privEnc: n
})
}
,
cy.prototype.validate = function() {
var e = this.getPublic();
return e.isInfinity() ? {
result: !1,
reason: "Invalid public key"
} : e.validate() ? e.mul(this.ec.curve.n).isInfinity() ? {
result: !0,
reason: null
}:{
result: !1,
reason: "Public key * N != O"
}:{
result: !1,
reason: "Public key is not a point"
}
}
,
cy.prototype.getPublic = function(e, t) {
return "string" == typeof e && (t = e,
e = null),
this.pub || (this.pub = this.ec.g.mul(this.priv)),
t ? this.pub.encode(t, e) : this.pub
}
,
cy.prototype.getPrivate = function(e) {
return "hex" === e ? this.priv.toString(16, 2) : this.priv
}
,
cy.prototype._importPrivate = function(e, t) {
this.priv = new uy(e,t || 16),
this.priv = this.priv.umod(this.ec.curve.n)
}
,
cy.prototype._importPublic = function(e, t) {
if (e.x || e.y)
return "mont" === this.ec.curve.type ? ly(e.x, "Need x coordinate") :
"short" !== this.ec.curve.type && "edwards" !== this.ec.curve.type || ly(e.x && e.y, "Need
both x and y coordinate"),
void (this.pub = this.ec.curve.point(e.x, e.y));
this.pub = this.ec.curve.decodePoint(e, t)
}
,
cy.prototype.derive = function(e) {
return e.validate() || ly(e.validate(), "public point not validated"),
e.mul(this.priv).getX()
}
,
cy.prototype.sign = function(e, t, n) {
return this.ec.sign(e, this, t, n)
}
,
cy.prototype.verify = function(e, t) {
return this.ec.verify(e, t, this)
}
,
cy.prototype.inspect = function() {
return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " +
(this.pub && this.pub.inspect()) + " >"
}
;
var fy = gg
, hy = pg
, py = hy.assert;
function my(e, t) {
if (e instanceof my)
return e;
this._importDER(e, t) || (py(e.r && e.s, "Signature without r or s"),
this.r = new fy(e.r,16),
this.s = new fy(e.s,16),
void 0 === e.recoveryParam ? this.recoveryParam = null :
this.recoveryParam = e.recoveryParam)
}
var gy = my;
function vy() {
this.place = 0
}
function by(e, t) {
var n = e[t.place++];
if (!(128 & n))
return n;
var r = 15 & n;
if (0 === r || r > 4)
return !1;
for (var i = 0, o = 0, a = t.place; o < r; o++,
a++)
i <<= 8,
i |= e[a],
i >>>= 0;
return !(i <= 127) && (t.place = a,
i)
}
function yy(e) {
for (var t = 0, n = e.length - 1; !e[t] && !(128 & e[t + 1]) && t < n; )
t++;
return 0 === t ? e : e.slice(t)
}
function Ay(e, t) {
if (t < 128)
e.push(t);
else {
var n = 1 + (Math.log(t) / Math.LN2 >>> 3);
for (e.push(128 | n); --n; )
e.push(t >>> (n << 3) & 255);
e.push(t)
}
}
my.prototype._importDER = function(e, t) {
e = hy.toArray(e, t);
var n = new vy;
if (48 !== e[n.place++])
return !1;
var r = by(e, n);
if (!1 === r)
return !1;
if (r + n.place !== e.length)
return !1;
if (2 !== e[n.place++])
return !1;
var i = by(e, n);
if (!1 === i)
return !1;
var o = e.slice(n.place, i + n.place);
if (n.place += i,
2 !== e[n.place++])
return !1;
var a = by(e, n);
if (!1 === a)
return !1;
if (e.length !== a + n.place)
return !1;
var s = e.slice(n.place, a + n.place);
if (0 === o[0]) {
if (!(128 & o[1]))
return !1;
o = o.slice(1)
}
if (0 === s[0]) {
if (!(128 & s[1]))
return !1;
s = s.slice(1)
}
return this.r = new fy(o),
this.s = new fy(s),
this.recoveryParam = null,
!0
}
,
my.prototype.toDER = function(e) {
var t = this.r.toArray()
, n = this.s.toArray();
for (128 & t[0] && (t = [0].concat(t)),
128 & n[0] && (n = [0].concat(n)),
t = yy(t),
n = yy(n); !(n[0] || 128 & n[1]); )
n = n.slice(1);
var r = [2];
Ay(r, t.length),
(r = r.concat(t)).push(2),
Ay(r, n.length);
var i = r.concat(n)
, o = [48];
return Ay(o, i.length),
o = o.concat(i),
hy.encode(o, e)
}
;
var wy = gg
, _y = sy
, Ey = iv
, Sy = Sg
, ky = pg.assert
, My = dy
, Cy = gy;
function xy(e) {
if (!(this instanceof xy))
return new xy(e);
"string" == typeof e && (ky(Object.prototype.hasOwnProperty.call(Ey,
e), "Unknown curve " + e),
e = Ey[e]),
e instanceof Ey.PresetCurve && (e = {
curve: e
}),
this.curve = e.curve.curve,
this.n = this.curve.n,
this.nh = this.n.ushrn(1),
this.g = this.curve.g,
this.g = e.curve.g,
this.g.precompute(e.curve.n.bitLength() + 1),
this.hash = e.hash || e.curve.hash
}
var Ry = xy;
xy.prototype.keyPair = function(e) {
return new My(this,e)
}
,
xy.prototype.keyFromPrivate = function(e, t) {
return My.fromPrivate(this, e, t)
}
,
xy.prototype.keyFromPublic = function(e, t) {
return My.fromPublic(this, e, t)
}
,
xy.prototype.genKeyPair = function(e) {
e || (e = {});
for (var t = new _y({
hash: this.hash,
pers: e.pers,
persEnc: e.persEnc || "utf8",
entropy: e.entropy || Sy(this.hash.hmacStrength),
entropyEnc: e.entropy && e.entropyEnc || "utf8",
nonce: this.n.toArray()
}), n = this.n.byteLength(), r = this.n.sub(new wy(2)); ; ) {
var i = new wy(t.generate(n));
if (!(i.cmp(r) > 0))
return i.iaddn(1),
this.keyFromPrivate(i)
}
}
,
xy.prototype._truncateToN = function(e, t) {
var n = 8 * e.byteLength() - this.n.bitLength();
return n > 0 && (e = e.ushrn(n)),
!t && e.cmp(this.n) >= 0 ? e.sub(this.n) : e
}
,
xy.prototype.sign = function(e, t, n, r) {
"object" == typeof n && (r = n,
n = null),
r || (r = {}),
t = this.keyFromPrivate(t, n),
e = this._truncateToN(new wy(e,16));
for (var i = this.n.byteLength(), o = t.getPrivate().toArray("be", i), a =
e.toArray("be", i), s = new _y({
hash: this.hash,
entropy: o,
nonce: a,
pers: r.pers,
persEnc: r.persEnc || "utf8"
}), u = this.n.sub(new wy(1)), l = 0; ; l++) {
var c = r.k ? r.k(l) : new wy(s.generate(this.n.byteLength()));
if (!((c = this._truncateToN(c, !0)).cmpn(1) <= 0 || c.cmp(u) >= 0)) {
var d = this.g.mul(c);
if (!d.isInfinity()) {
var f = d.getX()
, h = f.umod(this.n);
if (0 !== h.cmpn(0)) {
var p = c.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));
if (0 !== (p = p.umod(this.n)).cmpn(0)) {
var m = (d.getY().isOdd() ? 1 : 0) | (0 !== f.cmp(h) ?
2 : 0);
return r.canonical && p.cmp(this.nh) > 0 && (p =
this.n.sub(p),
m ^= 1),
new Cy({
r: h,
s: p,
recoveryParam: m
})
}
}
}
}
}
}
,
xy.prototype.verify = function(e, t, n, r) {
e = this._truncateToN(new wy(e,16)),
n = this.keyFromPublic(n, r);
var i = (t = new Cy(t,"hex")).r
, o = t.s;
if (i.cmpn(1) < 0 || i.cmp(this.n) >= 0)
return !1;
if (o.cmpn(1) < 0 || o.cmp(this.n) >= 0)
return !1;
var a, s = o.invm(this.n), u = s.mul(e).umod(this.n), l =
s.mul(i).umod(this.n);
return this.curve._maxwellTrick ? !(a = this.g.jmulAdd(u, n.getPublic(),
l)).isInfinity() && a.eqXToP(i) : !(a = this.g.mulAdd(u, n.getPublic(), l)).isInfinity() && 0
=== a.getX().umod(this.n).cmp(i)
}
,
xy.prototype.recoverPubKey = function(e, t, n, r) {
ky((3 & n) === n, "The recovery param is more than two bits"),
t = new Cy(t,r);
var i = this.n
, o = new wy(e)
, a = t.r
, s = t.s
,u=1&n
, l = n >> 1;
if (a.cmp(this.curve.p.umod(this.curve.n)) >= 0 && l)
throw new Error("Unable to find sencond key candinate");
a = l ? this.curve.pointFromX(a.add(this.curve.n), u) :
this.curve.pointFromX(a, u);
var c = t.r.invm(i)
, d = i.sub(o).mul(c).umod(i)
, f = s.mul(c).umod(i);
return this.g.mulAdd(d, a, f)
}
,
xy.prototype.getKeyRecoveryParam = function(e, t, n, r) {
if (null !== (t = new Cy(t,r)).recoveryParam)
return t.recoveryParam;
for (var i = 0; i < 4; i++) {
var o;
try {
o = this.recoverPubKey(e, t, i)
} catch (e) {
continue
}
if (o.eq(n))
return i
}
throw new Error("Unable to find valid recovery factor")
}
;
var Ty = pg
, Iy = Ty.assert
, Py = Ty.parseBytes
, Ly = Ty.cachedProperty;
function Oy(e, t) {
this.eddsa = e,
this._secret = Py(t.secret),
e.isPoint(t.pub) ? this._pub = t.pub : this._pubBytes = Py(t.pub)
}
Oy.fromPublic = function(e, t) {
return t instanceof Oy ? t : new Oy(e,{
pub: t
})
}
,
Oy.fromSecret = function(e, t) {
return t instanceof Oy ? t : new Oy(e,{
secret: t
})
}
,
Oy.prototype.secret = function() {
return this._secret
}
,
Ly(Oy, "pubBytes", (function() {
return this.eddsa.encodePoint(this.pub())
}
)),
Ly(Oy, "pub", (function() {
return this._pubBytes ? this.eddsa.decodePoint(this._pubBytes) :
this.eddsa.g.mul(this.priv())
}
)),
Ly(Oy, "privBytes", (function() {
var e = this.eddsa
, t = this.hash()
, n = e.encodingLength - 1
, r = t.slice(0, e.encodingLength);
return r[0] &= 248,
r[n] &= 127,
r[n] |= 64,
r
}
)),
Ly(Oy, "priv", (function() {
return this.eddsa.decodeInt(this.privBytes())
}
)),
Ly(Oy, "hash", (function() {
return this.eddsa.hash().update(this.secret()).digest()
}
)),
Ly(Oy, "messagePrefix", (function() {
return this.hash().slice(this.eddsa.encodingLength)
}
)),
Oy.prototype.sign = function(e) {
return Iy(this._secret, "KeyPair can only verify"),
this.eddsa.sign(e, this)
}
,
Oy.prototype.verify = function(e, t) {
return this.eddsa.verify(e, t, this)
}
,
Oy.prototype.getSecret = function(e) {
return Iy(this._secret, "KeyPair is public only"),
Ty.encode(this.secret(), e)
}
,
Oy.prototype.getPublic = function(e) {
return Ty.encode(this.pubBytes(), e)
}
;
var Ny = Oy
, Dy = gg
, By = pg
, jy = By.assert
, zy = By.cachedProperty
, Fy = By.parseBytes;
function Uy(e, t) {
this.eddsa = e,
"object" != typeof t && (t = Fy(t)),
Array.isArray(t) && (t = {
R: t.slice(0, e.encodingLength),
S: t.slice(e.encodingLength)
}),
jy(t.R && t.S, "Signature without R or S"),
e.isPoint(t.R) && (this._R = t.R),
t.S instanceof Dy && (this._S = t.S),
this._Rencoded = Array.isArray(t.R) ? t.R : t.Rencoded,
this._Sencoded = Array.isArray(t.S) ? t.S : t.Sencoded
}
zy(Uy, "S", (function() {
return this.eddsa.decodeInt(this.Sencoded())
}
)),
zy(Uy, "R", (function() {
return this.eddsa.decodePoint(this.Rencoded())
}
)),
zy(Uy, "Rencoded", (function() {
return this.eddsa.encodePoint(this.R())
}
)),
zy(Uy, "Sencoded", (function() {
return this.eddsa.encodeInt(this.S())
}
)),
Uy.prototype.toBytes = function() {
return this.Rencoded().concat(this.Sencoded())
}
,
Uy.prototype.toHex = function() {
return By.encode(this.toBytes(), "hex").toUpperCase()
}
;
var Ky = Uy
, qy = ov
, Hy = iv
, Vy = pg
, Wy = Vy.assert
, $y = Vy.parseBytes
, Yy = Ny
, Qy = Ky;
function Zy(e) {
if (Wy("ed25519" === e, "only tested with ed25519 so far"),
!(this instanceof Zy))
return new Zy(e);
e = Hy[e].curve,
this.curve = e,
this.g = e.g,
this.g.precompute(e.n.bitLength() + 1),
this.pointClass = e.point().constructor,
this.encodingLength = Math.ceil(e.n.bitLength() / 8),
this.hash = qy.sha512
}
var Gy = Zy;
Zy.prototype.sign = function(e, t) {
e = $y(e);
var n = this.keyFromSecret(t)
, r = this.hashInt(n.messagePrefix(), e)
, i = this.g.mul(r)
, o = this.encodePoint(i)
, a = this.hashInt(o, n.pubBytes(), e).mul(n.priv())
, s = r.add(a).umod(this.curve.n);
return this.makeSignature({
R: i,
S: s,
Rencoded: o
})
}
,
Zy.prototype.verify = function(e, t, n) {
e = $y(e),
t = this.makeSignature(t);
var r = this.keyFromPublic(n)
, i = this.hashInt(t.Rencoded(), r.pubBytes(), e)
, o = this.g.mul(t.S());
return t.R().add(r.pub().mul(i)).eq(o)
}
,
Zy.prototype.hashInt = function() {
for (var e = this.hash(), t = 0; t < arguments.length; t++)
e.update(arguments[t]);
return Vy.intFromLE(e.digest()).umod(this.curve.n)
}
,
Zy.prototype.keyFromPublic = function(e) {
return Yy.fromPublic(this, e)
}
,
Zy.prototype.keyFromSecret = function(e) {
return Yy.fromSecret(this, e)
}
,
Zy.prototype.makeSignature = function(e) {
return e instanceof Qy ? e : new Qy(this,e)
}
,
Zy.prototype.encodePoint = function(e) {
var t = e.getY().toArray("le", this.encodingLength);
return t[this.encodingLength - 1] |= e.getX().isOdd() ? 128 : 0,
t
}
,
Zy.prototype.decodePoint = function(e) {
var t = (e = Vy.parseBytes(e)).length - 1
, n = e.slice(0, t).concat(-129 & e[t])
, r = 0 != (128 & e[t])
, i = Vy.intFromLE(n);
return this.curve.pointFromY(i, r)
}
,
Zy.prototype.encodeInt = function(e) {
return e.toArray("le", this.encodingLength)
}
,
Zy.prototype.decodeInt = function(e) {
return Vy.intFromLE(e)
}
,
Zy.prototype.isPoint = function(e) {
return e instanceof this.pointClass
}
,
function(e) {
var t = e;
t.version = hg,
t.utils = pg,
t.rand = Sg,
t.curve = kg,
t.curves = iv,
t.ec = Ry,
t.eddsa = Gy
}(fg);
const Xy = new (0,
fg.ec)("secp256k1")
, Jy = Xy.curve
, eA = Jy.n.constructor;
function tA(e) {
const t = e[0];
switch (t) {
case 2:
case 3:
return 33 !== e.length ? null : function(e, t) {
let n = new eA(t);
if (n.cmp(Jy.p) >= 0)
return null;
n = n.toRed(Jy.red);
let r = n.redSqr().redIMul(n).redIAdd(Jy.b).redSqrt();
return 3 === e !== r.isOdd() && (r = r.redNeg()),
Xy.keyPair({
pub: {
x: n,
y: r
}
})
}(t, e.subarray(1, 33));
case 4:
case 6:
case 7:
return 65 !== e.length ? null : function(e, t, n) {
let r = new eA(t)
, i = new eA(n);
if (r.cmp(Jy.p) >= 0 || i.cmp(Jy.p) >= 0)
return null;
if (r = r.toRed(Jy.red),
i = i.toRed(Jy.red),
(6 === e || 7 === e) && i.isOdd() !== (7 === e))
return null;
const o = r.redSqr().redIMul(r);
return i.redSqr().redISub(o.redIAdd(Jy.b)).isZero() ?
Xy.keyPair({
pub: {
x: r,
y: i
}
}) : null
}(t, e.subarray(1, 33), e.subarray(33, 65));
default:
return null
}
}
function nA(e, t) {
const n = t.encode(null, 33 === e.length);
for (let r = 0; r < e.length; ++r)
e[r] = n[r]
}
var rA = {
contextRandomize: () => 0,
privateKeyVerify(e) {
const t = new eA(e);
return t.cmp(Jy.n) < 0 && !t.isZero() ? 0 : 1
},
privateKeyNegate(e) {
const t = new eA(e)
, n = Jy.n.sub(t).umod(Jy.n).toArrayLike(Uint8Array, "be", 32);
return e.set(n),
0
},
privateKeyTweakAdd(e, t) {
const n = new eA(t);
if (n.cmp(Jy.n) >= 0)
return 1;
if (n.iadd(new eA(e)),
n.cmp(Jy.n) >= 0 && n.isub(Jy.n),
n.isZero())
return 1;
const r = n.toArrayLike(Uint8Array, "be", 32);
return e.set(r),
0
},
privateKeyTweakMul(e, t) {
let n = new eA(t);
if (n.cmp(Jy.n) >= 0 || n.isZero())
return 1;
n.imul(new eA(e)),
n.cmp(Jy.n) >= 0 && (n = n.umod(Jy.n));
const r = n.toArrayLike(Uint8Array, "be", 32);
return e.set(r),
0
},
publicKeyVerify: e => null === tA(e) ? 1 : 0,
publicKeyCreate(e, t) {
const n = new eA(t);
return n.cmp(Jy.n) >= 0 || n.isZero() ? 1 : (nA(e,
Xy.keyFromPrivate(t).getPublic()),
0)
},
publicKeyConvert(e, t) {
const n = tA(t);
return null === n ? 1 : (nA(e, n.getPublic()),
0)
},
publicKeyNegate(e, t) {
const n = tA(t);
if (null === n)
return 1;
const r = n.getPublic();
return r.y = r.y.redNeg(),
nA(e, r),
0
},
publicKeyCombine(e, t) {
const n = new Array(t.length);
for (let i = 0; i < t.length; ++i)
if (n[i] = tA(t[i]),
null === n[i])
return 1;
let r = n[0].getPublic();
for (let i = 1; i < n.length; ++i)
r = r.add(n[i].pub);
return r.isInfinity() ? 2 : (nA(e, r),
0)
},
publicKeyTweakAdd(e, t, n) {
const r = tA(t);
if (null === r)
return 1;
if ((n = new eA(n)).cmp(Jy.n) >= 0)
return 2;
const i = r.getPublic().add(Jy.g.mul(n));
return i.isInfinity() ? 2 : (nA(e, i),
0)
},
publicKeyTweakMul(e, t, n) {
const r = tA(t);
return null === r ? 1 : (n = new eA(n)).cmp(Jy.n) >= 0 || n.isZero() ?
2 : (nA(e, r.getPublic().mul(n)),
0)
},
signatureNormalize(e) {
const t = new eA(e.subarray(0, 32))
, n = new eA(e.subarray(32, 64));
return t.cmp(Jy.n) >= 0 || n.cmp(Jy.n) >= 0 ? 1 : (1 ===
n.cmp(Xy.nh) && e.set(Jy.n.sub(n).toArrayLike(Uint8Array, "be", 32), 32),
0)
},
signatureExport(e, t) {
const n = t.subarray(0, 32)
, r = t.subarray(32, 64);
if (new eA(n).cmp(Jy.n) >= 0)
return 1;
if (new eA(r).cmp(Jy.n) >= 0)
return 1;
const {output: i} = e;
let o = i.subarray(4, 37);
o[0] = 0,
o.set(n, 1);
let a = 33
, s = 0;
for (; a > 1 && 0 === o[s] && !(128 & o[s + 1]); --a,
++s)
;
if (o = o.subarray(s),
128 & o[0])
return 1;
if (a > 1 && 0 === o[0] && !(128 & o[1]))
return 1;
let u = i.subarray(39, 72);
u[0] = 0,
u.set(r, 1);
let l = 33
, c = 0;
for (; l > 1 && 0 === u[c] && !(128 & u[c + 1]); --l,
++c)
;
return u = u.subarray(c),
128 & u[0] || l > 1 && 0 === u[0] && !(128 & u[1]) ? 1 : (e.outputlen =
6 + a + l,
i[0] = 48,
i[1] = e.outputlen - 2,
i[2] = 2,
i[3] = o.length,
i.set(o, 4),
i[4 + a] = 2,
i[5 + a] = u.length,
i.set(u, 6 + a),
0)
},
signatureImport(e, t) {
if (t.length < 8)
return 1;
if (t.length > 72)
return 1;
if (48 !== t[0])
return 1;
if (t[1] !== t.length - 2)
return 1;
if (2 !== t[2])
return 1;
const n = t[3];
if (0 === n)
return 1;
if (5 + n >= t.length)
return 1;
if (2 !== t[4 + n])
return 1;
const r = t[5 + n];
if (0 === r)
return 1;
if (6 + n + r !== t.length)
return 1;
if (128 & t[4])
return 1;
if (n > 1 && 0 === t[4] && !(128 & t[5]))
return 1;
if (128 & t[n + 6])
return 1;
if (r > 1 && 0 === t[n + 6] && !(128 & t[n + 7]))
return 1;
let i = t.subarray(4, 4 + n);
if (33 === i.length && 0 === i[0] && (i = i.subarray(1)),
i.length > 32)
return 1;
let o = t.subarray(6 + n);
if (33 === o.length && 0 === o[0] && (o = o.slice(1)),
o.length > 32)
throw new Error("S length is too long");
let a = new eA(i);
a.cmp(Jy.n) >= 0 && (a = new eA(0));
let s = new eA(t.subarray(6 + n));
return s.cmp(Jy.n) >= 0 && (s = new eA(0)),
e.set(a.toArrayLike(Uint8Array, "be", 32), 0),
e.set(s.toArrayLike(Uint8Array, "be", 32), 32),
0
},
ecdsaSign(e, t, n, r, i) {
if (i) {
const e = i;
i = i => {
const o = e(t, n, null, r, i);
if (!(o instanceof Uint8Array && 32 === o.length))
throw new Error("This is the way");
return new eA(o)
}
}
const o = new eA(n);
if (o.cmp(Jy.n) >= 0 || o.isZero())
return 1;
let a;
try {
a = Xy.sign(t, n, {
canonical: !0,
k: i,
pers: r
})
} catch (e) {
return 1
}
return e.signature.set(a.r.toArrayLike(Uint8Array, "be", 32), 0),
e.signature.set(a.s.toArrayLike(Uint8Array, "be", 32), 32),
e.recid = a.recoveryParam,
0
},
ecdsaVerify(e, t, n) {
const r = {
r: e.subarray(0, 32),
s: e.subarray(32, 64)
}
, i = new eA(r.r)
, o = new eA(r.s);
if (i.cmp(Jy.n) >= 0 || o.cmp(Jy.n) >= 0)
return 1;
if (1 === o.cmp(Xy.nh) || i.isZero() || o.isZero())
return 3;
const a = tA(n);
if (null === a)
return 2;
const s = a.getPublic();
return Xy.verify(t, r, s) ? 0 : 3
},
ecdsaRecover(e, t, n, r) {
const i = {
r: t.slice(0, 32),
s: t.slice(32, 64)
}
, o = new eA(i.r)
, a = new eA(i.s);
if (o.cmp(Jy.n) >= 0 || a.cmp(Jy.n) >= 0)
return 1;
if (o.isZero() || a.isZero())
return 2;
let s;
try {
s = Xy.recoverPubKey(r, i, n)
} catch (e) {
return 2
}
return nA(e, s),
0
},
ecdh(e, t, n, r, i, o, a) {
const s = tA(t);
if (null === s)
return 1;
const u = new eA(n);
if (u.cmp(Jy.n) >= 0 || u.isZero())
return 2;
const l = s.getPublic().mul(u);
if (void 0 === i) {
const t = l.encode(null, !0)
, n = Xy.hash().update(t).digest();
for (let r = 0; r < 32; ++r)
e[r] = n[r]
} else {
o || (o = new Uint8Array(32));
const t = l.getX().toArray("be", 32);
for (let e = 0; e < 32; ++e)
o[e] = t[e];
a || (a = new Uint8Array(32));
const n = l.getY().toArray("be", 32);
for (let e = 0; e < 32; ++e)
a[e] = n[e];
const s = i(o, a, r);
if (!(s instanceof Uint8Array && s.length === e.length))
return 2;
e.set(s)
}
return 0
}
}
, iA = (e => ({
contextRandomize(t) {
if (sg(null === t || t instanceof Uint8Array, "Expected seed to be an
Uint8Array or null"),
null !== t && ug("seed", t, 32),
1 === e.contextRandomize(t))
throw new Error(Xm)
},
privateKeyVerify: t => (ug("private key", t, 32),
0 === e.privateKeyVerify(t)),
privateKeyNegate(t) {
switch (ug("private key", t, 32),
e.privateKeyNegate(t)) {
case 0:
return t;
case 1:
throw new Error(Qm)
}
},
privateKeyTweakAdd(t, n) {
switch (ug("private key", t, 32),
ug("tweak", n, 32),
e.privateKeyTweakAdd(t, n)) {
case 0:
return t;
case 1:
throw new Error(Zm)
}
},
privateKeyTweakMul(t, n) {
switch (ug("private key", t, 32),
ug("tweak", n, 32),
e.privateKeyTweakMul(t, n)) {
case 0:
return t;
case 1:
throw new Error(Gm)
}
},
publicKeyVerify: t => (ug("public key", t, [33, 65]),
0 === e.publicKeyVerify(t)),
publicKeyCreate(t) {
let n = !(arguments.length > 1 && void 0 !== arguments[1]) ||
arguments[1]
, r = arguments.length > 2 ? arguments[2] : void 0;
switch (ug("private key", t, 32),
lg(n),
r = cg(r, n ? 33 : 65),
e.publicKeyCreate(r, t)) {
case 0:
return r;
case 1:
throw new Error(Jm);
case 2:
throw new Error(tg)
}
},
publicKeyConvert(t) {
let n = !(arguments.length > 1 && void 0 !== arguments[1]) ||
arguments[1]
, r = arguments.length > 2 ? arguments[2] : void 0;
switch (ug("public key", t, [33, 65]),
lg(n),
r = cg(r, n ? 33 : 65),
e.publicKeyConvert(r, t)) {
case 0:
return r;
case 1:
throw new Error(eg);
case 2:
throw new Error(tg)
}
},
publicKeyNegate(t) {
let n = !(arguments.length > 1 && void 0 !== arguments[1]) ||
arguments[1]
, r = arguments.length > 2 ? arguments[2] : void 0;
switch (ug("public key", t, [33, 65]),
lg(n),
r = cg(r, n ? 33 : 65),
e.publicKeyNegate(r, t)) {
case 0:
return r;
case 1:
throw new Error(eg);
case 2:
throw new Error(Qm);
case 3:
throw new Error(tg)
}
},
publicKeyCombine(t) {
let n = !(arguments.length > 1 && void 0 !== arguments[1]) ||
arguments[1]
, r = arguments.length > 2 ? arguments[2] : void 0;
sg(Array.isArray(t), "Expected public keys to be an Array"),
sg(t.length > 0, "Expected public keys array will have more than
zero items");
for (const e of t)
ug("public key", e, [33, 65]);
switch (lg(n),
r = cg(r, n ? 33 : 65),
e.publicKeyCombine(r, t)) {
case 0:
return r;
case 1:
throw new Error(eg);
case 2:
throw new Error(ng);
case 3:
throw new Error(tg)
}
},
publicKeyTweakAdd(t, n) {
let r = !(arguments.length > 2 && void 0 !== arguments[2]) ||
arguments[2]
, i = arguments.length > 3 ? arguments[3] : void 0;
switch (ug("public key", t, [33, 65]),
ug("tweak", n, 32),
lg(r),
i = cg(i, r ? 33 : 65),
e.publicKeyTweakAdd(i, t, n)) {
case 0:
return i;
case 1:
throw new Error(eg);
case 2:
throw new Error(Zm)
}
},
publicKeyTweakMul(t, n) {
let r = !(arguments.length > 2 && void 0 !== arguments[2]) ||
arguments[2]
, i = arguments.length > 3 ? arguments[3] : void 0;
switch (ug("public key", t, [33, 65]),
ug("tweak", n, 32),
lg(r),
i = cg(i, r ? 33 : 65),
e.publicKeyTweakMul(i, t, n)) {
case 0:
return i;
case 1:
throw new Error(eg);
case 2:
throw new Error(Gm)
}
},
signatureNormalize(t) {
switch (ug("signature", t, 64),
e.signatureNormalize(t)) {
case 0:
return t;
case 1:
throw new Error(rg)
}
},
signatureExport(t, n) {
ug("signature", t, 64);
const r = {
output: n = cg(n, 72),
outputlen: 72
};
switch (e.signatureExport(r, t)) {
case 0:
return n.slice(0, r.outputlen);
case 1:
throw new Error(rg);
case 2:
throw new Error(Qm)
}
},
signatureImport(t, n) {
switch (ug("signature", t),
n = cg(n, 64),
e.signatureImport(n, t)) {
case 0:
return n;
case 1:
throw new Error(rg);
case 2:
throw new Error(Qm)
}
},
ecdsaSign(t, n) {
let r = arguments.length > 2 && void 0 !== arguments[2] ?
arguments[2] : {}
, i = arguments.length > 3 ? arguments[3] : void 0;
ug("message", t, 32),
ug("private key", n, 32),
sg("Object" === dg(r), "Expected options to be an Object"),
void 0 !== r.data && ug("options.data", r.data),
void 0 !== r.noncefn && sg("Function" === dg(r.noncefn), "Expected
options.noncefn to be a Function");
const o = {
signature: i = cg(i, 64),
recid: null
};
switch (e.ecdsaSign(o, t, n, r.data, r.noncefn)) {
case 0:
return o;
case 1:
throw new Error(ig);
case 2:
throw new Error(Qm)
}
},
ecdsaVerify(t, n, r) {
switch (ug("signature", t, 64),
ug("message", n, 32),
ug("public key", r, [33, 65]),
e.ecdsaVerify(t, n, r)) {
case 0:
return !0;
case 3:
return !1;
case 1:
throw new Error(rg);
case 2:
throw new Error(eg)
}
},
ecdsaRecover(t, n, r) {
let i = !(arguments.length > 3 && void 0 !== arguments[3]) ||
arguments[3]
, o = arguments.length > 4 ? arguments[4] : void 0;
switch (ug("signature", t, 64),
sg("Number" === dg(n) && n >= 0 && n <= 3, "Expected recovery id
to be a Number within interval [0, 3]"),
ug("message", r, 32),
lg(i),
o = cg(o, i ? 33 : 65),
e.ecdsaRecover(o, t, n, r)) {
case 0:
return o;
case 1:
throw new Error(rg);
case 2:
throw new Error(og);
case 3:
throw new Error(Qm)
}
},
ecdh(t, n) {
let r = arguments.length > 2 && void 0 !== arguments[2] ?
arguments[2] : {}
, i = arguments.length > 3 ? arguments[3] : void 0;
switch (ug("public key", t, [33, 65]),
ug("private key", n, 32),
sg("Object" === dg(r), "Expected options to be an Object"),
void 0 !== r.data && ug("options.data", r.data),
void 0 !== r.hashfn ? (sg("Function" === dg(r.hashfn), "Expected
options.hashfn to be a Function"),
void 0 !== r.xbuf && ug("options.xbuf", r.xbuf, 32),
void 0 !== r.ybuf && ug("options.ybuf", r.ybuf, 32),
ug("output", i)) : i = cg(i, 32),
e.ecdh(i, t, n, r.data, r.hashfn, r.xbuf, r.ybuf)) {
case 0:
return i;
case 1:
throw new Error(eg);
case 2:
throw new Error(ag)
}
}
}))(rA)
, oA = {}
, aA = {};
!function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.SECRET_KEY_LENGTH = e.AES_IV_PLUS_TAG_LENGTH =
e.AES_TAG_LENGTH = e.AES_IV_LENGTH =
e.UNCOMPRESSED_PUBLIC_KEY_SIZE = void 0,
e.UNCOMPRESSED_PUBLIC_KEY_SIZE = 65,
e.AES_IV_LENGTH = 16,
e.AES_TAG_LENGTH = 16,
e.AES_IV_PLUS_TAG_LENGTH = e.AES_IV_LENGTH +
e.AES_TAG_LENGTH,
e.SECRET_KEY_LENGTH = 32
}(aA);
var sA = r && r.__importDefault || function(e) {
return e && e.__esModule ? e : {
default: e
}
}
;
Object.defineProperty(oA, "__esModule", {
value: !0
}),
oA.aesDecrypt = oA.aesEncrypt = oA.getValidSecret = oA.decodeHex =
oA.remove0x = void 0;
var uA = zm()
, lA = sA(iA)
, cA = aA;
function dA(e) {
return e.startsWith("0x") || e.startsWith("0X") ? e.slice(2) : e
}
oA.remove0x = dA,
oA.decodeHex = function(e) {
return _.from(dA(e), "hex")
}
,
oA.getValidSecret = function() {
var e;
do {
e = (0,
uA.randomBytes)(cA.SECRET_KEY_LENGTH)
} while (!lA.default.privateKeyVerify(e));
return e
}
,
oA.aesEncrypt = function(e, t) {
var n = (0,
uA.randomBytes)(cA.AES_IV_LENGTH)
, r = (0,
uA.createCipheriv)("aes-256-gcm", e, n)
, i = _.concat([r.update(t), r.final()])
, o = r.getAuthTag();
return _.concat([n, o, i])
}
,
oA.aesDecrypt = function(e, t) {
var n = t.slice(0, cA.AES_IV_LENGTH)
, r = t.slice(cA.AES_IV_LENGTH, cA.AES_IV_PLUS_TAG_LENGTH)
, i = t.slice(cA.AES_IV_PLUS_TAG_LENGTH)
, o = (0,
uA.createDecipheriv)("aes-256-gcm", e, n);
return o.setAuthTag(r),
_.concat([o.update(i), o.final()])
}
;
var fA = {}
, hA = r && r.__importDefault || function(e) {
return e && e.__esModule ? e : {
default: e
}
}
;
Object.defineProperty(fA, "__esModule", {
value: !0
});
var pA = hA(Ym)
, mA = hA(iA)
, gA = oA
, vA = aA
, bA = function() {
function e(e) {
this.uncompressed = _.from(mA.default.publicKeyConvert(e, !1)),
this.compressed = _.from(mA.default.publicKeyConvert(e, !0))
}
return e.fromHex = function(t) {
var n = (0,
gA.decodeHex)(t);
if (n.length === vA.UNCOMPRESSED_PUBLIC_KEY_SIZE - 1) {
var r = _.from([4]);
return new e(_.concat([r, n]))
}
return new e(n)
}
,
e.prototype.toHex = function(e) {
return void 0 === e && (e = !0),
e ? this.compressed.toString("hex") :
this.uncompressed.toString("hex")
}
,
e.prototype.decapsulate = function(e) {
var t = _.concat([this.uncompressed, e.multiply(this)]);
return (0,
pA.default)(t, 32, {
hash: "SHA-256"
})
}
,
e.prototype.equals = function(e) {
return this.uncompressed.equals(e.uncompressed)
}
,
e
}();
fA.default = bA;
var yA = r && r.__importDefault || function(e) {
return e && e.__esModule ? e : {
default: e
}
}
;
Object.defineProperty(ce, "__esModule", {
value: !0
});
var AA = yA(Ym)
, wA = yA(iA)
, _A = oA
, EA = yA(fA)
, SA = function() {
function e(e) {
if (this.secret = e || (0,
_A.getValidSecret)(),
!wA.default.privateKeyVerify(this.secret))
throw new Error("Invalid private key");
this.publicKey = new
EA.default(_.from(wA.default.publicKeyCreate(this.secret)))
}
return e.fromHex = function(t) {
return new e((0,
_A.decodeHex)(t))
}
,
e.prototype.toHex = function() {
return "0x".concat(this.secret.toString("hex"))
}
,
e.prototype.encapsulate = function(e) {
var t = _.concat([this.publicKey.uncompressed, this.multiply(e)]);
return (0,
AA.default)(t, 32, {
hash: "SHA-256"
})
}
,
e.prototype.multiply = function(e) {
return _.from(wA.default.publicKeyTweakMul(e.compressed,
this.secret, !1))
}
,
e.prototype.equals = function(e) {
return this.secret.equals(e.secret)
}
,
e
}();
ce.default = SA,
function(e) {
var t = r && r.__importDefault || function(e) {
return e && e.__esModule ? e : {
default: e
}
}
;
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.PublicKey = e.PrivateKey = void 0;
var n = ce;
Object.defineProperty(e, "PrivateKey", {
enumerable: !0,
get: function() {
return t(n).default
}
});
var i = fA;
Object.defineProperty(e, "PublicKey", {
enumerable: !0,
get: function() {
return t(i).default
}
})
}(le),
function(e) {
Object.defineProperty(e, "__esModule", {
value: !0
}),
e.utils = e.PublicKey = e.PrivateKey = e.decrypt = e.encrypt = void 0;
var t = le
, n = oA
, r = aA;
e.encrypt = function(e, r) {
var i = new t.PrivateKey
, o = e instanceof _ ? new t.PublicKey(e) : t.PublicKey.fromHex(e)
, a = i.encapsulate(o)
, s = (0,
n.aesEncrypt)(a, r);
return _.concat([i.publicKey.uncompressed, s])
}
,
e.decrypt = function(e, i) {
var o = e instanceof _ ? new t.PrivateKey(e) :
t.PrivateKey.fromHex(e)
, a = new t.PublicKey(i.slice(0,
r.UNCOMPRESSED_PUBLIC_KEY_SIZE))
, s = i.slice(r.UNCOMPRESSED_PUBLIC_KEY_SIZE)
, u = a.decapsulate(o);
return (0,
n.aesDecrypt)(u, s)
}
;
var i = le;
Object.defineProperty(e, "PrivateKey", {
enumerable: !0,
get: function() {
return i.PrivateKey
}
}),
Object.defineProperty(e, "PublicKey", {
enumerable: !0,
get: function() {
return i.PublicKey
}
}),
e.utils = {
aesDecrypt: n.aesDecrypt,
aesEncrypt: n.aesEncrypt,
decodeHex: n.decodeHex,
getValidSecret: n.getValidSecret,
remove0x: n.remove0x
}
}(ue);
var kA = {
exports: {}
};
!function(e, t) {
!function(t) {
var n = Object.hasOwnProperty
, r = Array.isArray ? Array.isArray : function(e) {
return "[object Array]" === Object.prototype.toString.call(e)
}
, i = "object" == typeof je && !0
, o = "function" == typeof Symbol
, a = "object" == typeof Reflect
, s = "function" == typeof setImmediate ? setImmediate :
setTimeout
, u = o ? a && "function" == typeof Reflect.ownKeys ?
Reflect.ownKeys : function(e) {
var t = Object.getOwnPropertyNames(e);
return t.push.apply(t, Object.getOwnPropertySymbols(e)),
t
}
: Object.keys;
function l() {
this._events = {},
this._conf && c.call(this, this._conf)
}
function c(e) {
e && (this._conf = e,
e.delimiter && (this.delimiter = e.delimiter),
e.maxListeners !== t && (this._maxListeners = e.maxListeners),
e.wildcard && (this.wildcard = e.wildcard),
e.newListener && (this._newListener = e.newListener),
e.removeListener && (this._removeListener =
e.removeListener),
e.verboseMemoryLeak && (this.verboseMemoryLeak =
e.verboseMemoryLeak),
e.ignoreErrors && (this.ignoreErrors = e.ignoreErrors),
this.wildcard && (this.listenerTree = {}))
}
function d(e, t) {
var n = "(node) warning: possible EventEmitter memory leak
detected. " + e + " listeners added. Use emitter.setMaxListeners() to increase limit.";
if (this.verboseMemoryLeak && (n += " Event name: " + t + "."),
void 0 !== je && je.emitWarning) {
var r = new Error(n);
r.name = "MaxListenersExceededWarning",
r.emitter = this,
r.count = e,
je.emitWarning(r)
} else
console.error(n),
console.trace && console.trace()
}
var f = function(e, t, n) {
var r = arguments.length;
switch (r) {
case 0:
return [];
case 1:
return [e];
case 2:
return [e, t];
case 3:
return [e, t, n];
default:
for (var i = new Array(r); r--; )
i[r] = arguments[r];
return i
}
};
function h(e, n) {
for (var r = {}, i = e.length, o = n ? n.length : 0, a = 0; a < i; a++)
r[e[a]] = a < o ? n[a] : t;
return r
}
function p(e, t, n) {
var r, i;
if (this._emitter = e,
this._target = t,
this._listeners = {},
this._listenersCount = 0,
(n.on || n.off) && (r = n.on,
i = n.off),
t.addEventListener ? (r = t.addEventListener,
i = t.removeEventListener) : t.addListener ? (r = t.addListener,
i = t.removeListener) : t.on && (r = t.on,
i = t.off),
!r && !i)
throw Error("target does not implement any known event
API");
if ("function" != typeof r)
throw TypeError("on method must be a function");
if ("function" != typeof i)
throw TypeError("off method must be a function");
this._on = r,
this._off = i;
var o = e._observers;
o ? o.push(this) : e._observers = [this]
}
function m(e, r, i, o) {
var a = Object.assign({}, r);
if (!e)
return a;
if ("object" != typeof e)
throw TypeError("options must be an object");
var s, u, l, c = Object.keys(e), d = c.length;
function f(e) {
throw Error('Invalid "' + s + '" option value' + (e ? ". Reason:
" + e : ""))
}
for (var h = 0; h < d; h++) {
if (s = c[h],
!o && !n.call(r, s))
throw Error('Unknown "' + s + '" option');
(u = e[s]) !== t && (l = i[s],
a[s] = l ? l(u, f) : u)
}
return a
}
function g(e, t) {
return "function" == typeof e && e.hasOwnProperty("prototype")
|| t("value must be a constructor"),
e
}
function v(e) {
var t = "value must be type of " + e.join("|")
, n = e.length
, r = e[0]
, i = e[1];
return 1 === n ? function(e, n) {
if (typeof e === r)
return e;
n(t)
}
: 2 === n ? function(e, n) {
var o = typeof e;
if (o === r || o === i)
return e;
n(t)
}
: function(r, i) {
for (var o = typeof r, a = n; a-- > 0; )
if (o === e[a])
return r;
i(t)
}
}
Object.assign(p.prototype, {
subscribe: function(e, t, n) {
var r = this
, i = this._target
, o = this._emitter
, a = this._listeners
, s = function() {
var r = f.apply(null, arguments)
,a={
data: r,
name: t,
original: e
};
n ? !1 !== n.call(i, a) && o.emit.apply(o,
[a.name].concat(r)) : o.emit.apply(o, [t].concat(r))
};
if (a[e])
throw Error("Event '" + e + "' is already listening");
this._listenersCount++,
o._newListener && o._removeListener && !
r._onNewListener ? (this._onNewListener = function(n) {
n === t && null === a[e] && (a[e] = s,
r._on.call(i, e, s))
}
,
o.on("newListener", this._onNewListener),
this._onRemoveListener = function(n) {
n === t && !o.hasListeners(n) && a[e] && (a[e] = null,
r._off.call(i, e, s))
}
,
a[e] = null,
o.on("removeListener", this._onRemoveListener)) : (a[e] =
s,
r._on.call(i, e, s))
},
unsubscribe: function(e) {
var t, n, r, i = this, o = this._listeners, a = this._emitter, s =
this._off, l = this._target;
if (e && "string" != typeof e)
throw TypeError("event must be a string");
function c() {
i._onNewListener && (a.off("newListener",
i._onNewListener),
a.off("removeListener", i._onRemoveListener),
i._onNewListener = null,
i._onRemoveListener = null);
var e = w.call(a, i);
a._observers.splice(e, 1)
}
if (e) {
if (!(t = o[e]))
return;
s.call(l, e, t),
delete o[e],
--this._listenersCount || c()
} else {
for (r = (n = u(o)).length; r-- > 0; )
e = n[r],
s.call(l, e, o[e]);
this._listeners = {},
this._listenersCount = 0,
c()
}
}
});
var b = v(["function"])
, y = v(["object", "function"]);
function A(e, t, n) {
var r, i, o, a = 0, s = new e((function(u, l, c) {
function d() {
i && (i = null),
a && (clearTimeout(a),
a = 0)
}
n = m(n, {
timeout: 0,
overload: !1
}, {
timeout: function(e, t) {
return ("number" != typeof (e *= 1) || e < 0 || !
Number.isFinite(e)) && t("timeout must be a positive number"),
e
}
}),
r = !n.overload && "function" == typeof e.prototype.cancel
&& "function" == typeof c;
var f = function(e) {
d(),
u(e)
}
, h = function(e) {
d(),
l(e)
};
r ? t(f, h, c) : (i = [function(e) {
h(e || Error("canceled"))
}
],
t(f, h, (function(e) {
if (o)
throw Error("Unable to subscribe on cancel event
asynchronously");
if ("function" != typeof e)
throw TypeError("onCancel callback must be a
function");
i.push(e)
}
)),
o = !0),
n.timeout > 0 && (a = setTimeout((function() {
var e = Error("timeout");
e.code = "ETIMEDOUT",
a = 0,
s.cancel(e),
l(e)
}
), n.timeout))
}
));
return r || (s.cancel = function(e) {
if (i) {
for (var t = i.length, n = 1; n < t; n++)
i[n](e);
i[0](e),
i = null
}
}
),
s
}
function w(e) {
var t = this._observers;
if (!t)
return -1;
for (var n = t.length, r = 0; r < n; r++)
if (t[r]._target === e)
return r;
return -1
}
function _(e, t, n, r, i) {
if (!n)
return null;
if (0 === r) {
var o = typeof t;
if ("string" === o) {
var a, s, l = 0, c = 0, d = this.delimiter, f = d.length;
if (-1 !== (s = t.indexOf(d))) {
a = new Array(5);
do {
a[l++] = t.slice(c, s),
c=s+f
} while (-1 !== (s = t.indexOf(d, c)));
a[l++] = t.slice(c),
t = a,
i=l
} else
t = [t],
i=1
} else
"object" === o ? i = t.length : (t = [t],
i = 1)
}
var h, p, m, g, v, b, y, A = null, w = t[r], E = t[r + 1];
if (r === i)
n._listeners && ("function" == typeof n._listeners ? (e &&
e.push(n._listeners),
A = [n]) : (e && e.push.apply(e, n._listeners),
A = [n]));
else {
if ("*" === w) {
for (s = (b = u(n)).length; s-- > 0; )
"_listeners" !== (h = b[s]) && (y = _(e, t, n[h], r + 1,
i)) && (A ? A.push.apply(A, y) : A = y);
return A
}
if ("**" === w) {
for ((v = r + 1 === i || r + 2 === i && "*" === E) &&
n._listeners && (A = _(e, t, n, i, i)),
s = (b = u(n)).length; s-- > 0; )
"_listeners" !== (h = b[s]) && ("*" === h || "**" ===
h ? (n[h]._listeners && !v && (y = _(e, t, n[h], i, i)) && (A ? A.push.apply(A, y) : A = y),
y = _(e, t, n[h], r, i)) : y = _(e, t, n[h], h === E ? r +
2 : r, i),
y && (A ? A.push.apply(A, y) : A = y));
return A
}
n[w] && (A = _(e, t, n[w], r + 1, i))
}
if ((p = n["*"]) && _(e, t, p, r + 1, i),
m = n["**"])
if (r < i)
for (m._listeners && _(e, t, m, i, i),
s = (b = u(m)).length; s-- > 0; )
"_listeners" !== (h = b[s]) && (h === E ? _(e, t, m[h],
r + 2, i) : h === w ? _(e, t, m[h], r + 1, i) : ((g = {})[h] = m[h],
_(e, t, {
"**": g
}, r + 1, i)));
else
m._listeners ? _(e, t, m, i, i) : m["*"] && m["*"]._listeners
&& _(e, t, m["*"], i, i);
return A
}
function E(e, t, n) {
var r, i, o = 0, a = 0, s = this.delimiter, u = s.length;
if ("string" == typeof e)
if (-1 !== (r = e.indexOf(s))) {
i = new Array(5);
do {
i[o++] = e.slice(a, r),
a=r+u
} while (-1 !== (r = e.indexOf(s, a)));
i[o++] = e.slice(a)
} else
i = [e],
o = 1;
else
i = e,
o = e.length;
if (o > 1)
for (r = 0; r + 1 < o; r++)
if ("**" === i[r] && "**" === i[r + 1])
return;
var l, c = this.listenerTree;
for (r = 0; r < o; r++)
if (c = c[l = i[r]] || (c[l] = {}),
r === o - 1)
return c._listeners ? ("function" == typeof c._listeners
&& (c._listeners = [c._listeners]),
n ? c._listeners.unshift(t) : c._listeners.push(t),
!c._listeners.warned && this._maxListeners > 0 &&
c._listeners.length > this._maxListeners && (c._listeners.warned = !0,
d.call(this, c._listeners.length, l))) : c._listeners = t,
!0;
return !0
}
function S(e, t, n, r) {
for (var i, o, a, s, l = u(e), c = l.length, d = e._listeners; c-- > 0; )
i = e[o = l[c]],
a = "_listeners" === o ? n : n ? n.concat(o) : [o],
s = r || "symbol" == typeof o,
d && t.push(s ? a : a.join(this.delimiter)),
"object" == typeof i && S.call(this, i, t, a, s);
return t
}
function k(e) {
for (var t, n, r, i = u(e), o = i.length; o-- > 0; )
(t = e[n = i[o]]) && (r = !0,
"_listeners" === n || k(t) || delete e[n]);
return r
}
function M(e, t, n) {
this.emitter = e,
this.event = t,
this.listener = n
}
function C(e, n, r) {
if (!0 === r)
a = !0;
else if (!1 === r)
o = !0;
else {
if (!r || "object" != typeof r)
throw TypeError("options should be an object or true");
var o = r.async
, a = r.promisify
, u = r.nextTick
, l = r.objectify
}
if (o || u || a) {
var c = n
, d = n._origin || n;
if (u && !i)
throw Error("process.nextTick is not supported");
a === t && (a = "AsyncFunction" === n.constructor.name),
n = function() {
var e = arguments
, t = this
, n = this.event;
return a ? u ? Promise.resolve() : new
Promise((function(e) {
s(e)
}
)).then((function() {
return t.event = n,
c.apply(t, e)
}
)) : (u ? Se : s)((function() {
t.event = n,
c.apply(t, e)
}
))
}
,
n._async = !0,
n._origin = d
}
return [n, l ? new M(this,e,n) : this]
}
function x(e) {
this._events = {},
this._newListener = !1,
this._removeListener = !1,
this.verboseMemoryLeak = !1,
c.call(this, e)
}
M.prototype.off = function() {
return this.emitter.off(this.event, this.listener),
this
}
,
x.EventEmitter2 = x,
x.prototype.listenTo = function(e, n, i) {
if ("object" != typeof e)
throw TypeError("target musts be an object");
var o = this;
function a(t) {
if ("object" != typeof t)
throw TypeError("events must be an object");
var n, r = i.reducers, a = w.call(o, e);
n = -1 === a ? new p(o,e,i) : o._observers[a];
for (var s, l = u(t), c = l.length, d = "function" == typeof r, f =
0; f < c; f++)
s = l[f],
n.subscribe(s, t[s] || s, d ? r : r && r[s])
}
return i = m(i, {
on: t,
off: t,
reducers: t
}, {
on: b,
off: b,
reducers: y
}),
r(n) ? a(h(n)) : a("string" == typeof n ? h(n.split(/\s+/)) : n),
this
}
,
x.prototype.stopListeningTo = function(e, t) {
var n = this._observers;
if (!n)
return !1;
var r, i = n.length, o = !1;
if (e && "object" != typeof e)
throw TypeError("target should be an object");
for (; i-- > 0; )
r = n[i],
e && r._target !== e || (r.unsubscribe(t),
o = !0);
return o
}
,
x.prototype.delimiter = ".",
x.prototype.setMaxListeners = function(e) {
e !== t && (this._maxListeners = e,
this._conf || (this._conf = {}),
this._conf.maxListeners = e)
}
,
x.prototype.getMaxListeners = function() {
return this._maxListeners
}
,
x.prototype.event = "",
x.prototype.once = function(e, t, n) {
return this._once(e, t, !1, n)
}
,
x.prototype.prependOnceListener = function(e, t, n) {
return this._once(e, t, !0, n)
}
,
x.prototype._once = function(e, t, n, r) {
return this._many(e, 1, t, n, r)
}
,
x.prototype.many = function(e, t, n, r) {
return this._many(e, t, n, !1, r)
}
,
x.prototype.prependMany = function(e, t, n, r) {
return this._many(e, t, n, !0, r)
}
,
x.prototype._many = function(e, t, n, r, i) {
var o = this;
if ("function" != typeof n)
throw new Error("many only accepts instances of
Function");
function a() {
return 0 == --t && o.off(e, a),
n.apply(this, arguments)
}
return a._origin = n,
this._on(e, a, r, i)
}
,
x.prototype.emit = function() {
if (!this._events && !this._all)
return !1;
this._events || l.call(this);
var e, t, n, r, i, a, s = arguments[0], u = this.wildcard;
if ("newListener" === s && !this._newListener && !
this._events.newListener)
return !1;
if (u && (e = s,
"newListener" !== s && "removeListener" !== s && "object" ==
typeof s)) {
if (n = s.length,
o)
for (r = 0; r < n; r++)
if ("symbol" == typeof s[r]) {
a = !0;
break
}
a || (s = s.join(this.delimiter))
}
var c, d = arguments.length;
if (this._all && this._all.length)
for (r = 0,
n = (c = this._all.slice()).length; r < n; r++)
switch (this.event = s,
d) {
case 1:
c[r].call(this, s);
break;
case 2:
c[r].call(this, s, arguments[1]);
break;
case 3:
c[r].call(this, s, arguments[1], arguments[2]);
break;
default:
c[r].apply(this, arguments)
}
if (u)
c = [],
_.call(this, c, e, this.listenerTree, 0, n);
else {
if ("function" == typeof (c = this._events[s])) {
switch (this.event = s,
d) {
case 1:
c.call(this);
break;
case 2:
c.call(this, arguments[1]);
break;
case 3:
c.call(this, arguments[1], arguments[2]);
break;
default:
for (t = new Array(d - 1),
i = 1; i < d; i++)
t[i - 1] = arguments[i];
c.apply(this, t)
}
return !0
}
c && (c = c.slice())
}
if (c && c.length) {
if (d > 3)
for (t = new Array(d - 1),
i = 1; i < d; i++)
t[i - 1] = arguments[i];
for (r = 0,
n = c.length; r < n; r++)
switch (this.event = s,
d) {
case 1:
c[r].call(this);
break;
case 2:
c[r].call(this, arguments[1]);
break;
case 3:
c[r].call(this, arguments[1], arguments[2]);
break;
default:
c[r].apply(this, t)
}
return !0
}
if (!this.ignoreErrors && !this._all && "error" === s)
throw arguments[1]instanceof Error ? arguments[1] : new
Error("Uncaught, unspecified 'error' event.");
return !!this._all
}
,
x.prototype.emitAsync = function() {
if (!this._events && !this._all)
return !1;
this._events || l.call(this);
var e, t, n, r, i, a, s = arguments[0], u = this.wildcard;
if ("newListener" === s && !this._newListener && !
this._events.newListener)
return Promise.resolve([!1]);
if (u && (e = s,
"newListener" !== s && "removeListener" !== s && "object" ==
typeof s)) {
if (r = s.length,
o)
for (i = 0; i < r; i++)
if ("symbol" == typeof s[i]) {
t = !0;
break
}
t || (s = s.join(this.delimiter))
}
var c, d = [], f = arguments.length;
if (this._all)
for (i = 0,
r = this._all.length; i < r; i++)
switch (this.event = s,
f) {
case 1:
d.push(this._all[i].call(this, s));
break;
case 2:
d.push(this._all[i].call(this, s, arguments[1]));
break;
case 3:
d.push(this._all[i].call(this, s, arguments[1],
arguments[2]));
break;
default:
d.push(this._all[i].apply(this, arguments))
}
if (u ? (c = [],
_.call(this, c, e, this.listenerTree, 0)) : c = this._events[s],
"function" == typeof c)
switch (this.event = s,
f) {
case 1:
d.push(c.call(this));
break;
case 2:
d.push(c.call(this, arguments[1]));
break;
case 3:
d.push(c.call(this, arguments[1], arguments[2]));
break;
default:
for (n = new Array(f - 1),
a = 1; a < f; a++)
n[a - 1] = arguments[a];
d.push(c.apply(this, n))
}
else if (c && c.length) {
if (c = c.slice(),
f > 3)
for (n = new Array(f - 1),
a = 1; a < f; a++)
n[a - 1] = arguments[a];
for (i = 0,
r = c.length; i < r; i++)
switch (this.event = s,
f) {
case 1:
d.push(c[i].call(this));
break;
case 2:
d.push(c[i].call(this, arguments[1]));
break;
case 3:
d.push(c[i].call(this, arguments[1], arguments[2]));
break;
default:
d.push(c[i].apply(this, n))
}
} else if (!this.ignoreErrors && !this._all && "error" === s)
return arguments[1]instanceof Error ?
Promise.reject(arguments[1]) : Promise.reject("Uncaught, unspecified 'error' event.");
return Promise.all(d)
}
,
x.prototype.on = function(e, t, n) {
return this._on(e, t, !1, n)
}
,
x.prototype.prependListener = function(e, t, n) {
return this._on(e, t, !0, n)
}
,
x.prototype.onAny = function(e) {
return this._onAny(e, !1)
}
,
x.prototype.prependAny = function(e) {
return this._onAny(e, !0)
}
,
x.prototype.addListener = x.prototype.on,
x.prototype._onAny = function(e, t) {
if ("function" != typeof e)
throw new Error("onAny only accepts instances of
Function");
return this._all || (this._all = []),
t ? this._all.unshift(e) : this._all.push(e),
this
}
,
x.prototype._on = function(e, n, r, i) {
if ("function" == typeof e)
return this._onAny(e, n),
this;
if ("function" != typeof n)
throw new Error("on only accepts instances of Function");
this._events || l.call(this);
var o, a = this;
return i !== t && (n = (o = C.call(this, e, n, i))[0],
a = o[1]),
this._newListener && this.emit("newListener", e, n),
this.wildcard ? (E.call(this, e, n, r),
a) : (this._events[e] ? ("function" == typeof this._events[e] &&
(this._events[e] = [this._events[e]]),
r ? this._events[e].unshift(n) : this._events[e].push(n),
!this._events[e].warned && this._maxListeners > 0 &&
this._events[e].length > this._maxListeners && (this._events[e].warned = !0,
d.call(this, this._events[e].length, e))) : this._events[e] = n,
a)
}
,
x.prototype.off = function(e, t) {
if ("function" != typeof t)
throw new Error("removeListener only takes instances of
Function");
var n, i = [];
if (this.wildcard) {
var o = "string" == typeof e ? e.split(this.delimiter) : e.slice();
if (!(i = _.call(this, null, o, this.listenerTree, 0)))
return this
} else {
if (!this._events[e])
return this;
n = this._events[e],
i.push({
_listeners: n
})
}
for (var a = 0; a < i.length; a++) {
var s = i[a];
if (n = s._listeners,
r(n)) {
for (var u = -1, l = 0, c = n.length; l < c; l++)
if (n[l] === t || n[l].listener && n[l].listener === t ||
n[l]._origin && n[l]._origin === t) {
u = l;
break
}
if (u < 0)
continue;
return this.wildcard ? s._listeners.splice(u, 1) :
this._events[e].splice(u, 1),
0 === n.length && (this.wildcard ? delete s._listeners :
delete this._events[e]),
this._removeListener && this.emit("removeListener", e,
t),
this
}
(n === t || n.listener && n.listener === t || n._origin &&
n._origin === t) && (this.wildcard ? delete s._listeners : delete this._events[e],
this._removeListener && this.emit("removeListener", e, t))
}
return this.listenerTree && k(this.listenerTree),
this
}
,
x.prototype.offAny = function(e) {
var t, n = 0, r = 0;
if (e && this._all && this._all.length > 0) {
for (n = 0,
r = (t = this._all).length; n < r; n++)
if (e === t[n])
return t.splice(n, 1),
this._removeListener &&
this.emit("removeListenerAny", e),
this
} else {
if (t = this._all,
this._removeListener)
for (n = 0,
r = t.length; n < r; n++)
this.emit("removeListenerAny", t[n]);
this._all = []
}
return this
}
,
x.prototype.removeListener = x.prototype.off,
x.prototype.removeAllListeners = function(e) {
if (e === t)
return !this._events || l.call(this),
this;
if (this.wildcard) {
var n, r = _.call(this, null, e, this.listenerTree, 0);
if (!r)
return this;
for (n = 0; n < r.length; n++)
r[n]._listeners = null;
this.listenerTree && k(this.listenerTree)
} else
this._events && (this._events[e] = null);
return this
}
,
x.prototype.listeners = function(e) {
var n, r, i, o, a, s = this._events;
if (e === t) {
if (this.wildcard)
throw Error("event name required for wildcard emitter");
if (!s)
return [];
for (o = (n = u(s)).length,
i = []; o-- > 0; )
"function" == typeof (r = s[n[o]]) ? i.push(r) :
i.push.apply(i, r);
return i
}
if (this.wildcard) {
if (!(a = this.listenerTree))
return [];
var l = []
, c = "string" == typeof e ? e.split(this.delimiter) : e.slice();
return _.call(this, l, c, a, 0),
l
}
return s && (r = s[e]) ? "function" == typeof r ? [r] : r : []
}
,
x.prototype.eventNames = function(e) {
var t = this._events;
return this.wildcard ? S.call(this, this.listenerTree, [], null, e) : t ?
u(t) : []
}
,
x.prototype.listenerCount = function(e) {
return this.listeners(e).length
}
,
x.prototype.hasListeners = function(e) {
if (this.wildcard) {
var n = []
, r = "string" == typeof e ? e.split(this.delimiter) : e.slice();
return _.call(this, n, r, this.listenerTree, 0),
n.length > 0
}
var i = this._events
, o = this._all;
return !!(o && o.length || i && (e === t ? u(i).length : i[e]))
}
,
x.prototype.listenersAny = function() {
return this._all ? this._all : []
}
,
x.prototype.waitFor = function(e, n) {
var r = this
, i = typeof n;
return "number" === i ? n = {
timeout: n
} : "function" === i && (n = {
filter: n
}),
A((n = m(n, {
timeout: 0,
filter: t,
handleError: !1,
Promise: Promise,
overload: !1
}, {
filter: b,
Promise: g
})).Promise, (function(t, i, o) {
function a() {
var o = n.filter;
if (!o || o.apply(r, arguments))
if (r.off(e, a),
n.handleError) {
var s = arguments[0];
s ? i(s) : t(f.apply(null, arguments).slice(1))
} else
t(f.apply(null, arguments))
}
o((function() {
r.off(e, a)
}
)),
r._on(e, a, !1)
}
), {
timeout: n.timeout,
overload: n.overload
})
}
;
var R = x.prototype;
Object.defineProperties(x, {
defaultMaxListeners: {
get: function() {
return R._maxListeners
},
set: function(e) {
if ("number" != typeof e || e < 0 || Number.isNaN(e))
throw TypeError("n must be a non-negative
number");
R._maxListeners = e
},
enumerable: !0
},
once: {
value: function(e, t, n) {
return A((n = m(n, {
Promise: Promise,
timeout: 0,
overload: !1
}, {
Promise: g
})).Promise, (function(n, r, i) {
var o;
if ("function" == typeof e.addEventListener)
return o = function() {
n(f.apply(null, arguments))
}
,
i((function() {
e.removeEventListener(t, o)
}
)),
void e.addEventListener(t, o, {
once: !0
});
var a, s = function() {
a && e.removeListener("error", a),
n(f.apply(null, arguments))
};
"error" !== t && (a = function(n) {
e.removeListener(t, s),
r(n)
}
,
e.once("error", a)),
i((function() {
a && e.removeListener("error", a),
e.removeListener(t, s)
}
)),
e.once(t, s)
}
), {
timeout: n.timeout,
overload: n.overload
})
},
writable: !0,
configurable: !0
}
}),
Object.defineProperties(R, {
_maxListeners: {
value: 10,
writable: !0,
configurable: !0
},
_observers: {
value: null,
writable: !0,
configurable: !0
}
}),
"function" == typeof t && t.amd ? t((function() {
return x
}
)) : e.exports = x
}()
}(kA);
var MA, CA = kA.exports, xA = new Uint8Array(16);
function RA() {
if (!MA && !(MA = "undefined" != typeof crypto &&
crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || "undefined" !=
typeof msCrypto && "function" == typeof msCrypto.getRandomValues &&
msCrypto.getRandomValues.bind(msCrypto)))
throw new Error("crypto.getRandomValues() not supported. See
https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
return MA(xA)
}
var TA = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]
{12}|00000000-0000-0000-0000-000000000000)$/i;
function IA(e) {
return "string" == typeof e && TA.test(e)
}
for (var PA = [], LA = 0; LA < 256; ++LA)
PA.push((LA + 256).toString(16).substr(1));
function OA(e, t, n) {
var r = (e = e || {}).random || (e.rng || RA)();
if (r[6] = 15 & r[6] | 64,
r[8] = 63 & r[8] | 128,
t) {
n = n || 0;
for (var i = 0; i < 16; ++i)
t[n + i] = r[i];
return t
}
return function(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : 0
, n = (PA[e[t + 0]] + PA[e[t + 1]] + PA[e[t + 2]] + PA[e[t + 3]] + "-" +
PA[e[t + 4]] + PA[e[t + 5]] + "-" + PA[e[t + 6]] + PA[e[t + 7]] + "-" + PA[e[t + 8]] + PA[e[t +
9]] + "-" + PA[e[t + 10]] + PA[e[t + 11]] + PA[e[t + 12]] + PA[e[t + 13]] + PA[e[t + 14]] +
PA[e[t + 15]]).toLowerCase();
if (!IA(n))
throw TypeError("Stringified UUID is invalid");
return n
}(r)
}
const NA = Object.create(null);
NA.open = "0",
NA.close = "1",
NA.ping = "2",
NA.pong = "3",
NA.message = "4",
NA.upgrade = "5",
NA.noop = "6";
const DA = Object.create(null);
Object.keys(NA).forEach((e => {
DA[NA[e]] = e
}
));
const BA = {
type: "error",
data: "parser error"
}
, jA = "function" == typeof Blob || "undefined" != typeof Blob && "[object
BlobConstructor]" === Object.prototype.toString.call(Blob)
, zA = "function" == typeof ArrayBuffer
, FA = e => "function" == typeof ArrayBuffer.isView ? ArrayBuffer.isView(e)
: e && e.buffer instanceof ArrayBuffer
, UA = (e, t, n) => {
let {type: r, data: i} = e;
return jA && i instanceof Blob ? t ? n(i) : KA(i, n) : zA && (i instanceof
ArrayBuffer || FA(i)) ? t ? n(i) : KA(new Blob([i]), n) : n(NA[r] + (i || ""))
}
, KA = (e, t) => {
const n = new FileReader;
return n.onload = function() {
const e = n.result.split(",")[1];
t("b" + (e || ""))
}
,
n.readAsDataURL(e)
}
;
function qA(e) {
return e instanceof Uint8Array ? e : e instanceof ArrayBuffer ? new
Uint8Array(e) : new Uint8Array(e.buffer,e.byteOffset,e.byteLength)
}
let HA;
function VA(e, t) {
return jA && e.data instanceof Blob ?
e.data.arrayBuffer().then(qA).then(t) : zA && (e.data instanceof ArrayBuffer ||
FA(e.data)) ? t(qA(e.data)) : void UA(e, !1, (e => {
HA || (HA = new TextEncoder),
t(HA.encode(e))
}
))
}
const WA =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
, $A = "undefined" == typeof Uint8Array ? [] : new Uint8Array(256);
for (let n = 0; n < 64; n++)
$A[WA.charCodeAt(n)] = n;
const YA = "function" == typeof ArrayBuffer
, QA = (e, t) => {
if ("string" != typeof e)
return {
type: "message",
data: GA(e, t)
};
const n = e.charAt(0);
return "b" === n ? {
type: "message",
data: ZA(e.substring(1), t)
} : DA[n] ? e.length > 1 ? {
type: DA[n],
data: e.substring(1)
}:{
type: DA[n]
} : BA
}
, ZA = (e, t) => {
if (YA) {
const n = (e => {
let t, n, r, i, o, a = .75 * e.length, s = e.length, u = 0;
"=" === e[e.length - 1] && (a--,
"=" === e[e.length - 2] && a--);
const l = new ArrayBuffer(a)
, c = new Uint8Array(l);
for (t = 0; t < s; t += 4)
n = $A[e.charCodeAt(t)],
r = $A[e.charCodeAt(t + 1)],
i = $A[e.charCodeAt(t + 2)],
o = $A[e.charCodeAt(t + 3)],
c[u++] = n << 2 | r >> 4,
c[u++] = (15 & r) << 4 | i >> 2,
c[u++] = (3 & i) << 6 | 63 & o;
return l
}
)(e);
return GA(n, t)
}
return {
base64: !0,
data: e
}
}
, GA = (e, t) => "blob" === t ? e instanceof Blob ? e : new Blob([e]) : e
instanceof ArrayBuffer ? e : e.buffer
, XA = String.fromCharCode(30);
let JA;
function ew(e) {
if (e)
return function(e) {
for (var t in ew.prototype)
e[t] = ew.prototype[t];
return e
}(e)
}
ew.prototype.on = ew.prototype.addEventListener = function(e, t) {
return this._callbacks = this._callbacks || {},
(this._callbacks["$" + e] = this._callbacks["$" + e] || []).push(t),
this
}
,
ew.prototype.once = function(e, t) {
function n() {
this.off(e, n),
t.apply(this, arguments)
}
return n.fn = t,
this.on(e, n),
this
}
,
ew.prototype.off = ew.prototype.removeListener =
ew.prototype.removeAllListeners = ew.prototype.removeEventListener = function(e, t) {
if (this._callbacks = this._callbacks || {},
0 == arguments.length)
return this._callbacks = {},
this;
var n, r = this._callbacks["$" + e];
if (!r)
return this;
if (1 == arguments.length)
return delete this._callbacks["$" + e],
this;
for (var i = 0; i < r.length; i++)
if ((n = r[i]) === t || n.fn === t) {
r.splice(i, 1);
break
}
return 0 === r.length && delete this._callbacks["$" + e],
this
}
,
ew.prototype.emit = function(e) {
this._callbacks = this._callbacks || {};
for (var t = new Array(arguments.length - 1), n = this._callbacks["$" + e],
r = 1; r < arguments.length; r++)
t[r - 1] = arguments[r];
if (n) {
r = 0;
for (var i = (n = n.slice(0)).length; r < i; ++r)
n[r].apply(this, t)
}
return this
}
,
ew.prototype.emitReserved = ew.prototype.emit,
ew.prototype.listeners = function(e) {
return this._callbacks = this._callbacks || {},
this._callbacks["$" + e] || []
}
,
ew.prototype.hasListeners = function(e) {
return !!this.listeners(e).length
}
;
const tw = "undefined" != typeof self ? self : "undefined" != typeof window ?
window : Function("return this")();
function nw(e) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r < t;
r++)
n[r - 1] = arguments[r];
return n.reduce(( (t, n) => (e.hasOwnProperty(n) && (t[n] = e[n]),
t)), {})
}
const rw = tw.setTimeout
, iw = tw.clearTimeout;
function ow(e, t) {
t.useNativeTimers ? (e.setTimeoutFn = rw.bind(tw),
e.clearTimeoutFn = iw.bind(tw)) : (e.setTimeoutFn =
tw.setTimeout.bind(tw),
e.clearTimeoutFn = tw.clearTimeout.bind(tw))
}
class aw extends Error {
constructor(e, t, n) {
super(e),
this.description = t,
this.context = n,
this.type = "TransportError"
}
}
class sw extends ew {
constructor(e) {
super(),
this.writable = !1,
ow(this, e),
this.opts = e,
this.query = e.query,
this.socket = e.socket
}
onError(e, t, n) {
return super.emitReserved("error", new aw(e,t,n)),
this
}
open() {
return this.readyState = "opening",
this.doOpen(),
this
}
close() {
return "opening" !== this.readyState && "open" !== this.readyState
|| (this.doClose(),
this.onClose()),
this
}
send(e) {
"open" === this.readyState && this.write(e)
}
onOpen() {
this.readyState = "open",
this.writable = !0,
super.emitReserved("open")
}
onData(e) {
const t = QA(e, this.socket.binaryType);
this.onPacket(t)
}
onPacket(e) {
super.emitReserved("packet", e)
}
onClose(e) {
this.readyState = "closed",
super.emitReserved("close", e)
}
pause(e) {}
createUri(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : {};
return e + "://" + this._hostname() + this._port() + this.opts.path +
this._query(t)
}
_hostname() {
const e = this.opts.hostname;
return -1 === e.indexOf(":") ? e : "[" + e + "]"
}
_port() {
return this.opts.port && (this.opts.secure && Number(443 !==
this.opts.port) || !this.opts.secure && 80 !== Number(this.opts.port)) ? ":" +
this.opts.port : ""
}
_query(e) {
const t = function(e) {
let t = "";
for (let n in e)
e.hasOwnProperty(n) && (t.length && (t += "&"),
t += encodeURIComponent(n) + "=" +
encodeURIComponent(e[n]));
return t
}(e);
return t.length ? "?" + t : ""
}
}
const uw =
"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-
_".split("")
, lw = 64
, cw = {};
let dw, fw = 0, hw = 0;
function pw(e) {
let t = "";
do {
t = uw[e % lw] + t,
e = Math.floor(e / lw)
} while (e > 0);
return t
}
function mw() {
const e = pw(+new Date);
return e !== dw ? (fw = 0,
dw = e) : e + "." + pw(fw++)
}
for (; hw < lw; hw++)
cw[uw[hw]] = hw;
let gw = !1;
try {
gw = "undefined" != typeof XMLHttpRequest && "withCredentials"in new
XMLHttpRequest
} catch (e) {}
const vw = gw;
function bw(e) {
const t = e.xdomain;
try {
if ("undefined" != typeof XMLHttpRequest && (!t || vw))
return new XMLHttpRequest
} catch (e) {}
if (!t)
try {
return new (tw[["Active"].concat("Object").join("X")])
("Microsoft.XMLHTTP")
} catch (e) {}
}
function yw() {}
const Aw = null != new bw({
xdomain: !1
}).responseType;
class ww extends ew {
constructor(e, t) {
super(),
ow(this, t),
this.opts = t,
this.method = t.method || "GET",
this.uri = e,
this.data = void 0 !== t.data ? t.data : null,
this.create()
}
create() {
var e;
const t = nw(this.opts, "agent", "pfx", "key", "passphrase", "cert",
"ca", "ciphers", "rejectUnauthorized", "autoUnref");
t.xdomain = !!this.opts.xd;
const n = this.xhr = new bw(t);
try {
n.open(this.method, this.uri, !0);
try {
if (this.opts.extraHeaders) {
n.setDisableHeaderCheck &&
n.setDisableHeaderCheck(!0);
for (let e in this.opts.extraHeaders)
this.opts.extraHeaders.hasOwnProperty(e) &&
n.setRequestHeader(e, this.opts.extraHeaders[e])
}
} catch (e) {}
if ("POST" === this.method)
try {
n.setRequestHeader("Content-type",
"text/plain;charset=UTF-8")
} catch (e) {}
try {
n.setRequestHeader("Accept", "*/*")
} catch (e) {}
null === (e = this.opts.cookieJar) || void 0 === e ||
e.addCookies(n),
"withCredentials"in n && (n.withCredentials =
this.opts.withCredentials),
this.opts.requestTimeout && (n.timeout =
this.opts.requestTimeout),
n.onreadystatechange = () => {
var e;
3 === n.readyState && (null === (e = this.opts.cookieJar) ||
void 0 === e || e.parseCookies(n)),
4 === n.readyState && (200 === n.status || 1223 ===
n.status ? this.onLoad() : this.setTimeoutFn(( () => {
this.onError("number" == typeof n.status ? n.status : 0)
}
), 0))
}
,
n.send(this.data)
} catch (e) {
return void this.setTimeoutFn(( () => {
this.onError(e)
}
), 0)
}
"undefined" != typeof document && (this.index =
ww.requestsCount++,
ww.requests[this.index] = this)
}
onError(e) {
this.emitReserved("error", e, this.xhr),
this.cleanup(!0)
}
cleanup(e) {
if (void 0 !== this.xhr && null !== this.xhr) {
if (this.xhr.onreadystatechange = yw,
e)
try {
this.xhr.abort()
} catch (e) {}
"undefined" != typeof document && delete
ww.requests[this.index],
this.xhr = null
}
}
onLoad() {
const e = this.xhr.responseText;
null !== e && (this.emitReserved("data", e),
this.emitReserved("success"),
this.cleanup())
}
abort() {
this.cleanup()
}
}
function _w() {
for (let e in ww.requests)
ww.requests.hasOwnProperty(e) && ww.requests[e].abort()
}
ww.requestsCount = 0,
ww.requests = {},
"undefined" != typeof document && ("function" == typeof attachEvent ?
attachEvent("onunload", _w) : "function" == typeof addEventListener &&
addEventListener("onpagehide"in tw ? "pagehide" : "unload", _w, !1));
const Ew = "function" == typeof Promise && "function" == typeof
Promise.resolve ? e => Promise.resolve().then(e) : (e, t) => t(e, 0)
, Sw = tw.WebSocket || tw.MozWebSocket
, kw = "undefined" != typeof navigator && "string" == typeof
navigator.product && "reactnative" === navigator.product.toLowerCase();
function Mw(e, t) {
return "message" === e.type && "string" != typeof e.data && t[0] >= 48
&& t[0] <= 54
}
const Cw = {
websocket: class extends sw {
constructor(e) {
super(e),
this.supportsBinary = !e.forceBase64
}
get name() {
return "websocket"
}
doOpen() {
if (!this.check())
return;
const e = this.uri()
, t = this.opts.protocols
, n = kw ? {} : nw(this.opts, "agent", "perMessageDeflate",
"pfx", "key", "passphrase", "cert", "ca", "ciphers", "rejectUnauthorized", "localAddress",
"protocolVersion", "origin", "maxPayload", "family", "checkServerIdentity");
this.opts.extraHeaders && (n.headers =
this.opts.extraHeaders);
try {
this.ws = kw ? new Sw(e,t,n) : t ? new Sw(e,t) : new Sw(e)
} catch (e) {
return this.emitReserved("error", e)
}
this.ws.binaryType = this.socket.binaryType || "arraybuffer",
this.addEventListeners()
}
addEventListeners() {
this.ws.onopen = () => {
this.opts.autoUnref && this.ws._socket.unref(),
this.onOpen()
}
,
this.ws.onclose = e => this.onClose({
description: "websocket connection closed",
context: e
}),
this.ws.onmessage = e => this.onData(e.data),
this.ws.onerror = e => this.onError("websocket error", e)
}
write(e) {
this.writable = !1;
for (let t = 0; t < e.length; t++) {
const n = e[t]
, r = t === e.length - 1;
UA(n, this.supportsBinary, (e => {
try {
this.ws.send(e)
} catch (e) {}
r && Ew(( () => {
this.writable = !0,
this.emitReserved("drain")
}
), this.setTimeoutFn)
}
))
}
}
doClose() {
void 0 !== this.ws && (this.ws.close(),
this.ws = null)
}
uri() {
const e = this.opts.secure ? "wss" : "ws"
, t = this.query || {};
return this.opts.timestampRequests &&
(t[this.opts.timestampParam] = mw()),
this.supportsBinary || (t.b64 = 1),
this.createUri(e, t)
}
check() {
return !!Sw
}
}
,
webtransport: class extends sw {
get name() {
return "webtransport"
}
doOpen() {
"function" == typeof WebTransport && (this.transport = new
WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),
this.transport.closed.then(( () => {
this.onClose()
}
)).catch((e => {
this.onError("webtransport error", e)
}
)),
this.transport.ready.then(( () => {
this.transport.createBidirectionalStream().then((e => {
const t = e.readable.getReader();
let n;
this.writer = e.writable.getWriter();
const r = () => {
t.read().then((e => {
let {done: t, value: i} = e;
t || (n || 1 !== i.byteLength || 54 !== i[0] ?
(this.onPacket(function(e, t, n) {
JA || (JA = new TextDecoder);
const r = t || e[0] < 48 || e[0] > 54;
return QA(r ? e : JA.decode(e), n)
}(i, n, "arraybuffer")),
n = !1) : n = !0,
r())
}
)).catch((e => {}
))
}
;
r();
const i = this.query.sid ? `0{"sid":"${this.query.sid}"}` :
"0";
this.writer.write((new TextEncoder).encode(i)).then(( ()
=> this.onOpen()))
}
))
}
)))
}
write(e) {
this.writable = !1;
for (let t = 0; t < e.length; t++) {
const n = e[t]
, r = t === e.length - 1;
VA(n, (e => {
Mw(n, e) && this.writer.write(Uint8Array.of(54)),
this.writer.write(e).then(( () => {
r && Ew(( () => {
this.writable = !0,
this.emitReserved("drain")
}
), this.setTimeoutFn)
}
))
}
))
}
}
doClose() {
var e;
null === (e = this.transport) || void 0 === e || e.close()
}
}
,
polling: class extends sw {
constructor(e) {
if (super(e),
this.polling = !1,
"undefined" != typeof location) {
const t = "https:" === location.protocol;
let n = location.port;
n || (n = t ? "443" : "80"),
this.xd = "undefined" != typeof location && e.hostname !==
location.hostname || n !== e.port
}
const t = e && e.forceBase64;
this.supportsBinary = Aw && !t,
this.opts.withCredentials && (this.cookieJar = void 0)
}
get name() {
return "polling"
}
doOpen() {
this.poll()
}
pause(e) {
this.readyState = "pausing";
const t = () => {
this.readyState = "paused",
e()
}
;
if (this.polling || !this.writable) {
let e = 0;
this.polling && (e++,
this.once("pollComplete", (function() {
--e || t()
}
))),
this.writable || (e++,
this.once("drain", (function() {
--e || t()
}
)))
} else
t()
}
poll() {
this.polling = !0,
this.doPoll(),
this.emitReserved("poll")
}
onData(e) {
( (e, t) => {
const n = e.split(XA)
, r = [];
for (let i = 0; i < n.length; i++) {
const e = QA(n[i], t);
if (r.push(e),
"error" === e.type)
break
}
return r
}
)(e, this.socket.binaryType).forEach((e => {
if ("opening" === this.readyState && "open" === e.type &&
this.onOpen(),
"close" === e.type)
return this.onClose({
description: "transport closed by the server"
}),
!1;
this.onPacket(e)
}
)),
"closed" !== this.readyState && (this.polling = !1,
this.emitReserved("pollComplete"),
"open" === this.readyState && this.poll())
}
doClose() {
const e = () => {
this.write([{
type: "close"
}])
}
;
"open" === this.readyState ? e() : this.once("open", e)
}
write(e) {
this.writable = !1,
( (e, t) => {
const n = e.length
, r = new Array(n);
let i = 0;
e.forEach(( (e, o) => {
UA(e, !1, (e => {
r[o] = e,
++i === n && t(r.join(XA))
}
))
}
))
}
)(e, (e => {
this.doWrite(e, ( () => {
this.writable = !0,
this.emitReserved("drain")
}
))
}
))
}
uri() {
const e = this.opts.secure ? "https" : "http"
, t = this.query || {};
return !1 !== this.opts.timestampRequests &&
(t[this.opts.timestampParam] = mw()),
this.supportsBinary || t.sid || (t.b64 = 1),
this.createUri(e, t)
}
request() {
let e = arguments.length > 0 && void 0 !== arguments[0] ?
arguments[0] : {};
return Object.assign(e, {
xd: this.xd,
cookieJar: this.cookieJar
}, this.opts),
new ww(this.uri(),e)
}
doWrite(e, t) {
const n = this.request({
method: "POST",
data: e
});
n.on("success", t),
n.on("error", ( (e, t) => {
this.onError("xhr post error", e, t)
}
))
}
doPoll() {
const e = this.request();
e.on("data", this.onData.bind(this)),
e.on("error", ( (e, t) => {
this.onError("xhr poll error", e, t)
}
)),
this.pollXhr = e
}
}
}
, xw = /^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?
#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?
#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/
, Rw = ["source", "protocol", "authority", "userInfo", "user", "password",
"host", "port", "relative", "path", "directory", "file", "query", "anchor"];
function Tw(e) {
const t = e
, n = e.indexOf("[")
, r = e.indexOf("]");
-1 != n && -1 != r && (e = e.substring(0, n) + e.substring(n,
r).replace(/:/g, ";") + e.substring(r, e.length));
let i = xw.exec(e || "")
, o = {}
, a = 14;
for (; a--; )
o[Rw[a]] = i[a] || "";
return -1 != n && -1 != r && (o.source = t,
o.host = o.host.substring(1, o.host.length - 1).replace(/;/g, ":"),
o.authority = o.authority.replace("[", "").replace("]", "").replace(/;/g, ":"),
o.ipv6uri = !0),
o.pathNames = function(e, t) {
const n = /\/{2,9}/g
, r = t.replace(n, "/").split("/");
return "/" != t.slice(0, 1) && 0 !== t.length || r.splice(0, 1),
"/" == t.slice(-1) && r.splice(r.length - 1, 1),
r
}(0, o.path),
o.queryKey = function(e, t) {
const n = {};
return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g, (function(e, t, r) {
t && (n[t] = r)
}
)),
n
}(0, o.query),
o
}
let Iw = class e extends ew {
constructor(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : {};
super(),
this.writeBuffer = [],
e && "object" == typeof e && (t = e,
e = null),
e ? (e = Tw(e),
t.hostname = e.host,
t.secure = "https" === e.protocol || "wss" === e.protocol,
t.port = e.port,
e.query && (t.query = e.query)) : t.host && (t.hostname =
Tw(t.host).host),
ow(this, t),
this.secure = null != t.secure ? t.secure : "undefined" != typeof
location && "https:" === location.protocol,
t.hostname && !t.port && (t.port = this.secure ? "443" : "80"),
this.hostname = t.hostname || ("undefined" != typeof location ?
location.hostname : "localhost"),
this.port = t.port || ("undefined" != typeof location && location.port ?
location.port : this.secure ? "443" : "80"),
this.transports = t.transports || ["polling", "websocket",
"webtransport"],
this.writeBuffer = [],
this.prevBufferLen = 0,
this.opts = Object.assign({
path: "/engine.io",
agent: !1,
withCredentials: !1,
upgrade: !0,
timestampParam: "t",
rememberUpgrade: !1,
addTrailingSlash: !0,
rejectUnauthorized: !0,
perMessageDeflate: {
threshold: 1024
},
transportOptions: {},
closeOnBeforeunload: !1
}, t),
this.opts.path = this.opts.path.replace(/\/$/, "") +
(this.opts.addTrailingSlash ? "/" : ""),
"string" == typeof this.opts.query && (this.opts.query = function(e) {
let t = {}
, n = e.split("&");
for (let r = 0, i = n.length; r < i; r++) {
let e = n[r].split("=");
t[decodeURIComponent(e[0])] =
decodeURIComponent(e[1])
}
return t
}(this.opts.query)),
this.id = null,
this.upgrades = null,
this.pingInterval = null,
this.pingTimeout = null,
this.pingTimeoutTimer = null,
"function" == typeof addEventListener &&
(this.opts.closeOnBeforeunload && (this.beforeunloadEventListener = () => {
this.transport && (this.transport.removeAllListeners(),
this.transport.close())
}
,
addEventListener("beforeunload", this.beforeunloadEventListener, !
1)),
"localhost" !== this.hostname && (this.offlineEventListener = () => {
this.onClose("transport close", {
description: "network connection lost"
})
}
,
addEventListener("offline", this.offlineEventListener, !1))),
this.open()
}
createTransport(e) {
const t = Object.assign({}, this.opts.query);
t.EIO = 4,
t.transport = e,
this.id && (t.sid = this.id);
const n = Object.assign({}, this.opts, {
query: t,
socket: this,
hostname: this.hostname,
secure: this.secure,
port: this.port
}, this.opts.transportOptions[e]);
return new Cw[e](n)
}
open() {
let t;
if (this.opts.rememberUpgrade && e.priorWebsocketSuccess && -
1 !== this.transports.indexOf("websocket"))
t = "websocket";
else {
if (0 === this.transports.length)
return void this.setTimeoutFn(( () => {
this.emitReserved("error", "No transports available")
}
), 0);
t = this.transports[0]
}
this.readyState = "opening";
try {
t = this.createTransport(t)
} catch (e) {
return this.transports.shift(),
void this.open()
}
t.open(),
this.setTransport(t)
}
setTransport(e) {
this.transport && this.transport.removeAllListeners(),
this.transport = e,
e.on("drain", this.onDrain.bind(this)).on("packet",
this.onPacket.bind(this)).on("error", this.onError.bind(this)).on("close", (e =>
this.onClose("transport close", e)))
}
probe(t) {
let n = this.createTransport(t)
, r = !1;
e.priorWebsocketSuccess = !1;
const i = () => {
r || (n.send([{
type: "ping",
data: "probe"
}]),
n.once("packet", (t => {
if (!r)
if ("pong" === t.type && "probe" === t.data) {
if (this.upgrading = !0,
this.emitReserved("upgrading", n),
!n)
return;
e.priorWebsocketSuccess = "websocket" ===
n.name,
this.transport.pause(( () => {
r || "closed" !== this.readyState && (c(),
this.setTransport(n),
n.send([{
type: "upgrade"
}]),
this.emitReserved("upgrade", n),
n = null,
this.upgrading = !1,
this.flush())
}
))
} else {
const e = new Error("probe error");
e.transport = n.name,
this.emitReserved("upgradeError", e)
}
}
)))
}
;
function o() {
r || (r = !0,
c(),
n.close(),
n = null)
}
const a = e => {
const t = new Error("probe error: " + e);
t.transport = n.name,
o(),
this.emitReserved("upgradeError", t)
}
;
function s() {
a("transport closed")
}
function u() {
a("socket closed")
}
function l(e) {
n && e.name !== n.name && o()
}
const c = () => {
n.removeListener("open", i),
n.removeListener("error", a),
n.removeListener("close", s),
this.off("close", u),
this.off("upgrading", l)
}
;
n.once("open", i),
n.once("error", a),
n.once("close", s),
this.once("close", u),
this.once("upgrading", l),
-1 !== this.upgrades.indexOf("webtransport") && "webtransport" !==
t ? this.setTimeoutFn(( () => {
r || n.open()
}
), 200) : n.open()
}
onOpen() {
if (this.readyState = "open",
e.priorWebsocketSuccess = "websocket" === this.transport.name,
this.emitReserved("open"),
this.flush(),
"open" === this.readyState && this.opts.upgrade) {
let e = 0;
const t = this.upgrades.length;
for (; e < t; e++)
this.probe(this.upgrades[e])
}
}
onPacket(e) {
if ("opening" === this.readyState || "open" === this.readyState ||
"closing" === this.readyState)
switch (this.emitReserved("packet", e),
this.emitReserved("heartbeat"),
e.type) {
case "open":
this.onHandshake(JSON.parse(e.data));
break;
case "ping":
this.resetPingTimeout(),
this.sendPacket("pong"),
this.emitReserved("ping"),
this.emitReserved("pong");
break;
case "error":
const t = new Error("server error");
t.code = e.data,
this.onError(t);
break;
case "message":
this.emitReserved("data", e.data),
this.emitReserved("message", e.data)
}
}
onHandshake(e) {
this.emitReserved("handshake", e),
this.id = e.sid,
this.transport.query.sid = e.sid,
this.upgrades = this.filterUpgrades(e.upgrades),
this.pingInterval = e.pingInterval,
this.pingTimeout = e.pingTimeout,
this.maxPayload = e.maxPayload,
this.onOpen(),
"closed" !== this.readyState && this.resetPingTimeout()
}
resetPingTimeout() {
this.clearTimeoutFn(this.pingTimeoutTimer),
this.pingTimeoutTimer = this.setTimeoutFn(( () => {
this.onClose("ping timeout")
}
), this.pingInterval + this.pingTimeout),
this.opts.autoUnref && this.pingTimeoutTimer.unref()
}
onDrain() {
this.writeBuffer.splice(0, this.prevBufferLen),
this.prevBufferLen = 0,
0 === this.writeBuffer.length ? this.emitReserved("drain") :
this.flush()
}
flush() {
if ("closed" !== this.readyState && this.transport.writable && !
this.upgrading && this.writeBuffer.length) {
const e = this.getWritablePackets();
this.transport.send(e),
this.prevBufferLen = e.length,
this.emitReserved("flush")
}
}
getWritablePackets() {
if (!(this.maxPayload && "polling" === this.transport.name &&
this.writeBuffer.length > 1))
return this.writeBuffer;
let e = 1;
for (let n = 0; n < this.writeBuffer.length; n++) {
const r = this.writeBuffer[n].data;
if (r && (e += "string" == typeof (t = r) ? function(e) {
let t = 0
, n = 0;
for (let r = 0, i = e.length; r < i; r++)
t = e.charCodeAt(r),
t < 128 ? n += 1 : t < 2048 ? n += 2 : t < 55296 || t >=
57344 ? n += 3 : (r++,
n += 4);
return n
}(t) : Math.ceil(1.33 * (t.byteLength || t.size))),
n > 0 && e > this.maxPayload)
return this.writeBuffer.slice(0, n);
e += 2
}
var t;
return this.writeBuffer
}
write(e, t, n) {
return this.sendPacket("message", e, t, n),
this
}
send(e, t, n) {
return this.sendPacket("message", e, t, n),
this
}
sendPacket(e, t, n, r) {
if ("function" == typeof t && (r = t,
t = void 0),
"function" == typeof n && (r = n,
n = null),
"closing" === this.readyState || "closed" === this.readyState)
return;
(n = n || {}).compress = !1 !== n.compress;
const i = {
type: e,
data: t,
options: n
};
this.emitReserved("packetCreate", i),
this.writeBuffer.push(i),
r && this.once("flush", r),
this.flush()
}
close() {
const e = () => {
this.onClose("forced close"),
this.transport.close()
}
, t = () => {
this.off("upgrade", t),
this.off("upgradeError", t),
e()
}
, n = () => {
this.once("upgrade", t),
this.once("upgradeError", t)
}
;
return "opening" !== this.readyState && "open" !== this.readyState
|| (this.readyState = "closing",
this.writeBuffer.length ? this.once("drain", ( () => {
this.upgrading ? n() : e()
}
)) : this.upgrading ? n() : e()),
this
}
onError(t) {
e.priorWebsocketSuccess = !1,
this.emitReserved("error", t),
this.onClose("transport error", t)
}
onClose(e, t) {
"opening" !== this.readyState && "open" !== this.readyState &&
"closing" !== this.readyState || (this.clearTimeoutFn(this.pingTimeoutTimer),
this.transport.removeAllListeners("close"),
this.transport.close(),
this.transport.removeAllListeners(),
"function" == typeof removeEventListener &&
(removeEventListener("beforeunload", this.beforeunloadEventListener, !1),
removeEventListener("offline", this.offlineEventListener, !1)),
this.readyState = "closed",
this.id = null,
this.emitReserved("close", e, t),
this.writeBuffer = [],
this.prevBufferLen = 0)
}
filterUpgrades(e) {
const t = [];
let n = 0;
const r = e.length;
for (; n < r; n++)
~this.transports.indexOf(e[n]) && t.push(e[n]);
return t
}
}
;
Iw.protocol = 4;
const Pw = "function" == typeof ArrayBuffer
, Lw = e => "function" == typeof ArrayBuffer.isView ? ArrayBuffer.isView(e)
: e.buffer instanceof ArrayBuffer
, Ow = Object.prototype.toString
, Nw = "function" == typeof Blob || "undefined" != typeof Blob && "[object
BlobConstructor]" === Ow.call(Blob)
, Dw = "function" == typeof File || "undefined" != typeof File && "[object
FileConstructor]" === Ow.call(File);
function Bw(e) {
return Pw && (e instanceof ArrayBuffer || Lw(e)) || Nw && e instanceof
Blob || Dw && e instanceof File
}
function jw(e, t) {
if (!e || "object" != typeof e)
return !1;
if (Array.isArray(e)) {
for (let t = 0, n = e.length; t < n; t++)
if (jw(e[t]))
return !0;
return !1
}
if (Bw(e))
return !0;
if (e.toJSON && "function" == typeof e.toJSON && 1 ===
arguments.length)
return jw(e.toJSON(), !0);
for (const n in e)
if (Object.prototype.hasOwnProperty.call(e, n) && jw(e[n]))
return !0;
return !1
}
function zw(e) {
const t = []
, n = e.data
, r = e;
return r.data = Fw(n, t),
r.attachments = t.length,
{
packet: r,
buffers: t
}
}
function Fw(e, t) {
if (!e)
return e;
if (Bw(e)) {
const n = {
_placeholder: !0,
num: t.length
};
return t.push(e),
n
}
if (Array.isArray(e)) {
const n = new Array(e.length);
for (let r = 0; r < e.length; r++)
n[r] = Fw(e[r], t);
return n
}
if ("object" == typeof e && !(e instanceof Date)) {
const n = {};
for (const r in e)
Object.prototype.hasOwnProperty.call(e, r) && (n[r] = Fw(e[r],
t));
return n
}
return e
}
function Uw(e, t) {
return e.data = Kw(e.data, t),
delete e.attachments,
e
}
function Kw(e, t) {
if (!e)
return e;
if (e && !0 === e._placeholder) {
if ("number" == typeof e.num && e.num >= 0 && e.num < t.length)
return t[e.num];
throw new Error("illegal attachments")
}
if (Array.isArray(e))
for (let n = 0; n < e.length; n++)
e[n] = Kw(e[n], t);
else if ("object" == typeof e)
for (const n in e)
Object.prototype.hasOwnProperty.call(e, n) && (e[n] = Kw(e[n],
t));
return e
}
const qw = ["connect", "connect_error", "disconnect", "disconnecting",
"newListener", "removeListener"];
var Hw;
function Vw(e) {
return "[object Object]" === Object.prototype.toString.call(e)
}
!function(e) {
e[e.CONNECT = 0] = "CONNECT",
e[e.DISCONNECT = 1] = "DISCONNECT",
e[e.EVENT = 2] = "EVENT",
e[e.ACK = 3] = "ACK",
e[e.CONNECT_ERROR = 4] = "CONNECT_ERROR",
e[e.BINARY_EVENT = 5] = "BINARY_EVENT",
e[e.BINARY_ACK = 6] = "BINARY_ACK"
}(Hw || (Hw = {}));
class Ww extends ew {
constructor(e) {
super(),
this.reviver = e
}
add(e) {
let t;
if ("string" == typeof e) {
if (this.reconstructor)
throw new Error("got plaintext data when reconstructing a
packet");
t = this.decodeString(e);
const n = t.type === Hw.BINARY_EVENT;
n || t.type === Hw.BINARY_ACK ? (t.type = n ? Hw.EVENT :
Hw.ACK,
this.reconstructor = new $w(t),
0 === t.attachments && super.emitReserved("decoded", t)) :
super.emitReserved("decoded", t)
} else {
if (!Bw(e) && !e.base64)
throw new Error("Unknown type: " + e);
if (!this.reconstructor)
throw new Error("got binary data when not reconstructing a
packet");
t = this.reconstructor.takeBinaryData(e),
t && (this.reconstructor = null,
super.emitReserved("decoded", t))
}
}
decodeString(e) {
let t = 0;
const n = {
type: Number(e.charAt(0))
};
if (void 0 === Hw[n.type])
throw new Error("unknown packet type " + n.type);
if (n.type === Hw.BINARY_EVENT || n.type === Hw.BINARY_ACK)
{
const r = t + 1;
for (; "-" !== e.charAt(++t) && t != e.length; )
;
const i = e.substring(r, t);
if (i != Number(i) || "-" !== e.charAt(t))
throw new Error("Illegal attachments");
n.attachments = Number(i)
}
if ("/" === e.charAt(t + 1)) {
const r = t + 1;
for (; ++t && "," !== e.charAt(t) && t !== e.length; )
;
n.nsp = e.substring(r, t)
} else
n.nsp = "/";
const r = e.charAt(t + 1);
if ("" !== r && Number(r) == r) {
const r = t + 1;
for (; ++t; ) {
const n = e.charAt(t);
if (null == n || Number(n) != n) {
--t;
break
}
if (t === e.length)
break
}
n.id = Number(e.substring(r, t + 1))
}
if (e.charAt(++t)) {
const r = this.tryParse(e.substr(t));
if (!Ww.isPayloadValid(n.type, r))
throw new Error("invalid payload");
n.data = r
}
return n
}
tryParse(e) {
try {
return JSON.parse(e, this.reviver)
} catch (e) {
return !1
}
}
static isPayloadValid(e, t) {
switch (e) {
case Hw.CONNECT:
return Vw(t);
case Hw.DISCONNECT:
return void 0 === t;
case Hw.CONNECT_ERROR:
return "string" == typeof t || Vw(t);
case Hw.EVENT:
case Hw.BINARY_EVENT:
return Array.isArray(t) && ("number" == typeof t[0] || "string" ==
typeof t[0] && -1 === qw.indexOf(t[0]));
case Hw.ACK:
case Hw.BINARY_ACK:
return Array.isArray(t)
}
}
destroy() {
this.reconstructor && (this.reconstructor.finishedReconstruction(),
this.reconstructor = null)
}
}
class $w {
constructor(e) {
this.packet = e,
this.buffers = [],
this.reconPack = e
}
takeBinaryData(e) {
if (this.buffers.push(e),
this.buffers.length === this.reconPack.attachments) {
const e = Uw(this.reconPack, this.buffers);
return this.finishedReconstruction(),
e
}
return null
}
finishedReconstruction() {
this.reconPack = null,
this.buffers = []
}
}
var Yw = Object.freeze({
__proto__: null,
Decoder: Ww,
Encoder: class {
constructor(e) {
this.replacer = e
}
encode(e) {
return e.type !== Hw.EVENT && e.type !== Hw.ACK || !jw(e) ?
[this.encodeAsString(e)] : this.encodeAsBinary({
type: e.type === Hw.EVENT ? Hw.BINARY_EVENT :
Hw.BINARY_ACK,
nsp: e.nsp,
data: e.data,
id: e.id
})
}
encodeAsString(e) {
let t = "" + e.type;
return e.type !== Hw.BINARY_EVENT && e.type !==
Hw.BINARY_ACK || (t += e.attachments + "-"),
e.nsp && "/" !== e.nsp && (t += e.nsp + ","),
null != e.id && (t += e.id),
null != e.data && (t += JSON.stringify(e.data, this.replacer)),
t
}
encodeAsBinary(e) {
const t = zw(e)
, n = this.encodeAsString(t.packet)
, r = t.buffers;
return r.unshift(n),
r
}
}
,
get PacketType() {
return Hw
},
protocol: 5
});
function Qw(e, t, n) {
return e.on(t, n),
function() {
e.off(t, n)
}
}
const Zw = Object.freeze({
connect: 1,
connect_error: 1,
disconnect: 1,
disconnecting: 1,
newListener: 1,
removeListener: 1
});
class Gw extends ew {
constructor(e, t, n) {
super(),
this.connected = !1,
this.recovered = !1,
this.receiveBuffer = [],
this.sendBuffer = [],
this._queue = [],
this._queueSeq = 0,
this.ids = 0,
this.acks = {},
this.flags = {},
this.io = e,
this.nsp = t,
n && n.auth && (this.auth = n.auth),
this._opts = Object.assign({}, n),
this.io._autoConnect && this.open()
}
get disconnected() {
return !this.connected
}
subEvents() {
if (this.subs)
return;
const e = this.io;
this.subs = [Qw(e, "open", this.onopen.bind(this)), Qw(e, "packet",
this.onpacket.bind(this)), Qw(e, "error", this.onerror.bind(this)), Qw(e, "close",
this.onclose.bind(this))]
}
get active() {
return !!this.subs
}
connect() {
return this.connected || (this.subEvents(),
this.io._reconnecting || this.io.open(),
"open" === this.io._readyState && this.onopen()),
this
}
open() {
return this.connect()
}
send() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n++)
t[n] = arguments[n];
return t.unshift("message"),
this.emit.apply(this, t),
this
}
emit(e) {
if (Zw.hasOwnProperty(e))
throw new Error('"' + e.toString() + '" is a reserved event name');
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r
< t; r++)
n[r - 1] = arguments[r];
if (n.unshift(e),
this._opts.retries && !this.flags.fromQueue && !this.flags.volatile)
return this._addToQueue(n),
this;
const i = {
type: Hw.EVENT,
data: n,
options: {}
};
if (i.options.compress = !1 !== this.flags.compress,
"function" == typeof n[n.length - 1]) {
const e = this.ids++
, t = n.pop();
this._registerAckCallback(e, t),
i.id = e
}
const o = this.io.engine && this.io.engine.transport &&
this.io.engine.transport.writable;
return this.flags.volatile && (!o || !this.connected) ||
(this.connected ? (this.notifyOutgoingListeners(i),
this.packet(i)) : this.sendBuffer.push(i)),
this.flags = {},
this
}
_registerAckCallback(e, t) {
var n, r = this;
const i = null !== (n = this.flags.timeout) && void 0 !== n ? n :
this._opts.ackTimeout;
if (void 0 === i)
return void (this.acks[e] = t);
const o = this.io.setTimeoutFn(( () => {
delete this.acks[e];
for (let t = 0; t < this.sendBuffer.length; t++)
this.sendBuffer[t].id === e && this.sendBuffer.splice(t, 1);
t.call(this, new Error("operation has timed out"))
}
), i);
this.acks[e] = function() {
for (var e = arguments.length, n = new Array(e), i = 0; i < e; i++)
n[i] = arguments[i];
r.io.clearTimeoutFn(o),
t.apply(r, [null, ...n])
}
}
emitWithAck(e) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r = 1; r
< t; r++)
n[r - 1] = arguments[r];
const i = void 0 !== this.flags.timeout || void 0 !==
this._opts.ackTimeout;
return new Promise(( (t, r) => {
n.push(( (e, n) => i ? e ? r(e) : t(n) : t(e))),
this.emit(e, ...n)
}
))
}
_addToQueue(e) {
var t = this;
let n;
"function" == typeof e[e.length - 1] && (n = e.pop());
const r = {
id: this._queueSeq++,
tryCount: 0,
pending: !1,
args: e,
flags: Object.assign({
fromQueue: !0
}, this.flags)
};
e.push((function(e) {
if (r === t._queue[0]) {
for (var i = arguments.length, o = new Array(i > 1 ? i - 1 : 0),
a = 1; a < i; a++)
o[a - 1] = arguments[a];
return null !== e ? r.tryCount > t._opts.retries &&
(t._queue.shift(),
n && n(e)) : (t._queue.shift(),
n && n(null, ...o)),
r.pending = !1,
t._drainQueue()
}
}
)),
this._queue.push(r),
this._drainQueue()
}
_drainQueue() {
let e = arguments.length > 0 && void 0 !== arguments[0] &&
arguments[0];
if (!this.connected || 0 === this._queue.length)
return;
const t = this._queue[0];
t.pending && !e || (t.pending = !0,
t.tryCount++,
this.flags = t.flags,
this.emit.apply(this, t.args))
}
packet(e) {
e.nsp = this.nsp,
this.io._packet(e)
}
onopen() {
"function" == typeof this.auth ? this.auth((e => {
this._sendConnectPacket(e)
}
)) : this._sendConnectPacket(this.auth)
}
_sendConnectPacket(e) {
this.packet({
type: Hw.CONNECT,
data: this._pid ? Object.assign({
pid: this._pid,
offset: this._lastOffset
}, e) : e
})
}
onerror(e) {
this.connected || this.emitReserved("connect_error", e)
}
onclose(e, t) {
this.connected = !1,
delete this.id,
this.emitReserved("disconnect", e, t)
}
onpacket(e) {
if (e.nsp === this.nsp)
switch (e.type) {
case Hw.CONNECT:
e.data && e.data.sid ? this.onconnect(e.data.sid, e.data.pid)
: this.emitReserved("connect_error", new Error("It seems you are trying to reach a
Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information
here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));
break;
case Hw.EVENT:
case Hw.BINARY_EVENT:
this.onevent(e);
break;
case Hw.ACK:
case Hw.BINARY_ACK:
this.onack(e);
break;
case Hw.DISCONNECT:
this.ondisconnect();
break;
case Hw.CONNECT_ERROR:
this.destroy();
const t = new Error(e.data.message);
t.data = e.data.data,
this.emitReserved("connect_error", t)
}
}
onevent(e) {
const t = e.data || [];
null != e.id && t.push(this.ack(e.id)),
this.connected ? this.emitEvent(t) :
this.receiveBuffer.push(Object.freeze(t))
}
emitEvent(e) {
if (this._anyListeners && this._anyListeners.length) {
const t = this._anyListeners.slice();
for (const n of t)
n.apply(this, e)
}
super.emit.apply(this, e),
this._pid && e.length && "string" == typeof e[e.length - 1] &&
(this._lastOffset = e[e.length - 1])
}
ack(e) {
const t = this;
let n = !1;
return function() {
for (var r = arguments.length, i = new Array(r), o = 0; o < r; o++)
i[o] = arguments[o];
n || (n = !0,
t.packet({
type: Hw.ACK,
id: e,
data: i
}))
}
}
onack(e) {
const t = this.acks[e.id];
"function" == typeof t && (t.apply(this, e.data),
delete this.acks[e.id])
}
onconnect(e, t) {
this.id = e,
this.recovered = t && this._pid === t,
this._pid = t,
this.connected = !0,
this.emitBuffered(),
this.emitReserved("connect"),
this._drainQueue(!0)
}
emitBuffered() {
this.receiveBuffer.forEach((e => this.emitEvent(e))),
this.receiveBuffer = [],
this.sendBuffer.forEach((e => {
this.notifyOutgoingListeners(e),
this.packet(e)
}
)),
this.sendBuffer = []
}
ondisconnect() {
this.destroy(),
this.onclose("io server disconnect")
}
destroy() {
this.subs && (this.subs.forEach((e => e())),
this.subs = void 0),
this.io._destroy(this)
}
disconnect() {
return this.connected && this.packet({
type: Hw.DISCONNECT
}),
this.destroy(),
this.connected && this.onclose("io client disconnect"),
this
}
close() {
return this.disconnect()
}
compress(e) {
return this.flags.compress = e,
this
}
get volatile() {
return this.flags.volatile = !0,
this
}
timeout(e) {
return this.flags.timeout = e,
this
}
onAny(e) {
return this._anyListeners = this._anyListeners || [],
this._anyListeners.push(e),
this
}
prependAny(e) {
return this._anyListeners = this._anyListeners || [],
this._anyListeners.unshift(e),
this
}
offAny(e) {
if (!this._anyListeners)
return this;
if (e) {
const t = this._anyListeners;
for (let n = 0; n < t.length; n++)
if (e === t[n])
return t.splice(n, 1),
this
} else
this._anyListeners = [];
return this
}
listenersAny() {
return this._anyListeners || []
}
onAnyOutgoing(e) {
return this._anyOutgoingListeners = this._anyOutgoingListeners ||
[],
this._anyOutgoingListeners.push(e),
this
}
prependAnyOutgoing(e) {
return this._anyOutgoingListeners = this._anyOutgoingListeners ||
[],
this._anyOutgoingListeners.unshift(e),
this
}
offAnyOutgoing(e) {
if (!this._anyOutgoingListeners)
return this;
if (e) {
const t = this._anyOutgoingListeners;
for (let n = 0; n < t.length; n++)
if (e === t[n])
return t.splice(n, 1),
this
} else
this._anyOutgoingListeners = [];
return this
}
listenersAnyOutgoing() {
return this._anyOutgoingListeners || []
}
notifyOutgoingListeners(e) {
if (this._anyOutgoingListeners &&
this._anyOutgoingListeners.length) {
const t = this._anyOutgoingListeners.slice();
for (const n of t)
n.apply(this, e.data)
}
}
}
function Xw(e) {
e = e || {},
this.ms = e.min || 100,
this.max = e.max || 1e4,
this.factor = e.factor || 2,
this.jitter = e.jitter > 0 && e.jitter <= 1 ? e.jitter : 0,
this.attempts = 0
}
Xw.prototype.duration = function() {
var e = this.ms * Math.pow(this.factor, this.attempts++);
if (this.jitter) {
var t = Math.random()
, n = Math.floor(t * this.jitter * e);
e = 0 == (1 & Math.floor(10 * t)) ? e - n : e + n
}
return 0 | Math.min(e, this.max)
}
,
Xw.prototype.reset = function() {
this.attempts = 0
}
,
Xw.prototype.setMin = function(e) {
this.ms = e
}
,
Xw.prototype.setMax = function(e) {
this.max = e
}
,
Xw.prototype.setJitter = function(e) {
this.jitter = e
}
;
class Jw extends ew {
constructor(e, t) {
var n;
super(),
this.nsps = {},
this.subs = [],
e && "object" == typeof e && (t = e,
e = void 0),
(t = t || {}).path = t.path || "/socket.io",
this.opts = t,
ow(this, t),
this.reconnection(!1 !== t.reconnection),
this.reconnectionAttempts(t.reconnectionAttempts || 1 / 0),
this.reconnectionDelay(t.reconnectionDelay || 1e3),
this.reconnectionDelayMax(t.reconnectionDelayMax || 5e3),
this.randomizationFactor(null !== (n = t.randomizationFactor) &&
void 0 !== n ? n : .5),
this.backoff = new Xw({
min: this.reconnectionDelay(),
max: this.reconnectionDelayMax(),
jitter: this.randomizationFactor()
}),
this.timeout(null == t.timeout ? 2e4 : t.timeout),
this._readyState = "closed",
this.uri = e;
const r = t.parser || Yw;
this.encoder = new r.Encoder,
this.decoder = new r.Decoder,
this._autoConnect = !1 !== t.autoConnect,
this._autoConnect && this.open()
}
reconnection(e) {
return arguments.length ? (this._reconnection = !!e,
this) : this._reconnection
}
reconnectionAttempts(e) {
return void 0 === e ? this._reconnectionAttempts :
(this._reconnectionAttempts = e,
this)
}
reconnectionDelay(e) {
var t;
return void 0 === e ? this._reconnectionDelay :
(this._reconnectionDelay = e,
null === (t = this.backoff) || void 0 === t || t.setMin(e),
this)
}
randomizationFactor(e) {
var t;
return void 0 === e ? this._randomizationFactor :
(this._randomizationFactor = e,
null === (t = this.backoff) || void 0 === t || t.setJitter(e),
this)
}
reconnectionDelayMax(e) {
var t;
return void 0 === e ? this._reconnectionDelayMax :
(this._reconnectionDelayMax = e,
null === (t = this.backoff) || void 0 === t || t.setMax(e),
this)
}
timeout(e) {
return arguments.length ? (this._timeout = e,
this) : this._timeout
}
maybeReconnectOnOpen() {
!this._reconnecting && this._reconnection && 0 ===
this.backoff.attempts && this.reconnect()
}
open(e) {
if (~this._readyState.indexOf("open"))
return this;
this.engine = new Iw(this.uri,this.opts);
const t = this.engine
, n = this;
this._readyState = "opening",
this.skipReconnect = !1;
const r = Qw(t, "open", (function() {
n.onopen(),
e && e()
}
))
, i = t => {
this.cleanup(),
this._readyState = "closed",
this.emitReserved("error", t),
e ? e(t) : this.maybeReconnectOnOpen()
}
, o = Qw(t, "error", i);
if (!1 !== this._timeout) {
const e = this._timeout
, n = this.setTimeoutFn(( () => {
r(),
i(new Error("timeout")),
t.close()
}
), e);
this.opts.autoUnref && n.unref(),
this.subs.push(( () => {
this.clearTimeoutFn(n)
}
))
}
return this.subs.push(r),
this.subs.push(o),
this
}
connect(e) {
return this.open(e)
}
onopen() {
this.cleanup(),
this._readyState = "open",
this.emitReserved("open");
const e = this.engine;
this.subs.push(Qw(e, "ping", this.onping.bind(this)), Qw(e, "data",
this.ondata.bind(this)), Qw(e, "error", this.onerror.bind(this)), Qw(e, "close",
this.onclose.bind(this)), Qw(this.decoder, "decoded", this.ondecoded.bind(this)))
}
onping() {
this.emitReserved("ping")
}
ondata(e) {
try {
this.decoder.add(e)
} catch (e) {
this.onclose("parse error", e)
}
}
ondecoded(e) {
Ew(( () => {
this.emitReserved("packet", e)
}
), this.setTimeoutFn)
}
onerror(e) {
this.emitReserved("error", e)
}
socket(e, t) {
let n = this.nsps[e];
return n ? this._autoConnect && !n.active && n.connect() : (n = new
Gw(this,e,t),
this.nsps[e] = n),
n
}
_destroy(e) {
const t = Object.keys(this.nsps);
for (const n of t)
if (this.nsps[n].active)
return;
this._close()
}
_packet(e) {
const t = this.encoder.encode(e);
for (let n = 0; n < t.length; n++)
this.engine.write(t[n], e.options)
}
cleanup() {
this.subs.forEach((e => e())),
this.subs.length = 0,
this.decoder.destroy()
}
_close() {
this.skipReconnect = !0,
this._reconnecting = !1,
this.onclose("forced close"),
this.engine && this.engine.close()
}
disconnect() {
return this._close()
}
onclose(e, t) {
this.cleanup(),
this.backoff.reset(),
this._readyState = "closed",
this.emitReserved("close", e, t),
this._reconnection && !this.skipReconnect && this.reconnect()
}
reconnect() {
if (this._reconnecting || this.skipReconnect)
return this;
const e = this;
if (this.backoff.attempts >= this._reconnectionAttempts)
this.backoff.reset(),
this.emitReserved("reconnect_failed"),
this._reconnecting = !1;
else {
const t = this.backoff.duration();
this._reconnecting = !0;
const n = this.setTimeoutFn(( () => {
e.skipReconnect || (this.emitReserved("reconnect_attempt",
e.backoff.attempts),
e.skipReconnect || e.open((t => {
t ? (e._reconnecting = !1,
e.reconnect(),
this.emitReserved("reconnect_error", t)) :
e.onreconnect()
}
)))
}
), t);
this.opts.autoUnref && n.unref(),
this.subs.push(( () => {
this.clearTimeoutFn(n)
}
))
}
}
onreconnect() {
const e = this.backoff.attempts;
this._reconnecting = !1,
this.backoff.reset(),
this.emitReserved("reconnect", e)
}
}
const e_ = {};
function t_(e, t) {
"object" == typeof e && (t = e,
e = void 0);
const n = function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : ""
, n = arguments.length > 2 ? arguments[2] : void 0
, r = e;
n = n || "undefined" != typeof location && location,
null == e && (e = n.protocol + "//" + n.host),
"string" == typeof e && ("/" === e.charAt(0) && (e = "/" ===
e.charAt(1) ? n.protocol + e : n.host + e),
/^(https?|wss?):\/\//.test(e) || (e = void 0 !== n ? n.protocol + "//" + e :
"https://" + e),
r = Tw(e)),
r.port || (/^(http|ws)$/.test(r.protocol) ? r.port = "80" : /^(http|
ws)s$/.test(r.protocol) && (r.port = "443")),
r.path = r.path || "/";
const i = -1 !== r.host.indexOf(":") ? "[" + r.host + "]" : r.host;
return r.id = r.protocol + "://" + i + ":" + r.port + t,
r.href = r.protocol + "://" + i + (n && n.port === r.port ? "" : ":" +
r.port),
r
}(e, (t = t || {}).path || "/socket.io")
, r = n.source
, i = n.id
, o = n.path
, a = e_[i] && o in e_[i].nsps;
let s;
return t.forceNew || t["force new connection"] || !1 === t.multiplex || a ? s
= new Jw(r,t) : (e_[i] || (e_[i] = new Jw(r,t)),
s = e_[i]),
n.query && !t.query && (t.query = n.queryKey),
s.socket(n.path, t)
}
function n_(e, t, n, r) {
return new (n || (n = Promise))((function(i, o) {
function a(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function s(e) {
try {
u(r.throw(e))
} catch (e) {
o(e)
}
}
function u(e) {
var t;
e.done ? i(e.value) : (t = e.value,
t instanceof n ? t : new n((function(e) {
e(t)
}
))).then(a, s)
}
u((r = r.apply(e, t || [])).next())
}
))
}
Object.assign(t_, {
Manager: Jw,
Socket: Gw,
io: t_,
connect: t_
}),
"function" == typeof SuppressedError && SuppressedError;
var r_ = void 0 !== t ? t : "undefined" != typeof self ? self : "undefined" !=
typeof window ? window : {};
function i_() {
throw new Error("setTimeout has not been defined")
}
function o_() {
throw new Error("clearTimeout has not been defined")
}
var a_ = i_
, s_ = o_;
function u_(e) {
if (a_ === setTimeout)
return setTimeout(e, 0);
if ((a_ === i_ || !a_) && setTimeout)
return a_ = setTimeout,
setTimeout(e, 0);
try {
return a_(e, 0)
} catch (t) {
try {
return a_.call(null, e, 0)
} catch (t) {
return a_.call(this, e, 0)
}
}
}
"function" == typeof r_.setTimeout && (a_ = setTimeout),
"function" == typeof r_.clearTimeout && (s_ = clearTimeout);
var l_, c_ = [], d_ = !1, f_ = -1;
function h_() {
d_ && l_ && (d_ = !1,
l_.length ? c_ = l_.concat(c_) : f_ = -1,
c_.length && p_())
}
function p_() {
if (!d_) {
var e = u_(h_);
d_ = !0;
for (var t = c_.length; t; ) {
for (l_ = c_,
c_ = []; ++f_ < t; )
l_ && l_[f_].run();
f_ = -1,
t = c_.length
}
l_ = null,
d_ = !1,
function(e) {
if (s_ === clearTimeout)
return clearTimeout(e);
if ((s_ === o_ || !s_) && clearTimeout)
return s_ = clearTimeout,
clearTimeout(e);
try {
return s_(e)
} catch (t) {
try {
return s_.call(null, e)
} catch (t) {
return s_.call(this, e)
}
}
}(e)
}
}
function m_(e, t) {
this.fun = e,
this.array = t
}
function g_() {}
m_.prototype.run = function() {
this.fun.apply(null, this.array)
}
;
var v_, b_, y_ = g_, A_ = g_, w_ = g_, __ = g_, E_ = g_, S_ = g_, k_ = g_,
M_ = r_.performance || {}, C_ = M_.now || M_.mozNow || M_.msNow || M_.oNow ||
M_.webkitNow || function() {
return (new Date).getTime()
}
, x_ = new Date, R_ = {
nextTick: function(e) {
var t = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
c_.push(new m_(e,t)),
1 !== c_.length || d_ || u_(p_)
},
title: "browser",
browser: !0,
env: {},
argv: [],
version: "",
versions: {},
on: y_,
addListener: A_,
once: w_,
off: __,
removeListener: E_,
removeAllListeners: S_,
emit: k_,
binding: function(e) {
throw new Error("process.binding is not supported")
},
cwd: function() {
return "/"
},
chdir: function(e) {
throw new Error("process.chdir is not supported")
},
umask: function() {
return 0
},
hrtime: function(e) {
var t = .001 * C_.call(M_)
, n = Math.floor(t)
, r = Math.floor(t % 1 * 1e9);
return e && (n -= e[0],
(r -= e[1]) < 0 && (n--,
r += 1e9)),
[n, r]
},
platform: "browser",
release: {},
config: {},
uptime: function() {
return (new Date - x_) / 1e3
}
}, T_ = {
exports: {}
}, I_ = function(e) {
function t(e) {
let r, i, o, a = null;
function s() {
for (var e = arguments.length, n = new Array(e), i = 0; i < e; i++)
n[i] = arguments[i];
if (!s.enabled)
return;
const o = s
, a = Number(new Date)
, u = a - (r || a);
o.diff = u,
o.prev = r,
o.curr = a,
r = a,
n[0] = t.coerce(n[0]),
"string" != typeof n[0] && n.unshift("%O");
let l = 0;
n[0] = n[0].replace(/%([a-zA-Z%])/g, ( (e, r) => {
if ("%%" === e)
return "%";
l++;
const i = t.formatters[r];
if ("function" == typeof i) {
const t = n[l];
e = i.call(o, t),
n.splice(l, 1),
l--
}
return e
}
)),
t.formatArgs.call(o, n),
(o.log || t.log).apply(o, n)
}
return s.namespace = e,
s.useColors = t.useColors(),
s.color = t.selectColor(e),
s.extend = n,
s.destroy = t.destroy,
Object.defineProperty(s, "enabled", {
enumerable: !0,
configurable: !1,
get: () => null !== a ? a : (i !== t.namespaces && (i =
t.namespaces,
o = t.enabled(e)),
o),
set: e => {
a=e
}
}),
"function" == typeof t.init && t.init(s),
s
}
function n(e, n) {
const r = t(this.namespace + (void 0 === n ? ":" : n) + e);
return r.log = this.log,
r
}
function r(e) {
return e.toString().substring(2, e.toString().length - 2).replace(/\.\*\?
$/, "*")
}
return t.debug = t,
t.default = t,
t.coerce = function(e) {
return e instanceof Error ? e.stack || e.message : e
}
,
t.disable = function() {
const e = [...t.names.map(r), ...t.skips.map(r).map((e => "-" +
e))].join(",");
return t.enable(""),
e
}
,
t.enable = function(e) {
let n;
t.save(e),
t.namespaces = e,
t.names = [],
t.skips = [];
const r = ("string" == typeof e ? e : "").split(/[\s,]+/)
, i = r.length;
for (n = 0; n < i; n++)
r[n] && ("-" === (e = r[n].replace(/\*/g, ".*?"))[0] ?
t.skips.push(new RegExp("^" + e.slice(1) + "$")) : t.names.push(new RegExp("^" + e +
"$")))
}
,
t.enabled = function(e) {
if ("*" === e[e.length - 1])
return !0;
let n, r;
for (n = 0,
r = t.skips.length; n < r; n++)
if (t.skips[n].test(e))
return !1;
for (n = 0,
r = t.names.length; n < r; n++)
if (t.names[n].test(e))
return !0;
return !1
}
,
t.humanize = function() {
if (b_)
return v_;
b_ = 1;
var e = 1e3
, t = 60 * e
, n = 60 * t
, r = 24 * n;
function i(e, t, n, r) {
var i = t >= 1.5 * n;
return Math.round(e / n) + " " + r + (i ? "s" : "")
}
return v_ = function(o, a) {
a = a || {};
var s = typeof o;
if ("string" === s && o.length > 0)
return function(i) {
if (!((i = String(i)).length > 100)) {
var o = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|
ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|
y)?$/i.exec(i);
if (o) {
var a = parseFloat(o[1]);
switch ((o[2] || "ms").toLowerCase()) {
case "years":
case "year":
case "yrs":
case "yr":
case "y":
return 315576e5 * a;
case "weeks":
case "week":
case "w":
return 6048e5 * a;
case "days":
case "day":
case "d":
return a * r;
case "hours":
case "hour":
case "hrs":
case "hr":
case "h":
return a * n;
case "minutes":
case "minute":
case "mins":
case "min":
case "m":
return a * t;
case "seconds":
case "second":
case "secs":
case "sec":
case "s":
return a * e;
case "milliseconds":
case "millisecond":
case "msecs":
case "msec":
case "ms":
return a;
default:
return
}
}
}
}(o);
if ("number" === s && isFinite(o))
return a.long ? function(o) {
var a = Math.abs(o);
return a >= r ? i(o, a, r, "day") : a >= n ? i(o, a, n, "hour")
: a >= t ? i(o, a, t, "minute") : a >= e ? i(o, a, e, "second") : o + " ms"
}(o) : function(i) {
var o = Math.abs(i);
return o >= r ? Math.round(i / r) + "d" : o >= n ?
Math.round(i / n) + "h" : o >= t ? Math.round(i / t) + "m" : o >= e ? Math.round(i / e) +
"s" : i + "ms"
}(o);
throw new Error("val is not a non-empty string or a valid
number. val=" + JSON.stringify(o))
}
}(),
t.destroy = function() {
console.warn("Instance method `debug.destroy()` is deprecated
and no longer does anything. It will be removed in the next major version of `debug`.")
}
,
Object.keys(e).forEach((n => {
t[n] = e[n]
}
)),
t.names = [],
t.skips = [],
t.formatters = {},
t.selectColor = function(e) {
let n = 0;
for (let t = 0; t < e.length; t++)
n = (n << 5) - n + e.charCodeAt(t),
n |= 0;
return t.colors[Math.abs(n) % t.colors.length]
}
,
t.enable(t.load()),
t
};
!function(e, t) {
t.formatArgs = function(t) {
if (t[0] = (this.useColors ? "%c" : "") + this.namespace +
(this.useColors ? " %c" : " ") + t[0] + (this.useColors ? "%c " : " ") + "+" +
e.exports.humanize(this.diff),
!this.useColors)
return;
const n = "color: " + this.color;
t.splice(1, 0, n, "color: inherit");
let r = 0
, i = 0;
t[0].replace(/%[a-zA-Z%]/g, (e => {
"%%" !== e && (r++,
"%c" === e && (i = r))
}
)),
t.splice(i, 0, n)
}
,
t.save = function(e) {
try {
e ? t.storage.setItem("debug", e) :
t.storage.removeItem("debug")
} catch (e) {}
}
,
t.load = function() {
let e;
try {
e = t.storage.getItem("debug")
} catch (e) {}
return !e && void 0 !== R_ && "env"in R_ && (e = R_.env.DEBUG),
e
}
,
t.useColors = function() {
return !("undefined" == typeof window || !window.process ||
"renderer" !== window.process.type && !window.process.__nwjs) || ("undefined" ==
typeof navigator || !navigator.userAgent ||
!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) && ("undefined" !=
typeof document && document.documentElement && document.documentElement.style
&& document.documentElement.style.WebkitAppearance || "undefined" != typeof
window && window.console && (window.console.firebug || window.console.exception
&& window.console.table) || "undefined" != typeof navigator && navigator.userAgent &&
navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10)
>= 31 || "undefined" != typeof navigator && navigator.userAgent &&
navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))
}
,
t.storage = function() {
try {
return localStorage
} catch (e) {}
}(),
t.destroy = ( () => {
let e = !1;
return () => {
e || (e = !0,
console.warn("Instance method `debug.destroy()` is deprecated
and no longer does anything. It will be removed in the next major version of `debug`."))
}
}
)(),
t.colors = ["#0000CC", "#0000FF", "#0033CC", "#0033FF", "#0066CC",
"#0066FF", "#0099CC", "#0099FF", "#00CC00", "#00CC33", "#00CC66", "#00CC99",
"#00CCCC", "#00CCFF", "#3300CC", "#3300FF", "#3333CC", "#3333FF", "#3366CC",
"#3366FF", "#3399CC", "#3399FF", "#33CC00", "#33CC33", "#33CC66", "#33CC99",
"#33CCCC", "#33CCFF", "#6600CC", "#6600FF", "#6633CC", "#6633FF", "#66CC00",
"#66CC33", "#9900CC", "#9900FF", "#9933CC", "#9933FF", "#99CC00", "#99CC33",
"#CC0000", "#CC0033", "#CC0066", "#CC0099", "#CC00CC", "#CC00FF", "#CC3300",
"#CC3333", "#CC3366", "#CC3399", "#CC33CC", "#CC33FF", "#CC6600", "#CC6633",
"#CC9900", "#CC9933", "#CCCC00", "#CCCC33", "#FF0000", "#FF0033", "#FF0066",
"#FF0099", "#FF00CC", "#FF00FF", "#FF3300", "#FF3333", "#FF3366", "#FF3399",
"#FF33CC", "#FF33FF", "#FF6600", "#FF6633", "#FF9900", "#FF9933", "#FFCC00",
"#FFCC33"],
t.log = console.debug || console.log || ( () => {}
),
e.exports = I_(t);
const {formatters: n} = e.exports;
n.j = function(e) {
try {
return JSON.stringify(e)
} catch (e) {
return "[UnexpectedJSONParseError]: " + e.message
}
}
}(T_, T_.exports);
var P_ = function(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e,
"default") ? e.default : e
}(T_.exports);
const L_ = P_("KeyExchange:Layer")
, O_ = P_("SocketService:Layer")
, N_ = P_("Ecies:Layer")
, D_ = P_("RemoteCommunication:Layer");
L_.color = "##95c44e",
O_.color = "#f638d7",
N_.color = "#465b9c",
D_.color = "#47a2be";
const B_ = {
KeyExchange: L_,
SocketService: O_,
Ecies: N_,
RemoteCommunication: D_
};
let j_, z_ = [], F_ = [];
function U_(e) {
return n_(this, void 0, void 0, (function*() {
if (!j_ || !e)
return;
!function() {
const e = F_;
F_ = z_,
z_ = e
}();
const t = j_.endsWith("/") ? `${j_}debug` : `${j_}/debug`
, n = Object.assign({}, e);
if (delete n.params,
e.params)
for (const [i,o] of Object.entries(e.params))
n[i] = o;
const r = JSON.stringify(n);
B_.RemoteCommunication(`[sendBufferedEvents] Sending $
{z_.length} analytics events to ${t}`);
try {
const e = yield s(t, {
method: "POST",
headers: {
Accept: "application/json",
"Content-Type": "application/json"
},
body: r
})
, n = yield e.text();
B_.RemoteCommunication(`[sendBufferedEvents] Response: $
{n}`),
z_.length = 0
} catch (e) {
console.warn("Error sending analytics", e)
}
}
))
}
const K_ = (e, t) => n_(void 0, void 0, void 0, (function*() {
var n;
j_ = t,
n = e,
F_.push(n),
U_(e).catch(( () => {}
))
}
));
var q_ = []
, H_ = []
, V_ = "undefined" != typeof Uint8Array ? Uint8Array : Array
, W_ = !1;
function $_() {
W_ = !0;
for (var e =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", t
= 0; t < 64; ++t)
q_[t] = e[t],
H_[e.charCodeAt(t)] = t;
H_["-".charCodeAt(0)] = 62,
H_["_".charCodeAt(0)] = 63
}
function Y_(e, t, n) {
for (var r, i, o = [], a = t; a < n; a += 3)
r = (e[a] << 16) + (e[a + 1] << 8) + e[a + 2],
o.push(q_[(i = r) >> 18 & 63] + q_[i >> 12 & 63] + q_[i >> 6 & 63] +
q_[63 & i]);
return o.join("")
}
function Q_(e) {
var t;
W_ || $_();
for (var n = e.length, r = n % 3, i = "", o = [], a = 16383, s = 0, u = n - r; s
< u; s += a)
o.push(Y_(e, s, s + a > u ? u : s + a));
return 1 === r ? (t = e[n - 1],
i += q_[t >> 2],
i += q_[t << 4 & 63],
i += "==") : 2 === r && (t = (e[n - 2] << 8) + e[n - 1],
i += q_[t >> 10],
i += q_[t >> 4 & 63],
i += q_[t << 2 & 63],
i += "="),
o.push(i),
o.join("")
}
function Z_(e, t, n, r, i) {
var o, a, s = 8 * i - r - 1, u = (1 << s) - 1, l = u >> 1, c = -7, d = n ? i - 1 :
0, f = n ? -1 : 1, h = e[t + d];
for (d += f,
o = h & (1 << -c) - 1,
h >>= -c,
c += s; c > 0; o = 256 * o + e[t + d],
d += f,
c -= 8)
;
for (a = o & (1 << -c) - 1,
o >>= -c,
c += r; c > 0; a = 256 * a + e[t + d],
d += f,
c -= 8)
;
if (0 === o)
o = 1 - l;
else {
if (o === u)
return a ? NaN : 1 / 0 * (h ? -1 : 1);
a += Math.pow(2, r),
o -= l
}
return (h ? -1 : 1) * a * Math.pow(2, o - r)
}
function G_(e, t, n, r, i, o) {
var a, s, u, l = 8 * o - i - 1, c = (1 << l) - 1, d = c >> 1, f = 23 === i ?
Math.pow(2, -24) - Math.pow(2, -77) : 0, h = r ? 0 : o - 1, p = r ? 1 : -1, m = t < 0 || 0 ===
t && 1 / t < 0 ? 1 : 0;
for (t = Math.abs(t),
isNaN(t) || t === 1 / 0 ? (s = isNaN(t) ? 1 : 0,
a = c) : (a = Math.floor(Math.log(t) / Math.LN2),
t * (u = Math.pow(2, -a)) < 1 && (a--,
u *= 2),
(t += a + d >= 1 ? f / u : f * Math.pow(2, 1 - d)) * u >= 2 && (a++,
u /= 2),
a + d >= c ? (s = 0,
a = c) : a + d >= 1 ? (s = (t * u - 1) * Math.pow(2, i),
a += d) : (s = t * Math.pow(2, d - 1) * Math.pow(2, i),
a = 0)); i >= 8; e[n + h] = 255 & s,
h += p,
s /= 256,
i -= 8)
;
for (a = a << i | s,
l += i; l > 0; e[n + h] = 255 & a,
h += p,
a /= 256,
l -= 8)
;
e[n + h - p] |= 128 * m
}
var X_ = {}.toString
, J_ = Array.isArray || function(e) {
return "[object Array]" == X_.call(e)
}
;
function eE() {
return nE.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823
}
function tE(e, t) {
if (eE() < t)
throw new RangeError("Invalid typed array length");
return nE.TYPED_ARRAY_SUPPORT ? (e = new
Uint8Array(t)).__proto__ = nE.prototype : (null === e && (e = new nE(t)),
e.length = t),
e
}
function nE(e, t, n) {
if (!(nE.TYPED_ARRAY_SUPPORT || this instanceof nE))
return new nE(e,t,n);
if ("number" == typeof e) {
if ("string" == typeof t)
throw new Error("If encoding is specified then the first argument
must be a string");
return oE(this, e)
}
return rE(this, e, t, n)
}
function rE(e, t, n, r) {
if ("number" == typeof t)
throw new TypeError('"value" argument must not be a number');
return "undefined" != typeof ArrayBuffer && t instanceof ArrayBuffer ?
function(e, t, n, r) {
if (t.byteLength,
n < 0 || t.byteLength < n)
throw new RangeError("'offset' is out of bounds");
if (t.byteLength < n + (r || 0))
throw new RangeError("'length' is out of bounds");
return t = void 0 === n && void 0 === r ? new Uint8Array(t) : void 0
=== r ? new Uint8Array(t,n) : new Uint8Array(t,n,r),
nE.TYPED_ARRAY_SUPPORT ? (e = t).__proto__ = nE.prototype :
e = aE(e, t),
e
}(e, t, n, r) : "string" == typeof t ? function(e, t, n) {
if ("string" == typeof n && "" !== n || (n = "utf8"),
!nE.isEncoding(n))
throw new TypeError('"encoding" must be a valid string
encoding');
var r = 0 | lE(t, n)
, i = (e = tE(e, r)).write(t, n);
return i !== r && (e = e.slice(0, i)),
e
}(e, t, n) : function(e, t) {
if (uE(t)) {
var n = 0 | sE(t.length);
return 0 === (e = tE(e, n)).length || t.copy(e, 0, 0, n),
e
}
if (t) {
if ("undefined" != typeof ArrayBuffer && t.buffer instanceof
ArrayBuffer || "length"in t)
return "number" != typeof t.length || (r = t.length) != r ? tE(e,
0) : aE(e, t);
if ("Buffer" === t.type && J_(t.data))
return aE(e, t.data)
}
var r;
throw new TypeError("First argument must be a string, Buffer,
ArrayBuffer, Array, or array-like object.")
}(e, t)
}
function iE(e) {
if ("number" != typeof e)
throw new TypeError('"size" argument must be a number');
if (e < 0)
throw new RangeError('"size" argument must not be negative')
}
function oE(e, t) {
if (iE(t),
e = tE(e, t < 0 ? 0 : 0 | sE(t)),
!nE.TYPED_ARRAY_SUPPORT)
for (var n = 0; n < t; ++n)
e[n] = 0;
return e
}
function aE(e, t) {
var n = t.length < 0 ? 0 : 0 | sE(t.length);
e = tE(e, n);
for (var r = 0; r < n; r += 1)
e[r] = 255 & t[r];
return e
}
function sE(e) {
if (e >= eE())
throw new RangeError("Attempt to allocate Buffer larger than
maximum size: 0x" + eE().toString(16) + " bytes");
return 0 | e
}
function uE(e) {
return !(null == e || !e._isBuffer)
}
function lE(e, t) {
if (uE(e))
return e.length;
if ("undefined" != typeof ArrayBuffer && "function" == typeof
ArrayBuffer.isView && (ArrayBuffer.isView(e) || e instanceof ArrayBuffer))
return e.byteLength;
"string" != typeof e && (e = "" + e);
var n = e.length;
if (0 === n)
return 0;
for (var r = !1; ; )
switch (t) {
case "ascii":
case "latin1":
case "binary":
return n;
case "utf8":
case "utf-8":
case void 0:
return DE(e).length;
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return 2 * n;
case "hex":
return n >>> 1;
case "base64":
return BE(e).length;
default:
if (r)
return DE(e).length;
t = ("" + t).toLowerCase(),
r = !0
}
}
function cE(e, t, n) {
var r = !1;
if ((void 0 === t || t < 0) && (t = 0),
t > this.length)
return "";
if ((void 0 === n || n > this.length) && (n = this.length),
n <= 0)
return "";
if ((n >>>= 0) <= (t >>>= 0))
return "";
for (e || (e = "utf8"); ; )
switch (e) {
case "hex":
return kE(this, t, n);
case "utf8":
case "utf-8":
return wE(this, t, n);
case "ascii":
return EE(this, t, n);
case "latin1":
case "binary":
return SE(this, t, n);
case "base64":
return AE(this, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return ME(this, t, n);
default:
if (r)
throw new TypeError("Unknown encoding: " + e);
e = (e + "").toLowerCase(),
r = !0
}
}
function dE(e, t, n) {
var r = e[t];
e[t] = e[n],
e[n] = r
}
function fE(e, t, n, r, i) {
if (0 === e.length)
return -1;
if ("string" == typeof n ? (r = n,
n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -
2147483648),
n = +n,
isNaN(n) && (n = i ? 0 : e.length - 1),
n < 0 && (n = e.length + n),
n >= e.length) {
if (i)
return -1;
n = e.length - 1
} else if (n < 0) {
if (!i)
return -1;
n=0
}
if ("string" == typeof t && (t = nE.from(t, r)),
uE(t))
return 0 === t.length ? -1 : hE(e, t, n, r, i);
if ("number" == typeof t)
return t &= 255,
nE.TYPED_ARRAY_SUPPORT && "function" == typeof
Uint8Array.prototype.indexOf ? i ? Uint8Array.prototype.indexOf.call(e, t, n) :
Uint8Array.prototype.lastIndexOf.call(e, t, n) : hE(e, [t], n, r, i);
throw new TypeError("val must be string, number or Buffer")
}
function hE(e, t, n, r, i) {
var o, a = 1, s = e.length, u = t.length;
if (void 0 !== r && ("ucs2" === (r = String(r).toLowerCase()) || "ucs-2"
=== r || "utf16le" === r || "utf-16le" === r)) {
if (e.length < 2 || t.length < 2)
return -1;
a = 2,
s /= 2,
u /= 2,
n /= 2
}
function l(e, t) {
return 1 === a ? e[t] : e.readUInt16BE(t * a)
}
if (i) {
var c = -1;
for (o = n; o < s; o++)
if (l(e, o) === l(t, -1 === c ? 0 : o - c)) {
if (-1 === c && (c = o),
o - c + 1 === u)
return c * a
} else
-1 !== c && (o -= o - c),
c = -1
} else
for (n + u > s && (n = s - u),
o = n; o >= 0; o--) {
for (var d = !0, f = 0; f < u; f++)
if (l(e, o + f) !== l(t, f)) {
d = !1;
break
}
if (d)
return o
}
return -1
}
function pE(e, t, n, r) {
n = Number(n) || 0;
var i = e.length - n;
r ? (r = Number(r)) > i && (r = i) : r = i;
var o = t.length;
if (o % 2 != 0)
throw new TypeError("Invalid hex string");
r > o / 2 && (r = o / 2);
for (var a = 0; a < r; ++a) {
var s = parseInt(t.substr(2 * a, 2), 16);
if (isNaN(s))
return a;
e[n + a] = s
}
return a
}
function mE(e, t, n, r) {
return jE(DE(t, e.length - n), e, n, r)
}
function gE(e, t, n, r) {
return jE(function(e) {
for (var t = [], n = 0; n < e.length; ++n)
t.push(255 & e.charCodeAt(n));
return t
}(t), e, n, r)
}
function vE(e, t, n, r) {
return gE(e, t, n, r)
}
function bE(e, t, n, r) {
return jE(BE(t), e, n, r)
}
function yE(e, t, n, r) {
return jE(function(e, t) {
for (var n, r, i, o = [], a = 0; a < e.length && !((t -= 2) < 0); ++a)
r = (n = e.charCodeAt(a)) >> 8,
i = n % 256,
o.push(i),
o.push(r);
return o
}(t, e.length - n), e, n, r)
}
function AE(e, t, n) {
return 0 === t && n === e.length ? Q_(e) : Q_(e.slice(t, n))
}
function wE(e, t, n) {
n = Math.min(e.length, n);
for (var r = [], i = t; i < n; ) {
var o, a, s, u, l = e[i], c = null, d = l > 239 ? 4 : l > 223 ? 3 : l > 191 ?
2 : 1;
if (i + d <= n)
switch (d) {
case 1:
l < 128 && (c = l);
break;
case 2:
128 == (192 & (o = e[i + 1])) && (u = (31 & l) << 6 | 63 & o)
> 127 && (c = u);
break;
case 3:
o = e[i + 1],
a = e[i + 2],
128 == (192 & o) && 128 == (192 & a) && (u = (15 & l) <<
12 | (63 & o) << 6 | 63 & a) > 2047 && (u < 55296 || u > 57343) && (c = u);
break;
case 4:
o = e[i + 1],
a = e[i + 2],
s = e[i + 3],
128 == (192 & o) && 128 == (192 & a) && 128 == (192 & s)
&& (u = (15 & l) << 18 | (63 & o) << 12 | (63 & a) << 6 | 63 & s) > 65535 && u < 1114112
&& (c = u)
}
null === c ? (c = 65533,
d = 1) : c > 65535 && (c -= 65536,
r.push(c >>> 10 & 1023 | 55296),
c = 56320 | 1023 & c),
r.push(c),
i += d
}
return function(e) {
var t = e.length;
if (t <= _E)
return String.fromCharCode.apply(String, e);
for (var n = "", r = 0; r < t; )
n += String.fromCharCode.apply(String, e.slice(r, r += _E));
return n
}(r)
}
nE.TYPED_ARRAY_SUPPORT = void 0 ===
r_.TYPED_ARRAY_SUPPORT || r_.TYPED_ARRAY_SUPPORT,
eE(),
nE.poolSize = 8192,
nE._augment = function(e) {
return e.__proto__ = nE.prototype,
e
}
,
nE.from = function(e, t, n) {
return rE(null, e, t, n)
}
,
nE.TYPED_ARRAY_SUPPORT && (nE.prototype.__proto__ =
Uint8Array.prototype,
nE.__proto__ = Uint8Array,
"undefined" != typeof Symbol && Symbol.species && nE[Symbol.species]),
nE.alloc = function(e, t, n) {
return function(e, t, n, r) {
return iE(t),
t <= 0 ? tE(e, t) : void 0 !== n ? "string" == typeof r ? tE(e, t).fill(n, r) :
tE(e, t).fill(n) : tE(e, t)
}(null, e, t, n)
}
,
nE.allocUnsafe = function(e) {
return oE(null, e)
}
,
nE.allocUnsafeSlow = function(e) {
return oE(null, e)
}
,
nE.isBuffer = function(e) {
return null != e && (!!e._isBuffer || zE(e) || function(e) {
return "function" == typeof e.readFloatLE && "function" == typeof
e.slice && zE(e.slice(0, 0))
}(e))
}
,
nE.compare = function(e, t) {
if (!uE(e) || !uE(t))
throw new TypeError("Arguments must be Buffers");
if (e === t)
return 0;
for (var n = e.length, r = t.length, i = 0, o = Math.min(n, r); i < o; ++i)
if (e[i] !== t[i]) {
n = e[i],
r = t[i];
break
}
return n < r ? -1 : r < n ? 1 : 0
}
,
nE.isEncoding = function(e) {
switch (String(e).toLowerCase()) {
case "hex":
case "utf8":
case "utf-8":
case "ascii":
case "latin1":
case "binary":
case "base64":
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return !0;
default:
return !1
}
}
,
nE.concat = function(e, t) {
if (!J_(e))
throw new TypeError('"list" argument must be an Array of Buffers');
if (0 === e.length)
return nE.alloc(0);
var n;
if (void 0 === t)
for (t = 0,
n = 0; n < e.length; ++n)
t += e[n].length;
var r = nE.allocUnsafe(t)
, i = 0;
for (n = 0; n < e.length; ++n) {
var o = e[n];
if (!uE(o))
throw new TypeError('"list" argument must be an Array of
Buffers');
o.copy(r, i),
i += o.length
}
return r
}
,
nE.byteLength = lE,
nE.prototype._isBuffer = !0,
nE.prototype.swap16 = function() {
var e = this.length;
if (e % 2 != 0)
throw new RangeError("Buffer size must be a multiple of 16-bits");
for (var t = 0; t < e; t += 2)
dE(this, t, t + 1);
return this
}
,
nE.prototype.swap32 = function() {
var e = this.length;
if (e % 4 != 0)
throw new RangeError("Buffer size must be a multiple of 32-bits");
for (var t = 0; t < e; t += 4)
dE(this, t, t + 3),
dE(this, t + 1, t + 2);
return this
}
,
nE.prototype.swap64 = function() {
var e = this.length;
if (e % 8 != 0)
throw new RangeError("Buffer size must be a multiple of 64-bits");
for (var t = 0; t < e; t += 8)
dE(this, t, t + 7),
dE(this, t + 1, t + 6),
dE(this, t + 2, t + 5),
dE(this, t + 3, t + 4);
return this
}
,
nE.prototype.toString = function() {
var e = 0 | this.length;
return 0 === e ? "" : 0 === arguments.length ? wE(this, 0, e) :
cE.apply(this, arguments)
}
,
nE.prototype.equals = function(e) {
if (!uE(e))
throw new TypeError("Argument must be a Buffer");
return this === e || 0 === nE.compare(this, e)
}
,
nE.prototype.inspect = function() {
var e = "";
return this.length > 0 && (e = this.toString("hex", 0,
50).match(/.{2}/g).join(" "),
this.length > 50 && (e += " ... ")),
"<Buffer " + e + ">"
}
,
nE.prototype.compare = function(e, t, n, r, i) {
if (!uE(e))
throw new TypeError("Argument must be a Buffer");
if (void 0 === t && (t = 0),
void 0 === n && (n = e ? e.length : 0),
void 0 === r && (r = 0),
void 0 === i && (i = this.length),
t < 0 || n > e.length || r < 0 || i > this.length)
throw new RangeError("out of range index");
if (r >= i && t >= n)
return 0;
if (r >= i)
return -1;
if (t >= n)
return 1;
if (this === e)
return 0;
for (var o = (i >>>= 0) - (r >>>= 0), a = (n >>>= 0) - (t >>>= 0), s =
Math.min(o, a), u = this.slice(r, i), l = e.slice(t, n), c = 0; c < s; ++c)
if (u[c] !== l[c]) {
o = u[c],
a = l[c];
break
}
return o < a ? -1 : a < o ? 1 : 0
}
,
nE.prototype.includes = function(e, t, n) {
return -1 !== this.indexOf(e, t, n)
}
,
nE.prototype.indexOf = function(e, t, n) {
return fE(this, e, t, n, !0)
}
,
nE.prototype.lastIndexOf = function(e, t, n) {
return fE(this, e, t, n, !1)
}
,
nE.prototype.write = function(e, t, n, r) {
if (void 0 === t)
r = "utf8",
n = this.length,
t = 0;
else if (void 0 === n && "string" == typeof t)
r = t,
n = this.length,
t = 0;
else {
if (!isFinite(t))
throw new Error("Buffer.write(string, encoding, offset[, length]) is
no longer supported");
t |= 0,
isFinite(n) ? (n |= 0,
void 0 === r && (r = "utf8")) : (r = n,
n = void 0)
}
var i = this.length - t;
if ((void 0 === n || n > i) && (n = i),
e.length > 0 && (n < 0 || t < 0) || t > this.length)
throw new RangeError("Attempt to write outside buffer bounds");
r || (r = "utf8");
for (var o = !1; ; )
switch (r) {
case "hex":
return pE(this, e, t, n);
case "utf8":
case "utf-8":
return mE(this, e, t, n);
case "ascii":
return gE(this, e, t, n);
case "latin1":
case "binary":
return vE(this, e, t, n);
case "base64":
return bE(this, e, t, n);
case "ucs2":
case "ucs-2":
case "utf16le":
case "utf-16le":
return yE(this, e, t, n);
default:
if (o)
throw new TypeError("Unknown encoding: " + r);
r = ("" + r).toLowerCase(),
o = !0
}
}
,
nE.prototype.toJSON = function() {
return {
type: "Buffer",
data: Array.prototype.slice.call(this._arr || this, 0)
}
}
;
var _E = 4096;
function EE(e, t, n) {
var r = "";
n = Math.min(e.length, n);
for (var i = t; i < n; ++i)
r += String.fromCharCode(127 & e[i]);
return r
}
function SE(e, t, n) {
var r = "";
n = Math.min(e.length, n);
for (var i = t; i < n; ++i)
r += String.fromCharCode(e[i]);
return r
}
function kE(e, t, n) {
var r = e.length;
(!t || t < 0) && (t = 0),
(!n || n < 0 || n > r) && (n = r);
for (var i = "", o = t; o < n; ++o)
i += NE(e[o]);
return i
}
function ME(e, t, n) {
for (var r = e.slice(t, n), i = "", o = 0; o < r.length; o += 2)
i += String.fromCharCode(r[o] + 256 * r[o + 1]);
return i
}
function CE(e, t, n) {
if (e % 1 != 0 || e < 0)
throw new RangeError("offset is not uint");
if (e + t > n)
throw new RangeError("Trying to access beyond buffer length")
}
function xE(e, t, n, r, i, o) {
if (!uE(e))
throw new TypeError('"buffer" argument must be a Buffer instance');
if (t > i || t < o)
throw new RangeError('"value" argument is out of bounds');
if (n + r > e.length)
throw new RangeError("Index out of range")
}
function RE(e, t, n, r) {
t < 0 && (t = 65535 + t + 1);
for (var i = 0, o = Math.min(e.length - n, 2); i < o; ++i)
e[n + i] = (t & 255 << 8 * (r ? i : 1 - i)) >>> 8 * (r ? i : 1 - i)
}
function TE(e, t, n, r) {
t < 0 && (t = 4294967295 + t + 1);
for (var i = 0, o = Math.min(e.length - n, 4); i < o; ++i)
e[n + i] = t >>> 8 * (r ? i : 3 - i) & 255
}
function IE(e, t, n, r, i, o) {
if (n + r > e.length)
throw new RangeError("Index out of range");
if (n < 0)
throw new RangeError("Index out of range")
}
function PE(e, t, n, r, i) {
return i || IE(e, 0, n, 4),
G_(e, t, n, r, 23, 4),
n+4
}
function LE(e, t, n, r, i) {
return i || IE(e, 0, n, 8),
G_(e, t, n, r, 52, 8),
n+8
}
nE.prototype.slice = function(e, t) {
var n, r = this.length;
if ((e = ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r),
(t = void 0 === t ? r : ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r),
t < e && (t = e),
nE.TYPED_ARRAY_SUPPORT)
(n = this.subarray(e, t)).__proto__ = nE.prototype;
else {
var i = t - e;
n = new nE(i,void 0);
for (var o = 0; o < i; ++o)
n[o] = this[o + e]
}
return n
}
,
nE.prototype.readUIntLE = function(e, t, n) {
e |= 0,
t |= 0,
n || CE(e, t, this.length);
for (var r = this[e], i = 1, o = 0; ++o < t && (i *= 256); )
r += this[e + o] * i;
return r
}
,
nE.prototype.readUIntBE = function(e, t, n) {
e |= 0,
t |= 0,
n || CE(e, t, this.length);
for (var r = this[e + --t], i = 1; t > 0 && (i *= 256); )
r += this[e + --t] * i;
return r
}
,
nE.prototype.readUInt8 = function(e, t) {
return t || CE(e, 1, this.length),
this[e]
}
,
nE.prototype.readUInt16LE = function(e, t) {
return t || CE(e, 2, this.length),
this[e] | this[e + 1] << 8
}
,
nE.prototype.readUInt16BE = function(e, t) {
return t || CE(e, 2, this.length),
this[e] << 8 | this[e + 1]
}
,
nE.prototype.readUInt32LE = function(e, t) {
return t || CE(e, 4, this.length),
(this[e] | this[e + 1] << 8 | this[e + 2] << 16) + 16777216 * this[e + 3]
}
,
nE.prototype.readUInt32BE = function(e, t) {
return t || CE(e, 4, this.length),
16777216 * this[e] + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3])
}
,
nE.prototype.readIntLE = function(e, t, n) {
e |= 0,
t |= 0,
n || CE(e, t, this.length);
for (var r = this[e], i = 1, o = 0; ++o < t && (i *= 256); )
r += this[e + o] * i;
return r >= (i *= 128) && (r -= Math.pow(2, 8 * t)),
r
}
,
nE.prototype.readIntBE = function(e, t, n) {
e |= 0,
t |= 0,
n || CE(e, t, this.length);
for (var r = t, i = 1, o = this[e + --r]; r > 0 && (i *= 256); )
o += this[e + --r] * i;
return o >= (i *= 128) && (o -= Math.pow(2, 8 * t)),
o
}
,
nE.prototype.readInt8 = function(e, t) {
return t || CE(e, 1, this.length),
128 & this[e] ? -1 * (255 - this[e] + 1) : this[e]
}
,
nE.prototype.readInt16LE = function(e, t) {
t || CE(e, 2, this.length);
var n = this[e] | this[e + 1] << 8;
return 32768 & n ? 4294901760 | n : n
}
,
nE.prototype.readInt16BE = function(e, t) {
t || CE(e, 2, this.length);
var n = this[e + 1] | this[e] << 8;
return 32768 & n ? 4294901760 | n : n
}
,
nE.prototype.readInt32LE = function(e, t) {
return t || CE(e, 4, this.length),
this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24
}
,
nE.prototype.readInt32BE = function(e, t) {
return t || CE(e, 4, this.length),
this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]
}
,
nE.prototype.readFloatLE = function(e, t) {
return t || CE(e, 4, this.length),
Z_(this, e, !0, 23, 4)
}
,
nE.prototype.readFloatBE = function(e, t) {
return t || CE(e, 4, this.length),
Z_(this, e, !1, 23, 4)
}
,
nE.prototype.readDoubleLE = function(e, t) {
return t || CE(e, 8, this.length),
Z_(this, e, !0, 52, 8)
}
,
nE.prototype.readDoubleBE = function(e, t) {
return t || CE(e, 8, this.length),
Z_(this, e, !1, 52, 8)
}
,
nE.prototype.writeUIntLE = function(e, t, n, r) {
e = +e,
t |= 0,
n |= 0,
r || xE(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
var i = 1
, o = 0;
for (this[t] = 255 & e; ++o < n && (i *= 256); )
this[t + o] = e / i & 255;
return t + n
}
,
nE.prototype.writeUIntBE = function(e, t, n, r) {
e = +e,
t |= 0,
n |= 0,
r || xE(this, e, t, n, Math.pow(2, 8 * n) - 1, 0);
var i = n - 1
, o = 1;
for (this[t + i] = 255 & e; --i >= 0 && (o *= 256); )
this[t + i] = e / o & 255;
return t + n
}
,
nE.prototype.writeUInt8 = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 1, 255, 0),
nE.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
this[t] = 255 & e,
t+1
}
,
nE.prototype.writeUInt16LE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 2, 65535, 0),
nE.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8) : RE(this, e, t, !0),
t+2
}
,
nE.prototype.writeUInt16BE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 2, 65535, 0),
nE.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
this[t + 1] = 255 & e) : RE(this, e, t, !1),
t+2
}
,
nE.prototype.writeUInt32LE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 4, 4294967295, 0),
nE.TYPED_ARRAY_SUPPORT ? (this[t + 3] = e >>> 24,
this[t + 2] = e >>> 16,
this[t + 1] = e >>> 8,
this[t] = 255 & e) : TE(this, e, t, !0),
t+4
}
,
nE.prototype.writeUInt32BE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 4, 4294967295, 0),
nE.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & e) : TE(this, e, t, !1),
t+4
}
,
nE.prototype.writeIntLE = function(e, t, n, r) {
if (e = +e,
t |= 0,
!r) {
var i = Math.pow(2, 8 * n - 1);
xE(this, e, t, n, i - 1, -i)
}
var o = 0
,a=1
, s = 0;
for (this[t] = 255 & e; ++o < n && (a *= 256); )
e < 0 && 0 === s && 0 !== this[t + o - 1] && (s = 1),
this[t + o] = (e / a >> 0) - s & 255;
return t + n
}
,
nE.prototype.writeIntBE = function(e, t, n, r) {
if (e = +e,
t |= 0,
!r) {
var i = Math.pow(2, 8 * n - 1);
xE(this, e, t, n, i - 1, -i)
}
var o = n - 1
,a=1
, s = 0;
for (this[t + o] = 255 & e; --o >= 0 && (a *= 256); )
e < 0 && 0 === s && 0 !== this[t + o + 1] && (s = 1),
this[t + o] = (e / a >> 0) - s & 255;
return t + n
}
,
nE.prototype.writeInt8 = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 1, 127, -128),
nE.TYPED_ARRAY_SUPPORT || (e = Math.floor(e)),
e < 0 && (e = 255 + e + 1),
this[t] = 255 & e,
t+1
}
,
nE.prototype.writeInt16LE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 2, 32767, -32768),
nE.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8) : RE(this, e, t, !0),
t+2
}
,
nE.prototype.writeInt16BE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 2, 32767, -32768),
nE.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 8,
this[t + 1] = 255 & e) : RE(this, e, t, !1),
t+2
}
,
nE.prototype.writeInt32LE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 4, 2147483647, -2147483648),
nE.TYPED_ARRAY_SUPPORT ? (this[t] = 255 & e,
this[t + 1] = e >>> 8,
this[t + 2] = e >>> 16,
this[t + 3] = e >>> 24) : TE(this, e, t, !0),
t+4
}
,
nE.prototype.writeInt32BE = function(e, t, n) {
return e = +e,
t |= 0,
n || xE(this, e, t, 4, 2147483647, -2147483648),
e < 0 && (e = 4294967295 + e + 1),
nE.TYPED_ARRAY_SUPPORT ? (this[t] = e >>> 24,
this[t + 1] = e >>> 16,
this[t + 2] = e >>> 8,
this[t + 3] = 255 & e) : TE(this, e, t, !1),
t+4
}
,
nE.prototype.writeFloatLE = function(e, t, n) {
return PE(this, e, t, !0, n)
}
,
nE.prototype.writeFloatBE = function(e, t, n) {
return PE(this, e, t, !1, n)
}
,
nE.prototype.writeDoubleLE = function(e, t, n) {
return LE(this, e, t, !0, n)
}
,
nE.prototype.writeDoubleBE = function(e, t, n) {
return LE(this, e, t, !1, n)
}
,
nE.prototype.copy = function(e, t, n, r) {
if (n || (n = 0),
r || 0 === r || (r = this.length),
t >= e.length && (t = e.length),
t || (t = 0),
r > 0 && r < n && (r = n),
r === n)
return 0;
if (0 === e.length || 0 === this.length)
return 0;
if (t < 0)
throw new RangeError("targetStart out of bounds");
if (n < 0 || n >= this.length)
throw new RangeError("sourceStart out of bounds");
if (r < 0)
throw new RangeError("sourceEnd out of bounds");
r > this.length && (r = this.length),
e.length - t < r - n && (r = e.length - t + n);
var i, o = r - n;
if (this === e && n < t && t < r)
for (i = o - 1; i >= 0; --i)
e[i + t] = this[i + n];
else if (o < 1e3 || !nE.TYPED_ARRAY_SUPPORT)
for (i = 0; i < o; ++i)
e[i + t] = this[i + n];
else
Uint8Array.prototype.set.call(e, this.subarray(n, n + o), t);
return o
}
,
nE.prototype.fill = function(e, t, n, r) {
if ("string" == typeof e) {
if ("string" == typeof t ? (r = t,
t = 0,
n = this.length) : "string" == typeof n && (r = n,
n = this.length),
1 === e.length) {
var i = e.charCodeAt(0);
i < 256 && (e = i)
}
if (void 0 !== r && "string" != typeof r)
throw new TypeError("encoding must be a string");
if ("string" == typeof r && !nE.isEncoding(r))
throw new TypeError("Unknown encoding: " + r)
} else
"number" == typeof e && (e &= 255);
if (t < 0 || this.length < t || this.length < n)
throw new RangeError("Out of range index");
if (n <= t)
return this;
var o;
if (t >>>= 0,
n = void 0 === n ? this.length : n >>> 0,
e || (e = 0),
"number" == typeof e)
for (o = t; o < n; ++o)
this[o] = e;
else {
var a = uE(e) ? e : DE(new nE(e,r).toString())
, s = a.length;
for (o = 0; o < n - t; ++o)
this[o + t] = a[o % s]
}
return this
}
;
var OE = /[^+\/0-9A-Za-z-_]/g;
function NE(e) {
return e < 16 ? "0" + e.toString(16) : e.toString(16)
}
function DE(e, t) {
var n;
t = t || 1 / 0;
for (var r = e.length, i = null, o = [], a = 0; a < r; ++a) {
if ((n = e.charCodeAt(a)) > 55295 && n < 57344) {
if (!i) {
if (n > 56319) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue
}
if (a + 1 === r) {
(t -= 3) > -1 && o.push(239, 191, 189);
continue
}
i = n;
continue
}
if (n < 56320) {
(t -= 3) > -1 && o.push(239, 191, 189),
i = n;
continue
}
n = 65536 + (i - 55296 << 10 | n - 56320)
} else
i && (t -= 3) > -1 && o.push(239, 191, 189);
if (i = null,
n < 128) {
if ((t -= 1) < 0)
break;
o.push(n)
} else if (n < 2048) {
if ((t -= 2) < 0)
break;
o.push(n >> 6 | 192, 63 & n | 128)
} else if (n < 65536) {
if ((t -= 3) < 0)
break;
o.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128)
} else {
if (!(n < 1114112))
throw new Error("Invalid code point");
if ((t -= 4) < 0)
break;
o.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63
& n | 128)
}
}
return o
}
function BE(e) {
return function(e) {
var t, n, r, i, o, a;
W_ || $_();
var s = e.length;
if (s % 4 > 0)
throw new Error("Invalid string. Length must be a multiple of 4");
o = "=" === e[s - 2] ? 2 : "=" === e[s - 1] ? 1 : 0,
a = new V_(3 * s / 4 - o),
r = o > 0 ? s - 4 : s;
var u = 0;
for (t = 0,
n = 0; t < r; t += 4,
n += 3)
i = H_[e.charCodeAt(t)] << 18 | H_[e.charCodeAt(t + 1)] << 12 |
H_[e.charCodeAt(t + 2)] << 6 | H_[e.charCodeAt(t + 3)],
a[u++] = i >> 16 & 255,
a[u++] = i >> 8 & 255,
a[u++] = 255 & i;
return 2 === o ? (i = H_[e.charCodeAt(t)] << 2 | H_[e.charCodeAt(t
+ 1)] >> 4,
a[u++] = 255 & i) : 1 === o && (i = H_[e.charCodeAt(t)] << 10 |
H_[e.charCodeAt(t + 1)] << 4 | H_[e.charCodeAt(t + 2)] >> 2,
a[u++] = i >> 8 & 255,
a[u++] = 255 & i),
a
}(function(e) {
if ((e = function(e) {
return e.trim ? e.trim() : e.replace(/^\s+|\s+$/g, "")
}(e).replace(OE, "")).length < 2)
return "";
for (; e.length % 4 != 0; )
e += "=";
return e
}(e))
}
function jE(e, t, n, r) {
for (var i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i)
t[i + n] = e[i];
return i
}
function zE(e) {
return !!e.constructor && "function" == typeof e.constructor.isBuffer &&
e.constructor.isBuffer(e)
}
class FE {
constructor(e) {
this.enabled = !0,
(null == e ? void 0 : e.debug) && P_.enable("Ecies:Layer"),
(null == e ? void 0 : e.privateKey) ? this.ecies =
ue.PrivateKey.fromHex(e.privateKey) : this.ecies = new ue.PrivateKey,
B_.Ecies("[ECIES constructor()] initialized secret: ",
this.ecies.toHex()),
B_.Ecies("[ECIES constructor()] initialized public: ",
this.ecies.publicKey.toHex()),
B_.Ecies("[ECIES constructor()] init with", this)
}
generateECIES() {
this.ecies = new ue.PrivateKey
}
getPublicKey() {
return this.ecies.publicKey.toHex()
}
encrypt(e, t) {
let n = e;
if (this.enabled)
try {
B_.Ecies("[ECIES: encrypt()] using otherPublicKey", t);
const r = nE.from(e)
, i = ue.encrypt(t, r);
n = nE.from(i).toString("base64")
} catch (n) {
throw B_.Ecies("[ECIES: encrypt()] error encrypt:", n),
B_.Ecies("[ECIES: encrypt()] private: ", this.ecies.toHex()),
B_.Ecies("[ECIES: encrypt()] data: ", e),
B_.Ecies("[ECIES: encrypt()] otherkey: ", t),
n
}
return n
}
decrypt(e) {
let t = e;
if (this.enabled)
try {
B_.Ecies("[ECIES: decrypt()] using privateKey",
this.ecies.toHex());
const n = nE.from(e.toString(), "base64");
t = ue.decrypt(this.ecies.toHex(), n).toString()
} catch (t) {
throw B_.Ecies("[ECIES: decrypt()] error decrypt", t),
B_.Ecies("[ECIES: decrypt()] private: ", this.ecies.toHex()),
B_.Ecies("[ECIES: decrypt()] encryptedData: ", e),
t
}
return t
}
getKeyInfo() {
return {
private: this.ecies.toHex(),
public: this.ecies.publicKey.toHex()
}
}
toString() {
B_.Ecies("[ECIES: toString()]", this.getKeyInfo())
}
}
var UE = "0.27.0";
const KE = "https://metamask-sdk.api.cx.metamask.io/"
, qE = ["websocket"]
, HE = 6048e5
, VE = {
METAMASK_GETPROVIDERSTATE: "metamask_getProviderState",
ETH_REQUESTACCOUNTS: "eth_requestAccounts"
};
function WE(e) {
const {context: t} = e;
B_.RemoteCommunication(`[RemoteCommunication: clean()] context=$
{t}`),
e.channelConfig = void 0,
e.ready = !1,
e.originatorConnectStarted = !1
}
var $E, YE;
e.ConnectionStatus = void 0,
e.EventType = void 0,
e.MessageType = void 0,
function(e) {
e.DISCONNECTED = "disconnected",
e.WAITING = "waiting",
e.TIMEOUT = "timeout",
e.LINKED = "linked",
e.PAUSED = "paused",
e.TERMINATED = "terminated"
}(e.ConnectionStatus || (e.ConnectionStatus = {})),
function(e) {
e.KEY_INFO = "key_info",
e.SERVICE_STATUS = "service_status",
e.PROVIDER_UPDATE = "provider_update",
e.RPC_UPDATE = "rpc_update",
e.KEYS_EXCHANGED = "keys_exchanged",
e.JOIN_CHANNEL = "join_channel",
e.CHANNEL_CREATED = "channel_created",
e.CLIENTS_CONNECTED = "clients_connected",
e.CLIENTS_DISCONNECTED = "clients_disconnected",
e.CLIENTS_WAITING = "clients_waiting",
e.CLIENTS_READY = "clients_ready",
e.CHANNEL_PERSISTENCE = "channel_persistence",
e.MESSAGE_ACK = "ack",
e.SOCKET_DISCONNECTED = "socket_disconnected",
e.SOCKET_RECONNECT = "socket_reconnect",
e.OTP = "otp",
e.SDK_RPC_CALL = "sdk_rpc_call",
e.AUTHORIZED = "authorized",
e.CONNECTION_STATUS = "connection_status",
e.MESSAGE = "message",
e.TERMINATE = "terminate"
}(e.EventType || (e.EventType = {})),
function(e) {
e.KEY_EXCHANGE = "key_exchange"
}($E || ($E = {})),
function(e) {
e.KEY_HANDSHAKE_START = "key_handshake_start",
e.KEY_HANDSHAKE_CHECK = "key_handshake_check",
e.KEY_HANDSHAKE_SYN = "key_handshake_SYN",
e.KEY_HANDSHAKE_SYNACK = "key_handshake_SYNACK",
e.KEY_HANDSHAKE_ACK = "key_handshake_ACK",
e.KEY_HANDSHAKE_NONE = "none"
}(YE || (YE = {}));
class QE extends CA.EventEmitter2 {
constructor(e) {
let {communicationLayer: t, otherPublicKey: n, context: r, ecies: i,
logging: o} = e;
super(),
this.keysExchanged = !1,
this.step = YE.KEY_HANDSHAKE_NONE,
this.debug = !1,
this.context = r,
this.communicationLayer = t,
(null == i ? void 0 : i.privateKey) && n &&
(B_.KeyExchange(`[KeyExchange: constructor()] otherPubKey=${n} set keysExchanged
to true!`, i),
this.keysExchanged = !0),
this.myECIES = new FE(Object.assign(Object.assign({}, i), {
debug: null == o ? void 0 : o.eciesLayer
})),
this.myPublicKey = this.myECIES.getPublicKey(),
this.debug = !0 === (null == o ? void 0 : o.keyExchangeLayer),
n && this.setOtherPublicKey(n),
this.communicationLayer.on($E.KEY_EXCHANGE,
this.onKeyExchangeMessage.bind(this))
}
onKeyExchangeMessage(t) {
const {relayPersistence: n} = this.communicationLayer.remote.state;
if (B_.KeyExchange(`[KeyExchange: onKeyExchangeMessage()]
context=${this.context} keysExchanged=${this.keysExchanged} relayPersistence=${n}`,
t),
n)
return void B_.KeyExchange("[KeyExchange:
onKeyExchangeMessage()] Ignoring key exchange message because relay persistence
is activated");
const {message: r} = t;
this.keysExchanged && B_.KeyExchange(`[KeyExchange:
onKeyExchangeMessage()] context=${this.context} received handshake while already
exchanged. step=${this.step} otherPubKey=${this.otherPublicKey}`),
this.emit(e.EventType.KEY_INFO, r.type),
r.type === YE.KEY_HANDSHAKE_SYN ?
(this.checkStep([YE.KEY_HANDSHAKE_NONE, YE.KEY_HANDSHAKE_ACK]),
B_.KeyExchange("[KeyExchange: onKeyExchangeMessage()]
KEY_HANDSHAKE_SYN", r),
r.pubkey && this.setOtherPublicKey(r.pubkey),
this.communicationLayer.sendMessage({
type: YE.KEY_HANDSHAKE_SYNACK,
pubkey: this.myPublicKey
}),
this.setStep(YE.KEY_HANDSHAKE_ACK)) : r.type ===
YE.KEY_HANDSHAKE_SYNACK ? (this.checkStep([YE.KEY_HANDSHAKE_SYNACK,
YE.KEY_HANDSHAKE_ACK, YE.KEY_HANDSHAKE_NONE]),
B_.KeyExchange("[KeyExchange: onKeyExchangeMessage()]
KEY_HANDSHAKE_SYNACK"),
r.pubkey && this.setOtherPublicKey(r.pubkey),
this.communicationLayer.sendMessage({
type: YE.KEY_HANDSHAKE_ACK
}),
this.keysExchanged = !0,
this.setStep(YE.KEY_HANDSHAKE_ACK),
this.emit(e.EventType.KEYS_EXCHANGED)) : r.type ===
YE.KEY_HANDSHAKE_ACK && (B_.KeyExchange("[KeyExchange:
onKeyExchangeMessage()] KEY_HANDSHAKE_ACK set keysExchanged to true!"),
this.checkStep([YE.KEY_HANDSHAKE_ACK,
YE.KEY_HANDSHAKE_NONE]),
this.keysExchanged = !0,
this.setStep(YE.KEY_HANDSHAKE_ACK),
this.emit(e.EventType.KEYS_EXCHANGED))
}
resetKeys(e) {
this.clean(),
this.myECIES = new FE(e)
}
clean() {
B_.KeyExchange(`[KeyExchange: clean()] context=${this.context}
reset handshake state`),
this.setStep(YE.KEY_HANDSHAKE_NONE),
this.emit(e.EventType.KEY_INFO, this.step),
this.keysExchanged = !1
}
start(e) {
let {isOriginator: t, force: n} = e;
const {relayPersistence: r, protocolVersion: i} =
this.communicationLayer.remote.state
, o = i >= 2;
if (r)
return B_.KeyExchange("[KeyExchange: start()] Ignoring key
exchange message because relay persistence is activated"),
void console.log(`[KeyExchange: start()] relayPersistence=$
{r}`);
B_.KeyExchange(`[KeyExchange: start()] context=${this.context}
protocolVersion=${i} isOriginator=${t} step=${this.step} force=${n} relayPersistence=${r}
keysExchanged=${this.keysExchanged}`),
t ? !(this.keysExchanged || this.step !==
YE.KEY_HANDSHAKE_NONE && this.step !== YE.KEY_HANDSHAKE_SYNACK) ||
n ? (B_.KeyExchange(`[KeyExchange: start()] context=${this.context} -- start key
exchange (force=${n}) -- step=${this.step}`, this.step),
this.clean(),
this.setStep(YE.KEY_HANDSHAKE_SYNACK),
this.communicationLayer.sendMessage({
type: YE.KEY_HANDSHAKE_SYN,
pubkey: this.myPublicKey,
v: 2
})) : B_.KeyExchange(`[KeyExchange: start()] context=$
{this.context} -- key exchange already ${this.keysExchanged ? "done" : "in progress"} --
aborted.`, this.step) : this.keysExchanged && !0 !== n ?
B_.KeyExchange("[KeyExchange: start()] don't send KEY_HANDSHAKE_START --
exchange already done.") : o ? this.communicationLayer.sendMessage({
type: YE.KEY_HANDSHAKE_SYNACK,
pubkey: this.myPublicKey,
v: 2
}) : (this.communicationLayer.sendMessage({
type: YE.KEY_HANDSHAKE_START
}),
this.clean())
}
setStep(t) {
this.step = t,
this.emit(e.EventType.KEY_INFO, t)
}
checkStep(e) {
e.length > 0 && -1 === e.indexOf(this.step.toString()) &&
console.warn(`[KeyExchange: checkStep()] Wrong Step "${this.step}" not within ${e}`)
}
setRelayPersistence(e) {
let {localKey: t, otherKey: n} = e;
this.otherPublicKey = n,
this.myECIES = new FE({
privateKey: t,
debug: this.debug
}),
this.keysExchanged = !0
}
setKeysExchanged(e) {
this.keysExchanged = e
}
areKeysExchanged() {
return this.keysExchanged
}
getMyPublicKey() {
return this.myPublicKey
}
getOtherPublicKey() {
return this.otherPublicKey
}
setOtherPublicKey(e) {
B_.KeyExchange("[KeyExchange: setOtherPubKey()]", e),
this.otherPublicKey = e
}
encryptMessage(e) {
if (!this.otherPublicKey)
throw new Error("encryptMessage: Keys not exchanged -
missing otherPubKey");
return this.myECIES.encrypt(e, this.otherPublicKey)
}
decryptMessage(e) {
if (!this.otherPublicKey)
throw new Error("decryptMessage: Keys not exchanged -
missing otherPubKey");
return this.myECIES.decrypt(e)
}
getKeyInfo() {
return {
ecies: Object.assign(Object.assign({},
this.myECIES.getKeyInfo()), {
otherPubKey: this.otherPublicKey
}),
step: this.step,
keysExchanged: this.areKeysExchanged()
}
}
toString() {
const e = {
keyInfo: this.getKeyInfo(),
keysExchanged: this.keysExchanged,
step: this.step
};
return JSON.stringify(e)
}
}
!function(e) {
e.TERMINATE = "terminate",
e.ANSWER = "answer",
e.OFFER = "offer",
e.CANDIDATE = "candidate",
e.JSONRPC = "jsonrpc",
e.WALLET_INFO = "wallet_info",
e.ORIGINATOR_INFO = "originator_info",
e.PAUSE = "pause",
e.OTP = "otp",
e.AUTHORIZED = "authorized",
e.PING = "ping",
e.READY = "ready"
}(e.MessageType || (e.MessageType = {}));
const ZE = e => new Promise((t => {
setTimeout(t, e)
}
))
, GE = function(e, t) {
let n = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2]
: 200;
return n_(void 0, void 0, void 0, (function*() {
let r;
const i = Date.now();
let o = !1;
for (; !o; ) {
if (o = Date.now() - i > 3e5,
r = t[e],
void 0 !== r.elapsedTime)
return r;
yield ZE(n)
}
throw new Error(`RPC ${e} timed out`)
}
))
}
, XE = t => n_(void 0, void 0, void 0, (function*() {
var n, r, i, o, a;
return t.remote.state.terminated ? (B_.SocketService(`[SocketService:
reconnectSocket()] instance.remote.state.terminated=${t.remote.state.terminated}
socket already terminated`, t),
!1) : (B_.SocketService(`[SocketService: reconnectSocket()]
instance.state.socket?.connected=${null === (n = t.state.socket) || void 0 === n ? void 0
: n.connected} trying to reconnect after socketio disconnection`, t),
yield ZE(200),
(null === (r = t.state.socket) || void 0 === r ? void 0 : r.connected) ||
(t.state.resumed = !0,
null === (i = t.state.socket) || void 0 === i || i.connect(),
t.emit(e.EventType.SOCKET_RECONNECT),
null === (o = t.state.socket) || void 0 === o ||
o.emit(e.EventType.JOIN_CHANNEL, {
channelId: t.state.channelId,
context: `${t.state.context}connect_again`,
clientType: t.state.isOriginator ? "dapp" : "wallet"
})),
yield ZE(100),
null === (a = t.state.socket) || void 0 === a ? void 0 : a.connected)
}
));
var JE, eS;
!function(e) {
e.REQUEST = "sdk_connect_request_started",
e.REQUEST_MOBILE = "sdk_connect_request_started_mobile",
e.RECONNECT = "sdk_reconnect_request_started",
e.CONNECTED = "sdk_connection_established",
e.CONNECTED_MOBILE = "sdk_connection_established_mobile",
e.AUTHORIZED = "sdk_connection_authorized",
e.REJECTED = "sdk_connection_rejected",
e.TERMINATED = "sdk_connection_terminated",
e.DISCONNECTED = "sdk_disconnected",
e.SDK_USE_EXTENSION = "sdk_use_extension",
e.SDK_RPC_REQUEST = "sdk_rpc_request",
e.SDK_RPC_REQUEST_RECEIVED = "sdk_rpc_request_received",
e.SDK_RPC_REQUEST_DONE = "sdk_rpc_request_done",
e.SDK_EXTENSION_UTILIZED = "sdk_extension_utilized",
e.SDK_USE_INAPP_BROWSER = "sdk_use_inapp_browser"
}(JE || (JE = {})),
function(e) {
e.RPC_CHECK = "rpcCheck",
e.SKIPPED_RPC = "skippedRpc"
}(eS || (eS = {}));
const tS = ["eth_sendTransaction", "eth_signTypedData",
"eth_signTransaction", "personal_sign", "wallet_requestPermissions",
"wallet_switchEthereumChain", "eth_signTypedData_v3", "eth_signTypedData_v4",
"metamask_connectSign", "metamask_connectWith", "metamask_batch"].map((e =>
e.toLowerCase()));
function nS(t, n) {
var r, i, o, a;
if (!t.state.channelId)
throw new Error("Create a channel first");
B_.SocketService(`[SocketService: handleSendMessage()] context=$
{t.state.context} areKeysExchanged=${null === (r = t.state.keyExchange) || void 0 ===
r ? void 0 : r.areKeysExchanged()}`, n),
(null === (i = null == n ? void 0 : n.type) || void 0 === i ? void 0 :
i.startsWith("key_handshake")) ? function(t, n) {
var r;
B_.SocketService(`[SocketService: handleKeyHandshake()]
context=${t.state.context}`, n),
null === (r = t.state.socket) || void 0 === r ||
r.emit(e.EventType.MESSAGE, {
id: t.state.channelId,
context: t.state.context,
clientType: t.state.isOriginator ? "dapp" : "wallet",
message: n
})
}(t, n) : (function(e, t) {
var n;
if (!(null === (n = e.state.keyExchange) || void 0 === n ? void 0 :
n.areKeysExchanged()) && !e.remote.state.relayPersistence)
throw B_.SocketService(`[SocketService:
validateKeyExchange()] context=${e.state.context} ERROR keys not exchanged`, t),
console.error("[SocketService: validateKeyExchange()] ERROR
keys not exchanged", t),
new Error("Keys not exchanged BBB")
}(t, n),
function(t, n) {
var r;
const i = null !== (r = null == n ? void 0 : n.method) && void 0 !== r ?
r : ""
, o = null == n ? void 0 : n.id;
t.state.isOriginator && o && (t.state.rpcMethodTracker[o] = {
id: o,
timestamp: Date.now(),
method: i
},
t.emit(e.EventType.RPC_UPDATE, t.state.rpcMethodTracker[o]))
}(t, n),
function(t, n) {
var r, i;
const o = null === (r = t.state.keyExchange) || void 0 === r ? void 0 :
r.encryptMessage(JSON.stringify(n))
,a={
id: t.state.channelId,
context: t.state.context,
clientType: t.state.isOriginator ? "dapp" : "wallet",
message: o,
plaintext: t.state.hasPlaintext ? JSON.stringify(n) : void 0
};
B_.SocketService(`[SocketService: encryptAndSendMessage()]
context=${t.state.context}`, a),
n.type === e.MessageType.TERMINATE &&
(t.state.manualDisconnect = !0),
null === (i = t.state.socket) || void 0 === i ||
i.emit(e.EventType.MESSAGE, a)
}(t, n),
t.remote.state.analytics && t.remote.state.isOriginator && n.method &&
tS.includes(n.method.toLowerCase()) && K_({
id: null !== (o = t.remote.state.channelId) && void 0 !== o ? o : "",
event: JE.SDK_RPC_REQUEST,
sdkVersion: t.remote.state.sdkVersion,
commLayerVersion: UE,
walletVersion: null === (a = t.remote.state.walletInfo) || void 0 === a
? void 0 : a.version,
params: {
method: n.method,
from: "mobile"
}
}, t.remote.state.communicationServerUrl).catch((e => {
console.error("Cannot send analytics", e)
}
)),
function(t, n) {
var r;
return n_(this, void 0, void 0, (function*() {
const i = null == n ? void 0 : n.id
, o = null !== (r = null == n ? void 0 : n.method) && void 0 !==
r ? r : "";
if (t.state.isOriginator && i)
try {
const r = GE(i, t.state.rpcMethodTracker, 200).then((e
=> ({
type: eS.RPC_CHECK,
result: e
})))
, a = ( () => n_(this, void 0, void 0, (function*() {
const e = yield(e => {
let {rpcId: t, instance: n} = e;
return n_(void 0, void 0, void 0, (function*() {
for (; n.state.lastRpcId === t || void 0 ===
n.state.lastRpcId; )
yield ZE(200);
return n.state.lastRpcId
}
))
}
)({
instance: t,
rpcId: i
})
, n = yield GE(e, t.state.rpcMethodTracker, 200);
return {
type: eS.SKIPPED_RPC,
result: n
}
}
)))()
, s = yield Promise.race([r, a]);
if (s.type === eS.RPC_CHECK) {
const e = s.result;
t.setConnectionStatus(e.ConnectionStatus.PAUSED)
}(n);
else if (t.type === e.MessageType.READY &&
r.isOriginator)
!function(t) {
const {state: n} = t;
t.setConnectionStatus(e.ConnectionStatus.LINKED);
const r = n.paused;
n.paused = !1,
t.emit(e.EventType.CLIENTS_READY, {
isOriginator: n.isOriginator,
walletInfo: n.walletInfo
}),
r && (n.authorized = !0,
t.emit(e.EventType.AUTHORIZED))
}(n);
else {
if (t.type === e.MessageType.OTP &&
r.isOriginator)
return void function(t, n) {
var r;
const {state: i} = t;
t.emit(e.EventType.OTP, n.otpAnswer),
1 === "6.6".localeCompare((null === (r =
i.walletInfo) || void 0 === r ? void 0 : r.version) || "") &&
(console.warn("RemoteCommunication::on 'otp' -- backward compatibility <6.6 -- triger
eth_requestAccounts"),
t.emit(e.EventType.SDK_RPC_CALL, {
method:
VE.ETH_REQUESTACCOUNTS,
params: []
}))
}(n, t);
t.type === e.MessageType.AUTHORIZED &&
r.isOriginator && function(t) {
const {state: n} = t;
n.authorized = !0,
t.emit(e.EventType.AUTHORIZED)
}(n)
}
n.emit(e.EventType.MESSAGE, t)
}
else
!function(t, n) {
var r;
const {state: i} = t;
null === (r = i.communicationLayer) || void 0 === r ||
r.sendMessage({
type: e.MessageType.WALLET_INFO,
walletInfo: i.walletInfo
}),
i.originatorInfo = n.originatorInfo || n.originator,
t.emit(e.EventType.CLIENTS_READY, {
isOriginator: i.isOriginator,
originatorInfo: i.originatorInfo
}),
i.paused = !1
}(n, t)
}(r, t)
}
}
function mS(e) {
return () => {
const {state: t} = e;
B_.RemoteCommunication("[RemoteCommunication:
handleSocketReconnectEvent()] on 'socket_reconnect' -- reset key exchange status /
set ready to false"),
t.ready = !1,
t.authorized = !1,
WE(t),
e.emitServiceStatusEvent({
context: "socket_reconnect"
})
}
}
function gS(e) {
return () => {
const {state: t} = e;
B_.RemoteCommunication("[RemoteCommunication:
handleSocketDisconnectedEvent()] on 'socket_Disconnected' set ready to false"),
t.ready = !1
}
}
function vS(t) {
return () => n_(this, void 0, void 0, (function*() {
var n, r, i, o, a, s, u;
const {state: l} = t;
B_.RemoteCommunication(`[RemoteCommunication:
handleFullPersistenceEvent()] context=${l.context}`),
t.state.ready = !0,
t.state.clientsConnected = !0,
t.state.authorized = !0,
t.state.relayPersistence = !0,
null === (n = t.state.communicationLayer) || void 0 === n ||
n.getKeyExchange().setKeysExchanged(!0),
t.emit(e.EventType.KEYS_EXCHANGED, {
keysExchanged: !0,
isOriginator: !0
}),
t.emit(e.EventType.AUTHORIZED),
t.emit(e.EventType.CLIENTS_READY),
t.emit(e.EventType.CHANNEL_PERSISTENCE);
try {
l.channelConfig = Object.assign(Object.assign({},
l.channelConfig), {
localKey: null === (r = l.communicationLayer) || void 0 === r
? void 0 : r.getKeyExchange().getKeyInfo().ecies.private,
otherKey: null === (i = l.communicationLayer) || void 0 === i
? void 0 : i.getKeyExchange().getOtherPublicKey(),
channelId: null !== (o = l.channelId) && void 0 !== o ? o : "",
validUntil: null !== (s = null === (a = l.channelConfig) || void
0 === a ? void 0 : a.validUntil) && void 0 !== s ? s : HE,
relayPersistence: !0
}),
yield null === (u = l.storageManager) || void 0 === u ? void 0 :
u.persistChannelConfig(l.channelConfig)
} catch (e) {
console.error("Error persisting channel config", e)
}
}
))
}
function bS(t) {
let {options: n, instance: r} = t;
var i, o, a, s, u, l;
const {state: c} = r;
B_.RemoteCommunication(`[RemoteCommunication: disconnect()]
channel=${c.channelId}`, n),
c.ready = !1,
c.paused = !1,
(null == n ? void 0 : n.terminate) ? (null === (i = c.storageManager) ||
void 0 === i || i.terminate(null !== (o = c.channelId) && void 0 !== o ? o : ""),
r.state.terminated = !0,
n.sendMessage && (null === (a = c.communicationLayer) || void 0 ===
a ? void 0 : a.getKeyInfo().keysExchanged) && (null === (s = c.communicationLayer) ||
void 0 === s || s.sendMessage({
type: e.MessageType.TERMINATE
})),
c.relayPersistence = !1,
c.channelId = OA(),
n.channelId = c.channelId,
c.channelConfig = void 0,
c.originatorConnectStarted = !1,
null === (u = c.communicationLayer) || void 0 === u || u.disconnect(n),
r.setConnectionStatus(e.ConnectionStatus.TERMINATED)) : (null === (l
= c.communicationLayer) || void 0 === l || l.disconnect(n),
r.setConnectionStatus(e.ConnectionStatus.DISCONNECTED))
}
e.CommunicationLayerPreference = void 0,
e.PlatformType = void 0,
function(e) {
e.SOCKET = "socket"
}(e.CommunicationLayerPreference || (e.CommunicationLayerPreference =
{})),
function(e) {
e.NonBrowser = "nodejs",
e.MetaMaskMobileWebview = "in-app-browser",
e.DesktopWeb = "web-desktop",
e.MobileWeb = "web-mobile",
e.ReactNative = "react-native"
}(e.PlatformType || (e.PlatformType = {}));
class yS extends CA.EventEmitter2 {
constructor(t) {
let {platformType: n, communicationLayerPreference: r,
otherPublicKey: i, reconnect: o, walletInfo: a, dappMetadata: s, protocolVersion: u,
transports: l, context: c, relayPersistence: d, ecies: f, analytics: h=!1, storage: p,
sdkVersion: m, communicationServerUrl: g=KE, logging: v, autoConnect: b={
timeout: 3e3
}} = t;
super(),
this.state = {
ready: !1,
authorized: !1,
isOriginator: !1,
terminated: !1,
protocolVersion: 1,
paused: !1,
platformType: "metamask-mobile",
analytics: !1,
reconnection: !1,
originatorInfoSent: !1,
communicationServerUrl: KE,
context: "",
persist: !1,
clientsConnected: !1,
sessionDuration: HE,
originatorConnectStarted: !1,
debug: !1,
_connectionStatus: e.ConnectionStatus.DISCONNECTED
},
this.state.otherPublicKey = i,
this.state.dappMetadata = s,
this.state.walletInfo = a,
this.state.transports = l,
this.state.platformType = n,
this.state.analytics = h,
this.state.protocolVersion = null != u ? u : 1,
this.state.isOriginator = !i,
this.state.relayPersistence = d,
this.state.communicationServerUrl = g,
this.state.context = c,
this.state.terminated = !1,
this.state.sdkVersion = m,
this.setMaxListeners(50),
this.setConnectionStatus(e.ConnectionStatus.DISCONNECTED),
(null == p ? void 0 : p.duration) && (this.state.sessionDuration =
HE),
this.state.storageOptions = p,
this.state.autoConnectOptions = b,
this.state.debug = !0 === (null == v ? void 0 : v.remoteLayer),
!0 === (null == v ? void 0 : v.remoteLayer) &&
P_.enable("RemoteCommunication:Layer"),
!0 === (null == v ? void 0 : v.serviceLayer) &&
P_.enable("SocketService:Layer"),
!0 === (null == v ? void 0 : v.eciesLayer) &&
P_.enable("ECIES:Layer"),
!0 === (null == v ? void 0 : v.keyExchangeLayer) &&
P_.enable("KeyExchange:Layer"),
this.state.logging = v,
(null == p ? void 0 : p.storageManager) &&
(this.state.storageManager = p.storageManager),
B_.RemoteCommunication(`[RemoteCommunication: constructor()]
protocolVersion=${u} relayPersistence=${d} isOriginator=${this.state.isOriginator}
communicationLayerPreference=${r} otherPublicKey=${i} reconnect=${o}`),
this.initCommunicationLayer({
communicationLayerPreference: r,
otherPublicKey: i,
reconnect: o,
ecies: f,
communicationServerUrl: g
}),
this.emitServiceStatusEvent({
context: "constructor"
})
}
initCommunicationLayer(t) {
let {communicationLayerPreference: n, otherPublicKey: r,
reconnect: i, ecies: o, communicationServerUrl: a=KE} = t;
return function(t) {
let {communicationLayerPreference: n, otherPublicKey: r,
reconnect: i, ecies: o, communicationServerUrl: a=KE, instance: s} = t;
var u, l, c, d, f, h, p, m, g, v, b;
const {state: y} = s;
if (B_.RemoteCommunication("[initCommunicationLayer()] ",
JSON.stringify(y, null, 2)),
n !== e.CommunicationLayerPreference.SOCKET)
throw new Error("Invalid communication protocol");
y.communicationLayer = new aS({
communicationLayerPreference: n,
otherPublicKey: r,
reconnect: i,
transports: y.transports,
communicationServerUrl: a,
context: y.context,
ecies: o,
logging: y.logging,
remote: s
});
let A = "undefined" != typeof document && document.URL || ""
, w = "undefined" != typeof document && document.title || "";
(null === (u = y.dappMetadata) || void 0 === u ? void 0 : u.url)
&& (A = y.dappMetadata.url),
(null === (l = y.dappMetadata) || void 0 === l ? void 0 : l.name)
&& (w = y.dappMetadata.name);
const _ = null !== (h = null !== (d = null === (c =
y.dappMetadata) || void 0 === c ? void 0 : c.name) && void 0 !== d ? d : null === (f =
y.dappMetadata) || void 0 === f ? void 0 : f.url) && void 0 !== h ? h : "n/a"
, E = "undefined" != typeof window && void 0 !==
window.location && null !== (p = window.location.hostname) && void 0 !== p ? p : _
,S={
url: A,
title: w,
source: null === (m = y.dappMetadata) || void 0 === m ?
void 0 : m.source,
dappId: E,
icon: (null === (g = y.dappMetadata) || void 0 === g ? void 0
: g.iconUrl) || (null === (v = y.dappMetadata) || void 0 === v ? void 0 : v.base64Icon),
platform: y.platformType,
apiVersion: UE,
connector: null === (b = y.dappMetadata) || void 0 === b ?
void 0 : b.connector
};
y.originatorInfo = S;
const k = {
[e.EventType.AUTHORIZED]: uS(s),
[e.EventType.MESSAGE]: pS(s),
[e.EventType.CHANNEL_PERSISTENCE]: vS(s),
[e.EventType.CLIENTS_CONNECTED]: cS(s, n),
[e.EventType.KEYS_EXCHANGED]: hS(s, n),
[e.EventType.SOCKET_DISCONNECTED]: gS(s),
[e.EventType.SOCKET_RECONNECT]: mS(s),
[e.EventType.CLIENTS_DISCONNECTED]: dS(s, n),
[e.EventType.KEY_INFO]: () => {}
,
[e.EventType.CHANNEL_CREATED]: lS(s),
[e.EventType.CLIENTS_WAITING]: fS(s),
[e.EventType.RPC_UPDATE]: t => {
s.emit(e.EventType.RPC_UPDATE, t)
}
};
for (const [e,M] of Object.entries(k))
try {
y.communicationLayer.on(e, M)
} catch (r) {
console.error(`Error registering handler for ${e}:`, r)
}
}({
communicationLayerPreference: n,
otherPublicKey: r,
reconnect: i,
ecies: o,
communicationServerUrl: a,
instance: this
})
}
originatorSessionConnect() {
return n_(this, void 0, void 0, (function*() {
return yield function(e) {
var t;
return n_(this, void 0, void 0, (function*() {
const {state: n} = e;
if (!n.storageManager)
return void
B_.RemoteCommunication("[RemoteCommunication: originatorSessionConnect()] no
storage manager defined - skip");
const r = yield
n.storageManager.getPersistedChannelConfig();
if (B_.RemoteCommunication(`[RemoteCommunication:
originatorSessionConnect()] autoStarted=${n.originatorConnectStarted} channelConfig`,
r),
null === (t = n.communicationLayer) || void 0 === t ?
void 0 : t.isConnected())
return
B_.RemoteCommunication("[RemoteCommunication: originatorSessionConnect()]
socket already connected - skip"),
r;
if (r) {
if (r.validUntil > Date.now())
return n.channelConfig = r,
n.originatorConnectStarted = !0,
n.channelId = null == r ? void 0 : r.channelId,
n.reconnection = !0,
r;
Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach((e => {
"function" == typeof n[e] && (n[e] = n[e].bind(n))
}
)),
t && !this.isInitialized && !e.isClone) {
if (!this.options.initImmediate)
return this.init(e, t),
this;
setTimeout(( () => {
this.init(e, t)
}
), 0)
}
}
init() {
var e = this;
let t = arguments.length > 0 && void 0 !== arguments[0] ?
arguments[0] : {}
, n = arguments.length > 1 ? arguments[1] : void 0;
this.isInitializing = !0,
"function" == typeof t && (n = t,
t = {}),
!t.defaultNS && !1 !== t.defaultNS && t.ns && ("string" == typeof
t.ns ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
const r = Lx();
function i(e) {
return e ? "function" == typeof e ? new e : e : null
}
if (this.options = {
...r,
...this.options,
...Ox(t)
},
"v1" !== this.options.compatibilityAPI && (this.options.interpolation =
{
...r.interpolation,
...this.options.interpolation
}),
void 0 !== t.keySeparator &&
(this.options.userDefinedKeySeparator = t.keySeparator),
void 0 !== t.nsSeparator && (this.options.userDefinedNsSeparator =
t.nsSeparator),
!this.options.isClone) {
let t;
this.modules.logger ? ex.init(i(this.modules.logger), this.options)
: ex.init(null, this.options),
this.modules.formatter ? t = this.modules.formatter : "undefined"
!= typeof Intl && (t = Ix);
const n = new wx(this.options);
this.store = new gx(this.options.resources,this.options);
const o = this.services;
o.logger = ex,
o.resourceStore = this.store,
o.languageUtils = n,
o.pluralResolver = new Cx(n,{
prepend: this.options.pluralSeparator,
compatibilityJSON: this.options.compatibilityJSON,
simplifyPluralSuffix: this.options.simplifyPluralSuffix
}),
!t || this.options.interpolation.format &&
this.options.interpolation.format !== r.interpolation.format || (o.formatter = i(t),
o.formatter.init(o, this.options),
this.options.interpolation.format =
o.formatter.format.bind(o.formatter)),
o.interpolator = new Rx(this.options),
o.utils = {
hasLoadedNamespace:
this.hasLoadedNamespace.bind(this)
},
o.backendConnector = new
Px(i(this.modules.backend),o.resourceStore,o,this.options),
o.backendConnector.on("*", (function(t) {
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 :
0), i = 1; i < n; i++)
r[i - 1] = arguments[i];
e.emit(t, ...r)
}
)),
this.modules.languageDetector && (o.languageDetector =
i(this.modules.languageDetector),
o.languageDetector.init && o.languageDetector.init(o,
this.options.detection, this.options)),
this.modules.i18nFormat && (o.i18nFormat =
i(this.modules.i18nFormat),
o.i18nFormat.init && o.i18nFormat.init(this)),
this.translator = new yx(this.services,this.options),
this.translator.on("*", (function(t) {
for (var n = arguments.length, r = new Array(n > 1 ? n - 1 :
0), i = 1; i < n; i++)
r[i - 1] = arguments[i];
e.emit(t, ...r)
}
)),
this.modules.external.forEach((e => {
e.init && e.init(this)
}
))
}
if (this.format = this.options.interpolation.format,
n || (n = Nx),
this.options.fallbackLng && !this.services.languageDetector && !
this.options.lng) {
const e =
this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);
e.length > 0 && "dev" !== e[0] && (this.options.lng = e[0])
}
this.services.languageDetector || this.options.lng ||
this.logger.warn("init: no languageDetector is used and no lng is defined"),
["getResource", "hasResourceBundle", "getResourceBundle",
"getDataByLanguage"].forEach((t => {
this[t] = function() {
return e.store[t](...arguments)
}
}
)),
["addResource", "addResources", "addResourceBundle",
"removeResourceBundle"].forEach((t => {
this[t] = function() {
return e.store[t](...arguments),
e
}
}
));
const o = nx()
, a = () => {
const e = (e, t) => {
this.isInitializing = !1,
this.isInitialized && !this.initializedStoreOnce &&
this.logger.warn("init: i18next is already initialized. You should call init just once!"),
this.isInitialized = !0,
this.options.isClone || this.logger.log("initialized",
this.options),
this.emit("initialized", this.options),
o.resolve(t),
n(e, t)
}
;
if (this.languages && "v1" !== this.options.compatibilityAPI && !
this.isInitialized)
return e(null, this.t.bind(this));
this.changeLanguage(this.options.lng, e)
}
;
return this.options.resources || !this.options.initImmediate ? a() :
setTimeout(a, 0),
o
}
loadResources(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : Nx;
const n = "string" == typeof e ? e : this.language;
if ("function" == typeof e && (t = e),
!this.options.resources || this.options.partialBundledLanguages) {
if (n && "cimode" === n.toLowerCase() && (!
this.options.preload || 0 === this.options.preload.length))
return t();
const e = []
, r = t => {
t && "cimode" !== t &&
this.services.languageUtils.toResolveHierarchy(t).forEach((t => {
"cimode" !== t && e.indexOf(t) < 0 && e.push(t)
}
))
}
;
n ? r(n) :
this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach((e =>
r(e))),
this.options.preload && this.options.preload.forEach((e =>
r(e))),
this.services.backendConnector.load(e, this.options.ns, (e => {
e || this.resolvedLanguage || !this.language ||
this.setResolvedLanguage(this.language),
t(e)
}
))
} else
t(null)
}
reloadResources(e, t, n) {
const r = nx();
return e || (e = this.languages),
t || (t = this.options.ns),
n || (n = Nx),
this.services.backendConnector.reload(e, t, (e => {
r.resolve(),
n(e)
}
)),
r
}
use(e) {
if (!e)
throw new Error("You are passing an undefined module! Please
check the object you are passing to i18next.use()");
if (!e.type)
throw new Error("You are passing a wrong module! Please
check the object you are passing to i18next.use()");
return "backend" === e.type && (this.modules.backend = e),
("logger" === e.type || e.log && e.warn && e.error) &&
(this.modules.logger = e),
"languageDetector" === e.type && (this.modules.languageDetector
= e),
"i18nFormat" === e.type && (this.modules.i18nFormat = e),
"postProcessor" === e.type && vx.addPostProcessor(e),
"formatter" === e.type && (this.modules.formatter = e),
"3rdParty" === e.type && this.modules.external.push(e),
this
}
setResolvedLanguage(e) {
if (e && this.languages && !(["cimode", "dev"].indexOf(e) > -1))
for (let t = 0; t < this.languages.length; t++) {
const e = this.languages[t];
if (!(["cimode", "dev"].indexOf(e) > -1) &&
this.store.hasLanguageSomeTranslations(e)) {
this.resolvedLanguage = e;
break
}
}
}
changeLanguage(e, t) {
var n = this;
this.isLanguageChangingTo = e;
const r = nx();
this.emit("languageChanging", e);
const i = e => {
this.language = e,
this.languages =
this.services.languageUtils.toResolveHierarchy(e),
this.resolvedLanguage = void 0,
this.setResolvedLanguage(e)
}
, o = (e, o) => {
o ? (i(o),
this.translator.changeLanguage(o),
this.isLanguageChangingTo = void 0,
this.emit("languageChanged", o),
this.logger.log("languageChanged", o)) :
this.isLanguageChangingTo = void 0,
r.resolve((function() {
return n.t(...arguments)
}
)),
t && t(e, (function() {
return n.t(...arguments)
}
))
}
, a = t => {
e || t || !this.services.languageDetector || (t = []);
const n = "string" == typeof t ? t :
this.services.languageUtils.getBestMatchFromCodes(t);
n && (this.language || i(n),
this.translator.language || this.translator.changeLanguage(n),
this.services.languageDetector &&
this.services.languageDetector.cacheUserLanguage &&
this.services.languageDetector.cacheUserLanguage(n)),
this.loadResources(n, (e => {
o(e, n)
}
))
}
;
return e || !this.services.languageDetector ||
this.services.languageDetector.async ? !e && this.services.languageDetector &&
this.services.languageDetector.async ? 0 ===
this.services.languageDetector.detect.length ?
this.services.languageDetector.detect().then(a) :
this.services.languageDetector.detect(a) : a(e) :
a(this.services.languageDetector.detect()),
r
}
getFixedT(e, t, n) {
var r = this;
const i = function(e, t) {
let o;
if ("object" != typeof t) {
for (var a = arguments.length, s = new Array(a > 2 ? a - 2 :
0), u = 2; u < a; u++)
s[u - 2] = arguments[u];
o = r.options.overloadTranslationOptionHandler([e,
t].concat(s))
} else
o={
...t
};
o.lng = o.lng || i.lng,
o.lngs = o.lngs || i.lngs,
o.ns = o.ns || i.ns,
o.keyPrefix = o.keyPrefix || n || i.keyPrefix;
const l = r.options.keySeparator || ".";
let c;
return c = o.keyPrefix && Array.isArray(e) ? e.map((e => `$
{o.keyPrefix}${l}${e}`)) : o.keyPrefix ? `${o.keyPrefix}${l}${e}` : e,
r.t(c, o)
};
return "string" == typeof e ? i.lng = e : i.lngs = e,
i.ns = t,
i.keyPrefix = n,
i
}
t() {
return this.translator && this.translator.translate(...arguments)
}
exists() {
return this.translator && this.translator.exists(...arguments)
}
setDefaultNamespace(e) {
this.options.defaultNS = e
}
hasLoadedNamespace(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : {};
if (!this.isInitialized)
return this.logger.warn("hasLoadedNamespace: i18next was
not initialized", this.languages),
!1;
if (!this.languages || !this.languages.length)
return this.logger.warn("hasLoadedNamespace: i18n.languages
were undefined or empty", this.languages),
!1;
const n = t.lng || this.resolvedLanguage || this.languages[0]
, r = !!this.options && this.options.fallbackLng
, i = this.languages[this.languages.length - 1];
if ("cimode" === n.toLowerCase())
return !0;
const o = (e, t) => {
const n = this.services.backendConnector.state[`${e}|${t}`];
return -1 === n || 2 === n
}
;
if (t.precheck) {
const e = t.precheck(this, o);
if (void 0 !== e)
return e
}
return !!this.hasResourceBundle(n, e) || !
(this.services.backendConnector.backend && (!this.options.resources ||
this.options.partialBundledLanguages)) || !(!o(n, e) || r && !o(i, e))
}
loadNamespaces(e, t) {
const n = nx();
return this.options.ns ? ("string" == typeof e && (e = [e]),
e.forEach((e => {
this.options.ns.indexOf(e) < 0 && this.options.ns.push(e)
}
)),
this.loadResources((e => {
n.resolve(),
t && t(e)
}
)),
n) : (t && t(),
Promise.resolve())
}
loadLanguages(e, t) {
const n = nx();
"string" == typeof e && (e = [e]);
const r = this.options.preload || []
, i = e.filter((e => r.indexOf(e) < 0 &&
this.services.languageUtils.isSupportedCode(e)));
return i.length ? (this.options.preload = r.concat(i),
this.loadResources((e => {
n.resolve(),
t && t(e)
}
)),
n) : (t && t(),
Promise.resolve())
}
dir(e) {
if (e || (e = this.resolvedLanguage || (this.languages &&
this.languages.length > 0 ? this.languages[0] : this.language)),
!e)
return "rtl";
const t = this.services && this.services.languageUtils || new
wx(Lx());
return ["ar", "shu", "sqr", "ssh", "xaa", "yhd", "yud", "aao", "abh",
"abv", "acm", "acq", "acw", "acx", "acy", "adf", "ads", "aeb", "aec", "afb", "ajp", "apc",
"apd", "arb", "arq", "ars", "ary", "arz", "auz", "avl", "ayh", "ayl", "ayn", "ayp", "bbz", "pga",
"he", "iw", "ps", "pbt", "pbu", "pst", "prp", "prd", "ug", "ur", "ydd", "yds", "yih", "ji", "yi",
"hbo", "men", "xmn", "fa", "jpr", "peo", "pes", "prs", "dv", "sam",
"ckb"].indexOf(t.getLanguagePartFromCode(e)) > -1 || e.toLowerCase().indexOf("-
arab") > 1 ? "rtl" : "ltr"
}
static createInstance() {
return new Dx(arguments.length > 0 && void 0 !== arguments[0] ?
arguments[0] : {},arguments.length > 1 ? arguments[1] : void 0)
}
cloneInstance() {
let e = arguments.length > 0 && void 0 !== arguments[0] ?
arguments[0] : {}
, t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : Nx;
const n = e.forkResourceStore;
n && delete e.forkResourceStore;
const r = {
...this.options,
...e,
isClone: !0
}
, i = new Dx(r);
return void 0 === e.debug && void 0 === e.prefix || (i.logger =
i.logger.clone(e)),
["store", "services", "language"].forEach((e => {
i[e] = this[e]
}
)),
i.services = {
...this.services
},
i.services.utils = {
hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
},
n && (i.store = new gx(this.store.data,r),
i.services.resourceStore = i.store),
i.translator = new yx(i.services,r),
i.translator.on("*", (function(e) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0), r =
1; r < t; r++)
n[r - 1] = arguments[r];
i.emit(e, ...n)
}
)),
i.init(r, t),
i.translator.options = r,
i.translator.backendConnector.services.utils = {
hasLoadedNamespace: i.hasLoadedNamespace.bind(i)
},
i
}
toJSON() {
return {
options: this.options,
store: this.store,
language: this.language,
languages: this.languages,
resolvedLanguage: this.resolvedLanguage
}
}
}
const Bx = Dx.createInstance();
Bx.createInstance = Dx.createInstance;
const jx = Bx.createInstance;
Bx.dir,
Bx.init,
Bx.loadResources,
Bx.reloadResources,
Bx.use,
Bx.changeLanguage,
Bx.getFixedT,
Bx.t,
Bx.exists,
Bx.setDefaultNamespace,
Bx.hasLoadedNamespace,
Bx.loadNamespaces,
Bx.loadLanguages;
var zx, Fx = "0.27.0";
!function(e) {
e.INPAGE = "metamask-inpage",
e.CONTENT_SCRIPT = "metamask-contentscript",
e.PROVIDER = "metamask-provider"
}(zx || (zx = {}));
const Ux = "direct"
, Kx = "https://metamask.app.link/connect"
, qx = "metamask://connect"
, Hx = {
NAME: "MetaMask",
RDNS: "io.metamask"
}
, Vx = /(?:^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}$)|
(?:^0{8}-0{4}-0{4}-0{4}-0{12}$)/u
, Wx = 36e5;
var $x;
e.PROVIDER_UPDATE_TYPE = void 0,
($x = e.PROVIDER_UPDATE_TYPE || (e.PROVIDER_UPDATE_TYPE =
{})).TERMINATE = "terminate",
$x.EXTENSION = "extension",
$x.INITIALIZED = "initialized";
const Yx = "undefined" != typeof window && window.localStorage;
function Qx(t) {
var n, r;
return AS(this, void 0, void 0, (function*() {
EC("[MetaMaskSDK: connectWithExtensionProvider()] ", t),
t.sdkProvider = t.activeProvider,
t.activeProvider = window.extension,
window.ethereum = window.extension;
try {
const e = yield null === (n = window.extension) || void 0 === n ?
void 0 : n.request({
method: "eth_requestAccounts"
});
EC(`[MetaMaskSDK: connectWithExtensionProvider()]
accounts=${e}`)
} catch (e) {
return void console.warn("[MetaMaskSDK:
connectWithExtensionProvider()] can't request accounts error", e)
}
localStorage.setItem(qC, "extension"),
t.extensionActive = !0,
t.emit(e.EventType.PROVIDER_UPDATE,
e.PROVIDER_UPDATE_TYPE.EXTENSION),
t.options.enableAnalytics && (null === (r = t.analytics) || void 0 ===
r || r.send({
event: JE.SDK_USE_EXTENSION
}))
}
))
}
class Zx {
constructor(e) {
let {shouldSetOnWindow: t, connectionStream: n,
shouldSendMetadata: r=!1, shouldShimWeb3: i} = e;
const o = new QC({
connectionStream: n,
shouldSendMetadata: r,
shouldSetOnWindow: t,
shouldShimWeb3: i,
autoRequestAccounts: !1
})
, a = new Proxy(o,{
deleteProperty: () => !0
});
var s;
this.provider = a,
t && "undefined" != typeof window && (s = o,
window.ethereum = s,
window.dispatchEvent(new Event("ethereum#initialized"))),
i && "undefined" != typeof window && function(e) {
let t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : console
, n = !1
, r = !1;
if (!window.web3) {
const i = "__isMetaMaskShim__";
let o = {
currentProvider: e
};
Object.defineProperty(o, i, {
value: !0,
enumerable: !0,
configurable: !1,
writable: !1
}),
o = new Proxy(o,{
get: function(o, a) {
for (var s = arguments.length, u = new Array(s > 2 ?
s - 2 : 0), l = 2; l < s; l++)
u[l - 2] = arguments[l];
return "currentProvider" !== a || n ?
"currentProvider" === a || a === i || r || (r = !0,
t.error("MetaMask no longer injects web3. For
details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-
web3"),
e.request({
method: "metamask_logWeb3ShimUsage"
}).catch((e => {
t.debug("MetaMask: Failed to log web3 shim
usage.", e)
}
))) : (n = !0,
t.warn("You are accessing the MetaMask
window.web3.currentProvider shim. This property is deprecated; use window.ethereum
instead. For details, see: https://docs.metamask.io/guide/provider-
migration.html#replacing-window-web3")),
Reflect.get(o, a, ...u)
},
set: function() {
return t.warn("You are accessing the MetaMask
window.web3 shim. This object is deprecated; use window.ethereum instead. For
details, see: https://docs.metamask.io/guide/provider-migration.html#replacing-window-
web3"),
Reflect.set(...arguments)
}
}),
Object.defineProperty(window, "web3", {
value: o,
enumerable: !1,
configurable: !0,
writable: !0
})
}
}(this.provider),
this.provider.on("_initialized", ( () => {
const e = {
chainId: this.provider.getChainId(),
isConnected: this.provider.isConnected(),
isMetaNask: this.provider.isMetaMask,
selectedAddress: this.provider.getSelectedAddress(),
networkVersion: this.provider.getNetworkVersion()
};
EC("[Ethereum: constructor()] provider initialized", e)
}
))
}
static init(e) {
var t;
return EC("[Ethereum: init()] Initializing Ethereum service"),
this.instance = new Zx(e),
null === (t = this.instance) || void 0 === t ? void 0 : t.provider
}
static destroy() {
Zx.instance = void 0
}
static getInstance() {
var e;
if (!(null === (e = this.instance) || void 0 === e ? void 0 : e.provider))
throw new Error("Ethereum instance not intiialized - call
Ethereum.factory first.");
return this.instance
}
static getProvider() {
var e;
if (!(null === (e = this.instance) || void 0 === e ? void 0 : e.provider))
throw new Error("Ethereum instance not intiialized - call
Ethereum.factory first.");
return this.instance.provider
}
}
function Gx(e, t, n, r) {
var i, o, a, s, u, l, c, d, f, h, p, m, g, v;
return AS(this, void 0, void 0, (function*() {
const n = null === (i = e.state.remote) || void 0 === i ? void 0 :
i.isReady()
, b = null === (o = e.state.remote) || void 0 === o ? void 0 :
o.isConnected()
, y = null === (a = e.state.remote) || void 0 === a ? void 0 :
a.isPaused()
, A = Zx.getProvider()
, w = null === (s = e.state.remote) || void 0 === s ? void 0 :
s.getChannelId()
, E = null === (u = e.state.remote) || void 0 === u ? void 0 :
u.isAuthorized()
, {method: S, data: k} = (e => {
var t;
let n;
return _.isBuffer(e) ? (n = e.toJSON(),
n._isBuffer = !0) : n = e,
{
method: null === (t = null == n ? void 0 : n.data) || void 0
=== t ? void 0 : t.method,
data: n
}
}
)(t);
if (EC(`[RCPMS: write()] method='${S}' isRemoteReady=${n}
channelId=${w} isSocketConnected=${b} isRemotePaused=${y} providerConnected=$
{A.isConnected()}`, t),
!w)
return S !== jC.METAMASK_GETPROVIDERSTATE &&
EC("[RCPMS: write()] Invalid channel id -- undefined"),
r();
EC(`[RCPMS: write()] remote.isPaused()=${null === (l =
e.state.remote) || void 0 === l ? void 0 : l.isPaused()} authorized=${E} ready=${n}
socketConnected=${b}`, t);
try {
if (null === (c = e.state.remote) || void 0 === c ||
c.sendMessage(null == k ? void 0 : k.data).then(( () => {
EC(`[RCPMS: _write()] ${S} sent successfully`)
}
)).catch((e => {
EC("[RCPMS: _write()] error sending message", e)
}
)),
!(null === (d = e.state.platformManager) || void 0 === d ? void 0
: d.isSecure()))
return EC(`[RCPMS: _write()] unsecure platform for method
${S} -- return callback`),
r();
if (!b && !n)
return EC(`[RCPMS: _write()] invalid connection status
targetMethod=${S} socketConnected=${b} ready=${n} providerConnected=$
{A.isConnected()}`),
r();
if (!b && n)
return console.warn("[RCPMS: _write()] invalid socket
status -- shouldn't happen"),
r();
const t = null !== (p = null === (h = null === (f = e.state.remote)
|| void 0 === f ? void 0 : f.getKeyInfo()) || void 0 === h ? void 0 : h.ecies.public) && void
0 !== p ? p : ""
, i = encodeURI(`channelId=${w}&pubkey=$
{t}&comm=socket&t=d&v=2`);
zC[S] ? (EC(`[RCPMS: _write()] redirect link for '${S}'
socketConnected=${b} connect?${i}`),
null === (m = e.state.platformManager) || void 0 === m ||
m.openDeeplink(`${Kx}?${i}`, `${qx}?${i}`, "_self")) : (null === (g = e.state.remote) || void
0 === g ? void 0 : g.isPaused()) ? (EC(`[RCPMS: _write()] MM is PAUSED! deeplink
with connect! targetMethod=${S}`),
null === (v = e.state.platformManager) || void 0 === v ||
v.openDeeplink(`${Kx}?redirect=true&${i}`, `${qx}?redirect=true&${i}`, "_self")) :
EC(`[RCPMS: _write()] method ${S} doesn't need redirect.`)
} catch (e) {
return EC("[RCPMS: _write()] error sending message", e),
r(new Error("RemoteCommunicationPostMessageStream -
disconnected"))
}
return r()
}
))
}
class Xx extends Vn.Duplex {
constructor(t) {
let {name: n, remote: r, platformManager: i} = t;
super({
objectMode: !0
}),
this.state = {
_name: null,
remote: null,
platformManager: null
},
this.state._name = n,
this.state.remote = r,
this.state.platformManager = i,
this._onMessage = this._onMessage.bind(this),
this.state.remote.on(e.EventType.MESSAGE, this._onMessage)
}
_write(e, t, n) {
return AS(this, void 0, void 0, (function*() {
return Gx(this, e, 0, n)
}
))
}
_read() {}
_onMessage(e) {
return function(e, t) {
try {
if (EC("[RCPMS: onMessage()] message", t),
!t || "object" != typeof t)
return;
if ("object" != typeof (null == t ? void 0 : t.data))
return;
if (!(null == t ? void 0 : t.name))
return void EC(`[RCPMS: onMessage()] ignore
message without name message=${t}`);
if ((null == t ? void 0 : t.name) !== zx.PROVIDER)
return void EC(`[RCPMS: onMessage()] ignore
message with wrong name message=${t}`);
if (_.isBuffer(t)) {
const n = _.from(t);
e.push(n)
} else
e.push(t)
} catch (e) {
EC(`[RCPMS: onMessage()] ignore message error err=$
{e}`)
}
}(this, e)
}
start() {}
}
var Jx = {
exports: {}
};
!function(e, t) {
var n = "undefined" != typeof globalThis && globalThis || "undefined" !=
typeof self && self || void 0 !== r && r
, i = function() {
function e() {
this.fetch = !1,
this.DOMException = n.DOMException
}
return e.prototype = n,
new e
}();
!function(e) {
!function(t) {
var n = void 0 !== e && e || "undefined" != typeof self && self ||
void 0 !== n && n
, r = "URLSearchParams"in n
, i = "Symbol"in n && "iterator"in Symbol
, o = "FileReader"in n && "Blob"in n && function() {
try {
return new Blob,
!0
} catch (e) {
return !1
}
}()
, a = "FormData"in n
, s = "ArrayBuffer"in n;
if (s)
var u = ["[object Int8Array]", "[object Uint8Array]", "[object
Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]",
"[object Uint32Array]", "[object Float32Array]", "[object Float64Array]"]
, l = ArrayBuffer.isView || function(e) {
return e && u.indexOf(Object.prototype.toString.call(e))
> -1
}
;
function c(e) {
if ("string" != typeof e && (e = String(e)),
/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e) || "" === e)
throw new TypeError('Invalid character in header field
name: "' + e + '"');
return e.toLowerCase()
}
function d(e) {
return "string" != typeof e && (e = String(e)),
e
}
function f(e) {
var t = {
next: function() {
var t = e.shift();
return {
done: void 0 === t,
value: t
}
}
};
return i && (t[Symbol.iterator] = function() {
return t
}
),
t
}
function h(e) {
this.map = {},
e instanceof h ? e.forEach((function(e, t) {
this.append(t, e)
}
), this) : Array.isArray(e) ? e.forEach((function(e) {
this.append(e[0], e[1])
}
), this) : e &&
Object.getOwnPropertyNames(e).forEach((function(t) {
this.append(t, e[t])
}
), this)
}
function p(e) {
if (e.bodyUsed)
return Promise.reject(new TypeError("Already read"));
e.bodyUsed = !0
}
function m(e) {
return new Promise((function(t, n) {
e.onload = function() {
t(e.result)
}
,
e.onerror = function() {
n(e.error)
}
}
))
}
function g(e) {
var t = new FileReader
, n = m(t);
return t.readAsArrayBuffer(e),
n
}
function v(e) {
if (e.slice)
return e.slice(0);
var t = new Uint8Array(e.byteLength);
return t.set(new Uint8Array(e)),
t.buffer
}
function b() {
return this.bodyUsed = !1,
this._initBody = function(e) {
var t;
this.bodyUsed = this.bodyUsed,
this._bodyInit = e,
e ? "string" == typeof e ? this._bodyText = e : o &&
Blob.prototype.isPrototypeOf(e) ? this._bodyBlob = e : a &&
FormData.prototype.isPrototypeOf(e) ? this._bodyFormData = e : r &&
URLSearchParams.prototype.isPrototypeOf(e) ? this._bodyText = e.toString() : s && o
&& (t = e) && DataView.prototype.isPrototypeOf(t) ? (this._bodyArrayBuffer =
v(e.buffer),
this._bodyInit = new Blob([this._bodyArrayBuffer])) : s
&& (ArrayBuffer.prototype.isPrototypeOf(e) || l(e)) ? this._bodyArrayBuffer = v(e) :
this._bodyText = e = Object.prototype.toString.call(e) : this._bodyText = "",
this.headers.get("content-type") || ("string" == typeof e ?
this.headers.set("content-type", "text/plain;charset=UTF-8") : this._bodyBlob &&
this._bodyBlob.type ? this.headers.set("content-type", this._bodyBlob.type) : r &&
URLSearchParams.prototype.isPrototypeOf(e) && this.headers.set("content-type",
"application/x-www-form-urlencoded;charset=UTF-8"))
}
,
o && (this.blob = function() {
var e = p(this);
if (e)
return e;
if (this._bodyBlob)
return Promise.resolve(this._bodyBlob);
if (this._bodyArrayBuffer)
return Promise.resolve(new
Blob([this._bodyArrayBuffer]));
if (this._bodyFormData)
throw new Error("could not read FormData body as
blob");
return Promise.resolve(new Blob([this._bodyText]))
}
,
this.arrayBuffer = function() {
return this._bodyArrayBuffer ? p(this) ||
(ArrayBuffer.isView(this._bodyArrayBuffer) ?
Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,
this._bodyArrayBuffer.byteOffset + this._bodyArrayBuffer.byteLength)) :
Promise.resolve(this._bodyArrayBuffer)) : this.blob().then(g)
}
),
this.text = function() {
var e, t, n, r = p(this);
if (r)
return r;
if (this._bodyBlob)
return e = this._bodyBlob,
n = m(t = new FileReader),
t.readAsText(e),
n;
if (this._bodyArrayBuffer)
return Promise.resolve(function(e) {
for (var t = new Uint8Array(e), n = new
Array(t.length), r = 0; r < t.length; r++)
n[r] = String.fromCharCode(t[r]);
return n.join("")
}(this._bodyArrayBuffer));
if (this._bodyFormData)
throw new Error("could not read FormData body as
text");
return Promise.resolve(this._bodyText)
}
,
a && (this.formData = function() {
return this.text().then(w)
}
),
this.json = function() {
return this.text().then(JSON.parse)
}
,
this
}
h.prototype.append = function(e, t) {
e = c(e),
t = d(t);
var n = this.map[e];
this.map[e] = n ? n + ", " + t : t
}
,
h.prototype.delete = function(e) {
delete this.map[c(e)]
}
,
h.prototype.get = function(e) {
return e = c(e),
this.has(e) ? this.map[e] : null
}
,
h.prototype.has = function(e) {
return this.map.hasOwnProperty(c(e))
}
,
h.prototype.set = function(e, t) {
this.map[c(e)] = d(t)
}
,
h.prototype.forEach = function(e, t) {
for (var n in this.map)
this.map.hasOwnProperty(n) && e.call(t, this.map[n], n,
this)
}
,
h.prototype.keys = function() {
var e = [];
return this.forEach((function(t, n) {
e.push(n)
}
)),
f(e)
}
,
h.prototype.values = function() {
var e = [];
return this.forEach((function(t) {
e.push(t)
}
)),
f(e)
}
,
h.prototype.entries = function() {
var e = [];
return this.forEach((function(t, n) {
e.push([n, t])
}
)),
f(e)
}
,
i && (h.prototype[Symbol.iterator] = h.prototype.entries);
var y = ["DELETE", "GET", "HEAD", "OPTIONS", "POST",
"PUT"];
function A(e, t) {
if (!(this instanceof A))
throw new TypeError('Please use the "new" operator,
this DOM object constructor cannot be called as a function.');
var n = (t = t || {}).body;
if (e instanceof A) {
if (e.bodyUsed)
throw new TypeError("Already read");
this.url = e.url,
this.credentials = e.credentials,
t.headers || (this.headers = new h(e.headers)),
this.method = e.method,
this.mode = e.mode,
this.signal = e.signal,
n || null == e._bodyInit || (n = e._bodyInit,
e.bodyUsed = !0)
} else
this.url = String(e);
if (this.credentials = t.credentials || this.credentials || "same-
origin",
!t.headers && this.headers || (this.headers = new
h(t.headers)),
this.method = function(e) {
var t = e.toUpperCase();
return y.indexOf(t) > -1 ? t : e
}(t.method || this.method || "GET"),
this.mode = t.mode || this.mode || null,
this.signal = t.signal || this.signal,
this.referrer = null,
("GET" === this.method || "HEAD" === this.method) && n)
throw new TypeError("Body not allowed for GET or
HEAD requests");
if (this._initBody(n),
!("GET" !== this.method && "HEAD" !== this.method || "no-
store" !== t.cache && "no-cache" !== t.cache)) {
var r = /([?&])_=[^&]*/;
r.test(this.url) ? this.url = this.url.replace(r, "$1_=" +
(new Date).getTime()) : this.url += (/\?/.test(this.url) ? "&" : "?") + "_=" + (new
Date).getTime()
}
}
function w(e) {
var t = new FormData;
return e.trim().split("&").forEach((function(e) {
if (e) {
var n = e.split("=")
, r = n.shift().replace(/\+/g, " ")
, i = n.join("=").replace(/\+/g, " ");
t.append(decodeURIComponent(r),
decodeURIComponent(i))
}
}
)),
t
}
function _(e, t) {
if (!(this instanceof _))
throw new TypeError('Please use the "new" operator,
this DOM object constructor cannot be called as a function.');
t || (t = {}),
this.type = "default",
this.status = void 0 === t.status ? 200 : t.status,
this.ok = this.status >= 200 && this.status < 300,
this.statusText = void 0 === t.statusText ? "" : "" +
t.statusText,
this.headers = new h(t.headers),
this.url = t.url || "",
this._initBody(e)
}
A.prototype.clone = function() {
return new A(this,{
body: this._bodyInit
})
}
,
b.call(A.prototype),
b.call(_.prototype),
_.prototype.clone = function() {
return new _(this._bodyInit,{
status: this.status,
statusText: this.statusText,
headers: new h(this.headers),
url: this.url
})
}
,
_.error = function() {
var e = new _(null,{
status: 0,
statusText: ""
});
return e.type = "error",
e
}
;
var E = [301, 302, 303, 307, 308];
_.redirect = function(e, t) {
if (-1 === E.indexOf(t))
throw new RangeError("Invalid status code");
return new _(null,{
status: t,
headers: {
location: e
}
})
}
,
t.DOMException = n.DOMException;
try {
new t.DOMException
} catch (e) {
t.DOMException = function(e, t) {
this.message = e,
this.name = t;
var n = Error(e);
this.stack = n.stack
}
,
t.DOMException.prototype = Object.create(Error.prototype),
t.DOMException.prototype.constructor = t.DOMException
}
function S(e, r) {
return new Promise((function(i, a) {
var u = new A(e,r);
if (u.signal && u.signal.aborted)
return a(new
t.DOMException("Aborted","AbortError"));
var l = new XMLHttpRequest;
function c() {
l.abort()
}
l.onload = function() {
var e, t, n = {
status: l.status,
statusText: l.statusText,
headers: (e = l.getAllResponseHeaders() || "",
t = new h,
e.replace(/\r?\n[\t ]+/g, " ").split("\
r").map((function(e) {
return 0 === e.indexOf("\n") ? e.substr(1,
e.length) : e
}
)).forEach((function(e) {
var n = e.split(":")
, r = n.shift().trim();
if (r) {
var i = n.join(":").trim();
t.append(r, i)
}
}
)),
t)
};
n.url = "responseURL"in l ? l.responseURL :
n.headers.get("X-Request-URL");
var r = "response"in l ? l.response : l.responseText;
setTimeout((function() {
i(new _(r,n))
}
), 0)
}
,
l.onerror = function() {
setTimeout((function() {
a(new TypeError("Network request failed"))
}
), 0)
}
,
l.ontimeout = function() {
setTimeout((function() {
a(new TypeError("Network request failed"))
}
), 0)
}
,
l.onabort = function() {
setTimeout((function() {
a(new t.DOMException("Aborted","AbortError"))
}
), 0)
}
,
l.open(u.method, function(e) {
try {
return "" === e && n.location.href ?
n.location.href : e
} catch (t) {
return e
}
}(u.url), !0),
"include" === u.credentials ? l.withCredentials = !0 :
"omit" === u.credentials && (l.withCredentials = !1),
"responseType"in l && (o ? l.responseType = "blob" : s
&& u.headers.get("Content-Type") && -1 !== u.headers.get("Content-
Type").indexOf("application/octet-stream") && (l.responseType = "arraybuffer")),
!r || "object" != typeof r.headers || r.headers instanceof h
? u.headers.forEach((function(e, t) {
l.setRequestHeader(t, e)
}
)) :
Object.getOwnPropertyNames(r.headers).forEach((function(e) {
l.setRequestHeader(e, d(r.headers[e]))
}
)),
u.signal && (u.signal.addEventListener("abort", c),
l.onreadystatechange = function() {
4 === l.readyState &&
u.signal.removeEventListener("abort", c)
}
),
l.send(void 0 === u._bodyInit ? null : u._bodyInit)
}
))
}
S.polyfill = !0,
n.fetch || (n.fetch = S,
n.Headers = h,
n.Request = A,
n.Response = _),
t.Headers = h,
t.Request = A,
t.Response = _,
t.fetch = S
}({})
}(i),
i.fetch.ponyfill = !0,
delete i.fetch.polyfill;
var o = n.fetch ? n : i;
(t = o.fetch).default = o.fetch,
t.fetch = o.fetch,
t.Headers = o.Headers,
t.Request = o.Request,
t.Response = o.Response,
e.exports = t
}(Jx, Jx.exports);
var eR = i(Jx.exports);
let tR = 1;
const nR = e => new Promise((t => {
setTimeout(( () => {
t(!0)
}
), e)
}
))
, rR = t => {
let {checkInstallationOnAllCalls: n=!1, communicationLayerPreference:
r, injectProvider: i, shouldShimWeb3: o, platformManager: a, installer: s, sdk: u,
remoteConnection: l, debug: c} = t;
return AS(void 0, void 0, void 0, (function*() {
var t, d;
const f = (e => {
let {name: t, remoteConnection: n} = e;
if (!n || !(null == n ? void 0 : n.getConnector()))
throw new Error("Missing remote connection parameter");
return new Xx({
name: t,
remote: null == n ? void 0 : n.getConnector(),
platformManager: null == n ? void 0 :
n.getPlatformManager()
})
}
)({
name: zx.INPAGE,
target: zx.CONTENT_SCRIPT,
platformManager: a,
communicationLayerPreference: r,
remoteConnection: l
})
, h = a.getPlatformType()
, p = u.options.dappMetadata
, m = `Sdk/Javascript SdkVersion/${Fx} Platform/${h} dApp/$
{null !== (t = p.url) && void 0 !== t ? t : p.name} dAppTitle/${p.name}`;
let g = null
, v = null;
const b = null === (d = u.options.storage) || void 0 === d ? void 0 :
d.storageManager;
if (b) {
try {
const e = yield b.getCachedAccounts();
e.length > 0 && (g = e[0])
} catch (e) {
console.error(`[initializeMobileProvider] failed to get cached
addresses: ${e}`)
}
try {
const e = yield b.getCachedChainId();
e && (v = e)
} catch (e) {
console.error(`[initializeMobileProvider] failed to parse
cached chainId: ${e}`)
}
}
EC(`[initializeMobileProvider] cachedAccountAddress: ${g},
cachedChainId: ${v}`);
const y = !(!i || h === e.PlatformType.NonBrowser || h ===
e.PlatformType.ReactNative)
, A = Zx.init({
shouldSetOnWindow: y,
connectionStream: f,
shouldShimWeb3: o
});
let w = !1;
const _ = e => {
w=e
}
, E = () => w
, S = (t, r, i, o) => AS(void 0, void 0, void 0, (function*() {
var c, d, f, h, p, y, A, S, k;
if (w) {
null == l || l.showActiveModal();
let e = E();
for (; e; )
yield nR(1e3),
e = E();
return EC("[initializeMobileProvider: sendRequest()] initial
method completed -- prevent installation and call provider"),
i(...r)
}
const M = a.isMetaMaskInstalled()
, C = null == l ? void 0 : l.isConnected()
, x = Zx.getProvider();
let R = null
, T = null;
if (R = null !== (c = x.getSelectedAddress()) && void 0 !== c ?
c : g,
T = x.getChainId() || v,
R && b && R !== g && b.persistAccounts([R]).catch((e => {
console.error(`[initializeMobileProvider] failed to persist
account: ${e}`)
}
)),
T && (v = T,
b && b.persistChainId(T).catch((e => {
console.error(`[initializeMobileProvider] failed to persist
chainId: ${e}`)
}
))),
EC("[initializeMobileProvider: sendRequest()]", {
selectedAddress: R,
chainId: T
}),
o && EC(`[initializeMobileProvider: sendRequest()] method=${t}
ongoing=${w} selectedAddress=${R} isInstalled=${M} checkInstallationOnAllCalls=${n}
socketConnected=${C}`),
R && t.toLowerCase() ===
jC.ETH_ACCOUNTS.toLowerCase())
return [R];
if (T && t.toLowerCase() === jC.ETH_CHAINID.toLowerCase())
return T;
const I = [jC.ETH_REQUESTACCOUNTS,
jC.WALLET_REQUESTPERMISSIONS, jC.METAMASK_CONNECTSIGN,
jC.METAMASK_CONNECTWITH]
, P = !zC[t]
, L = null === (d = u.options.readonlyRPCMap) || void 0 === d
? void 0 : d[T];
if (L && P)
try {
const e = null === (f = null == r ? void 0 : r[0]) || void 0
=== f ? void 0 : f.params
, n = yield(e => {
let {rpcEndpoint: t, method: n, sdkInfo: r, params: i}
= e;
return AS(void 0, void 0, void 0, (function*() {
const e = JSON.stringify({
jsonrpc: "2.0",
method: n,
params: i,
id: (tR += 1,
tR)
})
,o={
Accept: "application/json",
"Content-Type": "application/json"
};
let a;
t.includes("infura") && (o["Metamask-Sdk-Info"]
= r);
try {
a = yield eR(t, {
method: "POST",
headers: o,
body: e
})
} catch (t) {
throw t instanceof Error ? new Error(`Failed
to fetch from RPC: ${t.message}`) : new Error(`Failed to fetch from RPC: ${t}`)
}
if (!a.ok)
throw new Error(`Server responded with a
status of ${a.status}`);
return (yield a.json()).result
}
))
}
)({
rpcEndpoint: L,
sdkInfo: m,
method: t,
params: e || []
});
return o &&
EC(`initializeProvider::ReadOnlyRPCResponse ${n}`),
n
} catch (e) {
console.warn(`[initializeMobileProvider: sendRequest()]
method=${t} readOnlyRPCRequest failed:`, e)
}
if ((!M || M && !C) && t !==
jC.METAMASK_GETPROVIDERSTATE) {
const o = (null === (h = null == r ? void 0 : r[0]) || void 0 ===
h ? void 0 : h.params) || [];
if (-1 !== I.indexOf(t) || n) {
_(!0);
try {
yield s.start({
wait: !1
})
} catch (n) {
if (_(!1),
e.PROVIDER_UPDATE_TYPE.EXTENSION ===
n) {
if (EC(`[initializeMobileProvider: sendRequest()]
extension provider detect: re-create ${t} on the active provider`),
t.toLowerCase() ===
jC.METAMASK_CONNECTSIGN.toLowerCase()) {
const e = yield null === (p =
u.getProvider()) || void 0 === p ? void 0 : p.request({
method:
jC.ETH_REQUESTACCOUNTS,
params: []
});
if (!e.length)
throw new Error("SDK state invalid --
undefined accounts");
return yield null === (y = u.getProvider()) ||
void 0 === y ? void 0 : y.request({
method: jC.PERSONAL_SIGN,
params: [o[0], e[0]]
})
}
if (t.toLowerCase() ===
jC.METAMASK_CONNECTWITH.toLowerCase()) {
const [e] = o;
return yield(e => {
let {method: t, sdk: n, params: r} = e;
return AS(void 0, void 0, void 0,
(function*() {
var e, i, o, a;
if (!n.isExtensionActive())
throw new Error("SDK state
invalid -- extension is not active");
EC("[MetaMaskProvider:
extensionConnectWithOverwrite()] Overwriting request method", t, r);
const s = yield null === (e =
n.getProvider()) || void 0 === e ? void 0 : e.request({
method:
jC.ETH_REQUESTACCOUNTS,
params: []
});
if (!s.length)
throw new Error("SDK state
invalid -- undefined accounts");
if ((null == t ? void 0 :
t.toLowerCase()) === jC.PERSONAL_SIGN.toLowerCase()) {
const e = {
method: t,
params: [r[0], s[0]]
};
return yield null === (i =
n.getProvider()) || void 0 === i ? void 0 : i.request(e)
}
if ((null == t ? void 0 :
t.toLowerCase()) === jC.ETH_SENDTRANSACTION.toLowerCase()) {
const e = {
method: t,
params:
[Object.assign(Object.assign({}, r[0]), {
from: s[0]
})]
};
return yield null === (o =
n.getProvider()) || void 0 === o ? void 0 : o.request(e)
}
return
UC.includes(t.toLowerCase()) ? (console.warn(`MetaMaskSDK connectWith method=$
{t} -- not handled by the extension -- call separately`),
s) : yield null === (a =
n.getProvider()) || void 0 === a ? void 0 : a.request({
method: t,
params: r
})
}
))
}
)({
method: e.method,
sdk: u,
params: e.params
})
}
return EC(`[initializeMobileProvider:
sendRequest()] sending '${t}' on active provider`, o),
yield null === (A = u.getProvider()) || void 0 ===
A ? void 0 : A.request({
method: t,
params: o
})
}
throw EC(`[initializeMobileProvider: sendRequest()]
failed to start installer: ${n}`),
n
}
const a = i(...r);
try {
yield new Promise(( (t, n) => {
null == l ||
l.getConnector().once(e.EventType.AUTHORIZED, ( () => {
t(!0)
}
)),
u.once(e.EventType.PROVIDER_UPDATE, (t
=> {
EC(`[initializeMobileProvider:
sendRequest()] PROVIDER_UPDATE --- remote provider request interupted type=${t}`),
t ===
e.PROVIDER_UPDATE_TYPE.EXTENSION ? n(e.EventType.PROVIDER_UPDATE) :
n(new Error("Connection Terminated"))
}
))
}
))
} catch (n) {
if (_(!1),
n === e.EventType.PROVIDER_UPDATE)
return yield null === (S = u.getProvider()) || void
0 === S ? void 0 : S.request({
method: t,
params: o
});
throw n
}
return _(!1),
a
}
if (a.isSecure() && zC[t])
return i(...r);
if (u.isExtensionActive())
return EC(`[initializeMobileProvider: sendRequest()]
EXTENSION active - redirect request '${t}' to it`, r, o),
yield null === (k = u.getProvider()) || void 0 === k ? void
0 : k.request({
method: t,
params: o
});
throw EC(`[initializeMobileProvider: sendRequest()]
method=${t} --- skip --- not connected/installed`),
new Error("MetaMask is not connected/installed, please call
eth_requestAccounts to connect first.")
}
const O = yield i(...r);
return EC(`[initializeMobileProvider: sendRequest()] method=$
{t} rpcResponse: ${O}`),
O
}
))
, {request: k} = A;
A.request = function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n+
+)
t[n] = arguments[n];
return AS(void 0, void 0, void 0, (function*() {
return S(null == t ? void 0 : t[0].method, t, k, c)
}
))
}
;
const {send: M} = A;
return A.send = function() {
for (var e = arguments.length, t = new Array(e), n = 0; n < e; n+
+)
t[n] = arguments[n];
return AS(void 0, void 0, void 0, (function*() {
return S(null == t ? void 0 : t[0], t, M, c)
}
))
}
,
EC("[initializeMobileProvider: sendRequest()]
metamaskStream.start()"),
f.start(),
A
}
))
}
;
function iR(t) {
var n, r, i, o;
return AS(this, void 0, void 0, (function*() {
const {options: a} = t
,s={
communicationLayerPreference: null !== (n =
a.communicationLayerPreference) && void 0 !== n ? n :
e.CommunicationLayerPreference.SOCKET,
platformManager: t.platformManager,
sdk: t,
checkInstallationOnAllCalls: a.checkInstallationOnAllCalls,
injectProvider: null === (r = a.injectProvider) || void 0 === r || r,
shouldShimWeb3: null === (i = a.shouldShimWeb3) || void 0
=== i || i,
extensionOnly: null === (o = a.extensionOnly) || void 0 === o ||
o,
installer: t.installer,
remoteConnection: t.remoteConnection,
debug: t.debug
}
, u = yield rR(s);
t.activeProvider = u,
function(t) {
var n, r, i, o;
null === (r = null === (n = t.remoteConnection) || void 0 === n ?
void 0 : n.getConnector()) || void 0 === r || r.on(e.EventType.CONNECTION_STATUS,
(n => {
t.emit(e.EventType.CONNECTION_STATUS, n)
}
)),
null === (o = null === (i = t.remoteConnection) || void 0 === i ?
void 0 : i.getConnector()) || void 0 === o || o.on(e.EventType.SERVICE_STATUS, (n =>
{
t.emit(e.EventType.SERVICE_STATUS, n)
}
))
}(t)
}
))
}
var oR, aR, sR;
const uR = "sdk";
class lR {
constructor(e) {
let {serverUrl: t, enabled: n, originatorInfo: r} = e;
oR.set(this, KE),
aR.set(this, void 0),
sR.set(this, void 0),
_S(this, oR, t, "f"),
_S(this, sR, r, "f"),
_S(this, aR, null == n || n, "f")
}
send(e) {
let {event: t, params: n} = e;
if (!wS(this, aR, "f"))
return;
const r = {
id: uR,
event: t,
sdkVersion: Fx,
originationInfo: wS(this, sR, "f"),
params: n
};
EC(`[Analytics: send()] event: ${t}`, r),
K_(r, wS(this, oR, "f")).catch((e => {
EC(`[Analytics: send()] error: ${e}`)
}
))
}
}
oR = new WeakMap,
aR = new WeakMap,
sR = new WeakMap;
const cR = () => {
if ("undefined" == typeof document)
return;
let e;
const t = document.getElementsByTagName("link");
for (let n = 0; n < t.length; n++)
"icon" !== t[n].getAttribute("rel") && "shortcut icon" !==
t[n].getAttribute("rel") || (e = t[n].getAttribute("href"));
return e
}
, dR = 163400
, fR = e => {
let {provider: t, sdkInstance: n} = e;
if ("state"in t)
throw new Error("INVALID EXTENSION PROVIDER");
return new Proxy(t,{
get: (e, r) => "request" === r ? function(r) {
var i, o;
return AS(this, void 0, void 0, (function*() {
EC("[wrapExtensionProvider()] Overwriting request
method", r);
const {method: a, params: s} = r
, u = FC.includes(a.toLowerCase());
if (u && (null === (i = n.analytics) || void 0 === i || i.send({
event: JE.SDK_RPC_REQUEST,
params: {
method: a,
from: "extension"
}
})),
a === jC.METAMASK_BATCH && Array.isArray(s))
return (e => {
let {params: t, target: n, args: r, trackEvent: i,
provider: o, sdkInstance: a} = e;
return AS(void 0, void 0, void 0, (function*() {
var e;
for (const n of t)
yield null == o ? void 0 : o.request({
method: n.method,
params: n.params
});
const s = yield n.request(r);
return i && (null === (e = a.analytics) || void 0
=== e || e.send({
event: JE.SDK_RPC_REQUEST_DONE,
params: {
method: r.method,
from: "extension"
}
})),
s
}
))
}
)({
params: s,
target: e,
args: r,
trackEvent: u,
sdkInstance: n,
provider: t
});
if (a.toLowerCase() ===
jC.METAMASK_CONNECTSIGN.toLowerCase() && Array.isArray(s))
return (e => {
let {target: t, params: n} = e;
return AS(void 0, void 0, void 0, (function*() {
const e = yield t.request({
method: jC.ETH_REQUESTACCOUNTS,
params: []
});
if (!e.length)
throw new Error("SDK state invalid --
undefined accounts");
return yield t.request({
method: jC.PERSONAL_SIGN,
params: [n[0], e[0]]
})
}
))
}
)({
target: e,
params: s
});
if (a.toLowerCase() ===
jC.METAMASK_CONNECTWITH.toLowerCase() && Array.isArray(s))
return (e => {
let {target: t, params: n} = e;
return AS(void 0, void 0, void 0, (function*() {
const [e] = n
, r = e.method
, i = e.params
, o = yield t.request({
method: jC.ETH_REQUESTACCOUNTS,
params: []
});
if (!o.length)
throw new Error("SDK state invalid --
undefined accounts");
return (null == r ? void 0 : r.toLowerCase()) ===
jC.PERSONAL_SIGN.toLowerCase() ? yield t.request({
method: r,
params: [i[0], o[0]]
}) : (null == r ? void 0 : r.toLowerCase()) ===
jC.ETH_SENDTRANSACTION.toLowerCase() ? yield t.request({
method: r,
params: [Object.assign(Object.assign({},
i[0]), {
from: o[0]
})]
}) : UC.includes(r.toLowerCase()) ?
(console.warn(`MetaMaskSDK connectWith method=${r} -- not handled by the
extension -- call separately`),
o) : yield t.request({
method: r,
params: i
})
}
))
}
)({
target: e,
params: s
});
let l;
try {
return l = yield e.request(r),
l
} finally {
u && (null === (o = n.analytics) || void 0 === o ||
o.send({
event: JE.SDK_RPC_REQUEST_DONE,
params: {
method: a,
from: "extension"
}
}))
}
}
))
}
: "getChainId" === r ? function() {
return t.chainId
}
: "getNetworkVersion" === r ? function() {
return t.networkVersion
}
: "getSelectedAddress" === r ? function() {
return t.selectedAddress
}
: "isConnected" === r ? function() {
return t._state.isConnected
}
: e[r]
})
}
;
var hR;
function pR(e) {
let {mustBeMetaMask: t, sdkInstance: n} = e;
return AS(this, void 0, void 0, (function*() {
if ("undefined" == typeof window)
throw new Error("window not available");
let e;
try {
return e = yield new Promise(( (e, t) => {
const n = setTimeout(( () => {
t(new Error("eip6963RequestProvider timed out"))
}
), 500);
window.addEventListener(hR.Announce, (t => {
const r = t
, {detail: {info: i, provider: o}={}} = r
, {name: a, rdns: s, uuid: u} = null != i ? i : {};
Vx.test(u) && a.startsWith(Hx.NAME) && s ===
Hx.RDNS && (clearTimeout(n),
e(o))
}
)),
window.dispatchEvent(new Event(hR.Request))
}
)),
fR({
provider: e,
sdkInstance: n
})
} catch (e) {
const {ethereum: r} = window;
if (!r)
throw new Error("Ethereum not found in window object");
if ("providers"in r) {
if (Array.isArray(r.providers)) {
const e = t ? r.providers.find((e => e.isMetaMask)) :
r.providers[0];
if (!e)
throw new Error("No suitable provider found");
return fR({
provider: e,
sdkInstance: n
})
}
} else if (t && !r.isMetaMask)
throw new Error("MetaMask provider not found in
Ethereum");
return fR({
provider: r,
sdkInstance: n
})
}
}
))
}
!function(e) {
e.Announce = "eip6963:announceProvider",
e.Request = "eip6963:requestProvider"
}(hR || (hR = {}));
var mR = {
exports: {}
};
!function(e, t) {
e.exports = function(e) {
var t = {};
function n(r) {
if (t[r])
return t[r].exports;
var i = t[r] = {
i: r,
l: !1,
exports: {}
};
return e[r].call(i.exports, i, i.exports, n),
i.l = !0,
i.exports
}
return n.m = e,
n.c = t,
n.d = function(e, t, r) {
n.o(e, t) || Object.defineProperty(e, t, {
enumerable: !0,
get: r
})
}
,
n.r = function(e) {
"undefined" != typeof Symbol && Symbol.toStringTag &&
Object.defineProperty(e, Symbol.toStringTag, {
value: "Module"
}),
Object.defineProperty(e, "__esModule", {
value: !0
})
}
,
n.t = function(e, t) {
if (1 & t && (e = n(e)),
8 & t)
return e;
if (4 & t && "object" == typeof e && e && e.__esModule)
return e;
var r = Object.create(null);
if (n.r(r),
Object.defineProperty(r, "default", {
enumerable: !0,
value: e
}),
2 & t && "string" != typeof e)
for (var i in e)
n.d(r, i, function(t) {
return e[t]
}
.bind(null, i));
return r
}
,
n.n = function(e) {
var t = e && e.__esModule ? function() {
return e.default
}
: function() {
return e
}
;
return n.d(t, "a", t),
t
}
,
n.o = function(e, t) {
return Object.prototype.hasOwnProperty.call(e, t)
}
,
n.p = "",
n(n.s = 90)
}({
17: function(e, t, n) {
t.__esModule = !0,
t.default = void 0;
var r = n(18)
, i = function() {
function e() {}
return e.getFirstMatch = function(e, t) {
var n = t.match(e);
return n && n.length > 0 && n[1] || ""
}
,
e.getSecondMatch = function(e, t) {
var n = t.match(e);
return n && n.length > 1 && n[2] || ""
}
,
e.matchAndReturnConst = function(e, t, n) {
if (e.test(t))
return n
}
,
e.getWindowsVersionName = function(e) {
switch (e) {
case "NT":
return "NT";
case "XP":
case "NT 5.1":
return "XP";
case "NT 5.0":
return "2000";
case "NT 5.2":
return "2003";
case "NT 6.0":
return "Vista";
case "NT 6.1":
return "7";
case "NT 6.2":
return "8";
case "NT 6.3":
return "8.1";
case "NT 10.0":
return "10";
default:
return
}
}
,
e.getMacOSVersionName = function(e) {
var t = e.split(".").splice(0, 2).map((function(e) {
return parseInt(e, 10) || 0
}
));
if (t.push(0),
10 === t[0])
switch (t[1]) {
case 5:
return "Leopard";
case 6:
return "Snow Leopard";
case 7:
return "Lion";
case 8:
return "Mountain Lion";
case 9:
return "Mavericks";
case 10:
return "Yosemite";
case 11:
return "El Capitan";
case 12:
return "Sierra";
case 13:
return "High Sierra";
case 14:
return "Mojave";
case 15:
return "Catalina";
default:
return
}
}
,
e.getAndroidVersionName = function(e) {
var t = e.split(".").splice(0, 2).map((function(e) {
return parseInt(e, 10) || 0
}
));
if (t.push(0),
!(1 === t[0] && t[1] < 5))
return 1 === t[0] && t[1] < 6 ? "Cupcake" : 1 === t[0]
&& t[1] >= 6 ? "Donut" : 2 === t[0] && t[1] < 2 ? "Eclair" : 2 === t[0] && 2 === t[1] ?
"Froyo" : 2 === t[0] && t[1] > 2 ? "Gingerbread" : 3 === t[0] ? "Honeycomb" : 4 === t[0]
&& t[1] < 1 ? "Ice Cream Sandwich" : 4 === t[0] && t[1] < 4 ? "Jelly Bean" : 4 === t[0] &&
t[1] >= 4 ? "KitKat" : 5 === t[0] ? "Lollipop" : 6 === t[0] ? "Marshmallow" : 7 === t[0] ?
"Nougat" : 8 === t[0] ? "Oreo" : 9 === t[0] ? "Pie" : void 0
}
,
e.getVersionPrecision = function(e) {
return e.split(".").length
}
,
e.compareVersions = function(t, n, r) {
void 0 === r && (r = !1);
var i = e.getVersionPrecision(t)
, o = e.getVersionPrecision(n)
, a = Math.max(i, o)
,s=0
, u = e.map([t, n], (function(t) {
var n = a - e.getVersionPrecision(t)
, r = t + new Array(n + 1).join(".0");
return e.map(r.split("."), (function(e) {
return new Array(20 - e.length).join("0") + e
}
)).reverse()
}
));
for (r && (s = a - Math.min(i, o)),
a -= 1; a >= s; ) {
if (u[0][a] > u[1][a])
return 1;
if (u[0][a] === u[1][a]) {
if (a === s)
return 0;
a -= 1
} else if (u[0][a] < u[1][a])
return -1
}
}
,
e.map = function(e, t) {
var n, r = [];
if (Array.prototype.map)
return Array.prototype.map.call(e, t);
for (n = 0; n < e.length; n += 1)
r.push(t(e[n]));
return r
}
,
e.find = function(e, t) {
var n, r;
if (Array.prototype.find)
return Array.prototype.find.call(e, t);
for (n = 0,
r = e.length; n < r; n += 1) {
var i = e[n];
if (t(i, n))
return i
}
}
,
e.assign = function(e) {
for (var t, n, r = e, i = arguments.length, o = new Array(i
> 1 ? i - 1 : 0), a = 1; a < i; a++)
o[a - 1] = arguments[a];
if (Object.assign)
return Object.assign.apply(Object, [e].concat(o));
var s = function() {
var e = o[t];
"object" == typeof e && null !== e &&
Object.keys(e).forEach((function(t) {
r[t] = e[t]
}
))
};
for (t = 0,
n = o.length; t < n; t += 1)
s();
return e
}
,
e.getBrowserAlias = function(e) {
return r.BROWSER_ALIASES_MAP[e]
}
,
e.getBrowserTypeByAlias = function(e) {
return r.BROWSER_MAP[e] || ""
}
,
e
}();
t.default = i,
e.exports = t.default
},
18: function(e, t, n) {
t.__esModule = !0,
t.ENGINE_MAP = t.OS_MAP = t.PLATFORMS_MAP =
t.BROWSER_MAP = t.BROWSER_ALIASES_MAP = void 0,
t.BROWSER_ALIASES_MAP = {
"Amazon Silk": "amazon_silk",
"Android Browser": "android",
Bada: "bada",
BlackBerry: "blackberry",
Chrome: "chrome",
Chromium: "chromium",
Electron: "electron",
Epiphany: "epiphany",
Firefox: "firefox",
Focus: "focus",
Generic: "generic",
"Google Search": "google_search",
Googlebot: "googlebot",
"Internet Explorer": "ie",
"K-Meleon": "k_meleon",
Maxthon: "maxthon",
"Microsoft Edge": "edge",
"MZ Browser": "mz",
"NAVER Whale Browser": "naver",
Opera: "opera",
"Opera Coast": "opera_coast",
PhantomJS: "phantomjs",
Puffin: "puffin",
QupZilla: "qupzilla",
QQ: "qq",
QQLite: "qqlite",
Safari: "safari",
Sailfish: "sailfish",
"Samsung Internet for Android": "samsung_internet",
SeaMonkey: "seamonkey",
Sleipnir: "sleipnir",
Swing: "swing",
Tizen: "tizen",
"UC Browser": "uc",
Vivaldi: "vivaldi",
"WebOS Browser": "webos",
WeChat: "wechat",
"Yandex Browser": "yandex",
Roku: "roku"
},
t.BROWSER_MAP = {
amazon_silk: "Amazon Silk",
android: "Android Browser",
bada: "Bada",
blackberry: "BlackBerry",
chrome: "Chrome",
chromium: "Chromium",
electron: "Electron",
epiphany: "Epiphany",
firefox: "Firefox",
focus: "Focus",
generic: "Generic",
googlebot: "Googlebot",
google_search: "Google Search",
ie: "Internet Explorer",
k_meleon: "K-Meleon",
maxthon: "Maxthon",
edge: "Microsoft Edge",
mz: "MZ Browser",
naver: "NAVER Whale Browser",
opera: "Opera",
opera_coast: "Opera Coast",
phantomjs: "PhantomJS",
puffin: "Puffin",
qupzilla: "QupZilla",
qq: "QQ Browser",
qqlite: "QQ Browser Lite",
safari: "Safari",
sailfish: "Sailfish",
samsung_internet: "Samsung Internet for Android",
seamonkey: "SeaMonkey",
sleipnir: "Sleipnir",
swing: "Swing",
tizen: "Tizen",
uc: "UC Browser",
vivaldi: "Vivaldi",
webos: "WebOS Browser",
wechat: "WeChat",
yandex: "Yandex Browser"
},
t.PLATFORMS_MAP = {
tablet: "tablet",
mobile: "mobile",
desktop: "desktop",
tv: "tv"
},
t.OS_MAP = {
WindowsPhone: "Windows Phone",
Windows: "Windows",
MacOS: "macOS",
iOS: "iOS",
Android: "Android",
WebOS: "WebOS",
BlackBerry: "BlackBerry",
Bada: "Bada",
Tizen: "Tizen",
Linux: "Linux",
ChromeOS: "Chrome OS",
PlayStation4: "PlayStation 4",
Roku: "Roku"
},
t.ENGINE_MAP = {
EdgeHTML: "EdgeHTML",
Blink: "Blink",
Trident: "Trident",
Presto: "Presto",
Gecko: "Gecko",
WebKit: "WebKit"
}
},
90: function(e, t, n) {
t.__esModule = !0,
t.default = void 0;
var r, i = (r = n(91)) && r.__esModule ? r : {
default: r
}, o = n(18);
function a(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1,
r.configurable = !0,
"value"in r && (r.writable = !0),
Object.defineProperty(e, r.key, r)
}
}
var s = function() {
function e() {}
var t, n, r;
return e.getParser = function(e, t) {
if (void 0 === t && (t = !1),
"string" != typeof e)
throw new Error("UserAgent should be a string");
return new i.default(e,t)
}
,
e.parse = function(e) {
return new i.default(e).getResult()
}
,
t = e,
r = [{
key: "BROWSER_MAP",
get: function() {
return o.BROWSER_MAP
}
}, {
key: "ENGINE_MAP",
get: function() {
return o.ENGINE_MAP
}
}, {
key: "OS_MAP",
get: function() {
return o.OS_MAP
}
}, {
key: "PLATFORMS_MAP",
get: function() {
return o.PLATFORMS_MAP
}
}],
(n = null) && a(t.prototype, n),
r && a(t, r),
e
}();
t.default = s,
e.exports = t.default
},
91: function(e, t, n) {
t.__esModule = !0,
t.default = void 0;
var r = u(n(92))
, i = u(n(93))
, o = u(n(94))
, a = u(n(95))
, s = u(n(17));
function u(e) {
return e && e.__esModule ? e : {
default: e
}
}
var l = function() {
function e(e, t) {
if (void 0 === t && (t = !1),
null == e || "" === e)
throw new Error("UserAgent parameter can't be
empty");
this._ua = e,
this.parsedResult = {},
!0 !== t && this.parse()
}
var t = e.prototype;
return t.getUA = function() {
return this._ua
}
,
t.test = function(e) {
return e.test(this._ua)
}
,
t.parseBrowser = function() {
var e = this;
this.parsedResult.browser = {};
var t = s.default.find(r.default, (function(t) {
if ("function" == typeof t.test)
return t.test(e);
if (t.test instanceof Array)
return t.test.some((function(t) {
return e.test(t)
}
));
throw new Error("Browser's test function is not
valid")
}
));
return t && (this.parsedResult.browser =
t.describe(this.getUA())),
this.parsedResult.browser
}
,
t.getBrowser = function() {
return this.parsedResult.browser ?
this.parsedResult.browser : this.parseBrowser()
}
,
t.getBrowserName = function(e) {
return e ?
String(this.getBrowser().name).toLowerCase() || "" : this.getBrowser().name || ""
}
,
t.getBrowserVersion = function() {
return this.getBrowser().version
}
,
t.getOS = function() {
return this.parsedResult.os ? this.parsedResult.os :
this.parseOS()
}
,
t.parseOS = function() {
var e = this;
this.parsedResult.os = {};
var t = s.default.find(i.default, (function(t) {
if ("function" == typeof t.test)
return t.test(e);
if (t.test instanceof Array)
return t.test.some((function(t) {
return e.test(t)
}
));
throw new Error("Browser's test function is not
valid")
}
));
return t && (this.parsedResult.os =
t.describe(this.getUA())),
this.parsedResult.os
}
,
t.getOSName = function(e) {
var t = this.getOS().name;
return e ? String(t).toLowerCase() || "" : t || ""
}
,
t.getOSVersion = function() {
return this.getOS().version
}
,
t.getPlatform = function() {
return this.parsedResult.platform ?
this.parsedResult.platform : this.parsePlatform()
}
,
t.getPlatformType = function(e) {
void 0 === e && (e = !1);
var t = this.getPlatform().type;
return e ? String(t).toLowerCase() || "" : t || ""
}
,
t.parsePlatform = function() {
var e = this;
this.parsedResult.platform = {};
var t = s.default.find(o.default, (function(t) {
if ("function" == typeof t.test)
return t.test(e);
if (t.test instanceof Array)
return t.test.some((function(t) {
return e.test(t)
}
));
throw new Error("Browser's test function is not
valid")
}
));
return t && (this.parsedResult.platform =
t.describe(this.getUA())),
this.parsedResult.platform
}
,
t.getEngine = function() {
return this.parsedResult.engine ?
this.parsedResult.engine : this.parseEngine()
}
,
t.getEngineName = function(e) {
return e ? String(this.getEngine().name).toLowerCase()
|| "" : this.getEngine().name || ""
}
,
t.parseEngine = function() {
var e = this;
this.parsedResult.engine = {};
var t = s.default.find(a.default, (function(t) {
if ("function" == typeof t.test)
return t.test(e);
if (t.test instanceof Array)
return t.test.some((function(t) {
return e.test(t)
}
));
throw new Error("Browser's test function is not
valid")
}
));
return t && (this.parsedResult.engine =
t.describe(this.getUA())),
this.parsedResult.engine
}
,
t.parse = function() {
return this.parseBrowser(),
this.parseOS(),
this.parsePlatform(),
this.parseEngine(),
this
}
,
t.getResult = function() {
return s.default.assign({}, this.parsedResult)
}
,
t.satisfies = function(e) {
var t = this
, n = {}
,r=0
, i = {}
, o = 0;
if (Object.keys(e).forEach((function(t) {
var a = e[t];
"string" == typeof a ? (i[t] = a,
o += 1) : "object" == typeof a && (n[t] = a,
r += 1)
}
)),
r > 0) {
var a = Object.keys(n)
, u = s.default.find(a, (function(e) {
return t.isOS(e)
}
));
if (u) {
var l = this.satisfies(n[u]);
if (void 0 !== l)
return l
}
var c = s.default.find(a, (function(e) {
return t.isPlatform(e)
}
));
if (c) {
var d = this.satisfies(n[c]);
if (void 0 !== d)
return d
}
}
if (o > 0) {
var f = Object.keys(i)
, h = s.default.find(f, (function(e) {
return t.isBrowser(e, !0)
}
));
if (void 0 !== h)
return this.compareVersion(i[h])
}
}
,
t.isBrowser = function(e, t) {
void 0 === t && (t = !1);
var n = this.getBrowserName().toLowerCase()
, r = e.toLowerCase()
, i = s.default.getBrowserTypeByAlias(r);
return t && i && (r = i.toLowerCase()),
r === n
}
,
t.compareVersion = function(e) {
var t = [0]
,n=e
, r = !1
, i = this.getBrowserVersion();
if ("string" == typeof i)
return ">" === e[0] || "<" === e[0] ? (n = e.substr(1),
"=" === e[1] ? (r = !0,
n = e.substr(2)) : t = [],
">" === e[0] ? t.push(1) : t.push(-1)) : "=" === e[0] ?
n = e.substr(1) : "~" === e[0] && (r = !0,
n = e.substr(1)),
t.indexOf(s.default.compareVersions(i, n, r)) > -1
}
,
t.isOS = function(e) {
return this.getOSName(!0) === String(e).toLowerCase()
}
,
t.isPlatform = function(e) {
return this.getPlatformType(!0) ===
String(e).toLowerCase()
}
,
t.isEngine = function(e) {
return this.getEngineName(!0) ===
String(e).toLowerCase()
}
,
t.is = function(e, t) {
return void 0 === t && (t = !1),
this.isBrowser(e, t) || this.isOS(e) || this.isPlatform(e)
}
,
t.some = function(e) {
var t = this;
return void 0 === e && (e = []),
e.some((function(e) {
return t.is(e)
}
))
}
,
e
}();
t.default = l,
e.exports = t.default
},
92: function(e, t, n) {
t.__esModule = !0,
t.default = void 0;
var r, i = (r = n(17)) && r.__esModule ? r : {
default: r
}, o = /version\/(\d+(\.?_?\d+)+)/i, a = [{
test: [/googlebot/i],
describe: function(e) {
var t = {
name: "Googlebot"
}
, n = i.default.getFirstMatch(/googlebot\/(\d+(\.\d+))/i,
e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/opera/i],
describe: function(e) {
var t = {
name: "Opera"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:opera)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/opr\/|opios/i],
describe: function(e) {
var t = {
name: "Opera"
}
, n = i.default.getFirstMatch(/(?:opr|opios)[\s/](\S+)/i,
e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/SamsungBrowser/i],
describe: function(e) {
var t = {
name: "Samsung Internet for Android"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:SamsungBrowser)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/Whale/i],
describe: function(e) {
var t = {
name: "NAVER Whale Browser"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:whale)[\s/](\d+(?:\.\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/MZBrowser/i],
describe: function(e) {
var t = {
name: "MZ Browser"
}
, n = i.default.getFirstMatch(/(?:MZBrowser)[\s/](\d+
(?:\.\d+)+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/focus/i],
describe: function(e) {
var t = {
name: "Focus"
}
, n = i.default.getFirstMatch(/(?:focus)[\s/](\d+(?:\.\d+)
+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/swing/i],
describe: function(e) {
var t = {
name: "Swing"
}
, n = i.default.getFirstMatch(/(?:swing)[\s/](\d+(?:\.\d+)
+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/coast/i],
describe: function(e) {
var t = {
name: "Opera Coast"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:coast)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/opt\/\d+(?:.?_?\d+)+/i],
describe: function(e) {
var t = {
name: "Opera Touch"
}
, n = i.default.getFirstMatch(/(?:opt)[\s/](\d+(\.?_?\d+)
+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/yabrowser/i],
describe: function(e) {
var t = {
name: "Yandex Browser"
}
, n = i.default.getFirstMatch(/(?:yabrowser)[\s/](\d+(\.?
_?\d+)+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/ucbrowser/i],
describe: function(e) {
var t = {
name: "UC Browser"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:ucbrowser)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/Maxthon|mxios/i],
describe: function(e) {
var t = {
name: "Maxthon"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:Maxthon|mxios)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/epiphany/i],
describe: function(e) {
var t = {
name: "Epiphany"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:epiphany)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/puffin/i],
describe: function(e) {
var t = {
name: "Puffin"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:puffin)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/sleipnir/i],
describe: function(e) {
var t = {
name: "Sleipnir"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:sleipnir)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/k-meleon/i],
describe: function(e) {
var t = {
name: "K-Meleon"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/(?:k-meleon)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/micromessenger/i],
describe: function(e) {
var t = {
name: "WeChat"
}
, n = i.default.getFirstMatch(/(?:micromessenger)[\s/](\
d+(\.?_?\d+)+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/qqbrowser/i],
describe: function(e) {
var t = {
name: /qqbrowserlite/i.test(e) ? "QQ Browser Lite" :
"QQ Browser"
}
, n = i.default.getFirstMatch(/(?:qqbrowserlite|
qqbrowser)[/](\d+(\.?_?\d+)+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/msie|trident/i],
describe: function(e) {
var t = {
name: "Internet Explorer"
}
, n = i.default.getFirstMatch(/(?:msie |rv:)(\d+(\.?_?\
d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/\sedg\//i],
describe: function(e) {
var t = {
name: "Microsoft Edge"
}
, n = i.default.getFirstMatch(/\sedg\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}, {
test: [/edg([ea]|ios)/i],
describe: function(e) {
var t = {
name: "Microsoft Edge"
}
, n = i.default.getSecondMatch(/edg([ea]|ios)\/(\d+(\.?
_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/vivaldi/i],
describe: function(e) {
var t = {
name: "Vivaldi"
}
, n = i.default.getFirstMatch(/vivaldi\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}, {
test: [/seamonkey/i],
describe: function(e) {
var t = {
name: "SeaMonkey"
}
, n = i.default.getFirstMatch(/seamonkey\/(\d+(\.?_?\
d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/sailfish/i],
describe: function(e) {
var t = {
name: "Sailfish"
}
, n = i.default.getFirstMatch(/sailfish\s?browser\/(\d+
(\.\d+)?)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/silk/i],
describe: function(e) {
var t = {
name: "Amazon Silk"
}
, n = i.default.getFirstMatch(/silk\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}, {
test: [/phantom/i],
describe: function(e) {
var t = {
name: "PhantomJS"
}
, n = i.default.getFirstMatch(/phantomjs\/(\d+(\.?_?\
d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/slimerjs/i],
describe: function(e) {
var t = {
name: "SlimerJS"
}
, n = i.default.getFirstMatch(/slimerjs\/(\d+(\.?_?\d+)
+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
describe: function(e) {
var t = {
name: "BlackBerry"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/blackberry[\d]+\/(\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/(web|hpw)[o0]s/i],
describe: function(e) {
var t = {
name: "WebOS Browser"
}
, n = i.default.getFirstMatch(o, e) ||
i.default.getFirstMatch(/w(?:eb)?[o0]sbrowser\/(\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/bada/i],
describe: function(e) {
var t = {
name: "Bada"
}
, n = i.default.getFirstMatch(/dolfin\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}, {
test: [/tizen/i],
describe: function(e) {
var t = {
name: "Tizen"
}
, n = i.default.getFirstMatch(/(?:tizen\s?)?browser\/(\
d+(\.?_?\d+)+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/qupzilla/i],
describe: function(e) {
var t = {
name: "QupZilla"
}
, n = i.default.getFirstMatch(/(?:qupzilla)[\s/](\d+(\.?_?\
d+)+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/firefox|iceweasel|fxios/i],
describe: function(e) {
var t = {
name: "Firefox"
}
, n = i.default.getFirstMatch(/(?:firefox|iceweasel|
fxios)[\s/](\d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/electron/i],
describe: function(e) {
var t = {
name: "Electron"
}
, n = i.default.getFirstMatch(/(?:electron)\/(\d+(\.?_?\
d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/MiuiBrowser/i],
describe: function(e) {
var t = {
name: "Miui"
}
, n = i.default.getFirstMatch(/(?:MiuiBrowser)[\s/](\d+
(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/chromium/i],
describe: function(e) {
var t = {
name: "Chromium"
}
, n = i.default.getFirstMatch(/(?:chromium)[\s/](\d+(\.?
_?\d+)+)/i, e) || i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/chrome|crios|crmo/i],
describe: function(e) {
var t = {
name: "Chrome"
}
, n = i.default.getFirstMatch(/(?:chrome|crios|crmo)\/(\
d+(\.?_?\d+)+)/i, e);
return n && (t.version = n),
t
}
}, {
test: [/GSA/i],
describe: function(e) {
var t = {
name: "Google Search"
}
, n = i.default.getFirstMatch(/(?:GSA)\/(\d+(\.?_?\d+)
+)/i, e);
return n && (t.version = n),
t
}
}, {
test: function(e) {
var t = !e.test(/like android/i)
, n = e.test(/android/i);
return t && n
},
describe: function(e) {
var t = {
name: "Android Browser"
}
, n = i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/playstation 4/i],
describe: function(e) {
var t = {
name: "PlayStation 4"
}
, n = i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/safari|applewebkit/i],
describe: function(e) {
var t = {
name: "Safari"
}
, n = i.default.getFirstMatch(o, e);
return n && (t.version = n),
t
}
}, {
test: [/.*/i],
describe: function(e) {
var t = -1 !== e.search("\\(") ? /^(.*)\/(.*)[ \t]\((.*)/ :
/^(.*)\/(.*) /;
return {
name: i.default.getFirstMatch(t, e),
version: i.default.getSecondMatch(t, e)
}
}
}];
t.default = a,
e.exports = t.default
},
93: function(e, t, n) {
t.__esModule = !0,
t.default = void 0;
var r, i = (r = n(17)) && r.__esModule ? r : {
default: r
}, o = n(18), a = [{
test: [/Roku\/DVP/],
describe: function(e) {
var t = i.default.getFirstMatch(/Roku\/DVP-(\d+\.\d+)/i,
e);
return {
name: o.OS_MAP.Roku,
version: t
}
}
}, {
test: [/windows phone/i],
describe: function(e) {
var t = i.default.getFirstMatch(/windows phone (?:os)?\
s?(\d+(\.\d+)*)/i, e);
return {
name: o.OS_MAP.WindowsPhone,
version: t
}
}
}, {
test: [/windows /i],
describe: function(e) {
var t = i.default.getFirstMatch(/Windows ((NT|XP)( \d\
d?.\d)?)/i, e)
, n = i.default.getWindowsVersionName(t);
return {
name: o.OS_MAP.Windows,
version: t,
versionName: n
}
}
}, {
test: [/Macintosh(.*?) FxiOS(.*?)\//],
describe: function(e) {
var t = {
name: o.OS_MAP.iOS
}
, n = i.default.getSecondMatch(/(Version\/)(\d[\d.]+)/,
e);
return n && (t.version = n),
t
}
}, {
test: [/macintosh/i],
describe: function(e) {
var t = i.default.getFirstMatch(/mac os x (\d+(\.?_?\d+)
+)/i, e).replace(/[_\s]/g, ".")
, n = i.default.getMacOSVersionName(t)
,r={
name: o.OS_MAP.MacOS,
version: t
};
return n && (r.versionName = n),
r
}
}, {
test: [/(ipod|iphone|ipad)/i],
describe: function(e) {
var t = i.default.getFirstMatch(/os (\d+([_\s]\d+)*) like
mac os x/i, e).replace(/[_\s]/g, ".");
return {
name: o.OS_MAP.iOS,
version: t
}
}
}, {
test: function(e) {
var t = !e.test(/like android/i)
, n = e.test(/android/i);
return t && n
},
describe: function(e) {
var t = i.default.getFirstMatch(/android[\s/-](\d+(\.\d+)*)/i,
e)
, n = i.default.getAndroidVersionName(t)
,r={
name: o.OS_MAP.Android,
version: t
};
return n && (r.versionName = n),
r
}
}, {
test: [/(web|hpw)[o0]s/i],
describe: function(e) {
var t = i.default.getFirstMatch(/(?:web|hpw)[o0]s\/(\d+(\.\
d+)*)/i, e)
,n={
name: o.OS_MAP.WebOS
};
return t && t.length && (n.version = t),
n
}
}, {
test: [/blackberry|\bbb\d+/i, /rim\stablet/i],
describe: function(e) {
var t = i.default.getFirstMatch(/rim\stablet\sos\s(\d+(\.\
d+)*)/i, e) || i.default.getFirstMatch(/blackberry\d+\/(\d+([_\s]\d+)*)/i, e) ||
i.default.getFirstMatch(/\bbb(\d+)/i, e);
return {
name: o.OS_MAP.BlackBerry,
version: t
}
}
}, {
test: [/bada/i],
describe: function(e) {
var t = i.default.getFirstMatch(/bada\/(\d+(\.\d+)*)/i, e);
return {
name: o.OS_MAP.Bada,
version: t
}
}
}, {
test: [/tizen/i],
describe: function(e) {
var t = i.default.getFirstMatch(/tizen[/\s](\d+(\.\d+)*)/i, e);
return {
name: o.OS_MAP.Tizen,
version: t
}
}
}, {
test: [/linux/i],
describe: function() {
return {
name: o.OS_MAP.Linux
}
}
}, {
test: [/CrOS/],
describe: function() {
return {
name: o.OS_MAP.ChromeOS
}
}
}, {
test: [/PlayStation 4/],
describe: function(e) {
var t = i.default.getFirstMatch(/PlayStation 4[/\s](\d+(\.\
d+)*)/i, e);
return {
name: o.OS_MAP.PlayStation4,
version: t
}
}
}];
t.default = a,
e.exports = t.default
},
94: function(e, t, n) {
t.__esModule = !0,
t.default = void 0;
var r, i = (r = n(17)) && r.__esModule ? r : {
default: r
}, o = n(18), a = [{
test: [/googlebot/i],
describe: function() {
return {
type: "bot",
vendor: "Google"
}
}
}, {
test: [/huawei/i],
describe: function(e) {
var t = i.default.getFirstMatch(/(can-l01)/i, e) && "Nova"
,n={
type: o.PLATFORMS_MAP.mobile,
vendor: "Huawei"
};
return t && (n.model = t),
n
}
}, {
test: [/nexus\s*(?:7|8|9|10).*/i],
describe: function() {
return {
type: o.PLATFORMS_MAP.tablet,
vendor: "Nexus"
}
}
}, {
test: [/ipad/i],
describe: function() {
return {
type: o.PLATFORMS_MAP.tablet,
vendor: "Apple",
model: "iPad"
}
}
}, {
test: [/Macintosh(.*?) FxiOS(.*?)\//],
describe: function() {
return {
type: o.PLATFORMS_MAP.tablet,
vendor: "Apple",
model: "iPad"
}
}
}, {
test: [/kftt build/i],
describe: function() {
return {
type: o.PLATFORMS_MAP.tablet,
vendor: "Amazon",
model: "Kindle Fire HD 7"
}
}
}, {
test: [/silk/i],
describe: function() {
return {
type: o.PLATFORMS_MAP.tablet,
vendor: "Amazon"
}
}
}, {
test: [/tablet(?! pc)/i],
describe: function() {
return {
type: o.PLATFORMS_MAP.tablet
}
}
}, {
test: function(e) {
var t = e.test(/ipod|iphone/i)
, n = e.test(/like (ipod|iphone)/i);
return t && !n
},
describe: function(e) {
var t = i.default.getFirstMatch(/(ipod|iphone)/i, e);
return {
type: o.PLATFORMS_MAP.mobile,
vendor: "Apple",
model: t
}
}
}, {
test: [/nexus\s*[0-6].*/i, /galaxy nexus/i],
describe: function() {
return {
type: o.PLATFORMS_MAP.mobile,
vendor: "Nexus"
}
}
}, {
test: [/[^-]mobi/i],
describe: function() {
return {
type: o.PLATFORMS_MAP.mobile
}
}
}, {
test: function(e) {
return "blackberry" === e.getBrowserName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.mobile,
vendor: "BlackBerry"
}
}
}, {
test: function(e) {
return "bada" === e.getBrowserName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.mobile
}
}
}, {
test: function(e) {
return "windows phone" === e.getBrowserName()
},
describe: function() {
return {
type: o.PLATFORMS_MAP.mobile,
vendor: "Microsoft"
}
}
}, {
test: function(e) {
var t = Number(String(e.getOSVersion()).split(".")[0]);
return "android" === e.getOSName(!0) && t >= 3
},
describe: function() {
return {
type: o.PLATFORMS_MAP.tablet
}
}
}, {
test: function(e) {
return "android" === e.getOSName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.mobile
}
}
}, {
test: function(e) {
return "macos" === e.getOSName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.desktop,
vendor: "Apple"
}
}
}, {
test: function(e) {
return "windows" === e.getOSName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.desktop
}
}
}, {
test: function(e) {
return "linux" === e.getOSName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.desktop
}
}
}, {
test: function(e) {
return "playstation 4" === e.getOSName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.tv
}
}
}, {
test: function(e) {
return "roku" === e.getOSName(!0)
},
describe: function() {
return {
type: o.PLATFORMS_MAP.tv
}
}
}];
t.default = a,
e.exports = t.default
},
95: function(e, t, n) {
t.__esModule = !0,
t.default = void 0;
var r, i = (r = n(17)) && r.__esModule ? r : {
default: r
}, o = n(18), a = [{
test: function(e) {
return "microsoft edge" === e.getBrowserName(!0)
},
describe: function(e) {
if (/\sedg\//i.test(e))
return {
name: o.ENGINE_MAP.Blink
};
var t = i.default.getFirstMatch(/edge\/(\d+(\.?_?\d+)+)/i,
e);
return {
name: o.ENGINE_MAP.EdgeHTML,
version: t
}
}
}, {
test: [/trident/i],
describe: function(e) {
var t = {
name: o.ENGINE_MAP.Trident
}
, n = i.default.getFirstMatch(/trident\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}, {
test: function(e) {
return e.test(/presto/i)
},
describe: function(e) {
var t = {
name: o.ENGINE_MAP.Presto
}
, n = i.default.getFirstMatch(/presto\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}, {
test: function(e) {
var t = e.test(/gecko/i)
, n = e.test(/like gecko/i);
return t && !n
},
describe: function(e) {
var t = {
name: o.ENGINE_MAP.Gecko
}
, n = i.default.getFirstMatch(/gecko\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}, {
test: [/(apple)?webkit\/537\.36/i],
describe: function() {
return {
name: o.ENGINE_MAP.Blink
}
}
}, {
test: [/(apple)?webkit/i],
describe: function(e) {
var t = {
name: o.ENGINE_MAP.WebKit
}
, n = i.default.getFirstMatch(/webkit\/(\d+(\.?_?\d+)+)/i,
e);
return n && (t.version = n),
t
}
}];
t.default = a,
e.exports = t.default
}
})
}(mR);
var gR, vR = i(mR.exports);
!function(e) {
e.Disabled = "Disabled",
e.Temporary = "Temporary",
e.UntilResponse = "UntilResponse"
}(gR || (gR = {}));
const bR = () => "wakeLock"in navigator
, yR = () => {
if ("undefined" == typeof navigator)
return !1;
const {userAgent: e} = navigator
, t = /CPU (?:iPhone )?OS (\d+)(?:_\d+)?_?\d+ like Mac OS
X/iu.exec(e);
return !!t && parseInt(t[1], 10) < 10 && !window.MSStream
}
;
class AR {
constructor(e) {
this.enabled = !1,
this._eventsAdded = !1,
this.debug = null != e && e
}
start() {
if (this.enabled = !1,
bR() && !this._eventsAdded) {
this._eventsAdded = !0,
this._wakeLock = void 0;
const e = () => AS(this, void 0, void 0, (function*() {
null !== this._wakeLock && "visible" ===
document.visibilityState && (yield this.enable())
}
));
document.addEventListener("visibilitychange", e),
document.addEventListener("fullscreenchange", e)
} else
yR() ? this.noSleepTimer = void 0 : (this.noSleepVideo =
document.createElement("video"),
this.noSleepVideo.setAttribute("title", "MetaMask SDK -
Listening for responses"),
this.noSleepVideo.setAttribute("playsinline", ""),
this._addSourceToVideo(this.noSleepVideo, "webm",
"data:video/webm;base64,GkXfowEAAAAAAAAfQoaBAUL3gQFC8oEEQvOBCEKChH
dlYm1Ch4EEQoWBAhhTgGcBAAAAAAAVkhFNm3RALE27i1OrhBVJqWZTrIHfTbuMU
6uEFlSua1OsggEwTbuMU6uEHFO7a1OsghV17AEAAAAAAACkAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmAQAAAAAAAEUq17GDD0JATYCN
TGF2ZjU1LjMzLjEwMFdBjUxhdmY1NS4zMy4xMDBzpJBlrrXf3DCDVB8KcgbMpcr+RIm
IQJBgAAAAAAAWVK5rAQAAAAAAD+
+uAQAAAAAAADLXgQFzxYEBnIEAIrWcg3VuZIaFVl9WUDiDgQEj44OEAmJaAOABAA
AAAAAABrCBsLqBkK4BAAAAAAAPq9eBAnPFgQKcgQAitZyDdW5khohBX1ZPUkJJU4
OBAuEBAAAAAAAAEZ+BArWIQOdwAAAAAABiZIEgY6JPbwIeVgF2b3JiaXMAAAAAA
oC7AAAAAAAAgLUBAAAAAAC4AQN2b3JiaXMtAAAAWGlwaC5PcmcgbGliVm9yYmlzI
EkgMjAxMDExMDEgKFNjaGF1ZmVudWdnZXQpAQAAABUAAABlbmNvZGVyPUxhdm
M1NS41Mi4xMDIBBXZvcmJpcyVCQ1YBAEAAACRzGCpGpXMWhBAaQlAZ4xxCzmvs
GUJMEYIcMkxbyyVzkCGkoEKIWyiB0JBVAABAAACHQXgUhIpBCCGEJT1YkoMnPQg
hhIg5eBSEaUEIIYQQQgghhBBCCCGERTlokoMnQQgdhOMwOAyD5Tj4HIRFOVgQgy
dB6CCED0K4moOsOQghhCQ1SFCDBjnoHITCLCiKgsQwuBaEBDUojILkMMjUgwtCiJq
DSTX4GoRnQXgWhGlBCCGEJEFIkIMGQcgYhEZBWJKDBjm4FITLQagahCo5CB+EID
RkFQCQAACgoiiKoigKEBqyCgDIAAAQQFEUx3EcyZEcybEcCwgNWQUAAAEACAAA
oEiKpEiO5EiSJFmSJVmSJVmS5omqLMuyLMuyLMsyEBqyCgBIAABQUQxFcRQHCA1
ZBQBkAAAIoDiKpViKpWiK54iOCISGrAIAgAAABAAAEDRDUzxHlETPVFXXtm3btm3bt
m3btm3btm1blmUZCA1ZBQBAAAAQ0mlmqQaIMAMZBkJDVgEACAAAgBGKMMSA0J
BVAABAAACAGEoOogmtOd+c46BZDppKsTkdnEi1eZKbirk555xzzsnmnDHOOeecopx
ZDJoJrTnnnMSgWQqaCa0555wnsXnQmiqtOeeccc7pYJwRxjnnnCateZCajbU555wFrW
mOmkuxOeecSLl5UptLtTnnnHPOOeecc84555zqxekcnBPOOeecqL25lpvQxTnnnE/
G6d6cEM4555xzzjnnnHPOOeecIDRkFQAABABAEIaNYdwpCNLnaCBGEWIaMulB9+g
wCRqDnELq0ehopJQ6CCWVcVJKJwgNWQUAAAIAQAghhRRSSCGFFFJIIYUUYoghh
hhyyimnoIJKKqmooowyyyyzzDLLLLPMOuyssw47DDHEEEMrrcRSU2011lhr7jnnmoO0
VlprrbVSSimllFIKQkNWAQAgAAAEQgYZZJBRSCGFFGKIKaeccgoqqIDQkFUAACAAg
AAAAABP8hzRER3RER3RER3RER3R8RzPESVREiVREi3TMjXTU0VVdWXXlnVZt31b
2IVd933d933d+HVhWJZlWZZlWZZlWZZlWZZlWZYgNGQVAAACAAAghBBCSCGFFFJ
IKcYYc8w56CSUEAgNWQUAAAIACAAAAHAUR3EcyZEcSbIkS9IkzdIsT/
M0TxM9URRF0zRV0RVdUTdtUTZl0zVdUzZdVVZtV5ZtW7Z125dl2/d93/d93/d93/d93/
d9XQdCQ1YBABIAADqSIymSIimS4ziOJElAaMgqAEAGAEAAAIriKI7jOJIkSZIlaZJneZa
omZrpmZ4qqkBoyCoAABAAQAAAAAAAAIqmeIqpeIqoeI7oiJJomZaoqZoryqbsuq7ruq7r
uq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq7ruq4LhIasAgAkAAB0JEdyJEdSJEVSJEdygNC
QVQCADACAAAAcwzEkRXIsy9I0T/
M0TxM90RM901NFV3SB0JBVAAAgAIAAAAAAAAAMybAUy9EcTRIl1VItVVMt1VJF1V
NVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVN0zRNEwgNWQkA
kAEAkBBTLS3GmgmLJGLSaqugYwxS7KWxSCpntbfKMYUYtV4ah5RREHupJGOKQc
wtpNApJq3WVEKFFKSYYyoVUg5SIDRkhQAQmgHgcBxAsixAsiwAAAAAAAAAkDQN0
DwPsDQPAAAAAAAAACRNAyxPAzTPAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BA0jRA8zxA8zwAAAAAAAAA0DwP8DwR8EQRAAAAAAAAACzPAzTRAzxRBAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAABA0jRA8zxA8zwAAAAAAAAAsDwP8EQR0DwRA
AAAAAAAACzPAzxRBDzRAwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAEAAAEOAAABBgIRQasiIAiBMAcEgSJAmSBM0
DSJYFTYOmwTQBkmVB06BpME0AAAAAAAAAAAAAJE2DpkHTIIoASdOgadA0iCIAA
AAAAAAAAAAAkqZB06BpEEWApGnQNGgaRBEAAAAAAAAAAAAAzzQhihBFmCbAM
02IIkQRpgkAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAAGHAAAAgwoQwUGrIiAIg
TAHA4imUBAIDjOJYFAACO41gWAABYliWKAABgWZooAgAAAAAAAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
AAAAAAAAAIAAAYcAAACDChDBQashIAiAIAcCiKZQHHsSzgOJYFJMmyAJYF0DyAp
gFEEQAIAAAocAAACLBBU2JxgEJDVgIAUQAABsWxLE0TRZKkaZoniiRJ0zxPFGma5
3meacLzPM80IYqiaJoQRVE0TZimaaoqME1VFQAAUOAAABBgg6bE4gCFhqwEAEICA
ByKYlma5nmeJ4qmqZokSdM8TxRF0TRNU1VJkqZ5niiKommapqqyLE3zPFEURdNUV
VWFpnmeKIqiaaqq6sLzPE8URdE0VdV14XmeJ4qiaJqq6roQRVE0TdNUTVV1XSCKp
mmaqqqqrgtETxRNU1Vd13WB54miaaqqq7ouEE3TVFVVdV1ZBpimaaqq68oyQFVV1X
VdV5YBqqqqruu6sgxQVdd1XVmWZQCu67qyLMsCAAAOHAAAAoygk4wqi7DRhAsPQ
KEhKwKAKAAAwBimFFPKMCYhpBAaxiSEFEImJaXSUqogpFJSKRWEVEoqJaOUUm
opVRBSKamUCkIqJZVSAADYgQMA2IGFUGjISgAgDwCAMEYpxhhzTiKkFGPOOScR
Uoox55yTSjHmnHPOSSkZc8w556SUzjnnnHNSSuacc845KaVzzjnnnJRSSuecc05KKS
WEzkEnpZTSOeecEwAAVOAAABBgo8jmBCNBhYasBABSAQAMjmNZmuZ5omialiRp
mud5niiapiZJmuZ5nieKqsnzPE8URdE0VZXneZ4oiqJpqirXFUXTNE1VVV2yLIqmaZqq6
rowTdNUVdd1XZimaaqq67oubFtVVdV1ZRm2raqq6rqyDFzXdWXZloEsu67s2rIAAPAE
BwCgAhtWRzgpGgssNGQlAJABAEAYg5BCCCFlEEIKIYSUUggJAAAYcAAACDChDB
QashIASAUAAIyx1lprrbXWQGettdZaa62AzFprrbXWWmuttdZaa6211lJrrbXWWmuttdZa
a6211lprrbXWWmuttdZaa6211lprrbXWWmuttdZaa6211lprrbXWWmstpZRSSimllFJKKa
WUUkoppZRSSgUA+lU4APg/
2LA6wknRWGChISsBgHAAAMAYpRhzDEIppVQIMeacdFRai7FCiDHnJKTUWmzFc85B
KCGV1mIsnnMOQikpxVZjUSmEUlJKLbZYi0qho5JSSq3VWIwxqaTWWoutxmKMSSm0
1FqLMRYjbE2ptdhqq7EYY2sqLbQYY4zFCF9kbC2m2moNxggjWywt1VprMMYY3VuLp
baaizE+
+NpSLDHWXAAAd4MDAESCjTOsJJ0VjgYXGrISAAgJACAQUooxxhhzzjnnpFKMOeac
cw5CCKFUijHGnHMOQgghlIwx5pxzEEIIIYRSSsaccxBCCCGEkFLqnHMQQgghhBBKK
Z1zDkIIIYQQQimlgxBCCCGEEEoopaQUQgghhBBCCKmklEIIIYRSQighlZRSCCGEEEI
pJaSUUgohhFJCCKGElFJKKYUQQgillJJSSimlEkoJJYQSUikppRRKCCGUUkpKKaVU
SgmhhBJKKSWllFJKIYQQSikFAAAcOAAABBhBJxlVFmGjCRcegEJDVgIAZAAAkKKU
UiktRYIipRikGEtGFXNQWoqocgxSzalSziDmJJaIMYSUk1Qy5hRCDELqHHVMKQYtlRh
Cxhik2HJLoXMOAAAAQQCAgJAAAAMEBTMAwOAA4XMQdAIERxsAgCBEZohEw0Jw
eFAJEBFTAUBigkIuAFRYXKRdXECXAS7o4q4DIQQhCEEsDqCABByccMMTb3jCDU7
QKSp1IAAAAAAADADwAACQXAAREdHMYWRobHB0eHyAhIiMkAgAAAAAABcAfAAA
JCVAREQ0cxgZGhscHR4fICEiIyQBAIAAAgAAAAAggAAEBAQAAAAAAAIAAAAEBB9
DtnUBAAAAAAAEPueBAKOFggAAgACjzoEAA4BwBwCdASqwAJAAAEcIhYWIhYSIAg
IABhwJ7kPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99YAD+/
6tQgKOFggADgAqjhYIAD4AOo4WCACSADqOZgQArADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggA6gA6jhYIAT4AOo5mBAFMAMQIAARAQABgAGFgv9AAIgEOY
BgAAo4WCAGSADqOFggB6gA6jmYEAewAxAgABEBAAGAAYWC/
0AAiAQ5gGAACjhYIAj4AOo5mBAKMAMQIAARAQABgAGFgv9AAIgEOYBgAAo4WCA
KSADqOFggC6gA6jmYEAywAxAgABEBAAGAAYWC/
0AAiAQ5gGAACjhYIAz4AOo4WCAOSADqOZgQDzADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggD6gA6jhYIBD4AOo5iBARsAEQIAARAQFGAAYWC/
0AAiAQ5gGACjhYIBJIAOo4WCATqADqOZgQFDADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggFPgA6jhYIBZIAOo5mBAWsAMQIAARAQABgAGFgv9AAIgEOY
BgAAo4WCAXqADqOFggGPgA6jmYEBkwAxAgABEBAAGAAYWC/
0AAiAQ5gGAACjhYIBpIAOo4WCAbqADqOZgQG7ADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggHPgA6jmYEB4wAxAgABEBAAGAAYWC/
0AAiAQ5gGAACjhYIB5IAOo4WCAfqADqOZgQILADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggIPgA6jhYICJIAOo5mBAjMAMQIAARAQABgAGFgv9AAIgEOYB
gAAo4WCAjqADqOFggJPgA6jmYECWwAxAgABEBAAGAAYWC/
0AAiAQ5gGAACjhYICZIAOo4WCAnqADqOZgQKDADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggKPgA6jhYICpIAOo5mBAqsAMQIAARAQABgAGFgv9AAIgEOY
BgAAo4WCArqADqOFggLPgA6jmIEC0wARAgABEBAUYABhYL/
QACIBDmAYAKOFggLkgA6jhYIC+oAOo5mBAvsAMQIAARAQABgAGFgv9AAIgEOYBg
AAo4WCAw+ADqOZgQMjADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggMkgA6jhYIDOoAOo5mBA0sAMQIAARAQABgAGFgv9AAIgEOY
BgAAo4WCA0+ADqOFggNkgA6jmYEDcwAxAgABEBAAGAAYWC/
0AAiAQ5gGAACjhYIDeoAOo4WCA4+ADqOZgQObADECAAEQEAAYABhYL/
QACIBDmAYAAKOFggOkgA6jhYIDuoAOo5mBA8MAMQIAARAQABgAGFgv9AAIgEOY
BgAAo4WCA8+ADqOFggPkgA6jhYID+oAOo4WCBA+ADhxTu2sBAAAAAAAAEbuPs4
EDt4r3gQHxghEr8IEK"),
this._addSourceToVideo(this.noSleepVideo, "mp4",
"data:video/mp4;base64,AAAAHGZ0eXBNNFYgAAACAGlzb21pc28yYXZjMQAAAAhm
cmVlAAAGF21kYXTeBAAAbGliZmFhYyAxLjI4AABCAJMgBDIARwAAArEGBf//
rdxF6b3m2Ui3lizYINkj7u94MjY0IC0gY29yZSAxNDIgcjIgOTU2YzhkOCAtIEguMjY0L01
QRUctNCBBVkMgY29kZWMgLSBDb3B5bGVmdCAyMDAzLTIwMTQgLSBodHRwOi8v
d3d3LnZpZGVvbGFuLm9yZy94MjY0Lmh0bWwgLSBvcHRpb25zOiBjYWJhYz0wIHJlZj0
zIGRlYmxvY2s9MTowOjAgYW5hbHlzZT0weDE6MHgxMTEgbWU9aGV4IHN1Ym1lPTc
gcHN5PTEgcHN5X3JkPTEuMDA6MC4wMCBtaXhlZF9yZWY9MSBtZV9yYW5nZT0xNi
BjaHJvbWFfbWU9MSB0cmVsbGlzPTEgOHg4ZGN0PTAgY3FtPTAgZGVhZHpvbmU9M
jEsMTEgZmFzdF9wc2tpcD0xIGNocm9tYV9xcF9vZmZzZXQ9LTIgdGhyZWFkcz02IGxv
b2thaGVhZF90aHJlYWRzPTEgc2xpY2VkX3RocmVhZHM9MCBucj0wIGRlY2ltYXRlPT
EgaW50ZXJsYWNlZD0wIGJsdXJheV9jb21wYXQ9MCBjb25zdHJhaW5lZF9pbnRyYT0
wIGJmcmFtZXM9MCB3ZWlnaHRwPTAga2V5aW50PTI1MCBrZXlpbnRfbWluPTI1IHNjZ
W5lY3V0PTQwIGludHJhX3JlZnJlc2g9MCByY19sb29rYWhlYWQ9NDAgcmM9Y3JmIG
1idHJlZT0xIGNyZj0yMy4wIHFjb21wPTAuNjAgcXBtaW49MCBxcG1heD02OSBxcHN0Z
XA9NCB2YnZfbWF4cmF0ZT03NjggdmJ2X2J1ZnNpemU9MzAwMCBjcmZfbWF4PTAu
MCBuYWxfaHJkPW5vbmUgZmlsbGVyPTAgaXBfcmF0aW89MS40MCBhcT0xOjEuMD
AAgAAAAFZliIQL8mKAAKvMnJycnJycnJycnXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXiEASZACGQAjgCEASZACGQAjgAAAAAdBmjgX4GSAIQBJkAIZACOAAAAAB0GaV
AX4GSAhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZpgL8DJIQBJkAIZACOAIQBJkAIZ
ACOAAAAABkGagC/
AySEASZACGQAjgAAAAAZBmqAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZrA
L8DJIQBJkAIZACOAAAAABkGa4C/
AySEASZACGQAjgCEASZACGQAjgAAAAAZBmwAvwMkhAEmQAhkAI4AAAAAGQZs
gL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGbQC/
AySEASZACGQAjgCEASZACGQAjgAAAAAZBm2AvwMkhAEmQAhkAI4AAAAAGQZu
AL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGboC/
AySEASZACGQAjgAAAAAZBm8AvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZvg
L8DJIQBJkAIZACOAAAAABkGaAC/
AySEASZACGQAjgCEASZACGQAjgAAAAAZBmiAvwMkhAEmQAhkAI4AhAEmQAhkAI
4AAAAAGQZpAL8DJIQBJkAIZACOAAAAABkGaYC/
AySEASZACGQAjgCEASZACGQAjgAAAAAZBmoAvwMkhAEmQAhkAI4AAAAAGQZq
gL8DJIQBJkAIZACOAIQBJkAIZACOAAAAABkGawC/
AySEASZACGQAjgAAAAAZBmuAvwMkhAEmQAhkAI4AhAEmQAhkAI4AAAAAGQZsA
L8DJIQBJkAIZACOAAAAABkGbIC/
AySEASZACGQAjgCEASZACGQAjgAAAAAZBm0AvwMkhAEmQAhkAI4AhAEmQAhk
AI4AAAAAGQZtgL8DJIQBJkAIZACOAAAAABkGbgCvAySEASZACGQAjgCEASZACG
QAjgAAAAAZBm6AnwMkhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhkAI4AhAEmQAhk
AI4AAAAhubW9vdgAAAGxtdmhkAAAAAAAAAAAAAAAAAAAD6AAABDcAAQAAAQA
AAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAwAAAzB0cmFrAAAAXHRr
aGQAAAADAAAAAAAAAAAAAAABAAAAAAAAA+kAAAAAAAAAAAAAAAAAAAAAAA
EAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAALAAAACQAAAA
AAAkZWR0cwAAABxlbHN0AAAAAAAAAAEAAAPpAAAAAAABAAAAAAKobWRpYQA
AACBtZGhkAAAAAAAAAAAAAAAAAAB1MAAAdU5VxAAAAAAALWhkbHIAAAAAAAA
AAHZpZGUAAAAAAAAAAAAAAABWaWRlb0hhbmRsZXIAAAACU21pbmYAAAAUdm1
oZAAAAAEAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1c
mwgAAAAAQAAAhNzdGJsAAAAr3N0c2QAAAAAAAAAAQAAAJ9hdmMxAAAAAAAAA
AEAAAAAAAAAAAAAAAAAAAAAALAAkABIAAAASAAAAAAAAAABAAAAAAAAAAAA
AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAALWF2Y0MBQsAN/
+EAFWdCwA3ZAsTsBEAAAPpAADqYA8UKkgEABWjLg8sgAAAAHHV1aWRraEDyXy
RPxbo5pRvPAyPzAAAAAAAAABhzdHRzAAAAAAAAAAEAAAAeAAAD6QAAABRzdHN
zAAAAAAAAAAEAAAABAAAAHHN0c2MAAAAAAAAAAQAAAAEAAAABAAAAAQAAAI
xzdHN6AAAAAAAAAAAAAAAeAAADDwAAAAsAAAALAAAACgAAAAoAAAAKAAAAC
gAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAK
AAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAoAAAAKAAAACgAAAAo
AAAAKAAAAiHN0Y28AAAAAAAAAHgAAAEYAAANnAAADewAAA5gAAAO0AAADxwA
AA+MAAAP2AAAEEgAABCUAAARBAAAEXQAABHAAAASMAAAEnwAABLsAAATOA
AAE6gAABQYAAAUZAAAFNQAABUgAAAVkAAAFdwAABZMAAAWmAAAFwgAABd4
AAAXxAAAGDQAABGh0cmFrAAAAXHRraGQAAAADAAAAAAAAAAAAAAACAAAAAA
AABDcAAAAAAAAAAAAAAAEBAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAA
AAAAAAAAAABAAAAAAAAAAAAAAAAAAAAkZWR0cwAAABxlbHN0AAAAAAAAAAE
AAAQkAAADcAABAAAAAAPgbWRpYQAAACBtZGhkAAAAAAAAAAAAAAAAAAC7gA
AAykBVxAAAAAAALWhkbHIAAAAAAAAAAHNvdW4AAAAAAAAAAAAAAABTb3VuZEh
hbmRsZXIAAAADi21pbmYAAAAQc21oZAAAAAAAAAAAAAAAJGRpbmYAAAAcZHJlZ
gAAAAAAAAABAAAADHVybCAAAAABAAADT3N0YmwAAABnc3RzZAAAAAAAAAAB
AAAAV21wNGEAAAAAAAAAAQAAAAAAAAAAAAIAEAAAAAC7gAAAAAAAM2VzZHM
AAAAAA4CAgCIAAgAEgICAFEAVBbjYAAu4AAAADcoFgICAAhGQBoCAgAECAAAAIH
N0dHMAAAAAAAAAAgAAADIAAAQAAAAAAQAAAkAAAAFUc3RzYwAAAAAAAAAbA
AAAAQAAAAEAAAABAAAAAgAAAAIAAAABAAAAAwAAAAEAAAABAAAABAAAAAIA
AAABAAAABgAAAAEAAAABAAAABwAAAAIAAAABAAAACAAAAAEAAAABAAAACQ
AAAAIAAAABAAAACgAAAAEAAAABAAAACwAAAAIAAAABAAAADQAAAAEAAAABA
AAADgAAAAIAAAABAAAADwAAAAEAAAABAAAAEAAAAAIAAAABAAAAEQAAAAEA
AAABAAAAEgAAAAIAAAABAAAAFAAAAAEAAAABAAAAFQAAAAIAAAABAAAAFgAA
AAEAAAABAAAAFwAAAAIAAAABAAAAGAAAAAEAAAABAAAAGQAAAAIAAAABAAA
AGgAAAAEAAAABAAAAGwAAAAIAAAABAAAAHQAAAAEAAAABAAAAHgAAAAIAAA
ABAAAAHwAAAAQAAAABAAAA4HN0c3oAAAAAAAAAAAAAADMAAAAaAAAACQAA
AAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAA
ACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAA
AJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAA
AkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAACQAAAAkAAAAJAAAA
CQAAAAkAAAAJAAAACQAAAAkAAACMc3RjbwAAAAAAAAAfAAAALAAAA1UAAANy
AAADhgAAA6IAAAO+AAAD0QAAA+0AAAQAAAAEHAAABC8AAARLAAAEZwAABHo
AAASWAAAEqQAABMUAAATYAAAE9AAABRAAAAUjAAAFPwAABVIAAAVuAAAFgQ
AABZ0AAAWwAAAFzAAABegAAAX7AAAGFwAAAGJ1ZHRhAAAAWm1ldGEAAAAAA
AAAIWhkbHIAAAAAAAAAAG1kaXJhcHBsAAAAAAAAAAAAAAAALWlsc3QAAAAlqXRv
bwAAAB1kYXRhAAAAAQAAAABMYXZmNTUuMzMuMTAw"),
this.noSleepVideo.addEventListener("loadedmetadata", ( () => {
EC("[WakeLockManager: start()] video loadedmetadata",
this.noSleepVideo),
this.noSleepVideo && (this.noSleepVideo.duration <= 1 ?
this.noSleepVideo.setAttribute("loop", "") :
this.noSleepVideo.addEventListener("timeupdate", ( () => {
this.noSleepVideo && this.noSleepVideo.currentTime
> .5 && (this.noSleepVideo.currentTime = Math.random())
}
)))
}
)))
}
_addSourceToVideo(e, t, n) {
const r = document.createElement("source");
r.src = n,
r.type = `video/${t}`,
e.appendChild(r)
}
isEnabled() {
return this.enabled
}
setDebug(e) {
EC("[WakeLockManager: setDebug()] activate debug mode"),
this.debug = e
}
enable() {
return AS(this, void 0, void 0, (function*() {
this.enabled && this.disable("from_enable");
const e = bR()
, t = yR();
if (EC(`[WakeLockManager: enable()] hasWakelock=${e}
isOldIos=${t}`, this.noSleepVideo),
this.start(),
bR())
try {
const e = yield navigator.wakeLock.request("screen");
this._wakeLock = e,
this.enabled = !0
} catch (e) {
return EC("[WakeLockManager: enable()] failed to
enable wake lock", e),
this.enabled = !1,
!1
}
else if (yR())
return this.disable("from_enable_old_ios"),
this.noSleepTimer = window.setInterval(( () => {
document.hidden || (window.location.href =
window.location.href.split("#")[0],
window.setTimeout(window.stop, 0))
}
), 15e3),
this.enabled = !0,
!0;
return !!this.noSleepVideo &&
(this.noSleepVideo.play().then(( () => {
EC("[WakeLockManager: enable()] video started playing
successfully")
}
)).catch((e => {
console.warn("[WakeLockManager: enable()] video failed to
play", e)
}
)),
this.enabled = !0,
!0)
}
))
}
disable(e) {
if (this.enabled) {
if (EC(`[WakeLockManager: disable()] context=${e}`),
bR())
this._wakeLock && (EC("[WakeLockManager: disable()]
release wake lock"),
this._wakeLock.release()),
this._wakeLock = void 0;
else if (yR())
this.noSleepTimer && (console.warn("\n NoSleep
now disabled for older iOS devices.\n "),
window.clearInterval(this.noSleepTimer),
this.noSleepTimer = void 0);
else
try {
if (!this.noSleepVideo)
return void EC("[WakeLockManager: disable()]
noSleepVideo is undefined");
EC("[WakeLockManager: disable()] pause
noSleepVideo"),
this.noSleepVideo.firstChild &&
(this.noSleepVideo.removeChild(this.noSleepVideo.firstChild),
this.noSleepVideo.load()),
this.noSleepVideo.pause(),
this.noSleepVideo.src = "",
this.noSleepVideo.remove()
} catch (e) {
console.log(e)
}
this.enabled = !1
}
}
}
const wR = 2e3
, _R = 4e4;
class ER {
constructor(e) {
let {useDeepLink: t, preferredOpenLink: n, wakeLockStatus:
r=gR.UntilResponse, debug: i=!1} = e;
this.state = {
wakeLock: new AR,
wakeLockStatus: gR.UntilResponse,
wakeLockTimer: void 0,
wakeLockFeatureActive: !1,
platformType: void 0,
useDeeplink: !1,
preferredOpenLink: void 0,
debug: !1
},
this.state.platformType = this.getPlatformType(),
this.state.useDeeplink = t,
this.state.preferredOpenLink = n,
this.state.wakeLockStatus = r,
this.state.debug = i,
this.state.wakeLock.setDebug(i)
}
enableWakeLock() {
return function(e) {
const {state: t} = e;
if (t.wakeLockStatus === gR.Disabled)
return void EC("[PlatfformManager: enableWakeLock()]
WakeLock is disabled");
t.wakeLock.enable().catch((e => {
console.error("[PlatfformManager: enableWakeLock()]
WakeLock is not supported", e)
}
));
const n = t.wakeLockStatus === gR.Temporary ? wR : _R;
t.wakeLockTimer = setTimeout(( () => {
e.disableWakeLock()
}
), n),
t.wakeLockFeatureActive || t.wakeLockStatus !==
gR.UntilResponse || (t.wakeLockFeatureActive = !0,
window.addEventListener("focus", ( () => {
e.disableWakeLock()
}
)))
}(this)
}
disableWakeLock() {
return function(e) {
const {state: t} = e;
t.wakeLockStatus !== gR.Disabled && (t.wakeLockTimer &&
clearTimeout(t.wakeLockTimer),
t.wakeLock.disable("disableWakeLock"))
}(this)
}
openDeeplink(e, t, n) {
return function(e, t, n, r) {
const {state: i} = e;
EC(`[PlatfformManager: openDeeplink()] universalLink --\x3e $
{t}`),
EC(`[PlatfformManager: openDeeplink()] deepLink --\x3e ${n}`),
e.isBrowser() && e.enableWakeLock();
try {
if (i.preferredOpenLink)
return void i.preferredOpenLink(i.useDeeplink ? n : t, r);
if (EC(`[PlatfformManager: openDeeplink()] open link now
useDeepLink=${i.useDeeplink} link=${i.useDeeplink ? n : t}`),
i.useDeeplink)
"undefined" != typeof window && (window.location.href
= n);
else if ("undefined" != typeof document) {
const e = document.createElement("a");
e.href = t,
e.target = "_self",
e.rel = "noreferrer noopener",
e.click()
}
} catch (e) {
console.log("[PlatfformManager: openDeeplink()] can't open
link", e)
}
}(this, e, t, n)
}
isReactNative() {
var e;
return this.isNotBrowser() && "undefined" != typeof window && (null
=== window || void 0 === window ? void 0 : window.navigator) && "ReactNative" ===
(null === (e = window.navigator) || void 0 === e ? void 0 : e.product)
}
isMetaMaskInstalled() {
return function() {
const e = Zx.getProvider() || (null === window || void 0 ===
window ? void 0 : window.ethereum);
return EC(`[PlatfformManager: isMetaMaskInstalled()]
isMetaMask=${null == e ? void 0 : e.isMetaMask} isConnected=${null == e ? void 0 :
e.isConnected()}`),
(null == e ? void 0 : e.isMetaMask) && (null == e ? void 0 :
e.isConnected())
}()
}
isDesktopWeb() {
return this.isBrowser() && !this.isMobileWeb()
}
isMobile() {
var e, t;
const n = vR.parse(window.navigator.userAgent);
return "mobile" === (null === (e = null == n ? void 0 : n.platform) ||
void 0 === e ? void 0 : e.type) || "tablet" === (null === (t = null == n ? void 0 : n.platform)
|| void 0 === t ? void 0 : t.type)
}
isSecure() {
return this.isReactNative() || this.isMobileWeb()
}
isMetaMaskMobileWebView() {
return "undefined" != typeof window &&
Boolean(window.ReactNativeWebView) &&
Boolean(navigator.userAgent.endsWith("MetaMaskMobile"))
}
isMobileWeb() {
return this.state.platformType === e.PlatformType.MobileWeb
}
isNotBrowser() {
var e;
return "undefined" == typeof window || !(null === window || void 0
=== window ? void 0 : window.navigator) || "undefined" != typeof n.g && "ReactNative"
=== (null === (e = null === n.g || void 0 === n.g ? void 0 : n.g.navigator) || void 0 ===
e ? void 0 : e.product) || "ReactNative" === (null === navigator || void 0 === navigator ?
void 0 : navigator.product)
}
isNodeJS() {
return this.isNotBrowser() && !this.isReactNative()
}
isBrowser() {
return !this.isNotBrowser()
}
isUseDeepLink() {
return this.state.useDeeplink
}
getPlatformType() {
return function(t) {
const {state: n} = t;
return n.platformType ? n.platformType : t.isReactNative() ?
e.PlatformType.ReactNative : t.isNotBrowser() ? e.PlatformType.NonBrowser :
t.isMetaMaskMobileWebView() ? e.PlatformType.MetaMaskMobileWebview :
t.isMobile() ? e.PlatformType.MobileWeb : e.PlatformType.DesktopWeb
}(this)
}
}
function SR(e, t, n, r) {
return new (n || (n = Promise))((function(i, o) {
function a(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function s(e) {
try {
u(r.throw(e))
} catch (e) {
o(e)
}
}
function u(e) {
e.done ? i(e.value) : function(e) {
return e instanceof n ? e : new n((function(t) {
t(e)
}
))
}(e.value).then(a, s)
}
u((r = r.apply(e, t || [])).next())
}
))
}
function kR(e, t) {
var n, r, i, o, a = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: s(0),
throw: s(1),
return: s(2)
},
"function" == typeof Symbol && (o[Symbol.iterator] = function() {
return this
}
),
o;
function s(o) {
return function(s) {
return function(o) {
if (n)
throw new TypeError("Generator is already executing.");
for (; a; )
try {
if (n = 1,
r && (i = 2 & o[0] ? r.return : o[0] ? r.throw || ((i =
r.return) && i.call(r),
0) : r.next) && !(i = i.call(r, o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0], i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return a.label++,
{
value: o[1],
done: !1
};
case 5:
a.label++,
r = o[1],
o = [0];
continue;
case 7:
o = a.ops.pop(),
a.trys.pop();
continue;
default:
if (!((i = (i = a.trys).length > 0 && i[i.length - 1]) ||
6 !== o[0] && 2 !== o[0])) {
a = 0;
continue
}
if (3 === o[0] && (!i || o[1] > i[0] && o[1] < i[3])) {
a.label = o[1];
break
}
if (6 === o[0] && a.label < i[1]) {
a.label = i[1],
i = o;
break
}
if (i && a.label < i[2]) {
a.label = i[2],
a.ops.push(o);
break
}
i[2] && a.ops.pop(),
a.trys.pop();
continue
}
o = t.call(e, a)
} catch (e) {
o = [6, e],
r=0
} finally {
n=i=0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, s])
}
}
}
var MR = "INSTALLED"
, CR = "NOT_INSTALLED"
, xR = "REGISTERED"
, RR = "REGISTERING"
, TR = "RELOADING"
, IR = {
CHROME:
"https://chrome.google.com/webstore/detail/metamask/nkbihfbeogaeaoehlefnkodbefgpg
knn",
FIREFOX: "https://addons.mozilla.org/firefox/addon/ether-metamask/",
DEFAULT: "https://metamask.io"
}
, PR = "REGISTRATION_IN_PROGRESS"
, LR = "FORWARDER_ID"
, OR = function() {
function e(t) {
var n = void 0 === t ? {} : t
, r = n.forwarderOrigin
, i = void 0 === r ? "https://fwd.metamask.io" : r
, o = n.forwarderMode
, a = void 0 === o ? e.FORWARDER_MODE.INJECT : o;
this.forwarderOrigin = i,
this.forwarderMode = a,
this.state = e.isMetaMaskInstalled() ? MR : CR;
var s = e._detectBrowser();
this.downloadUrl = s ? IR[s] : IR.DEFAULT,
this._onMessage = this._onMessage.bind(this),
this._onMessageFromForwarder =
this._onMessageFromForwarder.bind(this),
this._openForwarder = this._openForwarder.bind(this),
this._openDownloadPage = this._openDownloadPage.bind(this),
this.startOnboarding = this.startOnboarding.bind(this),
this.stopOnboarding = this.stopOnboarding.bind(this),
window.addEventListener("message", this._onMessage),
a === e.FORWARDER_MODE.INJECT && "true" ===
sessionStorage.getItem(PR) && e._injectForwarder(this.forwarderOrigin)
}
return e.prototype._onMessage = function(e) {
if (e.origin === this.forwarderOrigin)
return "metamask:reload" === e.data.type ?
this._onMessageFromForwarder(e) : void console.debug("Unknown message from '" +
e.origin + "' with data " + JSON.stringify(e.data))
}
,
e.prototype._onMessageUnknownStateError = function(e) {
throw new Error("Unknown state: '" + e + "'")
}
,
e.prototype._onMessageFromForwarder = function(t) {
return SR(this, void 0, void 0, (function() {
return kR(this, (function(n) {
switch (n.label) {
case 0:
switch (this.state) {
case TR:
return [3, 1];
case CR:
return [3, 2];
case MR:
return [3, 3];
case RR:
return [3, 5];
case xR:
return [3, 6]
}
return [3, 7];
case 1:
return console.debug("Ignoring message while
reloading"),
[3, 8];
case 2:
return console.debug("Reloading now to register with
MetaMask"),
this.state = TR,
location.reload(),
[3, 8];
case 3:
return console.debug("Registering with MetaMask"),
this.state = RR,
[4, e._register()];
case 4:
return n.sent(),
this.state = xR,
t.source.postMessage({
type: "metamask:registrationCompleted"
}, t.origin),
this.stopOnboarding(),
[3, 8];
case 5:
return console.debug("Already registering - ignoring
reload message"),
[3, 8];
case 6:
return console.debug("Already registered - ignoring
reload message"),
[3, 8];
case 7:
this._onMessageUnknownStateError(this.state),
n.label = 8;
case 8:
return [2]
}
}
))
}
))
}
,
e.prototype.startOnboarding = function() {
sessionStorage.setItem(PR, "true"),
this._openDownloadPage(),
this._openForwarder()
}
,
e.prototype.stopOnboarding = function() {
"true" === sessionStorage.getItem(PR) && (this.forwarderMode
=== e.FORWARDER_MODE.INJECT && (console.debug("Removing forwarder"),
e._removeForwarder()),
sessionStorage.setItem(PR, "false"))
}
,
e.prototype._openForwarder = function() {
this.forwarderMode === e.FORWARDER_MODE.OPEN_TAB ?
window.open(this.forwarderOrigin, "_blank") : e._injectForwarder(this.forwarderOrigin)
}
,
e.prototype._openDownloadPage = function() {
window.open(this.downloadUrl, "_blank")
}
,
e.isMetaMaskInstalled = function() {
return Boolean(window.ethereum &&
window.ethereum.isMetaMask)
}
,
e._register = function() {
return window.ethereum.request({
method: "wallet_registerOnboarding"
})
}
,
e._injectForwarder = function(e) {
var t = document.body
, n = document.createElement("iframe");
n.setAttribute("height", "0"),
n.setAttribute("width", "0"),
n.setAttribute("style", "display: none;"),
n.setAttribute("src", e),
n.setAttribute("id", LR),
t.insertBefore(n, t.children[0])
}
,
e._removeForwarder = function() {
var e;
null === (e = document.getElementById(LR)) || void 0 === e ||
e.remove()
}
,
e._detectBrowser = function() {
var e = vR.parse(window.navigator.userAgent);
return "Firefox" === e.browser.name ? "FIREFOX" : ["Chrome",
"Chromium"].includes(e.browser.name || "") ? "CHROME" : null
}
,
e.FORWARDER_MODE = {
INJECT: "INJECT",
OPEN_TAB: "OPEN_TAB"
},
e
}();
function NR(e, t) {
let {wait: n=!1} = t;
return AS(this, void 0, void 0, (function*() {
return EC(`[MetamaskInstaller: startInstaller()] wait=${n}`),
n && (yield nR(1e3)),
yield e.checkInstallation()
}
))
}
class DR {
constructor(e) {
let {remote: t, preferDesktop: n, platformManager: r, debug: i=!1} =
e;
this.state = {
isInstalling: !1,
hasInstalled: !1,
resendRequest: null,
preferDesktop: !1,
platformManager: null,
remote: null,
debug: !1
},
this.state.remote = t,
this.state.preferDesktop = n,
this.state.platformManager = r,
this.state.debug = i
}
startDesktopOnboarding() {
return function() {
return AS(this, void 0, void 0, (function*() {
EC("[MetamaskInstaller: startDesktopOnboarding() starting
desktop onboarding"),
Zx.destroy(),
delete window.ethereum,
(new OR).startOnboarding()
}
))
}()
}
redirectToProperInstall() {
return AS(this, void 0, void 0, (function*() {
return function(t) {
var n, r;
return AS(this, void 0, void 0, (function*() {
const {state: i} = t
, o = null === (n = i.platformManager) || void 0 ===
n ? void 0 : n.getPlatformType();
if (EC(`[MetamaskInstaller: redirectToProperInstall()]
platform=${o}`),
o === e.PlatformType.MetaMaskMobileWebview)
return !1;
i.isInstalling = !0;
try {
yield null === (r = i.remote) || void 0 === r ? void 0 :
r.startConnection(),
i.isInstalling = !1,
i.hasInstalled = !0
} catch (e) {
throw i.isInstalling = !1,
e
}
return !0
}
))
}(this)
}
))
}
checkInstallation() {
return AS(this, void 0, void 0, (function*() {
return function(e) {
var t;
return AS(this, void 0, void 0, (function*() {
const {state: n} = e
, r = null === (t = n.platformManager) || void 0 === t ?
void 0 : t.isMetaMaskInstalled();
return EC(`[MetamaskInstaller: checkInstallation()]
isInstalled=${r}`),
!!r || (yield e.redirectToProperInstall())
}
))
}(this)
}
))
}
start(e) {
let {wait: t=!1} = e;
return AS(this, void 0, void 0, (function*() {
return yield NR(this, {
wait: t
})
}
))
}
}
var BR, jR = {
exports: {}
}, zR = {
exports: {}
}, FR = {};
function UR() {
if (BR)
return FR;
BR = 1;
var e = Symbol.for("react.element")
, t = Symbol.for("react.portal")
, n = Symbol.for("react.fragment")
, r = Symbol.for("react.strict_mode")
, i = Symbol.for("react.profiler")
, o = Symbol.for("react.provider")
, a = Symbol.for("react.context")
, s = Symbol.for("react.forward_ref")
, u = Symbol.for("react.suspense")
, l = Symbol.for("react.memo")
, c = Symbol.for("react.lazy")
, d = Symbol.iterator
,f={
isMounted: function() {
return !1
},
enqueueForceUpdate: function() {},
enqueueReplaceState: function() {},
enqueueSetState: function() {}
}
, h = Object.assign
, p = {};
function m(e, t, n) {
this.props = e,
this.context = t,
this.refs = p,
this.updater = n || f
}
function g() {}
function v(e, t, n) {
this.props = e,
this.context = t,
this.refs = p,
this.updater = n || f
}
m.prototype.isReactComponent = {},
m.prototype.setState = function(e, t) {
if ("object" != typeof e && "function" != typeof e && null != e)
throw Error("setState(...): takes an object of state variables to
update or a function which returns an object of state variables.");
this.updater.enqueueSetState(this, e, t, "setState")
}
,
m.prototype.forceUpdate = function(e) {
this.updater.enqueueForceUpdate(this, e, "forceUpdate")
}
,
g.prototype = m.prototype;
var b = v.prototype = new g;
b.constructor = v,
h(b, m.prototype),
b.isPureReactComponent = !0;
var y = Array.isArray
, A = Object.prototype.hasOwnProperty
,w={
current: null
}
,_={
key: !0,
ref: !0,
__self: !0,
__source: !0
};
function E(t, n, r) {
var i, o = {}, a = null, s = null;
if (null != n)
for (i in void 0 !== n.ref && (s = n.ref),
void 0 !== n.key && (a = "" + n.key),
n)
A.call(n, i) && !_.hasOwnProperty(i) && (o[i] = n[i]);
var u = arguments.length - 2;
if (1 === u)
o.children = r;
else if (1 < u) {
for (var l = Array(u), c = 0; c < u; c++)
l[c] = arguments[c + 2];
o.children = l
}
if (t && t.defaultProps)
for (i in u = t.defaultProps)
void 0 === o[i] && (o[i] = u[i]);
return {
$$typeof: e,
type: t,
key: a,
ref: s,
props: o,
_owner: w.current
}
}
function S(t) {
return "object" == typeof t && null !== t && t.$$typeof === e
}
var k = /\/+/g;
function M(e, t) {
return "object" == typeof e && null !== e && null != e.key ?
function(e) {
var t = {
"=": "=0",
":": "=2"
};
return "$" + e.replace(/[=:]/g, (function(e) {
return t[e]
}
))
}("" + e.key) : t.toString(36)
}
function C(n, r, i, o, a) {
var s = typeof n;
"undefined" !== s && "boolean" !== s || (n = null);
var u = !1;
if (null === n)
u = !0;
else
switch (s) {
case "string":
case "number":
u = !0;
break;
case "object":
switch (n.$$typeof) {
case e:
case t:
u = !0
}
}
if (u)
return a = a(u = n),
n = "" === o ? "." + M(u, 0) : o,
y(a) ? (i = "",
null != n && (i = n.replace(k, "$&/") + "/"),
C(a, r, i, "", (function(e) {
return e
}
))) : null != a && (S(a) && (a = function(t, n) {
return {
$$typeof: e,
type: t.type,
key: n,
ref: t.ref,
props: t.props,
_owner: t._owner
}
}(a, i + (!a.key || u && u.key === a.key ? "" : ("" +
a.key).replace(k, "$&/") + "/") + n)),
r.push(a)),
1;
if (u = 0,
o = "" === o ? "." : o + ":",
y(n))
for (var l = 0; l < n.length; l++) {
var c = o + M(s = n[l], l);
u += C(s, r, i, c, a)
}
else if (c = function(e) {
return null === e || "object" != typeof e ? null : "function" ==
typeof (e = d && e[d] || e["@@iterator"]) ? e : null
}(n),
"function" == typeof c)
for (n = c.call(n),
l = 0; !(s = n.next()).done; )
u += C(s = s.value, r, i, c = o + M(s, l++), a);
else if ("object" === s)
throw r = String(n),
Error("Objects are not valid as a React child (found: " + ("[object
Object]" === r ? "object with keys {" + Object.keys(n).join(", ") + "}" : r) + "). If you meant
to render a collection of children, use an array instead.");
return u
}
function x(e, t, n) {
if (null == e)
return e;
var r = []
, i = 0;
return C(e, r, "", "", (function(e) {
return t.call(n, e, i++)
}
)),
r
}
function R(e) {
if (-1 === e._status) {
var t = e._result;
(t = t()).then((function(t) {
0 !== e._status && -1 !== e._status || (e._status = 1,
e._result = t)
}
), (function(t) {
0 !== e._status && -1 !== e._status || (e._status = 2,
e._result = t)
}
)),
-1 === e._status && (e._status = 0,
e._result = t)
}
if (1 === e._status)
return e._result.default;
throw e._result
}
var T = {
current: null
}
,I={
transition: null
}
,P={
ReactCurrentDispatcher: T,
ReactCurrentBatchConfig: I,
ReactCurrentOwner: w
};
return FR.Children = {
map: x,
forEach: function(e, t, n) {
x(e, (function() {
t.apply(this, arguments)
}
), n)
},
count: function(e) {
var t = 0;
return x(e, (function() {
t++
}
)),
t
},
toArray: function(e) {
return x(e, (function(e) {
return e
}
)) || []
},
only: function(e) {
if (!S(e))
throw Error("React.Children.only expected to receive a
single React element child.");
return e
}
},
FR.Component = m,
FR.Fragment = n,
FR.Profiler = i,
FR.PureComponent = v,
FR.StrictMode = r,
FR.Suspense = u,
FR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = P,
FR.cloneElement = function(t, n, r) {
if (null == t)
throw Error("React.cloneElement(...): The argument must be a
React element, but you passed " + t + ".");
var i = h({}, t.props)
, o = t.key
, a = t.ref
, s = t._owner;
if (null != n) {
if (void 0 !== n.ref && (a = n.ref,
s = w.current),
void 0 !== n.key && (o = "" + n.key),
t.type && t.type.defaultProps)
var u = t.type.defaultProps;
for (l in n)
A.call(n, l) && !_.hasOwnProperty(l) && (i[l] = void 0 === n[l]
&& void 0 !== u ? u[l] : n[l])
}
var l = arguments.length - 2;
if (1 === l)
i.children = r;
else if (1 < l) {
u = Array(l);
for (var c = 0; c < l; c++)
u[c] = arguments[c + 2];
i.children = u
}
return {
$$typeof: e,
type: t.type,
key: o,
ref: a,
props: i,
_owner: s
}
}
,
FR.createContext = function(e) {
return (e = {
$$typeof: a,
_currentValue: e,
_currentValue2: e,
_threadCount: 0,
Provider: null,
Consumer: null,
_defaultValue: null,
_globalName: null
}).Provider = {
$$typeof: o,
_context: e
},
e.Consumer = e
}
,
FR.createElement = E,
FR.createFactory = function(e) {
var t = E.bind(null, e);
return t.type = e,
t
}
,
FR.createRef = function() {
return {
current: null
}
}
,
FR.forwardRef = function(e) {
return {
$$typeof: s,
render: e
}
}
,
FR.isValidElement = S,
FR.lazy = function(e) {
return {
$$typeof: c,
_payload: {
_status: -1,
_result: e
},
_init: R
}
}
,
FR.memo = function(e, t) {
return {
$$typeof: l,
type: e,
compare: void 0 === t ? null : t
}
}
,
FR.startTransition = function(e) {
var t = I.transition;
I.transition = {};
try {
e()
} finally {
I.transition = t
}
}
,
FR.unstable_act = function() {
throw Error("act(...) is not supported in production builds of React.")
}
,
FR.useCallback = function(e, t) {
return T.current.useCallback(e, t)
}
,
FR.useContext = function(e) {
return T.current.useContext(e)
}
,
FR.useDebugValue = function() {}
,
FR.useDeferredValue = function(e) {
return T.current.useDeferredValue(e)
}
,
FR.useEffect = function(e, t) {
return T.current.useEffect(e, t)
}
,
FR.useId = function() {
return T.current.useId()
}
,
FR.useImperativeHandle = function(e, t, n) {
return T.current.useImperativeHandle(e, t, n)
}
,
FR.useInsertionEffect = function(e, t) {
return T.current.useInsertionEffect(e, t)
}
,
FR.useLayoutEffect = function(e, t) {
return T.current.useLayoutEffect(e, t)
}
,
FR.useMemo = function(e, t) {
return T.current.useMemo(e, t)
}
,
FR.useReducer = function(e, t, n) {
return T.current.useReducer(e, t, n)
}
,
FR.useRef = function(e) {
return T.current.useRef(e)
}
,
FR.useState = function(e) {
return T.current.useState(e)
}
,
FR.useSyncExternalStore = function(e, t, n) {
return T.current.useSyncExternalStore(e, t, n)
}
,
FR.useTransition = function() {
return T.current.useTransition()
}
,
FR.version = "18.2.0",
FR
}
var KR, qR, HR = {
exports: {}
};
function VR() {
return KR || (KR = 1,
function(e, t) {
"production" !== je.env.NODE_ENV && function() {
"undefined" != typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);
var n = Symbol.for("react.element")
, r = Symbol.for("react.portal")
, i = Symbol.for("react.fragment")
, o = Symbol.for("react.strict_mode")
, a = Symbol.for("react.profiler")
, s = Symbol.for("react.provider")
, u = Symbol.for("react.context")
, l = Symbol.for("react.forward_ref")
, c = Symbol.for("react.suspense")
, d = Symbol.for("react.suspense_list")
, f = Symbol.for("react.memo")
, h = Symbol.for("react.lazy")
, p = Symbol.for("react.offscreen")
, m = Symbol.iterator
, g = "@@iterator";
function v(e) {
if (null === e || "object" != typeof e)
return null;
var t = m && e[m] || e[g];
return "function" == typeof t ? t : null
}
var b = {
current: null
}
,y={
transition: null
}
,A={
current: null,
isBatchingLegacy: !1,
didScheduleLegacyUpdate: !1
}
,w={
current: null
}
, _ = {}
, E = null;
function S(e) {
E=e
}
_.setExtraStackFrame = function(e) {
E=e
}
,
_.getCurrentStack = null,
_.getStackAddendum = function() {
var e = "";
E && (e += E);
var t = _.getCurrentStack;
return t && (e += t() || ""),
e
}
;
var k = !1
, M = !1
, C = !1
, x = !1
, R = !1
,T={
ReactCurrentDispatcher: b,
ReactCurrentBatchConfig: y,
ReactCurrentOwner: w
};
function I(e) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
r = 1; r < t; r++)
n[r - 1] = arguments[r];
L("warn", e, n)
}
function P(e) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
r = 1; r < t; r++)
n[r - 1] = arguments[r];
L("error", e, n)
}
function L(e, t, n) {
var r = T.ReactDebugCurrentFrame.getStackAddendum();
"" !== r && (t += "%s",
n = n.concat([r]));
var i = n.map((function(e) {
return String(e)
}
));
i.unshift("Warning: " + t),
Function.prototype.apply.call(console[e], console, i)
}
T.ReactDebugCurrentFrame = _,
T.ReactCurrentActQueue = A;
var O = {};
function N(e, t) {
var n = e.constructor
, r = n && (n.displayName || n.name) || "ReactClass"
, i = r + "." + t;
O[i] || (P("Can't call %s on a component that is not yet
mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign
to `this.state` directly or define a `state = {};` class property with the desired state in the
%s component.", t, r),
O[i] = !0)
}
var D = {
isMounted: function(e) {
return !1
},
enqueueForceUpdate: function(e, t, n) {
N(e, "forceUpdate")
},
enqueueReplaceState: function(e, t, n, r) {
N(e, "replaceState")
},
enqueueSetState: function(e, t, n, r) {
N(e, "setState")
}
}
, B = Object.assign
, j = {};
function z(e, t, n) {
this.props = e,
this.context = t,
this.refs = j,
this.updater = n || D
}
Object.freeze(j),
z.prototype.isReactComponent = {},
z.prototype.setState = function(e, t) {
if ("object" != typeof e && "function" != typeof e && null != e)
throw new Error("setState(...): takes an object of state
variables to update or a function which returns an object of state variables.");
this.updater.enqueueSetState(this, e, t, "setState")
}
,
z.prototype.forceUpdate = function(e) {
this.updater.enqueueForceUpdate(this, e, "forceUpdate")
}
;
var F = {
isMounted: ["isMounted", "Instead, make sure to clean up
subscriptions and pending requests in componentWillUnmount to prevent memory
leaks."],
replaceState: ["replaceState", "Refactor your code to use
setState instead (see https://github.com/facebook/react/issues/3236)."]
}
, U = function(e, t) {
Object.defineProperty(z.prototype, e, {
get: function() {
I("%s(...) is deprecated in plain JavaScript React
classes. %s", t[0], t[1])
}
})
};
for (var K in F)
F.hasOwnProperty(K) && U(K, F[K]);
function q() {}
function H(e, t, n) {
this.props = e,
this.context = t,
this.refs = j,
this.updater = n || D
}
q.prototype = z.prototype;
var V = H.prototype = new q;
V.constructor = H,
B(V, z.prototype),
V.isPureReactComponent = !0;
var W = Array.isArray;
function $(e) {
return W(e)
}
function Y(e) {
return "" + e
}
function Q(e) {
if (function(e) {
try {
return Y(e),
!1
} catch (e) {
return !0
}
}(e))
return P("The provided key is an unsupported type %s.
This value must be coerced to a string before before using it here.", function(e) {
return "function" == typeof Symbol &&
Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object"
}(e)),
Y(e)
}
function Z(e) {
return e.displayName || "Context"
}
function G(e) {
if (null == e)
return null;
if ("number" == typeof e.tag && P("Received an unexpected
object in getComponentNameFromType(). This is likely a bug in React. Please file an
issue."),
"function" == typeof e)
return e.displayName || e.name || null;
if ("string" == typeof e)
return e;
switch (e) {
case i:
return "Fragment";
case r:
return "Portal";
case a:
return "Profiler";
case o:
return "StrictMode";
case c:
return "Suspense";
case d:
return "SuspenseList"
}
if ("object" == typeof e)
switch (e.$$typeof) {
case u:
return Z(e) + ".Consumer";
case s:
return Z(e._context) + ".Provider";
case l:
return function(e, t, n) {
var r = e.displayName;
if (r)
return r;
var i = t.displayName || t.name || "";
return "" !== i ? n + "(" + i + ")" : n
}(e, e.render, "ForwardRef");
case f:
var t = e.displayName || null;
return null !== t ? t : G(e.type) || "Memo";
case h:
var n = e
, p = n._payload
, m = n._init;
try {
return G(m(p))
} catch (e) {
return null
}
}
return null
}
var X, J, ee, te = Object.prototype.hasOwnProperty, ne = {
key: !0,
ref: !0,
__self: !0,
__source: !0
};
function re(e) {
if (te.call(e, "ref")) {
var t = Object.getOwnPropertyDescriptor(e, "ref").get;
if (t && t.isReactWarning)
return !1
}
return void 0 !== e.ref
}
function ie(e) {
if (te.call(e, "key")) {
var t = Object.getOwnPropertyDescriptor(e, "key").get;
if (t && t.isReactWarning)
return !1
}
return void 0 !== e.key
}
ee = {};
var oe = function(e, t, r, i, o, a, s) {
var u = {
$$typeof: n,
type: e,
key: t,
ref: r,
props: s,
_owner: a,
_store: {}
};
return Object.defineProperty(u._store, "validated", {
configurable: !1,
enumerable: !1,
writable: !0,
value: !1
}),
Object.defineProperty(u, "_self", {
configurable: !1,
enumerable: !1,
writable: !1,
value: i
}),
Object.defineProperty(u, "_source", {
configurable: !1,
enumerable: !1,
writable: !1,
value: o
}),
Object.freeze && (Object.freeze(u.props),
Object.freeze(u)),
u
};
function ae(e, t, n) {
var r, i = {}, o = null, a = null, s = null, u = null;
if (null != t)
for (r in re(t) && (a = t.ref,
function(e) {
if ("string" == typeof e.ref && w.current && e.__self
&& w.current.stateNode !== e.__self) {
var t = G(w.current.type);
ee[t] || (P('Component "%s" contains the string
ref "%s". Support for string refs will be removed in a future major release. This case
cannot be automatically converted to an arrow function. We ask you to manually fix this
case by using useRef() or createRef() instead. Learn more about using refs safely here:
https://reactjs.org/link/strict-mode-string-ref', t, e.ref),
ee[t] = !0)
}
}(t)),
ie(t) && (Q(t.key),
o = "" + t.key),
s = void 0 === t.__self ? null : t.__self,
u = void 0 === t.__source ? null : t.__source,
t)
te.call(t, r) && !ne.hasOwnProperty(r) && (i[r] = t[r]);
var l = arguments.length - 2;
if (1 === l)
i.children = n;
else if (l > 1) {
for (var c = Array(l), d = 0; d < l; d++)
c[d] = arguments[d + 2];
Object.freeze && Object.freeze(c),
i.children = c
}
if (e && e.defaultProps) {
var f = e.defaultProps;
for (r in f)
void 0 === i[r] && (i[r] = f[r])
}
if (o || a) {
var h = "function" == typeof e ? e.displayName ||
e.name || "Unknown" : e;
o && function(e, t) {
var n = function() {
X || (X = !0,
P("%s: `key` is not a prop. Trying to access it
will result in `undefined` being returned. If you need to access the same value within the
child component, you should pass it as a different prop. (https://reactjs.org/link/special-
props)", t))
};
n.isReactWarning = !0,
Object.defineProperty(e, "key", {
get: n,
configurable: !0
})
}(i, h),
a && function(e, t) {
var n = function() {
J || (J = !0,
P("%s: `ref` is not a prop. Trying to access it will
result in `undefined` being returned. If you need to access the same value within the
child component, you should pass it as a different prop. (https://reactjs.org/link/special-
props)", t))
};
n.isReactWarning = !0,
Object.defineProperty(e, "ref", {
get: n,
configurable: !0
})
}(i, h)
}
return oe(e, o, a, s, u, w.current, i)
}
function se(e, t, n) {
if (null == e)
throw new Error("React.cloneElement(...): The
argument must be a React element, but you passed " + e + ".");
var r, i, o = B({}, e.props), a = e.key, s = e.ref, u = e._self, l =
e._source, c = e._owner;
if (null != t)
for (r in re(t) && (s = t.ref,
c = w.current),
ie(t) && (Q(t.key),
a = "" + t.key),
e.type && e.type.defaultProps && (i =
e.type.defaultProps),
t)
te.call(t, r) && !ne.hasOwnProperty(r) && (void 0
=== t[r] && void 0 !== i ? o[r] = i[r] : o[r] = t[r]);
var d = arguments.length - 2;
if (1 === d)
o.children = n;
else if (d > 1) {
for (var f = Array(d), h = 0; h < d; h++)
f[h] = arguments[h + 2];
o.children = f
}
return oe(e.type, a, s, u, l, c, o)
}
function ue(e) {
return "object" == typeof e && null !== e && e.$$typeof ===
n
}
var le = "."
, ce = ":"
, de = !1
, fe = /\/+/g;
function he(e) {
return e.replace(fe, "$&/")
}
function pe(e, t) {
return "object" == typeof e && null !== e && null != e.key ?
(Q(e.key),
function(e) {
var t = {
"=": "=0",
":": "=2"
};
return "$" + e.replace(/[=:]/g, (function(e) {
return t[e]
}
))
}("" + e.key)) : t.toString(36)
}
function me(e, t, i, o, a) {
var s = typeof e;
"undefined" !== s && "boolean" !== s || (e = null);
var u, l, c, d = !1;
if (null === e)
d = !0;
else
switch (s) {
case "string":
case "number":
d = !0;
break;
case "object":
switch (e.$$typeof) {
case n:
case r:
d = !0
}
}
if (d) {
var f = e
, h = a(f)
, p = "" === o ? le + pe(f, 0) : o;
if ($(h)) {
var m = "";
null != p && (m = he(p) + "/"),
me(h, t, m, "", (function(e) {
return e
}
))
} else
null != h && (ue(h) && (!h.key || f && f.key ===
h.key || Q(h.key),
u = h,
l = i + (!h.key || f && f.key === h.key ? "" : he("" +
h.key) + "/") + p,
h = oe(u.type, l, u.ref, u._self, u._source, u._owner,
u.props)),
t.push(h));
return 1
}
var g = 0
, b = "" === o ? le : o + ce;
if ($(e))
for (var y = 0; y < e.length; y++)
g += me(c = e[y], t, i, b + pe(c, y), a);
else {
var A = v(e);
if ("function" == typeof A) {
var w = e;
A === w.entries && (de || I("Using Maps as children
is not supported. Use an array of keyed ReactElements instead."),
de = !0);
for (var _, E = A.call(w), S = 0; !(_ =
E.next()).done; )
g += me(c = _.value, t, i, b + pe(c, S++), a)
} else if ("object" === s) {
var k = String(e);
throw new Error("Objects are not valid as a React
child (found: " + ("[object Object]" === k ? "object with keys {" + Object.keys(e).join(", ")
+ "}" : k) + "). If you meant to render a collection of children, use an array instead.")
}
}
return g
}
function ge(e, t, n) {
if (null == e)
return e;
var r = []
, i = 0;
return me(e, r, "", "", (function(e) {
return t.call(n, e, i++)
}
)),
r
}
var ve, be = -1, ye = 0, Ae = 1, we = 2;
function _e(e) {
if (e._status === be) {
var t = (0,
e._result)();
if (t.then((function(t) {
if (e._status === ye || e._status === be) {
var n = e;
n._status = Ae,
n._result = t
}
}
), (function(t) {
if (e._status === ye || e._status === be) {
var n = e;
n._status = we,
n._result = t
}
}
)),
e._status === be) {
var n = e;
n._status = ye,
n._result = t
}
}
if (e._status === Ae) {
var r = e._result;
return void 0 === r && P("lazy: Expected the result of a
dynamic import() call. Instead received: %s\n\nYour code should look like: \n const
MyComponent = lazy(() => import('./MyComponent'))\n\nDid you accidentally put curly
braces around the import?", r),
"default"in r || P("lazy: Expected the result of a dynamic
import() call. Instead received: %s\n\nYour code should look like: \n const
MyComponent = lazy(() => import('./MyComponent'))", r),
r.default
}
throw e._result
}
function Ee(e) {
return "string" == typeof e || "function" == typeof e || !!(e ===
i || e === a || R || e === o || e === c || e === d || x || e === p || k || M || C) || "object" ==
typeof e && null !== e && (e.$$typeof === h || e.$$typeof === f || e.$$typeof === s || e.$
$typeof === u || e.$$typeof === l || e.$$typeof === ve || void 0 !== e.getModuleId)
}
function Se() {
var e = b.current;
return null === e && P("Invalid hook call. Hooks can only be
called inside of the body of a function component. This could happen for one of the
following reasons:\n1. You might have mismatching versions of React and the renderer
(such as React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have
more than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-
call for tips about how to debug and fix this problem."),
e
}
ve = Symbol.for("react.module.reference");
var ke, Me, Ce, xe, Re, Te, Ie, Pe = 0;
function Le() {}
Le.__reactDisabledLog = !0;
var Oe, Ne = T.ReactCurrentDispatcher;
function De(e, t, n) {
if (void 0 === Oe)
try {
throw Error()
} catch (e) {
var r = e.stack.trim().match(/\n( *(at )?)/);
Oe = r && r[1] || ""
}
return "\n" + Oe + e
}
var Be, je = !1, ze = "function" == typeof WeakMap ?
WeakMap : Map;
function Fe(e, t) {
if (!e || je)
return "";
var n, r = Be.get(e);
if (void 0 !== r)
return r;
je = !0;
var i, o = Error.prepareStackTrace;
Error.prepareStackTrace = void 0,
i = Ne.current,
Ne.current = null,
function() {
if (0 === Pe) {
ke = console.log,
Me = console.info,
Ce = console.warn,
xe = console.error,
Re = console.group,
Te = console.groupCollapsed,
Ie = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: Le,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
})
}
Pe++
}();
try {
if (t) {
var a = function() {
throw Error()
};
if (Object.defineProperty(a.prototype, "props", {
set: function() {
throw Error()
}
}),
"object" == typeof Reflect && Reflect.construct) {
try {
Reflect.construct(a, [])
} catch (e) {
n=e
}
Reflect.construct(e, [], a)
} else {
try {
a.call()
} catch (e) {
n=e
}
e.call(a.prototype)
}
} else {
try {
throw Error()
} catch (e) {
n=e
}
e()
}
} catch (t) {
if (t && n && "string" == typeof t.stack) {
for (var s = t.stack.split("\n"), u = n.stack.split("\n"), l
= s.length - 1, c = u.length - 1; l >= 1 && c >= 0 && s[l] !== u[c]; )
c--;
for (; l >= 1 && c >= 0; l--,
c--)
if (s[l] !== u[c]) {
if (1 !== l || 1 !== c)
do {
if (l--,
--c < 0 || s[l] !== u[c]) {
var d = "\n" + s[l].replace(" at
new ", " at ");
return e.displayName &&
d.includes("<anonymous>") && (d = d.replace("<anonymous>", e.displayName)),
"function" == typeof e &&
Be.set(e, d),
d
}
} while (l >= 1 && c >= 0);
break
}
}
} finally {
je = !1,
Ne.current = i,
function() {
if (0 == --Pe) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: B({}, e, {
value: ke
}),
info: B({}, e, {
value: Me
}),
warn: B({}, e, {
value: Ce
}),
error: B({}, e, {
value: xe
}),
group: B({}, e, {
value: Re
}),
groupCollapsed: B({}, e, {
value: Te
}),
groupEnd: B({}, e, {
value: Ie
})
})
}
Pe < 0 && P("disabledDepth fell below zero. This is
a bug in React. Please file an issue.")
}(),
Error.prepareStackTrace = o
}
var f = e ? e.displayName || e.name : ""
, h = f ? De(f) : "";
return "function" == typeof e && Be.set(e, h),
h
}
function Ue(e, t, n) {
if (null == e)
return "";
if ("function" == typeof e)
return Fe(e, function(e) {
var t = e.prototype;
return !(!t || !t.isReactComponent)
}(e));
if ("string" == typeof e)
return De(e);
switch (e) {
case c:
return De("Suspense");
case d:
return De("SuspenseList")
}
if ("object" == typeof e)
switch (e.$$typeof) {
case l:
return Fe(e.render, !1);
case f:
return Ue(e.type, t, n);
case h:
var r = e
, i = r._payload
, o = r._init;
try {
return Ue(o(i), t, n)
} catch (e) {}
}
return ""
}
Be = new ze;
var Ke, qe = {}, He = T.ReactDebugCurrentFrame;
function Ve(e) {
if (e) {
var t = e._owner
, n = Ue(e.type, e._source, t ? t.type : null);
He.setExtraStackFrame(n)
} else
He.setExtraStackFrame(null)
}
function We(e) {
if (e) {
var t = e._owner;
S(Ue(e.type, e._source, t ? t.type : null))
} else
S(null)
}
function $e() {
if (w.current) {
var e = G(w.current.type);
if (e)
return "\n\nCheck the render method of `" + e + "`."
}
return ""
}
Ke = !1;
var Ye = {};
function Qe(e, t) {
if (e._store && !e._store.validated && null == e.key) {
e._store.validated = !0;
var n = function(e) {
var t = $e();
if (!t) {
var n = "string" == typeof e ? e : e.displayName
|| e.name;
n && (t = "\n\nCheck the top-level render call
using <" + n + ">.")
}
return t
}(t);
if (!Ye[n]) {
Ye[n] = !0;
var r = "";
e && e._owner && e._owner !== w.current && (r = "
It was passed a child from " + G(e._owner.type) + "."),
We(e),
P('Each child in a list should have a unique "key"
prop.%s%s See https://reactjs.org/link/warning-keys for more information.', n, r),
We(null)
}
}
}
function Ze(e, t) {
if ("object" == typeof e)
if ($(e))
for (var n = 0; n < e.length; n++) {
var r = e[n];
ue(r) && Qe(r, t)
}
else if (ue(e))
e._store && (e._store.validated = !0);
else if (e) {
var i = v(e);
if ("function" == typeof i && i !== e.entries)
for (var o, a = i.call(e); !(o = a.next()).done; )
ue(o.value) && Qe(o.value, t)
}
}
function Ge(e) {
var t, n = e.type;
if (null != n && "string" != typeof n) {
if ("function" == typeof n)
t = n.propTypes;
else {
if ("object" != typeof n || n.$$typeof !== l && n.$
$typeof !== f)
return;
t = n.propTypes
}
if (t) {
var r = G(n);
!function(e, t, n, r, i) {
var o = Function.call.bind(te);
for (var a in e)
if (o(e, a)) {
var s = void 0;
try {
if ("function" != typeof e[a]) {
var u = Error((r || "React class")
+ ": " + n + " type `" + a + "` is invalid; it must be a function, usually from the `prop-types`
package, but received `" + typeof e[a] + "`.This often happens because of typos such as
`PropTypes.function` instead of `PropTypes.func`.");
throw u.name = "Invariant
Violation",
u
}
s = e[a](t, a, r, n, null,
"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")
} catch (e) {
s=e
}
!s || s instanceof Error || (Ve(i),
P("%s: type specification of %s `%s` is
invalid; the type checker function must return `null` or an `Error` but returned a %s. You
may have forgotten to pass an argument to the type checker creator (arrayOf,
instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", r ||
"React class", n, a, typeof s),
Ve(null)),
s instanceof Error && !(s.message in
qe) && (qe[s.message] = !0,
Ve(i),
P("Failed %s type: %s", n, s.message),
Ve(null))
}
}(t, e.props, "prop", r, e)
} else
void 0 === n.PropTypes || Ke || (Ke = !0,
P("Component %s declared `PropTypes` instead of
`propTypes`. Did you misspell the property assignment?", G(n) || "Unknown"));
"function" != typeof n.getDefaultProps ||
n.getDefaultProps.isReactClassApproved || P("getDefaultProps is only used on classic
React.createClass definitions. Use a static property named `defaultProps` instead.")
}
}
function Xe(e, t, r) {
var o, a, s = Ee(e);
if (!s) {
var u, l = "";
(void 0 === e || "object" == typeof e && null !== e && 0
=== Object.keys(e).length) && (l += " You likely forgot to export your component from
the file it's defined in, or you might have mixed up default and named imports."),
l += (null != (o = t) && void 0 !== (a = o.__source) ? "\n\
nCheck your code at " + a.fileName.replace(/^.*[\\\/]/, "") + ":" + a.lineNumber + "." : "") ||
$e(),
null === e ? u = "null" : $(e) ? u = "array" : void 0 !== e
&& e.$$typeof === n ? (u = "<" + (G(e.type) || "Unknown") + " />",
l = " Did you accidentally export a JSX literal instead of
a component?") : u = typeof e,
P("React.createElement: type is invalid -- expected a
string (for built-in components) or a class/function (for composite components) but got:
%s.%s", u, l)
}
var c = ae.apply(this, arguments);
if (null == c)
return c;
if (s)
for (var d = 2; d < arguments.length; d++)
Ze(arguments[d], e);
return e === i ? function(e) {
for (var t = Object.keys(e.props), n = 0; n < t.length; n+
+) {
var r = t[n];
if ("children" !== r && "key" !== r) {
We(e),
P("Invalid prop `%s` supplied to
`React.Fragment`. React.Fragment can only have `key` and `children` props.", r),
We(null);
break
}
}
null !== e.ref && (We(e),
P("Invalid attribute `ref` supplied to `React.Fragment`."),
We(null))
}(c) : Ge(c),
c
}
var Je = !1
, et = !1
, tt = null
, nt = 0
, rt = !1;
function it(e) {
e !== nt - 1 && P("You seem to have overlapping act() calls,
this is not supported. Be sure to await previous act() calls before making a new one. "),
nt = e
}
function ot(t, n, r) {
var i = A.current;
if (null !== i)
try {
st(i),
function(t) {
if (null === tt)
try {
var n = ("require" +
Math.random()).slice(0, 7)
, r = e && e[n];
tt = r.call(e, "timers").setImmediate
} catch (e) {
tt = function(e) {
!1 === et && (et = !0,
"undefined" == typeof
MessageChannel && P("This browser does not have a MessageChannel
implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an
issue at https://github.com/facebook/react/issues if you encounter this warning."));
var t = new MessageChannel;
t.port1.onmessage = e,
t.port2.postMessage(void 0)
}
}
tt(t)
}((function() {
0 === i.length ? (A.current = null,
n(t)) : ot(t, n, r)
}
))
} catch (e) {
r(e)
}
else
n(t)
}
var at = !1;
function st(e) {
if (!at) {
at = !0;
var t = 0;
try {
for (; t < e.length; t++) {
var n = e[t];
do {
n = n(!0)
} while (null !== n)
}
e.length = 0
} catch (n) {
throw e = e.slice(t + 1),
n
} finally {
at = !1
}
}
}
var ut = Xe
, lt = function(e, t, n) {
for (var r = se.apply(this, arguments), i = 2; i <
arguments.length; i++)
Ze(arguments[i], r.type);
return Ge(r),
r
}
, ct = function(e) {
var t = Xe.bind(null, e);
return t.type = e,
Je || (Je = !0,
I("React.createFactory() is deprecated and will be removed
in a future major release. Consider using JSX or use React.createElement() directly
instead.")),
Object.defineProperty(t, "type", {
enumerable: !1,
get: function() {
return I("Factory.type is deprecated. Access the
class directly before passing it to createFactory."),
Object.defineProperty(this, "type", {
value: e
}),
e
}
}),
t
}
, dt = {
map: ge,
forEach: function(e, t, n) {
ge(e, (function() {
t.apply(this, arguments)
}
), n)
},
count: function(e) {
var t = 0;
return ge(e, (function() {
t++
}
)),
t
},
toArray: function(e) {
return ge(e, (function(e) {
return e
}
)) || []
},
only: function(e) {
if (!ue(e))
throw new Error("React.Children.only expected to
receive a single React element child.");
return e
}
};
t.Children = dt,
t.Component = z,
t.Fragment = i,
t.Profiler = a,
t.PureComponent = H,
t.StrictMode = o,
t.Suspense = c,
t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = T,
t.cloneElement = lt,
t.createContext = function(e) {
var t = {
$$typeof: u,
_currentValue: e,
_currentValue2: e,
_threadCount: 0,
Provider: null,
Consumer: null,
_defaultValue: null,
_globalName: null
};
t.Provider = {
$$typeof: s,
_context: t
};
var n = !1
, r = !1
, i = !1
,o={
$$typeof: u,
_context: t
};
return Object.defineProperties(o, {
Provider: {
get: function() {
return r || (r = !0,
P("Rendering <Context.Consumer.Provider> is
not supported and will be removed in a future major release. Did you mean to render
<Context.Provider> instead?")),
t.Provider
},
set: function(e) {
t.Provider = e
}
},
_currentValue: {
get: function() {
return t._currentValue
},
set: function(e) {
t._currentValue = e
}
},
_currentValue2: {
get: function() {
return t._currentValue2
},
set: function(e) {
t._currentValue2 = e
}
},
_threadCount: {
get: function() {
return t._threadCount
},
set: function(e) {
t._threadCount = e
}
},
Consumer: {
get: function() {
return n || (n = !0,
P("Rendering <Context.Consumer.Consumer>
is not supported and will be removed in a future major release. Did you mean to render
<Context.Consumer> instead?")),
t.Consumer
}
},
displayName: {
get: function() {
return t.displayName
},
set: function(e) {
i || (I("Setting `displayName` on
Context.Consumer has no effect. You should set it directly on the context with
Context.displayName = '%s'.", e),
i = !0)
}
}
}),
t.Consumer = o,
t._currentRenderer = null,
t._currentRenderer2 = null,
t
}
,
t.createElement = ut,
t.createFactory = ct,
t.createRef = function() {
var e = {
current: null
};
return Object.seal(e),
e
}
,
t.forwardRef = function(e) {
null != e && e.$$typeof === f ? P("forwardRef requires a
render function but received a `memo` component. Instead of forwardRef(memo(...)),
use memo(forwardRef(...)).") : "function" != typeof e ? P("forwardRef requires a render
function but was given %s.", null === e ? "null" : typeof e) : 0 !== e.length && 2 !==
e.length && P("forwardRef render functions accept exactly two parameters: props and
ref. %s", 1 === e.length ? "Did you forget to use the ref parameter?" : "Any additional
parameter will be undefined."),
null != e && (null == e.defaultProps && null == e.propTypes
|| P("forwardRef render functions do not support propTypes or defaultProps. Did you
accidentally pass a React component?"));
var t, n = {
$$typeof: l,
render: e
};
return Object.defineProperty(n, "displayName", {
enumerable: !1,
configurable: !0,
get: function() {
return t
},
set: function(n) {
t = n,
e.name || e.displayName || (e.displayName = n)
}
}),
n
}
,
t.isValidElement = ue,
t.lazy = function(e) {
var t, n, r = {
$$typeof: h,
_payload: {
_status: be,
_result: e
},
_init: _e
};
return Object.defineProperties(r, {
defaultProps: {
configurable: !0,
get: function() {
return t
},
set: function(e) {
P("React.lazy(...): It is not supported to assign
`defaultProps` to a lazy component import. Either specify them where the component is
defined, or create a wrapping component around it."),
t = e,
Object.defineProperty(r, "defaultProps", {
enumerable: !0
})
}
},
propTypes: {
configurable: !0,
get: function() {
return n
},
set: function(e) {
P("React.lazy(...): It is not supported to assign
`propTypes` to a lazy component import. Either specify them where the component is
defined, or create a wrapping component around it."),
n = e,
Object.defineProperty(r, "propTypes", {
enumerable: !0
})
}
}
}),
r
}
,
t.memo = function(e, t) {
Ee(e) || P("memo: The first argument must be a component.
Instead received: %s", null === e ? "null" : typeof e);
var n, r = {
$$typeof: f,
type: e,
compare: void 0 === t ? null : t
};
return Object.defineProperty(r, "displayName", {
enumerable: !1,
configurable: !0,
get: function() {
return n
},
set: function(t) {
n = t,
e.name || e.displayName || (e.displayName = t)
}
}),
r
}
,
t.startTransition = function(e, t) {
var n = y.transition;
y.transition = {};
var r = y.transition;
y.transition._updatedFibers = new Set;
try {
e()
} finally {
y.transition = n,
null === n && r._updatedFibers &&
(r._updatedFibers.size > 10 && I("Detected a large number of updates inside
startTransition. If this is due to a subscription please re-write it to use React provided
hooks. Otherwise concurrent mode guarantees are off the table."),
r._updatedFibers.clear())
}
}
,
t.unstable_act = function(e) {
var t = nt;
nt++,
null === A.current && (A.current = []);
var n, r = A.isBatchingLegacy;
try {
if (A.isBatchingLegacy = !0,
n = e(),
!r && A.didScheduleLegacyUpdate) {
var i = A.current;
null !== i && (A.didScheduleLegacyUpdate = !1,
st(i))
}
} catch (e) {
throw it(t),
e
} finally {
A.isBatchingLegacy = r
}
if (null !== n && "object" == typeof n && "function" == typeof
n.then) {
var o = n
, a = !1
,s={
then: function(e, n) {
a = !0,
o.then((function(r) {
it(t),
0 === nt ? ot(r, e, n) : e(r)
}
), (function(e) {
it(t),
n(e)
}
))
}
};
return rt || "undefined" == typeof Promise ||
Promise.resolve().then((function() {}
)).then((function() {
a || (rt = !0,
P("You called act(async () => ...) without await. This
could lead to unexpected testing behaviour, interleaving multiple act calls and mixing
their scopes. You should - await act(async () => ...);"))
}
)),
s
}
var u = n;
if (it(t),
0 === nt) {
var l = A.current;
return null !== l && (st(l),
A.current = null),
{
then: function(e, t) {
null === A.current ? (A.current = [],
ot(u, e, t)) : e(u)
}
}
}
return {
then: function(e, t) {
e(u)
}
}
}
,
t.useCallback = function(e, t) {
return Se().useCallback(e, t)
}
,
t.useContext = function(e) {
var t = Se();
if (void 0 !== e._context) {
var n = e._context;
n.Consumer === e ? P("Calling
useContext(Context.Consumer) is not supported, may cause bugs, and will be removed
in a future major release. Did you mean to call useContext(Context) instead?") :
n.Provider === e && P("Calling useContext(Context.Provider) is not supported. Did you
mean to call useContext(Context) instead?")
}
return t.useContext(e)
}
,
t.useDebugValue = function(e, t) {
return Se().useDebugValue(e, t)
}
,
t.useDeferredValue = function(e) {
return Se().useDeferredValue(e)
}
,
t.useEffect = function(e, t) {
return Se().useEffect(e, t)
}
,
t.useId = function() {
return Se().useId()
}
,
t.useImperativeHandle = function(e, t, n) {
return Se().useImperativeHandle(e, t, n)
}
,
t.useInsertionEffect = function(e, t) {
return Se().useInsertionEffect(e, t)
}
,
t.useLayoutEffect = function(e, t) {
return Se().useLayoutEffect(e, t)
}
,
t.useMemo = function(e, t) {
return Se().useMemo(e, t)
}
,
t.useReducer = function(e, t, n) {
return Se().useReducer(e, t, n)
}
,
t.useRef = function(e) {
return Se().useRef(e)
}
,
t.useState = function(e) {
return Se().useState(e)
}
,
t.useSyncExternalStore = function(e, t, n) {
return Se().useSyncExternalStore(e, t, n)
}
,
t.useTransition = function() {
return Se().useTransition()
}
,
t.version = "18.2.0",
"undefined" != typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)
}()
}(HR, HR.exports)),
HR.exports
}
function WR() {
return qR || (qR = 1,
"production" === je.env.NODE_ENV ? zR.exports = UR() : zR.exports =
VR()),
zR.exports
}
HR.exports;
var $R, YR, QR, ZR, GR = {}, XR = {
exports: {}
}, JR = {}, eT = {
exports: {}
}, tT = {}, nT = {};
function rT() {
return YR || (YR = 1,
function(e) {
"production" !== je.env.NODE_ENV && function() {
"undefined" != typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);
var t = !1
, n = !1;
function r(e, t) {
var n = e.length;
e.push(t),
function(e, t, n) {
for (var r = n; r > 0; ) {
var i = r - 1 >>> 1
, o = e[i];
if (!(a(o, t) > 0))
return;
e[i] = t,
e[r] = o,
r=i
}
}(e, t, n)
}
function i(e) {
return 0 === e.length ? null : e[0]
}
function o(e) {
if (0 === e.length)
return null;
var t = e[0]
, n = e.pop();
return n !== t && (e[0] = n,
function(e, t, n) {
for (var r = 0, i = e.length, o = i >>> 1; r < o; ) {
var s = 2 * (r + 1) - 1
, u = e[s]
,l=s+1
, c = e[l];
if (a(u, t) < 0)
l < i && a(c, u) < 0 ? (e[r] = c,
e[l] = t,
r = l) : (e[r] = u,
e[s] = t,
r = s);
else {
if (!(l < i && a(c, t) < 0))
return;
e[r] = c,
e[l] = t,
r=l
}
}
}(e, n)),
t
}
function a(e, t) {
var n = e.sortIndex - t.sortIndex;
return 0 !== n ? n : e.id - t.id
}
if ("object" == typeof performance && "function" == typeof
performance.now) {
var s = performance;
e.unstable_now = function() {
return s.now()
}
} else {
var u = Date
, l = u.now();
e.unstable_now = function() {
return u.now() - l
}
}
var c = []
, d = []
,f=1
, h = null
,p=3
, m = !1
, g = !1
, v = !1
, b = "function" == typeof setTimeout ? setTimeout : null
, y = "function" == typeof clearTimeout ? clearTimeout : null
, A = "undefined" != typeof setImmediate ? setImmediate :
null;
function w(e) {
for (var t = i(d); null !== t; ) {
if (null === t.callback)
o(d);
else {
if (!(t.startTime <= e))
return;
o(d),
t.sortIndex = t.expirationTime,
r(c, t)
}
t = i(d)
}
}
function _(e) {
if (v = !1,
w(e),
!g)
if (null !== i(c))
g = !0,
O(E);
else {
var t = i(d);
null !== t && N(_, t.startTime - e)
}
}
function E(r, a) {
g = !1,
v && (v = !1,
D()),
m = !0;
var s = p;
try {
if (!n)
return function(n, r) {
var a = r;
for (w(a),
h = i(c); null !== h && !t && (!(h.expirationTime
> a) || n && !R()); ) {
var s = h.callback;
if ("function" == typeof s) {
h.callback = null,
p = h.priorityLevel;
var u = s(h.expirationTime <= a);
a = e.unstable_now(),
"function" == typeof u ? h.callback = u :
h === i(c) && o(c),
w(a)
} else
o(c);
h = i(c)
}
if (null !== h)
return !0;
var l = i(d);
return null !== l && N(_, l.startTime - a),
!1
}(r, a)
} finally {
h = null,
p = s,
m = !1
}
}
"undefined" != typeof navigator && void 0 !==
navigator.scheduling && void 0 !== navigator.scheduling.isInputPending &&
navigator.scheduling.isInputPending.bind(navigator.scheduling);
var S = !1
, k = null
, M = -1
,C=5
, x = -1;
function R() {
return !(e.unstable_now() - x < C)
}
var T, I = function() {
if (null !== k) {
var t = e.unstable_now();
x = t;
var n = !0;
try {
n = k(!0, t)
} finally {
n ? T() : (S = !1,
k = null)
}
} else
S = !1
};
if ("function" == typeof A)
T = function() {
A(I)
}
;
else if ("undefined" != typeof MessageChannel) {
var P = new MessageChannel
, L = P.port2;
P.port1.onmessage = I,
T = function() {
L.postMessage(null)
}
} else
T = function() {
b(I, 0)
}
;
function O(e) {
k = e,
S || (S = !0,
T())
}
function N(t, n) {
M = b((function() {
t(e.unstable_now())
}
), n)
}
function D() {
y(M),
M = -1
}
var B = function() {};
e.unstable_IdlePriority = 5,
e.unstable_ImmediatePriority = 1,
e.unstable_LowPriority = 4,
e.unstable_NormalPriority = 3,
e.unstable_Profiling = null,
e.unstable_UserBlockingPriority = 2,
e.unstable_cancelCallback = function(e) {
e.callback = null
}
,
e.unstable_continueExecution = function() {
g || m || (g = !0,
O(E))
}
,
e.unstable_forceFrameRate = function(e) {
e < 0 || e > 125 ? console.error("forceFrameRate takes a
positive int between 0 and 125, forcing frame rates higher than 125 fps is not
supported") : C = e > 0 ? Math.floor(1e3 / e) : 5
}
,
e.unstable_getCurrentPriorityLevel = function() {
return p
}
,
e.unstable_getFirstCallbackNode = function() {
return i(c)
}
,
e.unstable_next = function(e) {
var t;
switch (p) {
case 1:
case 2:
case 3:
t = 3;
break;
default:
t=p
}
var n = p;
p = t;
try {
return e()
} finally {
p=n
}
}
,
e.unstable_pauseExecution = function() {}
,
e.unstable_requestPaint = B,
e.unstable_runWithPriority = function(e, t) {
switch (e) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
e=3
}
var n = p;
p = e;
try {
return t()
} finally {
p=n
}
}
,
e.unstable_scheduleCallback = function(t, n, o) {
var a, s, u = e.unstable_now();
if ("object" == typeof o && null !== o) {
var l = o.delay;
a = "number" == typeof l && l > 0 ? u + l : u
} else
a = u;
switch (t) {
case 1:
s = -1;
break;
case 2:
s = 250;
break;
case 5:
s = 1073741823;
break;
case 4:
s = 1e4;
break;
default:
s = 5e3
}
var h = a + s
,p={
id: f++,
callback: n,
priorityLevel: t,
startTime: a,
expirationTime: h,
sortIndex: -1
};
return a > u ? (p.sortIndex = a,
r(d, p),
null === i(c) && p === i(d) && (v ? D() : v = !0,
N(_, a - u))) : (p.sortIndex = h,
r(c, p),
g || m || (g = !0,
O(E))),
p
}
,
e.unstable_shouldYield = R,
e.unstable_wrapCallback = function(e) {
var t = p;
return function() {
var n = p;
p = t;
try {
return e.apply(this, arguments)
} finally {
p=n
}
}
}
,
"undefined" != typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)
}()
}(nT)),
nT
}
function iT() {
return QR || (QR = 1,
"production" === je.env.NODE_ENV ? eT.exports = ($R || ($R = 1,
function(e) {
function t(e, t) {
var n = e.length;
e.push(t);
e: for (; 0 < n; ) {
var r = n - 1 >>> 1
, o = e[r];
if (!(0 < i(o, t)))
break e;
e[r] = t,
e[n] = o,
n=r
}
}
function n(e) {
return 0 === e.length ? null : e[0]
}
function r(e) {
if (0 === e.length)
return null;
var t = e[0]
, n = e.pop();
if (n !== t) {
e[0] = n;
e: for (var r = 0, o = e.length, a = o >>> 1; r < a; ) {
var s = 2 * (r + 1) - 1
, u = e[s]
,l=s+1
, c = e[l];
if (0 > i(u, n))
l < o && 0 > i(c, u) ? (e[r] = c,
e[l] = n,
r = l) : (e[r] = u,
e[s] = n,
r = s);
else {
if (!(l < o && 0 > i(c, n)))
break e;
e[r] = c,
e[l] = n,
r=l
}
}
}
return t
}
function i(e, t) {
var n = e.sortIndex - t.sortIndex;
return 0 !== n ? n : e.id - t.id
}
if ("object" == typeof performance && "function" == typeof
performance.now) {
var o = performance;
e.unstable_now = function() {
return o.now()
}
} else {
var a = Date
, s = a.now();
e.unstable_now = function() {
return a.now() - s
}
}
var u = []
, l = []
,c=1
, d = null
,f=3
, h = !1
, p = !1
, m = !1
, g = "function" == typeof setTimeout ? setTimeout : null
, v = "function" == typeof clearTimeout ? clearTimeout : null
, b = "undefined" != typeof setImmediate ? setImmediate : null;
function y(e) {
for (var i = n(l); null !== i; ) {
if (null === i.callback)
r(l);
else {
if (!(i.startTime <= e))
break;
r(l),
i.sortIndex = i.expirationTime,
t(u, i)
}
i = n(l)
}
}
function A(e) {
if (m = !1,
y(e),
!p)
if (null !== n(u))
p = !0,
P(w);
else {
var t = n(l);
null !== t && L(A, t.startTime - e)
}
}
function w(t, i) {
p = !1,
m && (m = !1,
v(k),
k = -1),
h = !0;
var o = f;
try {
for (y(i),
d = n(u); null !== d && (!(d.expirationTime > i) || t && !x()); ) {
var a = d.callback;
if ("function" == typeof a) {
d.callback = null,
f = d.priorityLevel;
var s = a(d.expirationTime <= i);
i = e.unstable_now(),
"function" == typeof s ? d.callback = s : d === n(u)
&& r(u),
y(i)
} else
r(u);
d = n(u)
}
if (null !== d)
var c = !0;
else {
var g = n(l);
null !== g && L(A, g.startTime - i),
c = !1
}
return c
} finally {
d = null,
f = o,
h = !1
}
}
"undefined" != typeof navigator && void 0 !== navigator.scheduling
&& void 0 !== navigator.scheduling.isInputPending &&
navigator.scheduling.isInputPending.bind(navigator.scheduling);
var _, E = !1, S = null, k = -1, M = 5, C = -1;
function x() {
return !(e.unstable_now() - C < M)
}
function R() {
if (null !== S) {
var t = e.unstable_now();
C = t;
var n = !0;
try {
n = S(!0, t)
} finally {
n ? _() : (E = !1,
S = null)
}
} else
E = !1
}
if ("function" == typeof b)
_ = function() {
b(R)
}
;
else if ("undefined" != typeof MessageChannel) {
var T = new MessageChannel
, I = T.port2;
T.port1.onmessage = R,
_ = function() {
I.postMessage(null)
}
} else
_ = function() {
g(R, 0)
}
;
function P(e) {
S = e,
E || (E = !0,
_())
}
function L(t, n) {
k = g((function() {
t(e.unstable_now())
}
), n)
}
e.unstable_IdlePriority = 5,
e.unstable_ImmediatePriority = 1,
e.unstable_LowPriority = 4,
e.unstable_NormalPriority = 3,
e.unstable_Profiling = null,
e.unstable_UserBlockingPriority = 2,
e.unstable_cancelCallback = function(e) {
e.callback = null
}
,
e.unstable_continueExecution = function() {
p || h || (p = !0,
P(w))
}
,
e.unstable_forceFrameRate = function(e) {
0 > e || 125 < e ? console.error("forceFrameRate takes a
positive int between 0 and 125, forcing frame rates higher than 125 fps is not
supported") : M = 0 < e ? Math.floor(1e3 / e) : 5
}
,
e.unstable_getCurrentPriorityLevel = function() {
return f
}
,
e.unstable_getFirstCallbackNode = function() {
return n(u)
}
,
e.unstable_next = function(e) {
switch (f) {
case 1:
case 2:
case 3:
var t = 3;
break;
default:
t=f
}
var n = f;
f = t;
try {
return e()
} finally {
f=n
}
}
,
e.unstable_pauseExecution = function() {}
,
e.unstable_requestPaint = function() {}
,
e.unstable_runWithPriority = function(e, t) {
switch (e) {
case 1:
case 2:
case 3:
case 4:
case 5:
break;
default:
e=3
}
var n = f;
f = e;
try {
return t()
} finally {
f=n
}
}
,
e.unstable_scheduleCallback = function(r, i, o) {
var a = e.unstable_now();
switch (o = "object" == typeof o && null !== o && "number" ==
typeof (o = o.delay) && 0 < o ? a + o : a,
r) {
case 1:
var s = -1;
break;
case 2:
s = 250;
break;
case 5:
s = 1073741823;
break;
case 4:
s = 1e4;
break;
default:
s = 5e3
}
return r = {
id: c++,
callback: i,
priorityLevel: r,
startTime: o,
expirationTime: s = o + s,
sortIndex: -1
},
o > a ? (r.sortIndex = o,
t(l, r),
null === n(u) && r === n(l) && (m ? (v(k),
k = -1) : m = !0,
L(A, o - a))) : (r.sortIndex = s,
t(u, r),
p || h || (p = !0,
P(w))),
r
}
,
e.unstable_shouldYield = x,
e.unstable_wrapCallback = function(e) {
var t = f;
return function() {
var n = f;
f = t;
try {
return e.apply(this, arguments)
} finally {
f=n
}
}
}
}(tT)),
tT) : eT.exports = rT()),
eT.exports
}
function oT() {
if (ZR)
return JR;
ZR = 1;
var e = WR()
, t = iT();
function n(e) {
for (var t = "https://reactjs.org/docs/error-decoder.html?invariant=" +
e, n = 1; n < arguments.length; n++)
t += "&args[]=" + encodeURIComponent(arguments[n]);
return "Minified React error #" + e + "; visit " + t + " for the full
message or use the non-minified dev environment for full errors and additional helpful
warnings."
}
var r = new Set
, i = {};
function o(e, t) {
a(e, t),
a(e + "Capture", t)
}
function a(e, t) {
for (i[e] = t,
e = 0; e < t.length; e++)
r.add(t[e])
}
var s = !("undefined" == typeof window || void 0 === window.document ||
void 0 === window.document.createElement)
, u = Object.prototype.hasOwnProperty
, l = /^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\
u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\
uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\
u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\
uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/
, c = {}
, d = {};
function f(e, t, n, r, i, o, a) {
this.acceptsBooleans = 2 === t || 3 === t || 4 === t,
this.attributeName = r,
this.attributeNamespace = i,
this.mustUseProperty = n,
this.propertyName = e,
this.type = t,
this.sanitizeURL = o,
this.removeEmptyString = a
}
var h = {};
"children dangerouslySetInnerHTML defaultValue defaultChecked
innerHTML suppressContentEditableWarning suppressHydrationWarning style".split("
").forEach((function(e) {
h[e] = new f(e,0,!1,e,null,!1,!1)
}
)),
[["acceptCharset", "accept-charset"], ["className", "class"], ["htmlFor",
"for"], ["httpEquiv", "http-equiv"]].forEach((function(e) {
var t = e[0];
h[t] = new f(t,1,!1,e[1],null,!1,!1)
}
)),
["contentEditable", "draggable", "spellCheck",
"value"].forEach((function(e) {
h[e] = new f(e,2,!1,e.toLowerCase(),null,!1,!1)
}
)),
["autoReverse", "externalResourcesRequired", "focusable",
"preserveAlpha"].forEach((function(e) {
h[e] = new f(e,2,!1,e,null,!1,!1)
}
)),
"allowFullScreen async autoFocus autoPlay controls default defer
disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop
noModule noValidate open playsInline readOnly required reversed scoped seamless
itemScope".split(" ").forEach((function(e) {
h[e] = new f(e,3,!1,e.toLowerCase(),null,!1,!1)
}
)),
["checked", "multiple", "muted", "selected"].forEach((function(e) {
h[e] = new f(e,3,!0,e,null,!1,!1)
}
)),
["capture", "download"].forEach((function(e) {
h[e] = new f(e,4,!1,e,null,!1,!1)
}
)),
["cols", "rows", "size", "span"].forEach((function(e) {
h[e] = new f(e,6,!1,e,null,!1,!1)
}
)),
["rowSpan", "start"].forEach((function(e) {
h[e] = new f(e,5,!1,e.toLowerCase(),null,!1,!1)
}
));
var p = /[\-:]([a-z])/g;
function m(e) {
return e[1].toUpperCase()
}
function g(e, t, n, r) {
var i = h.hasOwnProperty(t) ? h[t] : null;
(null !== i ? 0 !== i.type : r || !(2 < t.length) || "o" !== t[0] && "O" !==
t[0] || "n" !== t[1] && "N" !== t[1]) && (function(e, t, n, r) {
if (null == t || function(e, t, n, r) {
if (null !== n && 0 === n.type)
return !1;
switch (typeof t) {
case "function":
case "symbol":
return !0;
case "boolean":
return !r && (null !== n ? !n.acceptsBooleans : "data-" !
== (e = e.toLowerCase().slice(0, 5)) && "aria-" !== e);
default:
return !1
}
}(e, t, n, r))
return !0;
if (r)
return !1;
if (null !== n)
switch (n.type) {
case 3:
return !t;
case 4:
return !1 === t;
case 5:
return isNaN(t);
case 6:
return isNaN(t) || 1 > t
}
return !1
}(t, n, i, r) && (n = null),
r || null === i ? function(e) {
return !!u.call(d, e) || !u.call(c, e) && (l.test(e) ? d[e] = !0 : (c[e]
= !0,
!1))
}(t) && (null === n ? e.removeAttribute(t) : e.setAttribute(t, "" + n)) :
i.mustUseProperty ? e[i.propertyName] = null === n ? 3 !== i.type && "" : n : (t =
i.attributeName,
r = i.attributeNamespace,
null === n ? e.removeAttribute(t) : (n = 3 === (i = i.type) || 4 === i
&& !0 === n ? "" : "" + n,
r ? e.setAttributeNS(r, t, n) : e.setAttribute(t, n))))
}
"accent-height alignment-baseline arabic-form baseline-shift cap-height
clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-
rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-
opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-
weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x
horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid
marker-start overline-position overline-thickness paint-order panose-1 pointer-events
rendering-intent shape-rendering stop-color stop-opacity strikethrough-position
strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin
stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering
underline-position underline-thickness unicode-bidi unicode-range units-per-em v-
alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x
vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split("
").forEach((function(e) {
var t = e.replace(p, m);
h[t] = new f(t,1,!1,e,null,!1,!1)
}
)),
"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title
xlink:type".split(" ").forEach((function(e) {
var t = e.replace(p, m);
h[t] = new f(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)
}
)),
["xml:base", "xml:lang", "xml:space"].forEach((function(e) {
var t = e.replace(p, m);
h[t] = new f(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)
}
)),
["tabIndex", "crossOrigin"].forEach((function(e) {
h[e] = new f(e,1,!1,e.toLowerCase(),null,!1,!1)
}
)),
h.xlinkHref = new
f("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),
["src", "href", "action", "formAction"].forEach((function(e) {
h[e] = new f(e,1,!1,e.toLowerCase(),null,!0,!0)
}
));
var v =
e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
, b = Symbol.for("react.element")
, y = Symbol.for("react.portal")
, A = Symbol.for("react.fragment")
, w = Symbol.for("react.strict_mode")
, _ = Symbol.for("react.profiler")
, E = Symbol.for("react.provider")
, S = Symbol.for("react.context")
, k = Symbol.for("react.forward_ref")
, M = Symbol.for("react.suspense")
, C = Symbol.for("react.suspense_list")
, x = Symbol.for("react.memo")
, R = Symbol.for("react.lazy")
, T = Symbol.for("react.offscreen")
, I = Symbol.iterator;
function P(e) {
return null === e || "object" != typeof e ? null : "function" == typeof (e
= I && e[I] || e["@@iterator"]) ? e : null
}
var L, O = Object.assign;
function N(e) {
if (void 0 === L)
try {
throw Error()
} catch (e) {
var t = e.stack.trim().match(/\n( *(at )?)/);
L = t && t[1] || ""
}
return "\n" + L + e
}
var D = !1;
function B(e, t) {
if (!e || D)
return "";
D = !0;
var n = Error.prepareStackTrace;
Error.prepareStackTrace = void 0;
try {
if (t)
if (t = function() {
throw Error()
}
,
Object.defineProperty(t.prototype, "props", {
set: function() {
throw Error()
}
}),
"object" == typeof Reflect && Reflect.construct) {
try {
Reflect.construct(t, [])
} catch (e) {
var r = e
}
Reflect.construct(e, [], t)
} else {
try {
t.call()
} catch (e) {
r=e
}
e.call(t.prototype)
}
else {
try {
throw Error()
} catch (e) {
r=e
}
e()
}
} catch (t) {
if (t && r && "string" == typeof t.stack) {
for (var i = t.stack.split("\n"), o = r.stack.split("\n"), a =
i.length - 1, s = o.length - 1; 1 <= a && 0 <= s && i[a] !== o[s]; )
s--;
for (; 1 <= a && 0 <= s; a--,
s--)
if (i[a] !== o[s]) {
if (1 !== a || 1 !== s)
do {
if (a--,
0 > --s || i[a] !== o[s]) {
var u = "\n" + i[a].replace(" at new ", " at
");
return e.displayName &&
u.includes("<anonymous>") && (u = u.replace("<anonymous>", e.displayName)),
u
}
} while (1 <= a && 0 <= s);
break
}
}
} finally {
D = !1,
Error.prepareStackTrace = n
}
return (e = e ? e.displayName || e.name : "") ? N(e) : ""
}
function j(e) {
switch (e.tag) {
case 5:
return N(e.type);
case 16:
return N("Lazy");
case 13:
return N("Suspense");
case 19:
return N("SuspenseList");
case 0:
case 2:
case 15:
return B(e.type, !1);
case 11:
return B(e.type.render, !1);
case 1:
return B(e.type, !0);
default:
return ""
}
}
function z(e) {
if (null == e)
return null;
if ("function" == typeof e)
return e.displayName || e.name || null;
if ("string" == typeof e)
return e;
switch (e) {
case A:
return "Fragment";
case y:
return "Portal";
case _:
return "Profiler";
case w:
return "StrictMode";
case M:
return "Suspense";
case C:
return "SuspenseList"
}
if ("object" == typeof e)
switch (e.$$typeof) {
case S:
return (e.displayName || "Context") + ".Consumer";
case E:
return (e._context.displayName || "Context") + ".Provider";
case k:
var t = e.render;
return (e = e.displayName) || (e = "" !== (e = t.displayName
|| t.name || "") ? "ForwardRef(" + e + ")" : "ForwardRef"),
e;
case x:
return null !== (t = e.displayName || null) ? t : z(e.type) ||
"Memo";
case R:
t = e._payload,
e = e._init;
try {
return z(e(t))
} catch (e) {}
}
return null
}
function F(e) {
var t = e.type;
switch (e.tag) {
case 24:
return "Cache";
case 9:
return (t.displayName || "Context") + ".Consumer";
case 10:
return (t._context.displayName || "Context") + ".Provider";
case 18:
return "DehydratedFragment";
case 11:
return e = (e = t.render).displayName || e.name || "",
t.displayName || ("" !== e ? "ForwardRef(" + e + ")" :
"ForwardRef");
case 7:
return "Fragment";
case 5:
return t;
case 4:
return "Portal";
case 3:
return "Root";
case 6:
return "Text";
case 16:
return z(t);
case 8:
return t === w ? "StrictMode" : "Mode";
case 22:
return "Offscreen";
case 12:
return "Profiler";
case 21:
return "Scope";
case 13:
return "Suspense";
case 19:
return "SuspenseList";
case 25:
return "TracingMarker";
case 1:
case 0:
case 17:
case 2:
case 14:
case 15:
if ("function" == typeof t)
return t.displayName || t.name || null;
if ("string" == typeof t)
return t
}
return null
}
function U(e) {
switch (typeof e) {
case "boolean":
case "number":
case "string":
case "undefined":
case "object":
return e;
default:
return ""
}
}
function K(e) {
var t = e.type;
return (e = e.nodeName) && "input" === e.toLowerCase() &&
("checkbox" === t || "radio" === t)
}
function q(e) {
e._valueTracker || (e._valueTracker = function(e) {
var t = K(e) ? "checked" : "value"
,n=
Object.getOwnPropertyDescriptor(e.constructor.prototype, t)
, r = "" + e[t];
if (!e.hasOwnProperty(t) && void 0 !== n && "function" == typeof
n.get && "function" == typeof n.set) {
var i = n.get
, o = n.set;
return Object.defineProperty(e, t, {
configurable: !0,
get: function() {
return i.call(this)
},
set: function(e) {
r = "" + e,
o.call(this, e)
}
}),
Object.defineProperty(e, t, {
enumerable: n.enumerable
}),
{
getValue: function() {
return r
},
setValue: function(e) {
r = "" + e
},
stopTracking: function() {
e._valueTracker = null,
delete e[t]
}
}
}
}(e))
}
function H(e) {
if (!e)
return !1;
var t = e._valueTracker;
if (!t)
return !0;
var n = t.getValue()
, r = "";
return e && (r = K(e) ? e.checked ? "true" : "false" : e.value),
(e = r) !== n && (t.setValue(e),
!0)
}
function V(e) {
if (void 0 === (e = e || ("undefined" != typeof document ? document :
void 0)))
return null;
try {
return e.activeElement || e.body
} catch (t) {
return e.body
}
}
function W(e, t) {
var n = t.checked;
return O({}, t, {
defaultChecked: void 0,
defaultValue: void 0,
value: void 0,
checked: null != n ? n : e._wrapperState.initialChecked
})
}
function $(e, t) {
var n = null == t.defaultValue ? "" : t.defaultValue
, r = null != t.checked ? t.checked : t.defaultChecked;
n = U(null != t.value ? t.value : n),
e._wrapperState = {
initialChecked: r,
initialValue: n,
controlled: "checkbox" === t.type || "radio" === t.type ? null !=
t.checked : null != t.value
}
}
function Y(e, t) {
null != (t = t.checked) && g(e, "checked", t, !1)
}
function Q(e, t) {
Y(e, t);
var n = U(t.value)
, r = t.type;
if (null != n)
"number" === r ? (0 === n && "" === e.value || e.value != n) &&
(e.value = "" + n) : e.value !== "" + n && (e.value = "" + n);
else if ("submit" === r || "reset" === r)
return void e.removeAttribute("value");
t.hasOwnProperty("value") ? G(e, t.type, n) :
t.hasOwnProperty("defaultValue") && G(e, t.type, U(t.defaultValue)),
null == t.checked && null != t.defaultChecked && (e.defaultChecked
= !!t.defaultChecked)
}
function Z(e, t, n) {
if (t.hasOwnProperty("value") || t.hasOwnProperty("defaultValue")) {
var r = t.type;
if (!("submit" !== r && "reset" !== r || void 0 !== t.value && null !
== t.value))
return;
t = "" + e._wrapperState.initialValue,
n || t === e.value || (e.value = t),
e.defaultValue = t
}
"" !== (n = e.name) && (e.name = ""),
e.defaultChecked = !!e._wrapperState.initialChecked,
"" !== n && (e.name = n)
}
function G(e, t, n) {
"number" === t && V(e.ownerDocument) === e || (null == n ?
e.defaultValue = "" + e._wrapperState.initialValue : e.defaultValue !== "" + n &&
(e.defaultValue = "" + n))
}
var X = Array.isArray;
function J(e, t, n, r) {
if (e = e.options,
t) {
t = {};
for (var i = 0; i < n.length; i++)
t["$" + n[i]] = !0;
for (n = 0; n < e.length; n++)
i = t.hasOwnProperty("$" + e[n].value),
e[n].selected !== i && (e[n].selected = i),
i && r && (e[n].defaultSelected = !0)
} else {
for (n = "" + U(n),
t = null,
i = 0; i < e.length; i++) {
if (e[i].value === n)
return e[i].selected = !0,
void (r && (e[i].defaultSelected = !0));
null !== t || e[i].disabled || (t = e[i])
}
null !== t && (t.selected = !0)
}
}
function ee(e, t) {
if (null != t.dangerouslySetInnerHTML)
throw Error(n(91));
return O({}, t, {
value: void 0,
defaultValue: void 0,
children: "" + e._wrapperState.initialValue
})
}
function te(e, t) {
var r = t.value;
if (null == r) {
if (r = t.children,
t = t.defaultValue,
null != r) {
if (null != t)
throw Error(n(92));
if (X(r)) {
if (1 < r.length)
throw Error(n(93));
r = r[0]
}
t=r
}
null == t && (t = ""),
r=t
}
e._wrapperState = {
initialValue: U(r)
}
}
function ne(e, t) {
var n = U(t.value)
, r = U(t.defaultValue);
null != n && ((n = "" + n) !== e.value && (e.value = n),
null == t.defaultValue && e.defaultValue !== n && (e.defaultValue =
n)),
null != r && (e.defaultValue = "" + r)
}
function re(e) {
var t = e.textContent;
t === e._wrapperState.initialValue && "" !== t && null !== t &&
(e.value = t)
}
function ie(e) {
switch (e) {
case "svg":
return "http://www.w3.org/2000/svg";
case "math":
return "http://www.w3.org/1998/Math/MathML";
default:
return "http://www.w3.org/1999/xhtml"
}
}
function oe(e, t) {
return null == e || "http://www.w3.org/1999/xhtml" === e ? ie(t) :
"http://www.w3.org/2000/svg" === e && "foreignObject" === t ?
"http://www.w3.org/1999/xhtml" : e
}
var ae, se, ue = (se = function(e, t) {
if ("http://www.w3.org/2000/svg" !== e.namespaceURI ||
"innerHTML"in e)
e.innerHTML = t;
else {
for ((ae = ae || document.createElement("div")).innerHTML =
"<svg>" + t.valueOf().toString() + "</svg>",
t = ae.firstChild; e.firstChild; )
e.removeChild(e.firstChild);
for (; t.firstChild; )
e.appendChild(t.firstChild)
}
}
,
"undefined" != typeof MSApp && MSApp.execUnsafeLocalFunction ?
function(e, t, n, r) {
MSApp.execUnsafeLocalFunction((function() {
return se(e, t)
}
))
}
: se);
function le(e, t) {
if (t) {
var n = e.firstChild;
if (n && n === e.lastChild && 3 === n.nodeType)
return void (n.nodeValue = t)
}
e.textContent = t
}
var ce = {
animationIterationCount: !0,
aspectRatio: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
boxFlex: !0,
boxFlexGroup: !0,
boxOrdinalGroup: !0,
columnCount: !0,
columns: !0,
flex: !0,
flexGrow: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
flexOrder: !0,
gridArea: !0,
gridRow: !0,
gridRowEnd: !0,
gridRowSpan: !0,
gridRowStart: !0,
gridColumn: !0,
gridColumnEnd: !0,
gridColumnSpan: !0,
gridColumnStart: !0,
fontWeight: !0,
lineClamp: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
fillOpacity: !0,
floodOpacity: !0,
stopOpacity: !0,
strokeDasharray: !0,
strokeDashoffset: !0,
strokeMiterlimit: !0,
strokeOpacity: !0,
strokeWidth: !0
}
, de = ["Webkit", "ms", "Moz", "O"];
function fe(e, t, n) {
return null == t || "boolean" == typeof t || "" === t ? "" : n || "number" !
= typeof t || 0 === t || ce.hasOwnProperty(e) && ce[e] ? ("" + t).trim() : t + "px"
}
function he(e, t) {
for (var n in e = e.style,
t)
if (t.hasOwnProperty(n)) {
var r = 0 === n.indexOf("--")
, i = fe(n, t[n], r);
"float" === n && (n = "cssFloat"),
r ? e.setProperty(n, i) : e[n] = i
}
}
Object.keys(ce).forEach((function(e) {
de.forEach((function(t) {
t = t + e.charAt(0).toUpperCase() + e.substring(1),
ce[t] = ce[e]
}
))
}
));
var pe = O({
menuitem: !0
}, {
area: !0,
base: !0,
br: !0,
col: !0,
embed: !0,
hr: !0,
img: !0,
input: !0,
keygen: !0,
link: !0,
meta: !0,
param: !0,
source: !0,
track: !0,
wbr: !0
});
function me(e, t) {
if (t) {
if (pe[e] && (null != t.children || null !=
t.dangerouslySetInnerHTML))
throw Error(n(137, e));
if (null != t.dangerouslySetInnerHTML) {
if (null != t.children)
throw Error(n(60));
if ("object" != typeof t.dangerouslySetInnerHTML || !
("__html"in t.dangerouslySetInnerHTML))
throw Error(n(61))
}
if (null != t.style && "object" != typeof t.style)
throw Error(n(62))
}
}
function ge(e, t) {
if (-1 === e.indexOf("-"))
return "string" == typeof t.is;
switch (e) {
case "annotation-xml":
case "color-profile":
case "font-face":
case "font-face-src":
case "font-face-uri":
case "font-face-format":
case "font-face-name":
case "missing-glyph":
return !1;
default:
return !0
}
}
var ve = null;
function be(e) {
return (e = e.target || e.srcElement ||
window).correspondingUseElement && (e = e.correspondingUseElement),
3 === e.nodeType ? e.parentNode : e
}
var ye = null
, Ae = null
, we = null;
function _e(e) {
if (e = gi(e)) {
if ("function" != typeof ye)
throw Error(n(280));
var t = e.stateNode;
t && (t = bi(t),
ye(e.stateNode, e.type, t))
}
}
function Ee(e) {
Ae ? we ? we.push(e) : we = [e] : Ae = e
}
function Se() {
if (Ae) {
var e = Ae
, t = we;
if (we = Ae = null,
_e(e),
t)
for (e = 0; e < t.length; e++)
_e(t[e])
}
}
function ke(e, t) {
return e(t)
}
function Me() {}
var Ce = !1;
function xe(e, t, n) {
if (Ce)
return e(t, n);
Ce = !0;
try {
return ke(e, t, n)
} finally {
Ce = !1,
(null !== Ae || null !== we) && (Me(),
Se())
}
}
function Re(e, t) {
var r = e.stateNode;
if (null === r)
return null;
var i = bi(r);
if (null === i)
return null;
r = i[t];
e: switch (t) {
case "onClick":
case "onClickCapture":
case "onDoubleClick":
case "onDoubleClickCapture":
case "onMouseDown":
case "onMouseDownCapture":
case "onMouseMove":
case "onMouseMoveCapture":
case "onMouseUp":
case "onMouseUpCapture":
case "onMouseEnter":
(i = !i.disabled) || (i = !("button" === (e = e.type) || "input" === e
|| "select" === e || "textarea" === e)),
e = !i;
break e;
default:
e = !1
}
if (e)
return null;
if (r && "function" != typeof r)
throw Error(n(231, t, typeof r));
return r
}
var Te = !1;
if (s)
try {
var Ie = {};
Object.defineProperty(Ie, "passive", {
get: function() {
Te = !0
}
}),
window.addEventListener("test", Ie, Ie),
window.removeEventListener("test", Ie, Ie)
} catch (se) {
Te = !1
}
function Pe(e, t, n, r, i, o, a, s, u) {
var l = Array.prototype.slice.call(arguments, 3);
try {
t.apply(n, l)
} catch (e) {
this.onError(e)
}
}
var Le = !1
, Oe = null
, Ne = !1
, De = null
, Be = {
onError: function(e) {
Le = !0,
Oe = e
}
};
function je(e, t, n, r, i, o, a, s, u) {
Le = !1,
Oe = null,
Pe.apply(Be, arguments)
}
function ze(e) {
var t = e
, n = e;
if (e.alternate)
for (; t.return; )
t = t.return;
else {
e = t;
do {
0 != (4098 & (t = e).flags) && (n = t.return),
e = t.return
} while (e)
}
return 3 === t.tag ? n : null
}
function Fe(e) {
if (13 === e.tag) {
var t = e.memoizedState;
if (null === t && null !== (e = e.alternate) && (t =
e.memoizedState),
null !== t)
return t.dehydrated
}
return null
}
function Ue(e) {
if (ze(e) !== e)
throw Error(n(188))
}
function Ke(e) {
return e = function(e) {
var t = e.alternate;
if (!t) {
if (null === (t = ze(e)))
throw Error(n(188));
return t !== e ? null : e
}
for (var r = e, i = t; ; ) {
var o = r.return;
if (null === o)
break;
var a = o.alternate;
if (null === a) {
if (null !== (i = o.return)) {
r = i;
continue
}
break
}
if (o.child === a.child) {
for (a = o.child; a; ) {
if (a === r)
return Ue(o),
e;
if (a === i)
return Ue(o),
t;
a = a.sibling
}
throw Error(n(188))
}
if (r.return !== i.return)
r = o,
i = a;
else {
for (var s = !1, u = o.child; u; ) {
if (u === r) {
s = !0,
r = o,
i = a;
break
}
if (u === i) {
s = !0,
i = o,
r = a;
break
}
u = u.sibling
}
if (!s) {
for (u = a.child; u; ) {
if (u === r) {
s = !0,
r = a,
i = o;
break
}
if (u === i) {
s = !0,
i = a,
r = o;
break
}
u = u.sibling
}
if (!s)
throw Error(n(189))
}
}
if (r.alternate !== i)
throw Error(n(190))
}
if (3 !== r.tag)
throw Error(n(188));
return r.stateNode.current === r ? e : t
}(e),
null !== e ? qe(e) : null
}
function qe(e) {
if (5 === e.tag || 6 === e.tag)
return e;
for (e = e.child; null !== e; ) {
var t = qe(e);
if (null !== t)
return t;
e = e.sibling
}
return null
}
var He = t.unstable_scheduleCallback
, Ve = t.unstable_cancelCallback
, We = t.unstable_shouldYield
, $e = t.unstable_requestPaint
, Ye = t.unstable_now
, Qe = t.unstable_getCurrentPriorityLevel
, Ze = t.unstable_ImmediatePriority
, Ge = t.unstable_UserBlockingPriority
, Xe = t.unstable_NormalPriority
, Je = t.unstable_LowPriority
, et = t.unstable_IdlePriority
, tt = null
, nt = null
, rt = Math.clz32 ? Math.clz32 : function(e) {
return 0 === (e >>>= 0) ? 32 : 31 - (it(e) / ot | 0) | 0
}
, it = Math.log
, ot = Math.LN2
, at = 64
, st = 4194304;
function ut(e) {
switch (e & -e) {
case 1:
return 1;
case 2:
return 2;
case 4:
return 4;
case 8:
return 8;
case 16:
return 16;
case 32:
return 32;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return 4194240 & e;
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
return 130023424 & e;
case 134217728:
return 134217728;
case 268435456:
return 268435456;
case 536870912:
return 536870912;
case 1073741824:
return 1073741824;
default:
return e
}
}
function lt(e, t) {
var n = e.pendingLanes;
if (0 === n)
return 0;
var r = 0
, i = e.suspendedLanes
, o = e.pingedLanes
, a = 268435455 & n;
if (0 !== a) {
var s = a & ~i;
0 !== s ? r = ut(s) : 0 !== (o &= a) && (r = ut(o))
} else
0 !== (a = n & ~i) ? r = ut(a) : 0 !== o && (r = ut(o));
if (0 === r)
return 0;
if (0 !== t && t !== r && 0 == (t & i) && ((i = r & -r) >= (o = t & -t) || 16
=== i && 0 != (4194240 & o)))
return t;
if (0 != (4 & r) && (r |= 16 & n),
0 !== (t = e.entangledLanes))
for (e = e.entanglements,
t &= r; 0 < t; )
i = 1 << (n = 31 - rt(t)),
r |= e[n],
t &= ~i;
return r
}
function ct(e, t) {
switch (e) {
case 1:
case 2:
case 4:
return t + 250;
case 8:
case 16:
case 32:
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
return t + 5e3;
default:
return -1
}
}
function dt(e) {
return 0 !== (e = -1073741825 & e.pendingLanes) ? e :
1073741824 & e ? 1073741824 : 0
}
function ft() {
var e = at;
return 0 == (4194240 & (at <<= 1)) && (at = 64),
e
}
function ht(e) {
for (var t = [], n = 0; 31 > n; n++)
t.push(e);
return t
}
function pt(e, t, n) {
e.pendingLanes |= t,
536870912 !== t && (e.suspendedLanes = 0,
e.pingedLanes = 0),
(e = e.eventTimes)[t = 31 - rt(t)] = n
}
function mt(e, t) {
var n = e.entangledLanes |= t;
for (e = e.entanglements; n; ) {
var r = 31 - rt(n)
, i = 1 << r;
i & t | e[r] & t && (e[r] |= t),
n &= ~i
}
}
var gt = 0;
function vt(e) {
return 1 < (e &= -e) ? 4 < e ? 0 != (268435455 & e) ? 16 :
536870912 : 4 : 1
}
var bt, yt, At, wt, _t, Et = !1, St = [], kt = null, Mt = null, Ct = null, xt = new
Map, Rt = new Map, Tt = [], It = "mousedown mouseup touchcancel touchend touchstart
auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop
compositionend compositionstart keydown keypress keyup input textInput copy cut
paste click change contextmenu reset submit".split(" ");
function Pt(e, t) {
switch (e) {
case "focusin":
case "focusout":
kt = null;
break;
case "dragenter":
case "dragleave":
Mt = null;
break;
case "mouseover":
case "mouseout":
Ct = null;
break;
case "pointerover":
case "pointerout":
xt.delete(t.pointerId);
break;
case "gotpointercapture":
case "lostpointercapture":
Rt.delete(t.pointerId)
}
}
function Lt(e, t, n, r, i, o) {
return null === e || e.nativeEvent !== o ? (e = {
blockedOn: t,
domEventName: n,
eventSystemFlags: r,
nativeEvent: o,
targetContainers: [i]
},
null !== t && null !== (t = gi(t)) && yt(t),
e) : (e.eventSystemFlags |= r,
t = e.targetContainers,
null !== i && -1 === t.indexOf(i) && t.push(i),
e)
}
function Ot(e) {
var t = mi(e.target);
if (null !== t) {
var n = ze(t);
if (null !== n)
if (13 === (t = n.tag)) {
if (null !== (t = Fe(n)))
return e.blockedOn = t,
void _t(e.priority, (function() {
At(n)
}
))
} else if (3 === t &&
n.stateNode.current.memoizedState.isDehydrated)
return void (e.blockedOn = 3 === n.tag ?
n.stateNode.containerInfo : null)
}
e.blockedOn = null
}
function Nt(e) {
if (null !== e.blockedOn)
return !1;
for (var t = e.targetContainers; 0 < t.length; ) {
var n = Wt(e.domEventName, e.eventSystemFlags, t[0],
e.nativeEvent);
if (null !== n)
return null !== (t = gi(n)) && yt(t),
e.blockedOn = n,
!1;
var r = new (n = e.nativeEvent).constructor(n.type,n);
ve = r,
n.target.dispatchEvent(r),
ve = null,
t.shift()
}
return !0
}
function Dt(e, t, n) {
Nt(e) && n.delete(t)
}
function Bt() {
Et = !1,
null !== kt && Nt(kt) && (kt = null),
null !== Mt && Nt(Mt) && (Mt = null),
null !== Ct && Nt(Ct) && (Ct = null),
xt.forEach(Dt),
Rt.forEach(Dt)
}
function jt(e, n) {
e.blockedOn === n && (e.blockedOn = null,
Et || (Et = !0,
t.unstable_scheduleCallback(t.unstable_NormalPriority, Bt)))
}
function zt(e) {
function t(t) {
return jt(t, e)
}
if (0 < St.length) {
jt(St[0], e);
for (var n = 1; n < St.length; n++) {
var r = St[n];
r.blockedOn === e && (r.blockedOn = null)
}
}
for (null !== kt && jt(kt, e),
null !== Mt && jt(Mt, e),
null !== Ct && jt(Ct, e),
xt.forEach(t),
Rt.forEach(t),
n = 0; n < Tt.length; n++)
(r = Tt[n]).blockedOn === e && (r.blockedOn = null);
for (; 0 < Tt.length && null === (n = Tt[0]).blockedOn; )
Ot(n),
null === n.blockedOn && Tt.shift()
}
var Ft = v.ReactCurrentBatchConfig
, Ut = !0;
function Kt(e, t, n, r) {
var i = gt
, o = Ft.transition;
Ft.transition = null;
try {
gt = 1,
Ht(e, t, n, r)
} finally {
gt = i,
Ft.transition = o
}
}
function qt(e, t, n, r) {
var i = gt
, o = Ft.transition;
Ft.transition = null;
try {
gt = 4,
Ht(e, t, n, r)
} finally {
gt = i,
Ft.transition = o
}
}
function Ht(e, t, n, r) {
if (Ut) {
var i = Wt(e, t, n, r);
if (null === i)
Ur(e, t, r, Vt, n),
Pt(e, r);
else if (function(e, t, n, r, i) {
switch (t) {
case "focusin":
return kt = Lt(kt, e, t, n, r, i),
!0;
case "dragenter":
return Mt = Lt(Mt, e, t, n, r, i),
!0;
case "mouseover":
return Ct = Lt(Ct, e, t, n, r, i),
!0;
case "pointerover":
var o = i.pointerId;
return xt.set(o, Lt(xt.get(o) || null, e, t, n, r, i)),
!0;
case "gotpointercapture":
return o = i.pointerId,
Rt.set(o, Lt(Rt.get(o) || null, e, t, n, r, i)),
!0
}
return !1
}(i, e, t, n, r))
r.stopPropagation();
else if (Pt(e, r),
4 & t && -1 < It.indexOf(e)) {
for (; null !== i; ) {
var o = gi(i);
if (null !== o && bt(o),
null === (o = Wt(e, t, n, r)) && Ur(e, t, r, Vt, n),
o === i)
break;
i=o
}
null !== i && r.stopPropagation()
} else
Ur(e, t, r, null, n)
}
}
var Vt = null;
function Wt(e, t, n, r) {
if (Vt = null,
null !== (e = mi(e = be(r))))
if (null === (t = ze(e)))
e = null;
else if (13 === (n = t.tag)) {
if (null !== (e = Fe(t)))
return e;
e = null
} else if (3 === n) {
if (t.stateNode.current.memoizedState.isDehydrated)
return 3 === t.tag ? t.stateNode.containerInfo : null;
e = null
} else
t !== e && (e = null);
return Vt = e,
null
}
function $t(e) {
switch (e) {
case "cancel":
case "click":
case "close":
case "contextmenu":
case "copy":
case "cut":
case "auxclick":
case "dblclick":
case "dragend":
case "dragstart":
case "drop":
case "focusin":
case "focusout":
case "input":
case "invalid":
case "keydown":
case "keypress":
case "keyup":
case "mousedown":
case "mouseup":
case "paste":
case "pause":
case "play":
case "pointercancel":
case "pointerdown":
case "pointerup":
case "ratechange":
case "reset":
case "resize":
case "seeked":
case "submit":
case "touchcancel":
case "touchend":
case "touchstart":
case "volumechange":
case "change":
case "selectionchange":
case "textInput":
case "compositionstart":
case "compositionend":
case "compositionupdate":
case "beforeblur":
case "afterblur":
case "beforeinput":
case "blur":
case "fullscreenchange":
case "focus":
case "hashchange":
case "popstate":
case "select":
case "selectstart":
return 1;
case "drag":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "mousemove":
case "mouseout":
case "mouseover":
case "pointermove":
case "pointerout":
case "pointerover":
case "scroll":
case "toggle":
case "touchmove":
case "wheel":
case "mouseenter":
case "mouseleave":
case "pointerenter":
case "pointerleave":
return 4;
case "message":
switch (Qe()) {
case Ze:
return 1;
case Ge:
return 4;
case Xe:
case Je:
return 16;
case et:
return 536870912;
default:
return 16
}
default:
return 16
}
}
var Yt = null
, Qt = null
, Zt = null;
function Gt() {
if (Zt)
return Zt;
var e, t, n = Qt, r = n.length, i = "value"in Yt ? Yt.value :
Yt.textContent, o = i.length;
for (e = 0; e < r && n[e] === i[e]; e++)
;
var a = r - e;
for (t = 1; t <= a && n[r - t] === i[o - t]; t++)
;
return Zt = i.slice(e, 1 < t ? 1 - t : void 0)
}
function Xt(e) {
var t = e.keyCode;
return "charCode"in e ? 0 === (e = e.charCode) && 13 === t && (e
= 13) : e = t,
10 === e && (e = 13),
32 <= e || 13 === e ? e : 0
}
function Jt() {
return !0
}
function en() {
return !1
}
function tn(e) {
function t(t, n, r, i, o) {
for (var a in this._reactName = t,
this._targetInst = r,
this.type = n,
this.nativeEvent = i,
this.target = o,
this.currentTarget = null,
e)
e.hasOwnProperty(a) && (t = e[a],
this[a] = t ? t(i) : i[a]);
return this.isDefaultPrevented = (null != i.defaultPrevented ?
i.defaultPrevented : !1 === i.returnValue) ? Jt : en,
this.isPropagationStopped = en,
this
}
return O(t.prototype, {
preventDefault: function() {
this.defaultPrevented = !0;
var e = this.nativeEvent;
e && (e.preventDefault ? e.preventDefault() : "unknown" !=
typeof e.returnValue && (e.returnValue = !1),
this.isDefaultPrevented = Jt)
},
stopPropagation: function() {
var e = this.nativeEvent;
e && (e.stopPropagation ? e.stopPropagation() : "unknown"
!= typeof e.cancelBubble && (e.cancelBubble = !0),
this.isPropagationStopped = Jt)
},
persist: function() {},
isPersistent: Jt
}),
t
}
var nn, rn, on, an = {
eventPhase: 0,
bubbles: 0,
cancelable: 0,
timeStamp: function(e) {
return e.timeStamp || Date.now()
},
defaultPrevented: 0,
isTrusted: 0
}, sn = tn(an), un = O({}, an, {
view: 0,
detail: 0
}), ln = tn(un), cn = O({}, un, {
screenX: 0,
screenY: 0,
clientX: 0,
clientY: 0,
pageX: 0,
pageY: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
getModifierState: _n,
button: 0,
buttons: 0,
relatedTarget: function(e) {
return void 0 === e.relatedTarget ? e.fromElement ===
e.srcElement ? e.toElement : e.fromElement : e.relatedTarget
},
movementX: function(e) {
return "movementX"in e ? e.movementX : (e !== on && (on &&
"mousemove" === e.type ? (nn = e.screenX - on.screenX,
rn = e.screenY - on.screenY) : rn = nn = 0,
on = e),
nn)
},
movementY: function(e) {
return "movementY"in e ? e.movementY : rn
}
}), dn = tn(cn), fn = tn(O({}, cn, {
dataTransfer: 0
})), hn = tn(O({}, un, {
relatedTarget: 0
})), pn = tn(O({}, an, {
animationName: 0,
elapsedTime: 0,
pseudoElement: 0
})), mn = O({}, an, {
clipboardData: function(e) {
return "clipboardData"in e ? e.clipboardData :
window.clipboardData
}
}), gn = tn(mn), vn = tn(O({}, an, {
data: 0
})), bn = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
Up: "ArrowUp",
Right: "ArrowRight",
Down: "ArrowDown",
Del: "Delete",
Win: "OS",
Menu: "ContextMenu",
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
}, yn = {
8: "Backspace",
9: "Tab",
12: "Clear",
13: "Enter",
16: "Shift",
17: "Control",
18: "Alt",
19: "Pause",
20: "CapsLock",
27: "Escape",
32: " ",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "ArrowLeft",
38: "ArrowUp",
39: "ArrowRight",
40: "ArrowDown",
45: "Insert",
46: "Delete",
112: "F1",
113: "F2",
114: "F3",
115: "F4",
116: "F5",
117: "F6",
118: "F7",
119: "F8",
120: "F9",
121: "F10",
122: "F11",
123: "F12",
144: "NumLock",
145: "ScrollLock",
224: "Meta"
}, An = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
function wn(e) {
var t = this.nativeEvent;
return t.getModifierState ? t.getModifierState(e) : !!(e = An[e]) && !!
t[e]
}
function _n() {
return wn
}
var En = O({}, un, {
key: function(e) {
if (e.key) {
var t = bn[e.key] || e.key;
if ("Unidentified" !== t)
return t
}
return "keypress" === e.type ? 13 === (e = Xt(e)) ? "Enter" :
String.fromCharCode(e) : "keydown" === e.type || "keyup" === e.type ? yn[e.keyCode] ||
"Unidentified" : ""
},
code: 0,
location: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
repeat: 0,
locale: 0,
getModifierState: _n,
charCode: function(e) {
return "keypress" === e.type ? Xt(e) : 0
},
keyCode: function(e) {
return "keydown" === e.type || "keyup" === e.type ?
e.keyCode : 0
},
which: function(e) {
return "keypress" === e.type ? Xt(e) : "keydown" === e.type ||
"keyup" === e.type ? e.keyCode : 0
}
})
, Sn = tn(En)
, kn = tn(O({}, cn, {
pointerId: 0,
width: 0,
height: 0,
pressure: 0,
tangentialPressure: 0,
tiltX: 0,
tiltY: 0,
twist: 0,
pointerType: 0,
isPrimary: 0
}))
, Mn = tn(O({}, un, {
touches: 0,
targetTouches: 0,
changedTouches: 0,
altKey: 0,
metaKey: 0,
ctrlKey: 0,
shiftKey: 0,
getModifierState: _n
}))
, Cn = tn(O({}, an, {
propertyName: 0,
elapsedTime: 0,
pseudoElement: 0
}))
, xn = O({}, cn, {
deltaX: function(e) {
return "deltaX"in e ? e.deltaX : "wheelDeltaX"in e ? -
e.wheelDeltaX : 0
},
deltaY: function(e) {
return "deltaY"in e ? e.deltaY : "wheelDeltaY"in e ? -
e.wheelDeltaY : "wheelDelta"in e ? -e.wheelDelta : 0
},
deltaZ: 0,
deltaMode: 0
})
, Rn = tn(xn)
, Tn = [9, 13, 27, 32]
, In = s && "CompositionEvent"in window
, Pn = null;
s && "documentMode"in document && (Pn =
document.documentMode);
var Ln = s && "TextEvent"in window && !Pn
, On = s && (!In || Pn && 8 < Pn && 11 >= Pn)
, Nn = String.fromCharCode(32)
, Dn = !1;
function Bn(e, t) {
switch (e) {
case "keyup":
return -1 !== Tn.indexOf(t.keyCode);
case "keydown":
return 229 !== t.keyCode;
case "keypress":
case "mousedown":
case "focusout":
return !0;
default:
return !1
}
}
function jn(e) {
return "object" == typeof (e = e.detail) && "data"in e ? e.data : null
}
var zn = !1
, Fn = {
color: !0,
date: !0,
datetime: !0,
"datetime-local": !0,
email: !0,
month: !0,
number: !0,
password: !0,
range: !0,
search: !0,
tel: !0,
text: !0,
time: !0,
url: !0,
week: !0
};
function Un(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return "input" === t ? !!Fn[e.type] : "textarea" === t
}
function Kn(e, t, n, r) {
Ee(r),
0 < (t = qr(t, "onChange")).length && (n = new
sn("onChange","change",null,n,r),
e.push({
event: n,
listeners: t
}))
}
var qn = null
, Hn = null;
function Vn(e) {
Nr(e, 0)
}
function Wn(e) {
if (H(vi(e)))
return e
}
function $n(e, t) {
if ("change" === e)
return t
}
var Yn = !1;
if (s) {
var Qn;
if (s) {
var Zn = "oninput"in document;
if (!Zn) {
var Gn = document.createElement("div");
Gn.setAttribute("oninput", "return;"),
Zn = "function" == typeof Gn.oninput
}
Qn = Zn
} else
Qn = !1;
Yn = Qn && (!document.documentMode || 9 <
document.documentMode)
}
function Xn() {
qn && (qn.detachEvent("onpropertychange", Jn),
Hn = qn = null)
}
function Jn(e) {
if ("value" === e.propertyName && Wn(Hn)) {
var t = [];
Kn(t, Hn, e, be(e)),
xe(Vn, t)
}
}
function er(e, t, n) {
"focusin" === e ? (Xn(),
Hn = n,
(qn = t).attachEvent("onpropertychange", Jn)) : "focusout" === e &&
Xn()
}
function tr(e) {
if ("selectionchange" === e || "keyup" === e || "keydown" === e)
return Wn(Hn)
}
function nr(e, t) {
if ("click" === e)
return Wn(t)
}
function rr(e, t) {
if ("input" === e || "change" === e)
return Wn(t)
}
var ir = "function" == typeof Object.is ? Object.is : function(e, t) {
return e === t && (0 !== e || 1 / e == 1 / t) || e != e && t != t
}
;
function or(e, t) {
if (ir(e, t))
return !0;
if ("object" != typeof e || null === e || "object" != typeof t || null === t)
return !1;
var n = Object.keys(e)
, r = Object.keys(t);
if (n.length !== r.length)
return !1;
for (r = 0; r < n.length; r++) {
var i = n[r];
if (!u.call(t, i) || !ir(e[i], t[i]))
return !1
}
return !0
}
function ar(e) {
for (; e && e.firstChild; )
e = e.firstChild;
return e
}
function sr(e, t) {
var n, r = ar(e);
for (e = 0; r; ) {
if (3 === r.nodeType) {
if (n = e + r.textContent.length,
e <= t && n >= t)
return {
node: r,
offset: t - e
};
e=n
}
e: {
for (; r; ) {
if (r.nextSibling) {
r = r.nextSibling;
break e
}
r = r.parentNode
}
r = void 0
}
r = ar(r)
}
}
function ur(e, t) {
return !(!e || !t) && (e === t || (!e || 3 !== e.nodeType) && (t && 3 ===
t.nodeType ? ur(e, t.parentNode) : "contains"in e ? e.contains(t) : !!
e.compareDocumentPosition && !!(16 & e.compareDocumentPosition(t))))
}
function lr() {
for (var e = window, t = V(); t instanceof e.HTMLIFrameElement; ) {
try {
var n = "string" == typeof t.contentWindow.location.href
} catch (e) {
n = !1
}
if (!n)
break;
t = V((e = t.contentWindow).document)
}
return t
}
function cr(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return t && ("input" === t && ("text" === e.type || "search" ===
e.type || "tel" === e.type || "url" === e.type || "password" === e.type) || "textarea" === t ||
"true" === e.contentEditable)
}
function dr(e) {
var t = lr()
, n = e.focusedElem
, r = e.selectionRange;
if (t !== n && n && n.ownerDocument &&
ur(n.ownerDocument.documentElement, n)) {
if (null !== r && cr(n))
if (t = r.start,
void 0 === (e = r.end) && (e = t),
"selectionStart"in n)
n.selectionStart = t,
n.selectionEnd = Math.min(e, n.value.length);
else if ((e = (t = n.ownerDocument || document) &&
t.defaultView || window).getSelection) {
e = e.getSelection();
var i = n.textContent.length
, o = Math.min(r.start, i);
r = void 0 === r.end ? o : Math.min(r.end, i),
!e.extend && o > r && (i = r,
r = o,
o = i),
i = sr(n, o);
var a = sr(n, r);
i && a && (1 !== e.rangeCount || e.anchorNode !==
i.node || e.anchorOffset !== i.offset || e.focusNode !== a.node || e.focusOffset !==
a.offset) && ((t = t.createRange()).setStart(i.node, i.offset),
e.removeAllRanges(),
o > r ? (e.addRange(t),
e.extend(a.node, a.offset)) : (t.setEnd(a.node, a.offset),
e.addRange(t)))
}
for (t = [],
e = n; e = e.parentNode; )
1 === e.nodeType && t.push({
element: e,
left: e.scrollLeft,
top: e.scrollTop
});
for ("function" == typeof n.focus && n.focus(),
n = 0; n < t.length; n++)
(e = t[n]).element.scrollLeft = e.left,
e.element.scrollTop = e.top
}
}
var fr = s && "documentMode"in document && 11 >=
document.documentMode
, hr = null
, pr = null
, mr = null
, gr = !1;
function vr(e, t, n) {
var r = n.window === n ? n.document : 9 === n.nodeType ? n :
n.ownerDocument;
gr || null == hr || hr !== V(r) || (r = "selectionStart"in (r = hr) && cr(r) ?
{
start: r.selectionStart,
end: r.selectionEnd
}:{
anchorNode: (r = (r.ownerDocument &&
r.ownerDocument.defaultView || window).getSelection()).anchorNode,
anchorOffset: r.anchorOffset,
focusNode: r.focusNode,
focusOffset: r.focusOffset
},
mr && or(mr, r) || (mr = r,
0 < (r = qr(pr, "onSelect")).length && (t = new
sn("onSelect","select",null,t,n),
e.push({
event: t,
listeners: r
}),
t.target = hr)))
}
function br(e, t) {
var n = {};
return n[e.toLowerCase()] = t.toLowerCase(),
n["Webkit" + e] = "webkit" + t,
n["Moz" + e] = "moz" + t,
n
}
var yr = {
animationend: br("Animation", "AnimationEnd"),
animationiteration: br("Animation", "AnimationIteration"),
animationstart: br("Animation", "AnimationStart"),
transitionend: br("Transition", "TransitionEnd")
}
, Ar = {}
, wr = {};
function _r(e) {
if (Ar[e])
return Ar[e];
if (!yr[e])
return e;
var t, n = yr[e];
for (t in n)
if (n.hasOwnProperty(t) && t in wr)
return Ar[e] = n[t];
return e
}
s && (wr = document.createElement("div").style,
"AnimationEvent"in window || (delete yr.animationend.animation,
delete yr.animationiteration.animation,
delete yr.animationstart.animation),
"TransitionEvent"in window || delete yr.transitionend.transition);
var Er = _r("animationend")
, Sr = _r("animationiteration")
, kr = _r("animationstart")
, Mr = _r("transitionend")
, Cr = new Map
, xr = "abort auxClick cancel canPlay canPlayThrough click close
contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart
drop durationChange emptied encrypted ended error gotPointerCapture input invalid
keyDown keyPress keyUp load loadedData loadedMetadata loadStart
lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste
pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver
pointerUp progress rateChange reset resize seeked seeking stalled submit suspend
timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove
waiting wheel".split(" ");
function Rr(e, t) {
Cr.set(e, t),
o(t, [e])
}
for (var Tr = 0; Tr < xr.length; Tr++) {
var Ir = xr[Tr];
Rr(Ir.toLowerCase(), "on" + (Ir[0].toUpperCase() + Ir.slice(1)))
}
Rr(Er, "onAnimationEnd"),
Rr(Sr, "onAnimationIteration"),
Rr(kr, "onAnimationStart"),
Rr("dblclick", "onDoubleClick"),
Rr("focusin", "onFocus"),
Rr("focusout", "onBlur"),
Rr(Mr, "onTransitionEnd"),
a("onMouseEnter", ["mouseout", "mouseover"]),
a("onMouseLeave", ["mouseout", "mouseover"]),
a("onPointerEnter", ["pointerout", "pointerover"]),
a("onPointerLeave", ["pointerout", "pointerover"]),
o("onChange", "change click focusin focusout input keydown keyup
selectionchange".split(" ")),
o("onSelect", "focusout contextmenu dragend focusin keydown keyup
mousedown mouseup selectionchange".split(" ")),
o("onBeforeInput", ["compositionend", "keypress", "textInput", "paste"]),
o("onCompositionEnd", "compositionend focusout keydown keypress
keyup mousedown".split(" ")),
o("onCompositionStart", "compositionstart focusout keydown keypress
keyup mousedown".split(" ")),
o("onCompositionUpdate", "compositionupdate focusout keydown
keypress keyup mousedown".split(" "));
var Pr = "abort canplay canplaythrough durationchange emptied
encrypted ended error loadeddata loadedmetadata loadstart pause play playing
progress ratechange resize seeked seeking stalled suspend timeupdate volumechange
waiting".split(" ")
, Lr = new Set("cancel close invalid load scroll toggle".split("
").concat(Pr));
function Or(e, t, r) {
var i = e.type || "unknown-event";
e.currentTarget = r,
function(e, t, r, i, o, a, s, u, l) {
if (je.apply(this, arguments),
Le) {
if (!Le)
throw Error(n(198));
var c = Oe;
Le = !1,
Oe = null,
Ne || (Ne = !0,
De = c)
}
}(i, t, void 0, e),
e.currentTarget = null
}
function Nr(e, t) {
t = 0 != (4 & t);
for (var n = 0; n < e.length; n++) {
var r = e[n]
, i = r.event;
r = r.listeners;
e: {
var o = void 0;
if (t)
for (var a = r.length - 1; 0 <= a; a--) {
var s = r[a]
, u = s.instance
, l = s.currentTarget;
if (s = s.listener,
u !== o && i.isPropagationStopped())
break e;
Or(i, s, l),
o=u
}
else
for (a = 0; a < r.length; a++) {
if (u = (s = r[a]).instance,
l = s.currentTarget,
s = s.listener,
u !== o && i.isPropagationStopped())
break e;
Or(i, s, l),
o=u
}
}
}
if (Ne)
throw e = De,
Ne = !1,
De = null,
e
}
function Dr(e, t) {
var n = t[fi];
void 0 === n && (n = t[fi] = new Set);
var r = e + "__bubble";
n.has(r) || (Fr(t, e, 2, !1),
n.add(r))
}
function Br(e, t, n) {
var r = 0;
t && (r |= 4),
Fr(n, e, r, t)
}
var jr = "_reactListening" + Math.random().toString(36).slice(2);
function zr(e) {
if (!e[jr]) {
e[jr] = !0,
r.forEach((function(t) {
"selectionchange" !== t && (Lr.has(t) || Br(t, !1, e),
Br(t, !0, e))
}
));
var t = 9 === e.nodeType ? e : e.ownerDocument;
null === t || t[jr] || (t[jr] = !0,
Br("selectionchange", !1, t))
}
}
function Fr(e, t, n, r) {
switch ($t(t)) {
case 1:
var i = Kt;
break;
case 4:
i = qt;
break;
default:
i = Ht
}
n = i.bind(null, t, n, e),
i = void 0,
!Te || "touchstart" !== t && "touchmove" !== t && "wheel" !== t || (i = !
0),
r ? void 0 !== i ? e.addEventListener(t, n, {
capture: !0,
passive: i
}) : e.addEventListener(t, n, !0) : void 0 !== i ? e.addEventListener(t,
n, {
passive: i
}) : e.addEventListener(t, n, !1)
}
function Ur(e, t, n, r, i) {
var o = r;
if (0 == (1 & t) && 0 == (2 & t) && null !== r)
e: for (; ; ) {
if (null === r)
return;
var a = r.tag;
if (3 === a || 4 === a) {
var s = r.stateNode.containerInfo;
if (s === i || 8 === s.nodeType && s.parentNode === i)
break;
if (4 === a)
for (a = r.return; null !== a; ) {
var u = a.tag;
if ((3 === u || 4 === u) && ((u =
a.stateNode.containerInfo) === i || 8 === u.nodeType && u.parentNode === i))
return;
a = a.return
}
for (; null !== s; ) {
if (null === (a = mi(s)))
return;
if (5 === (u = a.tag) || 6 === u) {
r = o = a;
continue e
}
s = s.parentNode
}
}
r = r.return
}
xe((function() {
var r = o
, i = be(n)
, a = [];
e: {
var s = Cr.get(e);
if (void 0 !== s) {
var u = sn
, l = e;
switch (e) {
case "keypress":
if (0 === Xt(n))
break e;
case "keydown":
case "keyup":
u = Sn;
break;
case "focusin":
l = "focus",
u = hn;
break;
case "focusout":
l = "blur",
u = hn;
break;
case "beforeblur":
case "afterblur":
u = hn;
break;
case "click":
if (2 === n.button)
break e;
case "auxclick":
case "dblclick":
case "mousedown":
case "mousemove":
case "mouseup":
case "mouseout":
case "mouseover":
case "contextmenu":
u = dn;
break;
case "drag":
case "dragend":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "dragstart":
case "drop":
u = fn;
break;
case "touchcancel":
case "touchend":
case "touchmove":
case "touchstart":
u = Mn;
break;
case Er:
case Sr:
case kr:
u = pn;
break;
case Mr:
u = Cn;
break;
case "scroll":
u = ln;
break;
case "wheel":
u = Rn;
break;
case "copy":
case "cut":
case "paste":
u = gn;
break;
case "gotpointercapture":
case "lostpointercapture":
case "pointercancel":
case "pointerdown":
case "pointermove":
case "pointerout":
case "pointerover":
case "pointerup":
u = kn
}
var c = 0 != (4 & t)
, d = !c && "scroll" === e
, f = c ? null !== s ? s + "Capture" : null : s;
c = [];
for (var h, p = r; null !== p; ) {
var m = (h = p).stateNode;
if (5 === h.tag && null !== m && (h = m,
null !== f && null != (m = Re(p, f)) && c.push(Kr(p,
m, h))),
d)
break;
p = p.return
}
0 < c.length && (s = new u(s,l,null,n,i),
a.push({
event: s,
listeners: c
}))
}
}
if (0 == (7 & t)) {
if (u = "mouseout" === e || "pointerout" === e,
(!(s = "mouseover" === e || "pointerover" === e) || n === ve
|| !(l = n.relatedTarget || n.fromElement) || !mi(l) && !l[di]) && (u || s) && (s = i.window
=== i ? i : (s = i.ownerDocument) ? s.defaultView || s.parentWindow : window,
u ? (u = r,
null !== (l = (l = n.relatedTarget || n.toElement) ? mi(l) : null)
&& (l !== (d = ze(l)) || 5 !== l.tag && 6 !== l.tag) && (l = null)) : (u = null,
l = r),
u !== l)) {
if (c = dn,
m = "onMouseLeave",
f = "onMouseEnter",
p = "mouse",
"pointerout" !== e && "pointerover" !== e || (c = kn,
m = "onPointerLeave",
f = "onPointerEnter",
p = "pointer"),
d = null == u ? s : vi(u),
h = null == l ? s : vi(l),
(s = new c(m,p + "leave",u,n,i)).target = d,
s.relatedTarget = h,
m = null,
mi(i) === r && ((c = new c(f,p + "enter",l,n,i)).target = h,
c.relatedTarget = d,
m = c),
d = m,
u && l)
e: {
for (f = l,
p = 0,
h = c = u; h; h = Hr(h))
p++;
for (h = 0,
m = f; m; m = Hr(m))
h++;
for (; 0 < p - h; )
c = Hr(c),
p--;
for (; 0 < h - p; )
f = Hr(f),
h--;
for (; p--; ) {
if (c === f || null !== f && c === f.alternate)
break e;
c = Hr(c),
f = Hr(f)
}
c = null
}
else
c = null;
null !== u && Vr(a, s, u, c, !1),
null !== l && null !== d && Vr(a, d, l, c, !0)
}
if ("select" === (u = (s = r ? vi(r) : window).nodeName &&
s.nodeName.toLowerCase()) || "input" === u && "file" === s.type)
var g = $n;
else if (Un(s))
if (Yn)
g = rr;
else {
g = tr;
var v = er
}
else
(u = s.nodeName) && "input" === u.toLowerCase() &&
("checkbox" === s.type || "radio" === s.type) && (g = nr);
switch (g && (g = g(e, r)) ? Kn(a, g, n, i) : (v && v(e, s, r),
"focusout" === e && (v = s._wrapperState) && v.controlled
&& "number" === s.type && G(s, "number", s.value)),
v = r ? vi(r) : window,
e) {
case "focusin":
(Un(v) || "true" === v.contentEditable) && (hr = v,
pr = r,
mr = null);
break;
case "focusout":
mr = pr = hr = null;
break;
case "mousedown":
gr = !0;
break;
case "contextmenu":
case "mouseup":
case "dragend":
gr = !1,
vr(a, n, i);
break;
case "selectionchange":
if (fr)
break;
case "keydown":
case "keyup":
vr(a, n, i)
}
var b;
if (In)
e: {
switch (e) {
case "compositionstart":
var y = "onCompositionStart";
break e;
case "compositionend":
y = "onCompositionEnd";
break e;
case "compositionupdate":
y = "onCompositionUpdate";
break e
}
y = void 0
}
else
zn ? Bn(e, n) && (y = "onCompositionEnd") : "keydown"
=== e && 229 === n.keyCode && (y = "onCompositionStart");
y && (On && "ko" !== n.locale && (zn ||
"onCompositionStart" !== y ? "onCompositionEnd" === y && zn && (b = Gt()) : (Qt =
"value"in (Yt = i) ? Yt.value : Yt.textContent,
zn = !0)),
0 < (v = qr(r, y)).length && (y = new vn(y,e,null,n,i),
a.push({
event: y,
listeners: v
}),
(b || null !== (b = jn(n))) && (y.data = b))),
(b = Ln ? function(e, t) {
switch (e) {
case "compositionend":
return jn(t);
case "keypress":
return 32 !== t.which ? null : (Dn = !0,
Nn);
case "textInput":
return (e = t.data) === Nn && Dn ? null : e;
default:
return null
}
}(e, n) : function(e, t) {
if (zn)
return "compositionend" === e || !In && Bn(e, t) ? (e
= Gt(),
Zt = Qt = Yt = null,
zn = !1,
e) : null;
switch (e) {
case "paste":
default:
return null;
case "keypress":
if (!(t.ctrlKey || t.altKey || t.metaKey) || t.ctrlKey &&
t.altKey) {
if (t.char && 1 < t.char.length)
return t.char;
if (t.which)
return String.fromCharCode(t.which)
}
return null;
case "compositionend":
return On && "ko" !== t.locale ? null : t.data
}
}(e, n)) && 0 < (r = qr(r, "onBeforeInput")).length && (i = new
vn("onBeforeInput","beforeinput",null,n,i),
a.push({
event: i,
listeners: r
}),
i.data = b)
}
Nr(a, t)
}
))
}
function Kr(e, t, n) {
return {
instance: e,
listener: t,
currentTarget: n
}
}
function qr(e, t) {
for (var n = t + "Capture", r = []; null !== e; ) {
var i = e
, o = i.stateNode;
5 === i.tag && null !== o && (i = o,
null != (o = Re(e, n)) && r.unshift(Kr(e, o, i)),
null != (o = Re(e, t)) && r.push(Kr(e, o, i))),
e = e.return
}
return r
}
function Hr(e) {
if (null === e)
return null;
do {
e = e.return
} while (e && 5 !== e.tag);
return e || null
}
function Vr(e, t, n, r, i) {
for (var o = t._reactName, a = []; null !== n && n !== r; ) {
var s = n
, u = s.alternate
, l = s.stateNode;
if (null !== u && u === r)
break;
5 === s.tag && null !== l && (s = l,
i ? null != (u = Re(n, o)) && a.unshift(Kr(n, u, s)) : i || null != (u =
Re(n, o)) && a.push(Kr(n, u, s))),
n = n.return
}
0 !== a.length && e.push({
event: t,
listeners: a
})
}
var Wr = /\r\n?/g
, $r = /\u0000|\uFFFD/g;
function Yr(e) {
return ("string" == typeof e ? e : "" + e).replace(Wr, "\n").replace($r,
"")
}
function Qr(e, t, r) {
if (t = Yr(t),
Yr(e) !== t && r)
throw Error(n(425))
}
function Zr() {}
var Gr = null
, Xr = null;
function Jr(e, t) {
return "textarea" === e || "noscript" === e || "string" == typeof
t.children || "number" == typeof t.children || "object" == typeof
t.dangerouslySetInnerHTML && null !== t.dangerouslySetInnerHTML && null !=
t.dangerouslySetInnerHTML.__html
}
var ei = "function" == typeof setTimeout ? setTimeout : void 0
, ti = "function" == typeof clearTimeout ? clearTimeout : void 0
, ni = "function" == typeof Promise ? Promise : void 0
, ri = "function" == typeof queueMicrotask ? queueMicrotask : void 0 !
== ni ? function(e) {
return ni.resolve(null).then(e).catch(ii)
}
: ei;
function ii(e) {
setTimeout((function() {
throw e
}
))
}
function oi(e, t) {
var n = t
, r = 0;
do {
var i = n.nextSibling;
if (e.removeChild(n),
i && 8 === i.nodeType)
if ("/$" === (n = i.data)) {
if (0 === r)
return e.removeChild(i),
void zt(t);
r--
} else
"$" !== n && "$?" !== n && "$!" !== n || r++;
n=i
} while (n);
zt(t)
}
function ai(e) {
for (; null != e; e = e.nextSibling) {
var t = e.nodeType;
if (1 === t || 3 === t)
break;
if (8 === t) {
if ("$" === (t = e.data) || "$!" === t || "$?" === t)
break;
if ("/$" === t)
return null
}
}
return e
}
function si(e) {
e = e.previousSibling;
for (var t = 0; e; ) {
if (8 === e.nodeType) {
var n = e.data;
if ("$" === n || "$!" === n || "$?" === n) {
if (0 === t)
return e;
t--
} else
"/$" === n && t++
}
e = e.previousSibling
}
return null
}
var ui = Math.random().toString(36).slice(2)
, li = "__reactFiber$" + ui
, ci = "__reactProps$" + ui
, di = "__reactContainer$" + ui
, fi = "__reactEvents$" + ui
, hi = "__reactListeners$" + ui
, pi = "__reactHandles$" + ui;
function mi(e) {
var t = e[li];
if (t)
return t;
for (var n = e.parentNode; n; ) {
if (t = n[di] || n[li]) {
if (n = t.alternate,
null !== t.child || null !== n && null !== n.child)
for (e = si(e); null !== e; ) {
if (n = e[li])
return n;
e = si(e)
}
return t
}
n = (e = n).parentNode
}
return null
}
function gi(e) {
return !(e = e[li] || e[di]) || 5 !== e.tag && 6 !== e.tag && 13 !== e.tag
&& 3 !== e.tag ? null : e
}
function vi(e) {
if (5 === e.tag || 6 === e.tag)
return e.stateNode;
throw Error(n(33))
}
function bi(e) {
return e[ci] || null
}
var yi = []
, Ai = -1;
function wi(e) {
return {
current: e
}
}
function _i(e) {
0 > Ai || (e.current = yi[Ai],
yi[Ai] = null,
Ai--)
}
function Ei(e, t) {
Ai++,
yi[Ai] = e.current,
e.current = t
}
var Si = {}
, ki = wi(Si)
, Mi = wi(!1)
, Ci = Si;
function xi(e, t) {
var n = e.type.contextTypes;
if (!n)
return Si;
var r = e.stateNode;
if (r && r.__reactInternalMemoizedUnmaskedChildContext === t)
return r.__reactInternalMemoizedMaskedChildContext;
var i, o = {};
for (i in n)
o[i] = t[i];
return r && ((e =
e.stateNode).__reactInternalMemoizedUnmaskedChildContext = t,
e.__reactInternalMemoizedMaskedChildContext = o),
o
}
function Ri(e) {
return null != e.childContextTypes
}
function Ti() {
_i(Mi),
_i(ki)
}
function Ii(e, t, r) {
if (ki.current !== Si)
throw Error(n(168));
Ei(ki, t),
Ei(Mi, r)
}
function Pi(e, t, r) {
var i = e.stateNode;
if (t = t.childContextTypes,
"function" != typeof i.getChildContext)
return r;
for (var o in i = i.getChildContext())
if (!(o in t))
throw Error(n(108, F(e) || "Unknown", o));
return O({}, r, i)
}
function Li(e) {
return e = (e = e.stateNode) &&
e.__reactInternalMemoizedMergedChildContext || Si,
Ci = ki.current,
Ei(ki, e),
Ei(Mi, Mi.current),
!0
}
function Oi(e, t, r) {
var i = e.stateNode;
if (!i)
throw Error(n(169));
r ? (e = Pi(e, t, Ci),
i.__reactInternalMemoizedMergedChildContext = e,
_i(Mi),
_i(ki),
Ei(ki, e)) : _i(Mi),
Ei(Mi, r)
}
var Ni = null
, Di = !1
, Bi = !1;
function ji(e) {
null === Ni ? Ni = [e] : Ni.push(e)
}
function zi() {
if (!Bi && null !== Ni) {
Bi = !0;
var e = 0
, t = gt;
try {
var n = Ni;
for (gt = 1; e < n.length; e++) {
var r = n[e];
do {
r = r(!0)
} while (null !== r)
}
Ni = null,
Di = !1
} catch (t) {
throw null !== Ni && (Ni = Ni.slice(e + 1)),
He(Ze, zi),
t
} finally {
gt = t,
Bi = !1
}
}
return null
}
var Fi = []
, Ui = 0
, Ki = null
, qi = 0
, Hi = []
, Vi = 0
, Wi = null
, $i = 1
, Yi = "";
function Qi(e, t) {
Fi[Ui++] = qi,
Fi[Ui++] = Ki,
Ki = e,
qi = t
}
function Zi(e, t, n) {
Hi[Vi++] = $i,
Hi[Vi++] = Yi,
Hi[Vi++] = Wi,
Wi = e;
var r = $i;
e = Yi;
var i = 32 - rt(r) - 1;
r &= ~(1 << i),
n += 1;
var o = 32 - rt(t) + i;
if (30 < o) {
var a = i - i % 5;
o = (r & (1 << a) - 1).toString(32),
r >>= a,
i -= a,
$i = 1 << 32 - rt(t) + i | n << i | r,
Yi = o + e
} else
$i = 1 << o | n << i | r,
Yi = e
}
function Gi(e) {
null !== e.return && (Qi(e, 1),
Zi(e, 1, 0))
}
function Xi(e) {
for (; e === Ki; )
Ki = Fi[--Ui],
Fi[Ui] = null,
qi = Fi[--Ui],
Fi[Ui] = null;
for (; e === Wi; )
Wi = Hi[--Vi],
Hi[Vi] = null,
Yi = Hi[--Vi],
Hi[Vi] = null,
$i = Hi[--Vi],
Hi[Vi] = null
}
var Ji = null
, eo = null
, to = !1
, no = null;
function ro(e, t) {
var n = Rl(5, null, null, 0);
n.elementType = "DELETED",
n.stateNode = t,
n.return = e,
null === (t = e.deletions) ? (e.deletions = [n],
e.flags |= 16) : t.push(n)
}
function io(e, t) {
switch (e.tag) {
case 5:
var n = e.type;
return null !== (t = 1 !== t.nodeType || n.toLowerCase() !==
t.nodeName.toLowerCase() ? null : t) && (e.stateNode = t,
Ji = e,
eo = ai(t.firstChild),
!0);
case 6:
return null !== (t = "" === e.pendingProps || 3 !== t.nodeType ?
null : t) && (e.stateNode = t,
Ji = e,
eo = null,
!0);
case 13:
return null !== (t = 8 !== t.nodeType ? null : t) && (n = null !==
Wi ? {
id: $i,
overflow: Yi
} : null,
e.memoizedState = {
dehydrated: t,
treeContext: n,
retryLane: 1073741824
},
(n = Rl(18, null, null, 0)).stateNode = t,
n.return = e,
e.child = n,
Ji = e,
eo = null,
!0);
default:
return !1
}
}
function oo(e) {
return 0 != (1 & e.mode) && 0 == (128 & e.flags)
}
function ao(e) {
if (to) {
var t = eo;
if (t) {
var r = t;
if (!io(e, t)) {
if (oo(e))
throw Error(n(418));
t = ai(r.nextSibling);
var i = Ji;
t && io(e, t) ? ro(i, r) : (e.flags = -4097 & e.flags | 2,
to = !1,
Ji = e)
}
} else {
if (oo(e))
throw Error(n(418));
e.flags = -4097 & e.flags | 2,
to = !1,
Ji = e
}
}
}
function so(e) {
for (e = e.return; null !== e && 5 !== e.tag && 3 !== e.tag && 13 !==
e.tag; )
e = e.return;
Ji = e
}
function uo(e) {
if (e !== Ji)
return !1;
if (!to)
return so(e),
to = !0,
!1;
var t;
if ((t = 3 !== e.tag) && !(t = 5 !== e.tag) && (t = "head" !== (t =
e.type) && "body" !== t && !Jr(e.type, e.memoizedProps)),
t && (t = eo)) {
if (oo(e))
throw lo(),
Error(n(418));
for (; t; )
ro(e, t),
t = ai(t.nextSibling)
}
if (so(e),
13 === e.tag) {
if (!(e = null !== (e = e.memoizedState) ? e.dehydrated : null))
throw Error(n(317));
e: {
for (e = e.nextSibling,
t = 0; e; ) {
if (8 === e.nodeType) {
var r = e.data;
if ("/$" === r) {
if (0 === t) {
eo = ai(e.nextSibling);
break e
}
t--
} else
"$" !== r && "$!" !== r && "$?" !== r || t++
}
e = e.nextSibling
}
eo = null
}
} else
eo = Ji ? ai(e.stateNode.nextSibling) : null;
return !0
}
function lo() {
for (var e = eo; e; )
e = ai(e.nextSibling)
}
function co() {
eo = Ji = null,
to = !1
}
function fo(e) {
null === no ? no = [e] : no.push(e)
}
var ho = v.ReactCurrentBatchConfig;
function po(e, t) {
if (e && e.defaultProps) {
for (var n in t = O({}, t),
e = e.defaultProps)
void 0 === t[n] && (t[n] = e[n]);
return t
}
return t
}
var mo = wi(null)
, go = null
, vo = null
, bo = null;
function yo() {
bo = vo = go = null
}
function Ao(e) {
var t = mo.current;
_i(mo),
e._currentValue = t
}
function wo(e, t, n) {
for (; null !== e; ) {
var r = e.alternate;
if ((e.childLanes & t) !== t ? (e.childLanes |= t,
null !== r && (r.childLanes |= t)) : null !== r && (r.childLanes &
t) !== t && (r.childLanes |= t),
e === n)
break;
e = e.return
}
}
function _o(e, t) {
go = e,
bo = vo = null,
null !== (e = e.dependencies) && null !== e.firstContext && (0 !=
(e.lanes & t) && (vs = !0),
e.firstContext = null)
}
function Eo(e) {
var t = e._currentValue;
if (bo !== e)
if (e = {
context: e,
memoizedValue: t,
next: null
},
null === vo) {
if (null === go)
throw Error(n(308));
vo = e,
go.dependencies = {
lanes: 0,
firstContext: e
}
} else
vo = vo.next = e;
return t
}
var So = null;
function ko(e) {
null === So ? So = [e] : So.push(e)
}
function Mo(e, t, n, r) {
var i = t.interleaved;
return null === i ? (n.next = n,
ko(t)) : (n.next = i.next,
i.next = n),
t.interleaved = n,
Co(e, r)
}
function Co(e, t) {
e.lanes |= t;
var n = e.alternate;
for (null !== n && (n.lanes |= t),
n = e,
e = e.return; null !== e; )
e.childLanes |= t,
null !== (n = e.alternate) && (n.childLanes |= t),
n = e,
e = e.return;
return 3 === n.tag ? n.stateNode : null
}
var xo = !1;
function Ro(e) {
e.updateQueue = {
baseState: e.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: 0
},
effects: null
}
}
function To(e, t) {
e = e.updateQueue,
t.updateQueue === e && (t.updateQueue = {
baseState: e.baseState,
firstBaseUpdate: e.firstBaseUpdate,
lastBaseUpdate: e.lastBaseUpdate,
shared: e.shared,
effects: e.effects
})
}
function Io(e, t) {
return {
eventTime: e,
lane: t,
tag: 0,
payload: null,
callback: null,
next: null
}
}
function Po(e, t, n) {
var r = e.updateQueue;
if (null === r)
return null;
if (r = r.shared,
0 != (2 & Mu)) {
var i = r.pending;
return null === i ? t.next = t : (t.next = i.next,
i.next = t),
r.pending = t,
Co(e, n)
}
return null === (i = r.interleaved) ? (t.next = t,
ko(r)) : (t.next = i.next,
i.next = t),
r.interleaved = t,
Co(e, n)
}
function Lo(e, t, n) {
if (null !== (t = t.updateQueue) && (t = t.shared,
0 != (4194240 & n))) {
var r = t.lanes;
n |= r &= e.pendingLanes,
t.lanes = n,
mt(e, n)
}
}
function Oo(e, t) {
var n = e.updateQueue
, r = e.alternate;
if (null !== r && n === (r = r.updateQueue)) {
var i = null
, o = null;
if (null !== (n = n.firstBaseUpdate)) {
do {
var a = {
eventTime: n.eventTime,
lane: n.lane,
tag: n.tag,
payload: n.payload,
callback: n.callback,
next: null
};
null === o ? i = o = a : o = o.next = a,
n = n.next
} while (null !== n);
null === o ? i = o = t : o = o.next = t
} else
i = o = t;
return n = {
baseState: r.baseState,
firstBaseUpdate: i,
lastBaseUpdate: o,
shared: r.shared,
effects: r.effects
},
void (e.updateQueue = n)
}
null === (e = n.lastBaseUpdate) ? n.firstBaseUpdate = t : e.next = t,
n.lastBaseUpdate = t
}
function No(e, t, n, r) {
var i = e.updateQueue;
xo = !1;
var o = i.firstBaseUpdate
, a = i.lastBaseUpdate
, s = i.shared.pending;
if (null !== s) {
i.shared.pending = null;
var u = s
, l = u.next;
u.next = null,
null === a ? o = l : a.next = l,
a = u;
var c = e.alternate;
null !== c && (s = (c = c.updateQueue).lastBaseUpdate) !== a
&& (null === s ? c.firstBaseUpdate = l : s.next = l,
c.lastBaseUpdate = u)
}
if (null !== o) {
var d = i.baseState;
for (a = 0,
c = l = u = null,
s = o; ; ) {
var f = s.lane
, h = s.eventTime;
if ((r & f) === f) {
null !== c && (c = c.next = {
eventTime: h,
lane: 0,
tag: s.tag,
payload: s.payload,
callback: s.callback,
next: null
});
e: {
var p = e
, m = s;
switch (f = t,
h = n,
m.tag) {
case 1:
if ("function" == typeof (p = m.payload)) {
d = p.call(h, d, f);
break e
}
d = p;
break e;
case 3:
p.flags = -65537 & p.flags | 128;
case 0:
if (null == (f = "function" == typeof (p =
m.payload) ? p.call(h, d, f) : p))
break e;
d = O({}, d, f);
break e;
case 2:
xo = !0
}
}
null !== s.callback && 0 !== s.lane && (e.flags |= 64,
null === (f = i.effects) ? i.effects = [s] : f.push(s))
} else
h={
eventTime: h,
lane: f,
tag: s.tag,
payload: s.payload,
callback: s.callback,
next: null
},
null === c ? (l = c = h,
u = d) : c = c.next = h,
a |= f;
if (null === (s = s.next)) {
if (null === (s = i.shared.pending))
break;
s = (f = s).next,
f.next = null,
i.lastBaseUpdate = f,
i.shared.pending = null
}
}
if (null === c && (u = d),
i.baseState = u,
i.firstBaseUpdate = l,
i.lastBaseUpdate = c,
null !== (t = i.shared.interleaved)) {
i = t;
do {
a |= i.lane,
i = i.next
} while (i !== t)
} else
null === o && (i.shared.lanes = 0);
Ou |= a,
e.lanes = a,
e.memoizedState = d
}
}
function Do(e, t, r) {
if (e = t.effects,
t.effects = null,
null !== e)
for (t = 0; t < e.length; t++) {
var i = e[t]
, o = i.callback;
if (null !== o) {
if (i.callback = null,
i = r,
"function" != typeof o)
throw Error(n(191, o));
o.call(i)
}
}
}
var Bo = (new e.Component).refs;
function jo(e, t, n, r) {
n = null == (n = n(r, t = e.memoizedState)) ? t : O({}, t, n),
e.memoizedState = n,
0 === e.lanes && (e.updateQueue.baseState = n)
}
var zo = {
isMounted: function(e) {
return !!(e = e._reactInternals) && ze(e) === e
},
enqueueSetState: function(e, t, n) {
e = e._reactInternals;
var r = Xu()
, i = Ju(e)
, o = Io(r, i);
o.payload = t,
null != n && (o.callback = n),
null !== (t = Po(e, o, i)) && (el(t, e, i, r),
Lo(t, e, i))
},
enqueueReplaceState: function(e, t, n) {
e = e._reactInternals;
var r = Xu()
, i = Ju(e)
, o = Io(r, i);
o.tag = 1,
o.payload = t,
null != n && (o.callback = n),
null !== (t = Po(e, o, i)) && (el(t, e, i, r),
Lo(t, e, i))
},
enqueueForceUpdate: function(e, t) {
e = e._reactInternals;
var n = Xu()
, r = Ju(e)
, i = Io(n, r);
i.tag = 2,
null != t && (i.callback = t),
null !== (t = Po(e, i, r)) && (el(t, e, r, n),
Lo(t, e, r))
}
};
function Fo(e, t, n, r, i, o, a) {
return "function" == typeof (e =
e.stateNode).shouldComponentUpdate ? e.shouldComponentUpdate(r, o, a) : !
t.prototype || !t.prototype.isPureReactComponent || !or(n, r) || !or(i, o)
}
function Uo(e, t, n) {
var r = !1
, i = Si
, o = t.contextType;
return "object" == typeof o && null !== o ? o = Eo(o) : (i = Ri(t) ? Ci :
ki.current,
o = (r = null != (r = t.contextTypes)) ? xi(e, i) : Si),
t = new t(n,o),
e.memoizedState = null !== t.state && void 0 !== t.state ? t.state :
null,
t.updater = zo,
e.stateNode = t,
t._reactInternals = e,
r && ((e =
e.stateNode).__reactInternalMemoizedUnmaskedChildContext = i,
e.__reactInternalMemoizedMaskedChildContext = o),
t
}
function Ko(e, t, n, r) {
e = t.state,
"function" == typeof t.componentWillReceiveProps &&
t.componentWillReceiveProps(n, r),
"function" == typeof t.UNSAFE_componentWillReceiveProps &&
t.UNSAFE_componentWillReceiveProps(n, r),
t.state !== e && zo.enqueueReplaceState(t, t.state, null)
}
function qo(e, t, n, r) {
var i = e.stateNode;
i.props = n,
i.state = e.memoizedState,
i.refs = Bo,
Ro(e);
var o = t.contextType;
"object" == typeof o && null !== o ? i.context = Eo(o) : (o = Ri(t) ? Ci
: ki.current,
i.context = xi(e, o)),
i.state = e.memoizedState,
"function" == typeof (o = t.getDerivedStateFromProps) && (jo(e, t, o,
n),
i.state = e.memoizedState),
"function" == typeof t.getDerivedStateFromProps || "function" ==
typeof i.getSnapshotBeforeUpdate || "function" != typeof
i.UNSAFE_componentWillMount && "function" != typeof i.componentWillMount || (t =
i.state,
"function" == typeof i.componentWillMount &&
i.componentWillMount(),
"function" == typeof i.UNSAFE_componentWillMount &&
i.UNSAFE_componentWillMount(),
t !== i.state && zo.enqueueReplaceState(i, i.state, null),
No(e, n, i, r),
i.state = e.memoizedState),
"function" == typeof i.componentDidMount && (e.flags |= 4194308)
}
function Ho(e, t, r) {
if (null !== (e = r.ref) && "function" != typeof e && "object" != typeof
e) {
if (r._owner) {
if (r = r._owner) {
if (1 !== r.tag)
throw Error(n(309));
var i = r.stateNode
}
if (!i)
throw Error(n(147, e));
var o = i
, a = "" + e;
return null !== t && null !== t.ref && "function" == typeof t.ref
&& t.ref._stringRef === a ? t.ref : (t = function(e) {
var t = o.refs;
t === Bo && (t = o.refs = {}),
null === e ? delete t[a] : t[a] = e
}
,
t._stringRef = a,
t)
}
if ("string" != typeof e)
throw Error(n(284));
if (!r._owner)
throw Error(n(290, e))
}
return e
}
function Vo(e, t) {
throw e = Object.prototype.toString.call(t),
Error(n(31, "[object Object]" === e ? "object with keys {" +
Object.keys(t).join(", ") + "}" : e))
}
function Wo(e) {
return (0,
e._init)(e._payload)
}
function $o(e) {
function t(t, n) {
if (e) {
var r = t.deletions;
null === r ? (t.deletions = [n],
t.flags |= 16) : r.push(n)
}
}
function r(n, r) {
if (!e)
return null;
for (; null !== r; )
t(n, r),
r = r.sibling;
return null
}
function i(e, t) {
for (e = new Map; null !== t; )
null !== t.key ? e.set(t.key, t) : e.set(t.index, t),
t = t.sibling;
return e
}
function o(e, t) {
return (e = Il(e, t)).index = 0,
e.sibling = null,
e
}
function a(t, n, r) {
return t.index = r,
e ? null !== (r = t.alternate) ? (r = r.index) < n ? (t.flags |= 2,
n) : r : (t.flags |= 2,
n) : (t.flags |= 1048576,
n)
}
function s(t) {
return e && null === t.alternate && (t.flags |= 2),
t
}
function u(e, t, n, r) {
return null === t || 6 !== t.tag ? ((t = Nl(n, e.mode, r)).return = e,
t) : ((t = o(t, n)).return = e,
t)
}
function l(e, t, n, r) {
var i = n.type;
return i === A ? d(e, t, n.props.children, r, n.key) : null !== t &&
(t.elementType === i || "object" == typeof i && null !== i && i.$$typeof === R && Wo(i)
=== t.type) ? ((r = o(t, n.props)).ref = Ho(e, t, n),
r.return = e,
r) : ((r = Pl(n.type, n.key, n.props, null, e.mode, r)).ref = Ho(e, t,
n),
r.return = e,
r)
}
function c(e, t, n, r) {
return null === t || 4 !== t.tag || t.stateNode.containerInfo !==
n.containerInfo || t.stateNode.implementation !== n.implementation ? ((t = Dl(n, e.mode,
r)).return = e,
t) : ((t = o(t, n.children || [])).return = e,
t)
}
function d(e, t, n, r, i) {
return null === t || 7 !== t.tag ? ((t = Ll(n, e.mode, r, i)).return =
e,
t) : ((t = o(t, n)).return = e,
t)
}
function f(e, t, n) {
if ("string" == typeof t && "" !== t || "number" == typeof t)
return (t = Nl("" + t, e.mode, n)).return = e,
t;
if ("object" == typeof t && null !== t) {
switch (t.$$typeof) {
case b:
return (n = Pl(t.type, t.key, t.props, null, e.mode, n)).ref
= Ho(e, null, t),
n.return = e,
n;
case y:
return (t = Dl(t, e.mode, n)).return = e,
t;
case R:
return f(e, (0,
t._init)(t._payload), n)
}
if (X(t) || P(t))
return (t = Ll(t, e.mode, n, null)).return = e,
t;
Vo(e, t)
}
return null
}
function h(e, t, n, r) {
var i = null !== t ? t.key : null;
if ("string" == typeof n && "" !== n || "number" == typeof n)
return null !== i ? null : u(e, t, "" + n, r);
if ("object" == typeof n && null !== n) {
switch (n.$$typeof) {
case b:
return n.key === i ? l(e, t, n, r) : null;
case y:
return n.key === i ? c(e, t, n, r) : null;
case R:
return h(e, t, (i = n._init)(n._payload), r)
}
if (X(n) || P(n))
return null !== i ? null : d(e, t, n, r, null);
Vo(e, n)
}
return null
}
function p(e, t, n, r, i) {
if ("string" == typeof r && "" !== r || "number" == typeof r)
return u(t, e = e.get(n) || null, "" + r, i);
if ("object" == typeof r && null !== r) {
switch (r.$$typeof) {
case b:
return l(t, e = e.get(null === r.key ? n : r.key) || null, r, i);
case y:
return c(t, e = e.get(null === r.key ? n : r.key) || null, r, i);
case R:
return p(e, t, n, (0,
r._init)(r._payload), i)
}
if (X(r) || P(r))
return d(t, e = e.get(n) || null, r, i, null);
Vo(t, r)
}
return null
}
function m(n, o, s, u) {
for (var l = null, c = null, d = o, m = o = 0, g = null; null !== d &&
m < s.length; m++) {
d.index > m ? (g = d,
d = null) : g = d.sibling;
var v = h(n, d, s[m], u);
if (null === v) {
null === d && (d = g);
break
}
e && d && null === v.alternate && t(n, d),
o = a(v, o, m),
null === c ? l = v : c.sibling = v,
c = v,
d=g
}
if (m === s.length)
return r(n, d),
to && Qi(n, m),
l;
if (null === d) {
for (; m < s.length; m++)
null !== (d = f(n, s[m], u)) && (o = a(d, o, m),
null === c ? l = d : c.sibling = d,
c = d);
return to && Qi(n, m),
l
}
for (d = i(n, d); m < s.length; m++)
null !== (g = p(d, n, m, s[m], u)) && (e && null !==
g.alternate && d.delete(null === g.key ? m : g.key),
o = a(g, o, m),
null === c ? l = g : c.sibling = g,
c = g);
return e && d.forEach((function(e) {
return t(n, e)
}
)),
to && Qi(n, m),
l
}
function g(o, s, u, l) {
var c = P(u);
if ("function" != typeof c)
throw Error(n(150));
if (null == (u = c.call(u)))
throw Error(n(151));
for (var d = c = null, m = s, g = s = 0, v = null, b = u.next(); null !
== m && !b.done; g++,
b = u.next()) {
m.index > g ? (v = m,
m = null) : v = m.sibling;
var y = h(o, m, b.value, l);
if (null === y) {
null === m && (m = v);
break
}
e && m && null === y.alternate && t(o, m),
s = a(y, s, g),
null === d ? c = y : d.sibling = y,
d = y,
m=v
}
if (b.done)
return r(o, m),
to && Qi(o, g),
c;
if (null === m) {
for (; !b.done; g++,
b = u.next())
null !== (b = f(o, b.value, l)) && (s = a(b, s, g),
null === d ? c = b : d.sibling = b,
d = b);
return to && Qi(o, g),
c
}
for (m = i(o, m); !b.done; g++,
b = u.next())
null !== (b = p(m, o, g, b.value, l)) && (e && null !==
b.alternate && m.delete(null === b.key ? g : b.key),
s = a(b, s, g),
null === d ? c = b : d.sibling = b,
d = b);
return e && m.forEach((function(e) {
return t(o, e)
}
)),
to && Qi(o, g),
c
}
return function e(n, i, a, u) {
if ("object" == typeof a && null !== a && a.type === A && null
=== a.key && (a = a.props.children),
"object" == typeof a && null !== a) {
switch (a.$$typeof) {
case b:
e: {
for (var l = a.key, c = i; null !== c; ) {
if (c.key === l) {
if ((l = a.type) === A) {
if (7 === c.tag) {
r(n, c.sibling),
(i = o(c, a.props.children)).return =
n,
n = i;
break e
}
} else if (c.elementType === l || "object" ==
typeof l && null !== l && l.$$typeof === R && Wo(l) === c.type) {
r(n, c.sibling),
(i = o(c, a.props)).ref = Ho(n, c, a),
i.return = n,
n = i;
break e
}
r(n, c);
break
}
t(n, c),
c = c.sibling
}
a.type === A ? ((i = Ll(a.props.children, n.mode, u,
a.key)).return = n,
n = i) : ((u = Pl(a.type, a.key, a.props, null, n.mode,
u)).ref = Ho(n, i, a),
u.return = n,
n = u)
}
return s(n);
case y:
e: {
for (c = a.key; null !== i; ) {
if (i.key === c) {
if (4 === i.tag && i.stateNode.containerInfo
=== a.containerInfo && i.stateNode.implementation === a.implementation) {
r(n, i.sibling),
(i = o(i, a.children || [])).return = n,
n = i;
break e
}
r(n, i);
break
}
t(n, i),
i = i.sibling
}
(i = Dl(a, n.mode, u)).return = n,
n=i
}
return s(n);
case R:
return e(n, i, (c = a._init)(a._payload), u)
}
if (X(a))
return m(n, i, a, u);
if (P(a))
return g(n, i, a, u);
Vo(n, a)
}
return "string" == typeof a && "" !== a || "number" == typeof a ?
(a = "" + a,
null !== i && 6 === i.tag ? (r(n, i.sibling),
(i = o(i, a)).return = n,
n = i) : (r(n, i),
(i = Nl(a, n.mode, u)).return = n,
n = i),
s(n)) : r(n, i)
}
}
var Yo = $o(!0)
, Qo = $o(!1)
, Zo = {}
, Go = wi(Zo)
, Xo = wi(Zo)
, Jo = wi(Zo);
function ea(e) {
if (e === Zo)
throw Error(n(174));
return e
}
function ta(e, t) {
switch (Ei(Jo, t),
Ei(Xo, e),
Ei(Go, Zo),
e = t.nodeType) {
case 9:
case 11:
t = (t = t.documentElement) ? t.namespaceURI : oe(null, "");
break;
default:
t = oe(t = (e = 8 === e ? t.parentNode : t).namespaceURI || null,
e = e.tagName)
}
_i(Go),
Ei(Go, t)
}
function na() {
_i(Go),
_i(Xo),
_i(Jo)
}
function ra(e) {
ea(Jo.current);
var t = ea(Go.current)
, n = oe(t, e.type);
t !== n && (Ei(Xo, e),
Ei(Go, n))
}
function ia(e) {
Xo.current === e && (_i(Go),
_i(Xo))
}
var oa = wi(0);
function aa(e) {
for (var t = e; null !== t; ) {
if (13 === t.tag) {
var n = t.memoizedState;
if (null !== n && (null === (n = n.dehydrated) || "$?" ===
n.data || "$!" === n.data))
return t
} else if (19 === t.tag && void 0 !==
t.memoizedProps.revealOrder) {
if (0 != (128 & t.flags))
return t
} else if (null !== t.child) {
t.child.return = t,
t = t.child;
continue
}
if (t === e)
break;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return null;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
return null
}
var sa = [];
function ua() {
for (var e = 0; e < sa.length; e++)
sa[e]._workInProgressVersionPrimary = null;
sa.length = 0
}
var la = v.ReactCurrentDispatcher
, ca = v.ReactCurrentBatchConfig
, da = 0
, fa = null
, ha = null
, pa = null
, ma = !1
, ga = !1
, va = 0
, ba = 0;
function ya() {
throw Error(n(321))
}
function Aa(e, t) {
if (null === t)
return !1;
for (var n = 0; n < t.length && n < e.length; n++)
if (!ir(e[n], t[n]))
return !1;
return !0
}
function wa(e, t, r, i, o, a) {
if (da = a,
fa = t,
t.memoizedState = null,
t.updateQueue = null,
t.lanes = 0,
la.current = null === e || null === e.memoizedState ? is : os,
e = r(i, o),
ga) {
a = 0;
do {
if (ga = !1,
va = 0,
25 <= a)
throw Error(n(301));
a += 1,
pa = ha = null,
t.updateQueue = null,
la.current = as,
e = r(i, o)
} while (ga)
}
if (la.current = rs,
t = null !== ha && null !== ha.next,
da = 0,
pa = ha = fa = null,
ma = !1,
t)
throw Error(n(300));
return e
}
function _a() {
var e = 0 !== va;
return va = 0,
e
}
function Ea() {
var e = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
return null === pa ? fa.memoizedState = pa = e : pa = pa.next = e,
pa
}
function Sa() {
if (null === ha) {
var e = fa.alternate;
e = null !== e ? e.memoizedState : null
} else
e = ha.next;
var t = null === pa ? fa.memoizedState : pa.next;
if (null !== t)
pa = t,
ha = e;
else {
if (null === e)
throw Error(n(310));
e={
memoizedState: (ha = e).memoizedState,
baseState: ha.baseState,
baseQueue: ha.baseQueue,
queue: ha.queue,
next: null
},
null === pa ? fa.memoizedState = pa = e : pa = pa.next = e
}
return pa
}
function ka(e, t) {
return "function" == typeof t ? t(e) : t
}
function Ma(e) {
var t = Sa()
, r = t.queue;
if (null === r)
throw Error(n(311));
r.lastRenderedReducer = e;
var i = ha
, o = i.baseQueue
, a = r.pending;
if (null !== a) {
if (null !== o) {
var s = o.next;
o.next = a.next,
a.next = s
}
i.baseQueue = o = a,
r.pending = null
}
if (null !== o) {
a = o.next,
i = i.baseState;
var u = s = null
, l = null
, c = a;
do {
var d = c.lane;
if ((da & d) === d)
null !== l && (l = l.next = {
lane: 0,
action: c.action,
hasEagerState: c.hasEagerState,
eagerState: c.eagerState,
next: null
}),
i = c.hasEagerState ? c.eagerState : e(i, c.action);
else {
var f = {
lane: d,
action: c.action,
hasEagerState: c.hasEagerState,
eagerState: c.eagerState,
next: null
};
null === l ? (u = l = f,
s = i) : l = l.next = f,
fa.lanes |= d,
Ou |= d
}
c = c.next
} while (null !== c && c !== a);
null === l ? s = i : l.next = u,
ir(i, t.memoizedState) || (vs = !0),
t.memoizedState = i,
t.baseState = s,
t.baseQueue = l,
r.lastRenderedState = i
}
if (null !== (e = r.interleaved)) {
o = e;
do {
a = o.lane,
fa.lanes |= a,
Ou |= a,
o = o.next
} while (o !== e)
} else
null === o && (r.lanes = 0);
return [t.memoizedState, r.dispatch]
}
function Ca(e) {
var t = Sa()
, r = t.queue;
if (null === r)
throw Error(n(311));
r.lastRenderedReducer = e;
var i = r.dispatch
, o = r.pending
, a = t.memoizedState;
if (null !== o) {
r.pending = null;
var s = o = o.next;
do {
a = e(a, s.action),
s = s.next
} while (s !== o);
ir(a, t.memoizedState) || (vs = !0),
t.memoizedState = a,
null === t.baseQueue && (t.baseState = a),
r.lastRenderedState = a
}
return [a, i]
}
function xa() {}
function Ra(e, t) {
var r = fa
, i = Sa()
, o = t()
, a = !ir(i.memoizedState, o);
if (a && (i.memoizedState = o,
vs = !0),
i = i.queue,
Ua(Pa.bind(null, r, i, e), [e]),
i.getSnapshot !== t || a || null !== pa && 1 & pa.memoizedState.tag)
{
if (r.flags |= 2048,
Da(9, Ia.bind(null, r, i, o, t), void 0, null),
null === Cu)
throw Error(n(349));
0 != (30 & da) || Ta(r, t, o)
}
return o
}
function Ta(e, t, n) {
e.flags |= 16384,
e={
getSnapshot: t,
value: n
},
null === (t = fa.updateQueue) ? (t = {
lastEffect: null,
stores: null
},
fa.updateQueue = t,
t.stores = [e]) : null === (n = t.stores) ? t.stores = [e] : n.push(e)
}
function Ia(e, t, n, r) {
t.value = n,
t.getSnapshot = r,
La(t) && Oa(e)
}
function Pa(e, t, n) {
return n((function() {
La(t) && Oa(e)
}
))
}
function La(e) {
var t = e.getSnapshot;
e = e.value;
try {
var n = t();
return !ir(e, n)
} catch (e) {
return !0
}
}
function Oa(e) {
var t = Co(e, 1);
null !== t && el(t, e, 1, -1)
}
function Na(e) {
var t = Ea();
return "function" == typeof e && (e = e()),
t.memoizedState = t.baseState = e,
e={
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: ka,
lastRenderedState: e
},
t.queue = e,
e = e.dispatch = Ja.bind(null, fa, e),
[t.memoizedState, e]
}
function Da(e, t, n, r) {
return e = {
tag: e,
create: t,
destroy: n,
deps: r,
next: null
},
null === (t = fa.updateQueue) ? (t = {
lastEffect: null,
stores: null
},
fa.updateQueue = t,
t.lastEffect = e.next = e) : null === (n = t.lastEffect) ? t.lastEffect =
e.next = e : (r = n.next,
n.next = e,
e.next = r,
t.lastEffect = e),
e
}
function Ba() {
return Sa().memoizedState
}
function ja(e, t, n, r) {
var i = Ea();
fa.flags |= e,
i.memoizedState = Da(1 | t, n, void 0, void 0 === r ? null : r)
}
function za(e, t, n, r) {
var i = Sa();
r = void 0 === r ? null : r;
var o = void 0;
if (null !== ha) {
var a = ha.memoizedState;
if (o = a.destroy,
null !== r && Aa(r, a.deps))
return void (i.memoizedState = Da(t, n, o, r))
}
fa.flags |= e,
i.memoizedState = Da(1 | t, n, o, r)
}
function Fa(e, t) {
return ja(8390656, 8, e, t)
}
function Ua(e, t) {
return za(2048, 8, e, t)
}
function Ka(e, t) {
return za(4, 2, e, t)
}
function qa(e, t) {
return za(4, 4, e, t)
}
function Ha(e, t) {
return "function" == typeof t ? (e = e(),
t(e),
function() {
t(null)
}
) : null != t ? (e = e(),
t.current = e,
function() {
t.current = null
}
) : void 0
}
function Va(e, t, n) {
return n = null != n ? n.concat([e]) : null,
za(4, 4, Ha.bind(null, t, e), n)
}
function Wa() {}
function $a(e, t) {
var n = Sa();
t = void 0 === t ? null : t;
var r = n.memoizedState;
return null !== r && null !== t && Aa(t, r[1]) ? r[0] : (n.memoizedState
= [e, t],
e)
}
function Ya(e, t) {
var n = Sa();
t = void 0 === t ? null : t;
var r = n.memoizedState;
return null !== r && null !== t && Aa(t, r[1]) ? r[0] : (e = e(),
n.memoizedState = [e, t],
e)
}
function Qa(e, t, n) {
return 0 == (21 & da) ? (e.baseState && (e.baseState = !1,
vs = !0),
e.memoizedState = n) : (ir(n, t) || (n = ft(),
fa.lanes |= n,
Ou |= n,
e.baseState = !0),
t)
}
function Za(e, t) {
var n = gt;
gt = 0 !== n && 4 > n ? n : 4,
e(!0);
var r = ca.transition;
ca.transition = {};
try {
e(!1),
t()
} finally {
gt = n,
ca.transition = r
}
}
function Ga() {
return Sa().memoizedState
}
function Xa(e, t, n) {
var r = Ju(e);
n={
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
},
es(e) ? ts(t, n) : null !== (n = Mo(e, t, n, r)) && (el(n, e, r, Xu()),
ns(n, t, r))
}
function Ja(e, t, n) {
var r = Ju(e)
,i={
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
};
if (es(e))
ts(t, i);
else {
var o = e.alternate;
if (0 === e.lanes && (null === o || 0 === o.lanes) && null !== (o
= t.lastRenderedReducer))
try {
var a = t.lastRenderedState
, s = o(a, n);
if (i.hasEagerState = !0,
i.eagerState = s,
ir(s, a)) {
var u = t.interleaved;
return null === u ? (i.next = i,
ko(t)) : (i.next = u.next,
u.next = i),
void (t.interleaved = i)
}
} catch (e) {}
null !== (n = Mo(e, t, i, r)) && (el(n, e, r, i = Xu()),
ns(n, t, r))
}
}
function es(e) {
var t = e.alternate;
return e === fa || null !== t && t === fa
}
function ts(e, t) {
ga = ma = !0;
var n = e.pending;
null === n ? t.next = t : (t.next = n.next,
n.next = t),
e.pending = t
}
function ns(e, t, n) {
if (0 != (4194240 & n)) {
var r = t.lanes;
n |= r &= e.pendingLanes,
t.lanes = n,
mt(e, n)
}
}
var rs = {
readContext: Eo,
useCallback: ya,
useContext: ya,
useEffect: ya,
useImperativeHandle: ya,
useInsertionEffect: ya,
useLayoutEffect: ya,
useMemo: ya,
useReducer: ya,
useRef: ya,
useState: ya,
useDebugValue: ya,
useDeferredValue: ya,
useTransition: ya,
useMutableSource: ya,
useSyncExternalStore: ya,
useId: ya,
unstable_isNewReconciler: !1
}
, is = {
readContext: Eo,
useCallback: function(e, t) {
return Ea().memoizedState = [e, void 0 === t ? null : t],
e
},
useContext: Eo,
useEffect: Fa,
useImperativeHandle: function(e, t, n) {
return n = null != n ? n.concat([e]) : null,
ja(4194308, 4, Ha.bind(null, t, e), n)
},
useLayoutEffect: function(e, t) {
return ja(4194308, 4, e, t)
},
useInsertionEffect: function(e, t) {
return ja(4, 2, e, t)
},
useMemo: function(e, t) {
var n = Ea();
return t = void 0 === t ? null : t,
e = e(),
n.memoizedState = [e, t],
e
},
useReducer: function(e, t, n) {
var r = Ea();
return t = void 0 !== n ? n(t) : t,
r.memoizedState = r.baseState = t,
e={
pending: null,
interleaved: null,
lanes: 0,
dispatch: null,
lastRenderedReducer: e,
lastRenderedState: t
},
r.queue = e,
e = e.dispatch = Xa.bind(null, fa, e),
[r.memoizedState, e]
},
useRef: function(e) {
return e = {
current: e
},
Ea().memoizedState = e
},
useState: Na,
useDebugValue: Wa,
useDeferredValue: function(e) {
return Ea().memoizedState = e
},
useTransition: function() {
var e = Na(!1)
, t = e[0];
return e = Za.bind(null, e[1]),
Ea().memoizedState = e,
[t, e]
},
useMutableSource: function() {},
useSyncExternalStore: function(e, t, r) {
var i = fa
, o = Ea();
if (to) {
if (void 0 === r)
throw Error(n(407));
r = r()
} else {
if (r = t(),
null === Cu)
throw Error(n(349));
0 != (30 & da) || Ta(i, t, r)
}
o.memoizedState = r;
var a = {
value: r,
getSnapshot: t
};
return o.queue = a,
Fa(Pa.bind(null, i, a, e), [e]),
i.flags |= 2048,
Da(9, Ia.bind(null, i, a, r, t), void 0, null),
r
},
useId: function() {
var e = Ea()
, t = Cu.identifierPrefix;
if (to) {
var n = Yi;
t = ":" + t + "R" + (n = ($i & ~(1 << 32 - rt($i) -
1)).toString(32) + n),
0 < (n = va++) && (t += "H" + n.toString(32)),
t += ":"
} else
t = ":" + t + "r" + (n = ba++).toString(32) + ":";
return e.memoizedState = t
},
unstable_isNewReconciler: !1
}
, os = {
readContext: Eo,
useCallback: $a,
useContext: Eo,
useEffect: Ua,
useImperativeHandle: Va,
useInsertionEffect: Ka,
useLayoutEffect: qa,
useMemo: Ya,
useReducer: Ma,
useRef: Ba,
useState: function() {
return Ma(ka)
},
useDebugValue: Wa,
useDeferredValue: function(e) {
return Qa(Sa(), ha.memoizedState, e)
},
useTransition: function() {
return [Ma(ka)[0], Sa().memoizedState]
},
useMutableSource: xa,
useSyncExternalStore: Ra,
useId: Ga,
unstable_isNewReconciler: !1
}
, as = {
readContext: Eo,
useCallback: $a,
useContext: Eo,
useEffect: Ua,
useImperativeHandle: Va,
useInsertionEffect: Ka,
useLayoutEffect: qa,
useMemo: Ya,
useReducer: Ca,
useRef: Ba,
useState: function() {
return Ca(ka)
},
useDebugValue: Wa,
useDeferredValue: function(e) {
var t = Sa();
return null === ha ? t.memoizedState = e : Qa(t,
ha.memoizedState, e)
},
useTransition: function() {
return [Ca(ka)[0], Sa().memoizedState]
},
useMutableSource: xa,
useSyncExternalStore: Ra,
useId: Ga,
unstable_isNewReconciler: !1
};
function ss(e, t) {
try {
var n = ""
, r = t;
do {
n += j(r),
r = r.return
} while (r);
var i = n
} catch (e) {
i = "\nError generating stack: " + e.message + "\n" + e.stack
}
return {
value: e,
source: t,
stack: i,
digest: null
}
}
function us(e, t, n) {
return {
value: e,
source: null,
stack: null != n ? n : null,
digest: null != t ? t : null
}
}
function ls(e, t) {
try {
console.error(t.value)
} catch (e) {
setTimeout((function() {
throw e
}
))
}
}
var cs = "function" == typeof WeakMap ? WeakMap : Map;
function ds(e, t, n) {
(n = Io(-1, n)).tag = 3,
n.payload = {
element: null
};
var r = t.value;
return n.callback = function() {
Ku || (Ku = !0,
qu = r),
ls(0, t)
}
,
n
}
function fs(e, t, n) {
(n = Io(-1, n)).tag = 3;
var r = e.type.getDerivedStateFromError;
if ("function" == typeof r) {
var i = t.value;
n.payload = function() {
return r(i)
}
,
n.callback = function() {
ls(0, t)
}
}
var o = e.stateNode;
return null !== o && "function" == typeof o.componentDidCatch &&
(n.callback = function() {
ls(0, t),
"function" != typeof r && (null === Hu ? Hu = new Set([this]) :
Hu.add(this));
var e = t.stack;
this.componentDidCatch(t.value, {
componentStack: null !== e ? e : ""
})
}
),
n
}
function hs(e, t, n) {
var r = e.pingCache;
if (null === r) {
r = e.pingCache = new cs;
var i = new Set;
r.set(t, i)
} else
void 0 === (i = r.get(t)) && (i = new Set,
r.set(t, i));
i.has(n) || (i.add(n),
e = El.bind(null, e, t, n),
t.then(e, e))
}
function ps(e) {
do {
var t;
if ((t = 13 === e.tag) && (t = null === (t = e.memoizedState) ||
null !== t.dehydrated),
t)
return e;
e = e.return
} while (null !== e);
return null
}
function ms(e, t, n, r, i) {
return 0 == (1 & e.mode) ? (e === t ? e.flags |= 65536 : (e.flags |=
128,
n.flags |= 131072,
n.flags &= -52805,
1 === n.tag && (null === n.alternate ? n.tag = 17 : ((t = Io(-1, 1)).tag
= 2,
Po(n, t, 1))),
n.lanes |= 1),
e) : (e.flags |= 65536,
e.lanes = i,
e)
}
var gs = v.ReactCurrentOwner
, vs = !1;
function bs(e, t, n, r) {
t.child = null === e ? Qo(t, null, n, r) : Yo(t, e.child, n, r)
}
function ys(e, t, n, r, i) {
n = n.render;
var o = t.ref;
return _o(t, i),
r = wa(e, t, n, r, o, i),
n = _a(),
null === e || vs ? (to && n && Gi(t),
t.flags |= 1,
bs(e, t, r, i),
t.child) : (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
Ks(e, t, i))
}
function As(e, t, n, r, i) {
if (null === e) {
var o = n.type;
return "function" != typeof o || Tl(o) || void 0 !== o.defaultProps ||
null !== n.compare || void 0 !== n.defaultProps ? ((e = Pl(n.type, null, r, t, t.mode, i)).ref
= t.ref,
e.return = t,
t.child = e) : (t.tag = 15,
t.type = o,
ws(e, t, o, r, i))
}
if (o = e.child,
0 == (e.lanes & i)) {
var a = o.memoizedProps;
if ((n = null !== (n = n.compare) ? n : or)(a, r) && e.ref === t.ref)
return Ks(e, t, i)
}
return t.flags |= 1,
(e = Il(o, r)).ref = t.ref,
e.return = t,
t.child = e
}
function ws(e, t, n, r, i) {
if (null !== e) {
var o = e.memoizedProps;
if (or(o, r) && e.ref === t.ref) {
if (vs = !1,
t.pendingProps = r = o,
0 == (e.lanes & i))
return t.lanes = e.lanes,
Ks(e, t, i);
0 != (131072 & e.flags) && (vs = !0)
}
}
return Ss(e, t, n, r, i)
}
function _s(e, t, n) {
var r = t.pendingProps
, i = r.children
, o = null !== e ? e.memoizedState : null;
if ("hidden" === r.mode)
if (0 == (1 & t.mode))
t.memoizedState = {
baseLanes: 0,
cachePool: null,
transitions: null
},
Ei(Iu, Tu),
Tu |= n;
else {
if (0 == (1073741824 & n))
return e = null !== o ? o.baseLanes | n : n,
t.lanes = t.childLanes = 1073741824,
t.memoizedState = {
baseLanes: e,
cachePool: null,
transitions: null
},
t.updateQueue = null,
Ei(Iu, Tu),
Tu |= e,
null;
t.memoizedState = {
baseLanes: 0,
cachePool: null,
transitions: null
},
r = null !== o ? o.baseLanes : n,
Ei(Iu, Tu),
Tu |= r
}
else
null !== o ? (r = o.baseLanes | n,
t.memoizedState = null) : r = n,
Ei(Iu, Tu),
Tu |= r;
return bs(e, t, i, n),
t.child
}
function Es(e, t) {
var n = t.ref;
(null === e && null !== n || null !== e && e.ref !== n) && (t.flags |=
512,
t.flags |= 2097152)
}
function Ss(e, t, n, r, i) {
var o = Ri(n) ? Ci : ki.current;
return o = xi(t, o),
_o(t, i),
n = wa(e, t, n, r, o, i),
r = _a(),
null === e || vs ? (to && r && Gi(t),
t.flags |= 1,
bs(e, t, n, i),
t.child) : (t.updateQueue = e.updateQueue,
t.flags &= -2053,
e.lanes &= ~i,
Ks(e, t, i))
}
function ks(e, t, n, r, i) {
if (Ri(n)) {
var o = !0;
Li(t)
} else
o = !1;
if (_o(t, i),
null === t.stateNode)
Us(e, t),
Uo(t, n, r),
qo(t, n, r, i),
r = !0;
else if (null === e) {
var a = t.stateNode
, s = t.memoizedProps;
a.props = s;
var u = a.context
, l = n.contextType;
l = "object" == typeof l && null !== l ? Eo(l) : xi(t, l = Ri(n) ? Ci :
ki.current);
var c = n.getDerivedStateFromProps
, d = "function" == typeof c || "function" == typeof
a.getSnapshotBeforeUpdate;
d || "function" != typeof
a.UNSAFE_componentWillReceiveProps && "function" != typeof
a.componentWillReceiveProps || (s !== r || u !== l) && Ko(t, a, r, l),
xo = !1;
var f = t.memoizedState;
a.state = f,
No(t, r, a, i),
u = t.memoizedState,
s !== r || f !== u || Mi.current || xo ? ("function" == typeof c &&
(jo(t, n, c, r),
u = t.memoizedState),
(s = xo || Fo(t, n, s, r, f, u, l)) ? (d || "function" != typeof
a.UNSAFE_componentWillMount && "function" != typeof a.componentWillMount ||
("function" == typeof a.componentWillMount && a.componentWillMount(),
"function" == typeof a.UNSAFE_componentWillMount &&
a.UNSAFE_componentWillMount()),
"function" == typeof a.componentDidMount && (t.flags |=
4194308)) : ("function" == typeof a.componentDidMount && (t.flags |= 4194308),
t.memoizedProps = r,
t.memoizedState = u),
a.props = r,
a.state = u,
a.context = l,
r = s) : ("function" == typeof a.componentDidMount && (t.flags |
= 4194308),
r = !1)
} else {
a = t.stateNode,
To(e, t),
s = t.memoizedProps,
l = t.type === t.elementType ? s : po(t.type, s),
a.props = l,
d = t.pendingProps,
f = a.context,
u = "object" == typeof (u = n.contextType) && null !== u ?
Eo(u) : xi(t, u = Ri(n) ? Ci : ki.current);
var h = n.getDerivedStateFromProps;
(c = "function" == typeof h || "function" == typeof
a.getSnapshotBeforeUpdate) || "function" != typeof
a.UNSAFE_componentWillReceiveProps && "function" != typeof
a.componentWillReceiveProps || (s !== d || f !== u) && Ko(t, a, r, u),
xo = !1,
f = t.memoizedState,
a.state = f,
No(t, r, a, i);
var p = t.memoizedState;
s !== d || f !== p || Mi.current || xo ? ("function" == typeof h &&
(jo(t, n, h, r),
p = t.memoizedState),
(l = xo || Fo(t, n, l, r, f, p, u) || !1) ? (c || "function" != typeof
a.UNSAFE_componentWillUpdate && "function" != typeof a.componentWillUpdate ||
("function" == typeof a.componentWillUpdate && a.componentWillUpdate(r, p, u),
"function" == typeof a.UNSAFE_componentWillUpdate &&
a.UNSAFE_componentWillUpdate(r, p, u)),
"function" == typeof a.componentDidUpdate && (t.flags |= 4),
"function" == typeof a.getSnapshotBeforeUpdate && (t.flags |=
1024)) : ("function" != typeof a.componentDidUpdate || s === e.memoizedProps && f
=== e.memoizedState || (t.flags |= 4),
"function" != typeof a.getSnapshotBeforeUpdate || s ===
e.memoizedProps && f === e.memoizedState || (t.flags |= 1024),
t.memoizedProps = r,
t.memoizedState = p),
a.props = r,
a.state = p,
a.context = u,
r = l) : ("function" != typeof a.componentDidUpdate || s ===
e.memoizedProps && f === e.memoizedState || (t.flags |= 4),
"function" != typeof a.getSnapshotBeforeUpdate || s ===
e.memoizedProps && f === e.memoizedState || (t.flags |= 1024),
r = !1)
}
return Ms(e, t, n, r, o, i)
}
function Ms(e, t, n, r, i, o) {
Es(e, t);
var a = 0 != (128 & t.flags);
if (!r && !a)
return i && Oi(t, n, !1),
Ks(e, t, o);
r = t.stateNode,
gs.current = t;
var s = a && "function" != typeof n.getDerivedStateFromError ?
null : r.render();
return t.flags |= 1,
null !== e && a ? (t.child = Yo(t, e.child, null, o),
t.child = Yo(t, null, s, o)) : bs(e, t, s, o),
t.memoizedState = r.state,
i && Oi(t, n, !0),
t.child
}
function Cs(e) {
var t = e.stateNode;
t.pendingContext ? Ii(0, t.pendingContext, t.pendingContext !==
t.context) : t.context && Ii(0, t.context, !1),
ta(e, t.containerInfo)
}
function xs(e, t, n, r, i) {
return co(),
fo(i),
t.flags |= 256,
bs(e, t, n, r),
t.child
}
var Rs, Ts, Is, Ps, Ls = {
dehydrated: null,
treeContext: null,
retryLane: 0
};
function Os(e) {
return {
baseLanes: e,
cachePool: null,
transitions: null
}
}
function Ns(e, t, r) {
var i, o = t.pendingProps, a = oa.current, s = !1, u = 0 != (128 &
t.flags);
if ((i = u) || (i = (null === e || null !== e.memoizedState) && 0 != (2 &
a)),
i ? (s = !0,
t.flags &= -129) : null !== e && null === e.memoizedState || (a |= 1),
Ei(oa, 1 & a),
null === e)
return ao(t),
null !== (e = t.memoizedState) && null !== (e = e.dehydrated) ?
(0 == (1 & t.mode) ? t.lanes = 1 : "$!" === e.data ? t.lanes = 8 : t.lanes = 1073741824,
null) : (u = o.children,
e = o.fallback,
s ? (o = t.mode,
s = t.child,
u={
mode: "hidden",
children: u
},
0 == (1 & o) && null !== s ? (s.childLanes = 0,
s.pendingProps = u) : s = Ol(u, o, 0, null),
e = Ll(e, o, r, null),
s.return = t,
e.return = t,
s.sibling = e,
t.child = s,
t.child.memoizedState = Os(r),
t.memoizedState = Ls,
e) : Ds(t, u));
if (null !== (a = e.memoizedState) && null !== (i = a.dehydrated))
return function(e, t, r, i, o, a, s) {
if (r)
return 256 & t.flags ? (t.flags &= -257,
Bs(e, t, s, i = us(Error(n(422))))) : null !==
t.memoizedState ? (t.child = e.child,
t.flags |= 128,
null) : (a = i.fallback,
o = t.mode,
i = Ol({
mode: "visible",
children: i.children
}, o, 0, null),
(a = Ll(a, o, s, null)).flags |= 2,
i.return = t,
a.return = t,
i.sibling = a,
t.child = i,
0 != (1 & t.mode) && Yo(t, e.child, null, s),
t.child.memoizedState = Os(s),
t.memoizedState = Ls,
a);
if (0 == (1 & t.mode))
return Bs(e, t, s, null);
if ("$!" === o.data) {
if (i = o.nextSibling && o.nextSibling.dataset)
var u = i.dgst;
return i = u,
Bs(e, t, s, i = us(a = Error(n(419)), i, void 0))
}
if (u = 0 != (s & e.childLanes),
vs || u) {
if (null !== (i = Cu)) {
switch (s & -s) {
case 4:
o = 2;
break;
case 16:
o = 8;
break;
case 64:
case 128:
case 256:
case 512:
case 1024:
case 2048:
case 4096:
case 8192:
case 16384:
case 32768:
case 65536:
case 131072:
case 262144:
case 524288:
case 1048576:
case 2097152:
case 4194304:
case 8388608:
case 16777216:
case 33554432:
case 67108864:
o = 32;
break;
case 536870912:
o = 268435456;
break;
default:
o=0
}
0 !== (o = 0 != (o & (i.suspendedLanes | s)) ? 0 : o)
&& o !== a.retryLane && (a.retryLane = o,
Co(e, o),
el(i, e, o, -1))
}
return hl(),
Bs(e, t, s, i = us(Error(n(421))))
}
return "$?" === o.data ? (t.flags |= 128,
t.child = e.child,
t = kl.bind(null, e),
o._reactRetry = t,
null) : (e = a.treeContext,
eo = ai(o.nextSibling),
Ji = t,
to = !0,
no = null,
null !== e && (Hi[Vi++] = $i,
Hi[Vi++] = Yi,
Hi[Vi++] = Wi,
$i = e.id,
Yi = e.overflow,
Wi = t),
(t = Ds(t, i.children)).flags |= 4096,
t)
}(e, t, u, o, i, a, r);
if (s) {
s = o.fallback,
u = t.mode,
i = (a = e.child).sibling;
var l = {
mode: "hidden",
children: o.children
};
return 0 == (1 & u) && t.child !== a ? ((o = t.child).childLanes =
0,
o.pendingProps = l,
t.deletions = null) : (o = Il(a, l)).subtreeFlags = 14680064 &
a.subtreeFlags,
null !== i ? s = Il(i, s) : (s = Ll(s, u, r, null)).flags |= 2,
s.return = t,
o.return = t,
o.sibling = s,
t.child = o,
o = s,
s = t.child,
u = null === (u = e.child.memoizedState) ? Os(r) : {
baseLanes: u.baseLanes | r,
cachePool: null,
transitions: u.transitions
},
s.memoizedState = u,
s.childLanes = e.childLanes & ~r,
t.memoizedState = Ls,
o
}
return e = (s = e.child).sibling,
o = Il(s, {
mode: "visible",
children: o.children
}),
0 == (1 & t.mode) && (o.lanes = r),
o.return = t,
o.sibling = null,
null !== e && (null === (r = t.deletions) ? (t.deletions = [e],
t.flags |= 16) : r.push(e)),
t.child = o,
t.memoizedState = null,
o
}
function Ds(e, t) {
return (t = Ol({
mode: "visible",
children: t
}, e.mode, 0, null)).return = e,
e.child = t
}
function Bs(e, t, n, r) {
return null !== r && fo(r),
Yo(t, e.child, null, n),
(e = Ds(t, t.pendingProps.children)).flags |= 2,
t.memoizedState = null,
e
}
function js(e, t, n) {
e.lanes |= t;
var r = e.alternate;
null !== r && (r.lanes |= t),
wo(e.return, t, n)
}
function zs(e, t, n, r, i) {
var o = e.memoizedState;
null === o ? e.memoizedState = {
isBackwards: t,
rendering: null,
renderingStartTime: 0,
last: r,
tail: n,
tailMode: i
} : (o.isBackwards = t,
o.rendering = null,
o.renderingStartTime = 0,
o.last = r,
o.tail = n,
o.tailMode = i)
}
function Fs(e, t, n) {
var r = t.pendingProps
, i = r.revealOrder
, o = r.tail;
if (bs(e, t, r.children, n),
0 != (2 & (r = oa.current)))
r = 1 & r | 2,
t.flags |= 128;
else {
if (null !== e && 0 != (128 & e.flags))
e: for (e = t.child; null !== e; ) {
if (13 === e.tag)
null !== e.memoizedState && js(e, n, t);
else if (19 === e.tag)
js(e, n, t);
else if (null !== e.child) {
e.child.return = e,
e = e.child;
continue
}
if (e === t)
break e;
for (; null === e.sibling; ) {
if (null === e.return || e.return === t)
break e;
e = e.return
}
e.sibling.return = e.return,
e = e.sibling
}
r &= 1
}
if (Ei(oa, r),
0 == (1 & t.mode))
t.memoizedState = null;
else
switch (i) {
case "forwards":
for (n = t.child,
i = null; null !== n; )
null !== (e = n.alternate) && null === aa(e) && (i = n),
n = n.sibling;
null === (n = i) ? (i = t.child,
t.child = null) : (i = n.sibling,
n.sibling = null),
zs(t, !1, i, n, o);
break;
case "backwards":
for (n = null,
i = t.child,
t.child = null; null !== i; ) {
if (null !== (e = i.alternate) && null === aa(e)) {
t.child = i;
break
}
e = i.sibling,
i.sibling = n,
n = i,
i=e
}
zs(t, !0, n, null, o);
break;
case "together":
zs(t, !1, null, null, void 0);
break;
default:
t.memoizedState = null
}
return t.child
}
function Us(e, t) {
0 == (1 & t.mode) && null !== e && (e.alternate = null,
t.alternate = null,
t.flags |= 2)
}
function Ks(e, t, r) {
if (null !== e && (t.dependencies = e.dependencies),
Ou |= t.lanes,
0 == (r & t.childLanes))
return null;
if (null !== e && t.child !== e.child)
throw Error(n(153));
if (null !== t.child) {
for (r = Il(e = t.child, e.pendingProps),
t.child = r,
r.return = t; null !== e.sibling; )
e = e.sibling,
(r = r.sibling = Il(e, e.pendingProps)).return = t;
r.sibling = null
}
return t.child
}
function qs(e, t) {
if (!to)
switch (e.tailMode) {
case "hidden":
t = e.tail;
for (var n = null; null !== t; )
null !== t.alternate && (n = t),
t = t.sibling;
null === n ? e.tail = null : n.sibling = null;
break;
case "collapsed":
n = e.tail;
for (var r = null; null !== n; )
null !== n.alternate && (r = n),
n = n.sibling;
null === r ? t || null === e.tail ? e.tail = null : e.tail.sibling =
null : r.sibling = null
}
}
function Hs(e) {
var t = null !== e.alternate && e.alternate.child === e.child
,n=0
, r = 0;
if (t)
for (var i = e.child; null !== i; )
n |= i.lanes | i.childLanes,
r |= 14680064 & i.subtreeFlags,
r |= 14680064 & i.flags,
i.return = e,
i = i.sibling;
else
for (i = e.child; null !== i; )
n |= i.lanes | i.childLanes,
r |= i.subtreeFlags,
r |= i.flags,
i.return = e,
i = i.sibling;
return e.subtreeFlags |= r,
e.childLanes = n,
t
}
function Vs(e, t, r) {
var o = t.pendingProps;
switch (Xi(t),
t.tag) {
case 2:
case 16:
case 15:
case 0:
case 11:
case 7:
case 8:
case 12:
case 9:
case 14:
return Hs(t),
null;
case 1:
case 17:
return Ri(t.type) && Ti(),
Hs(t),
null;
case 3:
return o = t.stateNode,
na(),
_i(Mi),
_i(ki),
ua(),
o.pendingContext && (o.context = o.pendingContext,
o.pendingContext = null),
null !== e && null !== e.child || (uo(t) ? t.flags |= 4 : null === e ||
e.memoizedState.isDehydrated && 0 == (256 & t.flags) || (t.flags |= 1024,
null !== no && (il(no),
no = null))),
Ts(e, t),
Hs(t),
null;
case 5:
ia(t);
var a = ea(Jo.current);
if (r = t.type,
null !== e && null != t.stateNode)
Is(e, t, r, o, a),
e.ref !== t.ref && (t.flags |= 512,
t.flags |= 2097152);
else {
if (!o) {
if (null === t.stateNode)
throw Error(n(166));
return Hs(t),
null
}
if (e = ea(Go.current),
uo(t)) {
o = t.stateNode,
r = t.type;
var s = t.memoizedProps;
switch (o[li] = t,
o[ci] = s,
e = 0 != (1 & t.mode),
r) {
case "dialog":
Dr("cancel", o),
Dr("close", o);
break;
case "iframe":
case "object":
case "embed":
Dr("load", o);
break;
case "video":
case "audio":
for (a = 0; a < Pr.length; a++)
Dr(Pr[a], o);
break;
case "source":
Dr("error", o);
break;
case "img":
case "image":
case "link":
Dr("error", o),
Dr("load", o);
break;
case "details":
Dr("toggle", o);
break;
case "input":
$(o, s),
Dr("invalid", o);
break;
case "select":
o._wrapperState = {
wasMultiple: !!s.multiple
},
Dr("invalid", o);
break;
case "textarea":
te(o, s),
Dr("invalid", o)
}
for (var u in me(r, s),
a = null,
s)
if (s.hasOwnProperty(u)) {
var l = s[u];
"children" === u ? "string" == typeof l ?
o.textContent !== l && (!0 !== s.suppressHydrationWarning && Qr(o.textContent, l, e),
a = ["children", l]) : "number" == typeof l &&
o.textContent !== "" + l && (!0 !== s.suppressHydrationWarning && Qr(o.textContent, l,
e),
a = ["children", "" + l]) : i.hasOwnProperty(u) &&
null != l && "onScroll" === u && Dr("scroll", o)
}
switch (r) {
case "input":
q(o),
Z(o, s, !0);
break;
case "textarea":
q(o),
re(o);
break;
case "select":
case "option":
break;
default:
"function" == typeof s.onClick && (o.onclick = Zr)
}
o = a,
t.updateQueue = o,
null !== o && (t.flags |= 4)
} else {
u = 9 === a.nodeType ? a : a.ownerDocument,
"http://www.w3.org/1999/xhtml" === e && (e = ie(r)),
"http://www.w3.org/1999/xhtml" === e ? "script" === r ?
((e = u.createElement("div")).innerHTML = "<script><\/script>",
e = e.removeChild(e.firstChild)) : "string" == typeof
o.is ? e = u.createElement(r, {
is: o.is
}) : (e = u.createElement(r),
"select" === r && (u = e,
o.multiple ? u.multiple = !0 : o.size && (u.size = o.size)))
: e = u.createElementNS(e, r),
e[li] = t,
e[ci] = o,
Rs(e, t, !1, !1),
t.stateNode = e;
e: {
switch (u = ge(r, o),
r) {
case "dialog":
Dr("cancel", e),
Dr("close", e),
a = o;
break;
case "iframe":
case "object":
case "embed":
Dr("load", e),
a = o;
break;
case "video":
case "audio":
for (a = 0; a < Pr.length; a++)
Dr(Pr[a], e);
a = o;
break;
case "source":
Dr("error", e),
a = o;
break;
case "img":
case "image":
case "link":
Dr("error", e),
Dr("load", e),
a = o;
break;
case "details":
Dr("toggle", e),
a = o;
break;
case "input":
$(e, o),
a = W(e, o),
Dr("invalid", e);
break;
case "option":
default:
a = o;
break;
case "select":
e._wrapperState = {
wasMultiple: !!o.multiple
},
a = O({}, o, {
value: void 0
}),
Dr("invalid", e);
break;
case "textarea":
te(e, o),
a = ee(e, o),
Dr("invalid", e)
}
for (s in me(r, a),
l = a)
if (l.hasOwnProperty(s)) {
var c = l[s];
"style" === s ? he(e, c) :
"dangerouslySetInnerHTML" === s ? null != (c = c ? c.__html : void 0) && ue(e, c) :
"children" === s ? "string" == typeof c ? ("textarea" !== r || "" !== c) && le(e, c) :
"number" == typeof c && le(e, "" + c) : "suppressContentEditableWarning" !== s &&
"suppressHydrationWarning" !== s && "autoFocus" !== s && (i.hasOwnProperty(s) ?
null != c && "onScroll" === s && Dr("scroll", e) : null != c && g(e, s, c, u))
}
switch (r) {
case "input":
q(e),
Z(e, o, !1);
break;
case "textarea":
q(e),
re(e);
break;
case "option":
null != o.value && e.setAttribute("value", "" +
U(o.value));
break;
case "select":
e.multiple = !!o.multiple,
null != (s = o.value) ? J(e, !!o.multiple, s, !1) :
null != o.defaultValue && J(e, !!o.multiple, o.defaultValue, !0);
break;
default:
"function" == typeof a.onClick && (e.onclick =
Zr)
}
switch (r) {
case "button":
case "input":
case "select":
case "textarea":
o = !!o.autoFocus;
break e;
case "img":
o = !0;
break e;
default:
o = !1
}
}
o && (t.flags |= 4)
}
null !== t.ref && (t.flags |= 512,
t.flags |= 2097152)
}
return Hs(t),
null;
case 6:
if (e && null != t.stateNode)
Ps(e, t, e.memoizedProps, o);
else {
if ("string" != typeof o && null === t.stateNode)
throw Error(n(166));
if (r = ea(Jo.current),
ea(Go.current),
uo(t)) {
if (o = t.stateNode,
r = t.memoizedProps,
o[li] = t,
(s = o.nodeValue !== r) && null !== (e = Ji))
switch (e.tag) {
case 3:
Qr(o.nodeValue, r, 0 != (1 & e.mode));
break;
case 5:
!0 !==
e.memoizedProps.suppressHydrationWarning && Qr(o.nodeValue, r, 0 != (1 & e.mode))
}
s && (t.flags |= 4)
} else
(o = (9 === r.nodeType ? r :
r.ownerDocument).createTextNode(o))[li] = t,
t.stateNode = o
}
return Hs(t),
null;
case 13:
if (_i(oa),
o = t.memoizedState,
null === e || null !== e.memoizedState && null !==
e.memoizedState.dehydrated) {
if (to && null !== eo && 0 != (1 & t.mode) && 0 == (128 &
t.flags))
lo(),
co(),
t.flags |= 98560,
s = !1;
else if (s = uo(t),
null !== o && null !== o.dehydrated) {
if (null === e) {
if (!s)
throw Error(n(318));
if (!(s = null !== (s = t.memoizedState) ?
s.dehydrated : null))
throw Error(n(317));
s[li] = t
} else
co(),
0 == (128 & t.flags) && (t.memoizedState = null),
t.flags |= 4;
Hs(t),
s = !1
} else
null !== no && (il(no),
no = null),
s = !0;
if (!s)
return 65536 & t.flags ? t : null
}
return 0 != (128 & t.flags) ? (t.lanes = r,
t) : ((o = null !== o) !== (null !== e && null !== e.memoizedState)
&& o && (t.child.flags |= 8192,
0 != (1 & t.mode) && (null === e || 0 != (1 & oa.current) ? 0 ===
Pu && (Pu = 3) : hl())),
null !== t.updateQueue && (t.flags |= 4),
Hs(t),
null);
case 4:
return na(),
Ts(e, t),
null === e && zr(t.stateNode.containerInfo),
Hs(t),
null;
case 10:
return Ao(t.type._context),
Hs(t),
null;
case 19:
if (_i(oa),
null === (s = t.memoizedState))
return Hs(t),
null;
if (o = 0 != (128 & t.flags),
null === (u = s.rendering))
if (o)
qs(s, !1);
else {
if (0 !== Pu || null !== e && 0 != (128 & e.flags))
for (e = t.child; null !== e; ) {
if (null !== (u = aa(e))) {
for (t.flags |= 128,
qs(s, !1),
null !== (o = u.updateQueue) &&
(t.updateQueue = o,
t.flags |= 4),
t.subtreeFlags = 0,
o = r,
r = t.child; null !== r; )
e = o,
(s = r).flags &= 14680066,
null === (u = s.alternate) ?
(s.childLanes = 0,
s.lanes = e,
s.child = null,
s.subtreeFlags = 0,
s.memoizedProps = null,
s.memoizedState = null,
s.updateQueue = null,
s.dependencies = null,
s.stateNode = null) : (s.childLanes =
u.childLanes,
s.lanes = u.lanes,
s.child = u.child,
s.subtreeFlags = 0,
s.deletions = null,
s.memoizedProps = u.memoizedProps,
s.memoizedState = u.memoizedState,
s.updateQueue = u.updateQueue,
s.type = u.type,
e = u.dependencies,
s.dependencies = null === e ? null : {
lanes: e.lanes,
firstContext: e.firstContext
}),
r = r.sibling;
return Ei(oa, 1 & oa.current | 2),
t.child
}
e = e.sibling
}
null !== s.tail && Ye() > Fu && (t.flags |= 128,
o = !0,
qs(s, !1),
t.lanes = 4194304)
}
else {
if (!o)
if (null !== (e = aa(u))) {
if (t.flags |= 128,
o = !0,
null !== (r = e.updateQueue) && (t.updateQueue =
r,
t.flags |= 4),
qs(s, !0),
null === s.tail && "hidden" === s.tailMode && !
u.alternate && !to)
return Hs(t),
null
} else
2 * Ye() - s.renderingStartTime > Fu &&
1073741824 !== r && (t.flags |= 128,
o = !0,
qs(s, !1),
t.lanes = 4194304);
s.isBackwards ? (u.sibling = t.child,
t.child = u) : (null !== (r = s.last) ? r.sibling = u : t.child = u,
s.last = u)
}
return null !== s.tail ? (t = s.tail,
s.rendering = t,
s.tail = t.sibling,
s.renderingStartTime = Ye(),
t.sibling = null,
r = oa.current,
Ei(oa, o ? 1 & r | 2 : 1 & r),
t) : (Hs(t),
null);
case 22:
case 23:
return ll(),
o = null !== t.memoizedState,
null !== e && null !== e.memoizedState !== o && (t.flags |=
8192),
o && 0 != (1 & t.mode) ? 0 != (1073741824 & Tu) && (Hs(t),
6 & t.subtreeFlags && (t.flags |= 8192)) : Hs(t),
null;
case 24:
case 25:
return null
}
throw Error(n(156, t.tag))
}
function Ws(e, t) {
switch (Xi(t),
t.tag) {
case 1:
return Ri(t.type) && Ti(),
65536 & (e = t.flags) ? (t.flags = -65537 & e | 128,
t) : null;
case 3:
return na(),
_i(Mi),
_i(ki),
ua(),
0 != (65536 & (e = t.flags)) && 0 == (128 & e) ? (t.flags = -65537
& e | 128,
t) : null;
case 5:
return ia(t),
null;
case 13:
if (_i(oa),
null !== (e = t.memoizedState) && null !== e.dehydrated) {
if (null === t.alternate)
throw Error(n(340));
co()
}
return 65536 & (e = t.flags) ? (t.flags = -65537 & e | 128,
t) : null;
case 19:
return _i(oa),
null;
case 4:
return na(),
null;
case 10:
return Ao(t.type._context),
null;
case 22:
case 23:
return ll(),
null;
default:
return null
}
}
Rs = function(e, t) {
for (var n = t.child; null !== n; ) {
if (5 === n.tag || 6 === n.tag)
e.appendChild(n.stateNode);
else if (4 !== n.tag && null !== n.child) {
n.child.return = n,
n = n.child;
continue
}
if (n === t)
break;
for (; null === n.sibling; ) {
if (null === n.return || n.return === t)
return;
n = n.return
}
n.sibling.return = n.return,
n = n.sibling
}
}
,
Ts = function() {}
,
Is = function(e, t, n, r) {
var o = e.memoizedProps;
if (o !== r) {
e = t.stateNode,
ea(Go.current);
var a, s = null;
switch (n) {
case "input":
o = W(e, o),
r = W(e, r),
s = [];
break;
case "select":
o = O({}, o, {
value: void 0
}),
r = O({}, r, {
value: void 0
}),
s = [];
break;
case "textarea":
o = ee(e, o),
r = ee(e, r),
s = [];
break;
default:
"function" != typeof o.onClick && "function" == typeof
r.onClick && (e.onclick = Zr)
}
for (c in me(n, r),
n = null,
o)
if (!r.hasOwnProperty(c) && o.hasOwnProperty(c) && null !=
o[c])
if ("style" === c) {
var u = o[c];
for (a in u)
u.hasOwnProperty(a) && (n || (n = {}),
n[a] = "")
} else
"dangerouslySetInnerHTML" !== c && "children" !==
c && "suppressContentEditableWarning" !== c && "suppressHydrationWarning" !== c
&& "autoFocus" !== c && (i.hasOwnProperty(c) ? s || (s = []) : (s = s || []).push(c, null));
for (c in r) {
var l = r[c];
if (u = null != o ? o[c] : void 0,
r.hasOwnProperty(c) && l !== u && (null != l || null != u))
if ("style" === c)
if (u) {
for (a in u)
!u.hasOwnProperty(a) || l &&
l.hasOwnProperty(a) || (n || (n = {}),
n[a] = "");
for (a in l)
l.hasOwnProperty(a) && u[a] !== l[a] && (n
|| (n = {}),
n[a] = l[a])
} else
n || (s || (s = []),
s.push(c, n)),
n = l;
else
"dangerouslySetInnerHTML" === c ? (l = l ?
l.__html : void 0,
u = u ? u.__html : void 0,
null != l && u !== l && (s = s || []).push(c, l)) :
"children" === c ? "string" != typeof l && "number" != typeof l || (s = s || []).push(c, "" + l) :
"suppressContentEditableWarning" !== c && "suppressHydrationWarning" !== c &&
(i.hasOwnProperty(c) ? (null != l && "onScroll" === c && Dr("scroll", e),
s || u === l || (s = [])) : (s = s || []).push(c, l))
}
n && (s = s || []).push("style", n);
var c = s;
(t.updateQueue = c) && (t.flags |= 4)
}
}
,
Ps = function(e, t, n, r) {
n !== r && (t.flags |= 4)
}
;
var $s = !1
, Ys = !1
, Qs = "function" == typeof WeakSet ? WeakSet : Set
, Zs = null;
function Gs(e, t) {
var n = e.ref;
if (null !== n)
if ("function" == typeof n)
try {
n(null)
} catch (n) {
_l(e, t, n)
}
else
n.current = null
}
function Xs(e, t, n) {
try {
n()
} catch (n) {
_l(e, t, n)
}
}
var Js = !1;
function eu(e, t, n) {
var r = t.updateQueue;
if (null !== (r = null !== r ? r.lastEffect : null)) {
var i = r = r.next;
do {
if ((i.tag & e) === e) {
var o = i.destroy;
i.destroy = void 0,
void 0 !== o && Xs(t, n, o)
}
i = i.next
} while (i !== r)
}
}
function tu(e, t) {
if (null !== (t = null !== (t = t.updateQueue) ? t.lastEffect : null)) {
var n = t = t.next;
do {
if ((n.tag & e) === e) {
var r = n.create;
n.destroy = r()
}
n = n.next
} while (n !== t)
}
}
function nu(e) {
var t = e.ref;
if (null !== t) {
var n = e.stateNode;
e.tag,
e = n,
"function" == typeof t ? t(e) : t.current = e
}
}
function ru(e) {
var t = e.alternate;
null !== t && (e.alternate = null,
ru(t)),
e.child = null,
e.deletions = null,
e.sibling = null,
5 === e.tag && null !== (t = e.stateNode) && (delete t[li],
delete t[ci],
delete t[fi],
delete t[hi],
delete t[pi]),
e.stateNode = null,
e.return = null,
e.dependencies = null,
e.memoizedProps = null,
e.memoizedState = null,
e.pendingProps = null,
e.stateNode = null,
e.updateQueue = null
}
function iu(e) {
return 5 === e.tag || 3 === e.tag || 4 === e.tag
}
function ou(e) {
e: for (; ; ) {
for (; null === e.sibling; ) {
if (null === e.return || iu(e.return))
return null;
e = e.return
}
for (e.sibling.return = e.return,
e = e.sibling; 5 !== e.tag && 6 !== e.tag && 18 !== e.tag; ) {
if (2 & e.flags)
continue e;
if (null === e.child || 4 === e.tag)
continue e;
e.child.return = e,
e = e.child
}
if (!(2 & e.flags))
return e.stateNode
}
}
function au(e, t, n) {
var r = e.tag;
if (5 === r || 6 === r)
e = e.stateNode,
t ? 8 === n.nodeType ? n.parentNode.insertBefore(e, t) :
n.insertBefore(e, t) : (8 === n.nodeType ? (t = n.parentNode).insertBefore(e, n) : (t =
n).appendChild(e),
null != (n = n._reactRootContainer) || null !== t.onclick ||
(t.onclick = Zr));
else if (4 !== r && null !== (e = e.child))
for (au(e, t, n),
e = e.sibling; null !== e; )
au(e, t, n),
e = e.sibling
}
function su(e, t, n) {
var r = e.tag;
if (5 === r || 6 === r)
e = e.stateNode,
t ? n.insertBefore(e, t) : n.appendChild(e);
else if (4 !== r && null !== (e = e.child))
for (su(e, t, n),
e = e.sibling; null !== e; )
su(e, t, n),
e = e.sibling
}
var uu = null
, lu = !1;
function cu(e, t, n) {
for (n = n.child; null !== n; )
du(e, t, n),
n = n.sibling
}
function du(e, t, n) {
if (nt && "function" == typeof nt.onCommitFiberUnmount)
try {
nt.onCommitFiberUnmount(tt, n)
} catch (e) {}
switch (n.tag) {
case 5:
Ys || Gs(n, t);
case 6:
var r = uu
, i = lu;
uu = null,
cu(e, t, n),
lu = i,
null !== (uu = r) && (lu ? (e = uu,
n = n.stateNode,
8 === e.nodeType ? e.parentNode.removeChild(n) :
e.removeChild(n)) : uu.removeChild(n.stateNode));
break;
case 18:
null !== uu && (lu ? (e = uu,
n = n.stateNode,
8 === e.nodeType ? oi(e.parentNode, n) : 1 === e.nodeType
&& oi(e, n),
zt(e)) : oi(uu, n.stateNode));
break;
case 4:
r = uu,
i = lu,
uu = n.stateNode.containerInfo,
lu = !0,
cu(e, t, n),
uu = r,
lu = i;
break;
case 0:
case 11:
case 14:
case 15:
if (!Ys && null !== (r = n.updateQueue) && null !== (r =
r.lastEffect)) {
i = r = r.next;
do {
var o = i
, a = o.destroy;
o = o.tag,
void 0 !== a && (0 != (2 & o) || 0 != (4 & o)) && Xs(n, t,
a),
i = i.next
} while (i !== r)
}
cu(e, t, n);
break;
case 1:
if (!Ys && (Gs(n, t),
"function" == typeof (r = n.stateNode).componentWillUnmount))
try {
r.props = n.memoizedProps,
r.state = n.memoizedState,
r.componentWillUnmount()
} catch (e) {
_l(n, t, e)
}
cu(e, t, n);
break;
case 21:
cu(e, t, n);
break;
case 22:
1 & n.mode ? (Ys = (r = Ys) || null !== n.memoizedState,
cu(e, t, n),
Ys = r) : cu(e, t, n);
break;
default:
cu(e, t, n)
}
}
function fu(e) {
var t = e.updateQueue;
if (null !== t) {
e.updateQueue = null;
var n = e.stateNode;
null === n && (n = e.stateNode = new Qs),
t.forEach((function(t) {
var r = Ml.bind(null, e, t);
n.has(t) || (n.add(t),
t.then(r, r))
}
))
}
}
function hu(e, t) {
var r = t.deletions;
if (null !== r)
for (var i = 0; i < r.length; i++) {
var o = r[i];
try {
var a = e
,s=t
, u = s;
e: for (; null !== u; ) {
switch (u.tag) {
case 5:
uu = u.stateNode,
lu = !1;
break e;
case 3:
case 4:
uu = u.stateNode.containerInfo,
lu = !0;
break e
}
u = u.return
}
if (null === uu)
throw Error(n(160));
du(a, s, o),
uu = null,
lu = !1;
var l = o.alternate;
null !== l && (l.return = null),
o.return = null
} catch (e) {
_l(o, t, e)
}
}
if (12854 & t.subtreeFlags)
for (t = t.child; null !== t; )
pu(t, e),
t = t.sibling
}
function pu(e, t) {
var r = e.alternate
, i = e.flags;
switch (e.tag) {
case 0:
case 11:
case 14:
case 15:
if (hu(t, e),
mu(e),
4 & i) {
try {
eu(3, e, e.return),
tu(3, e)
} catch (t) {
_l(e, e.return, t)
}
try {
eu(5, e, e.return)
} catch (t) {
_l(e, e.return, t)
}
}
break;
case 1:
hu(t, e),
mu(e),
512 & i && null !== r && Gs(r, r.return);
break;
case 5:
if (hu(t, e),
mu(e),
512 & i && null !== r && Gs(r, r.return),
32 & e.flags) {
var o = e.stateNode;
try {
le(o, "")
} catch (t) {
_l(e, e.return, t)
}
}
if (4 & i && null != (o = e.stateNode)) {
var a = e.memoizedProps
, s = null !== r ? r.memoizedProps : a
, u = e.type
, l = e.updateQueue;
if (e.updateQueue = null,
null !== l)
try {
"input" === u && "radio" === a.type && null !=
a.name && Y(o, a),
ge(u, s);
var c = ge(u, a);
for (s = 0; s < l.length; s += 2) {
var d = l[s]
, f = l[s + 1];
"style" === d ? he(o, f) :
"dangerouslySetInnerHTML" === d ? ue(o, f) : "children" === d ? le(o, f) : g(o, d, f, c)
}
switch (u) {
case "input":
Q(o, a);
break;
case "textarea":
ne(o, a);
break;
case "select":
var h = o._wrapperState.wasMultiple;
o._wrapperState.wasMultiple = !!a.multiple;
var p = a.value;
null != p ? J(o, !!a.multiple, p, !1) : h !== !!
a.multiple && (null != a.defaultValue ? J(o, !!a.multiple, a.defaultValue, !0) : J(o, !!
a.multiple, a.multiple ? [] : "", !1))
}
o[ci] = a
} catch (t) {
_l(e, e.return, t)
}
}
break;
case 6:
if (hu(t, e),
mu(e),
4 & i) {
if (null === e.stateNode)
throw Error(n(162));
o = e.stateNode,
a = e.memoizedProps;
try {
o.nodeValue = a
} catch (t) {
_l(e, e.return, t)
}
}
break;
case 3:
if (hu(t, e),
mu(e),
4 & i && null !== r && r.memoizedState.isDehydrated)
try {
zt(t.containerInfo)
} catch (t) {
_l(e, e.return, t)
}
break;
case 4:
default:
hu(t, e),
mu(e);
break;
case 13:
hu(t, e),
mu(e),
8192 & (o = e.child).flags && (a = null !== o.memoizedState,
o.stateNode.isHidden = a,
!a || null !== o.alternate && null !== o.alternate.memoizedState
|| (zu = Ye())),
4 & i && fu(e);
break;
case 22:
if (d = null !== r && null !== r.memoizedState,
1 & e.mode ? (Ys = (c = Ys) || d,
hu(t, e),
Ys = c) : hu(t, e),
mu(e),
8192 & i) {
if (c = null !== e.memoizedState,
(e.stateNode.isHidden = c) && !d && 0 != (1 & e.mode))
for (Zs = e,
d = e.child; null !== d; ) {
for (f = Zs = d; null !== Zs; ) {
switch (p = (h = Zs).child,
h.tag) {
case 0:
case 11:
case 14:
case 15:
eu(4, h, h.return);
break;
case 1:
Gs(h, h.return);
var m = h.stateNode;
if ("function" == typeof
m.componentWillUnmount) {
i = h,
r = h.return;
try {
t = i,
m.props = t.memoizedProps,
m.state = t.memoizedState,
m.componentWillUnmount()
} catch (e) {
_l(i, r, e)
}
}
break;
case 5:
Gs(h, h.return);
break;
case 22:
if (null !== h.memoizedState) {
yu(f);
continue
}
}
null !== p ? (p.return = h,
Zs = p) : yu(f)
}
d = d.sibling
}
e: for (d = null,
f = e; ; ) {
if (5 === f.tag) {
if (null === d) {
d = f;
try {
o = f.stateNode,
c ? "function" == typeof (a =
o.style).setProperty ? a.setProperty("display", "none", "important") : a.display = "none" :
(u = f.stateNode,
s = null != (l = f.memoizedProps.style) &&
l.hasOwnProperty("display") ? l.display : null,
u.style.display = fe("display", s))
} catch (t) {
_l(e, e.return, t)
}
}
} else if (6 === f.tag) {
if (null === d)
try {
f.stateNode.nodeValue = c ? "" :
f.memoizedProps
} catch (t) {
_l(e, e.return, t)
}
} else if ((22 !== f.tag && 23 !== f.tag || null ===
f.memoizedState || f === e) && null !== f.child) {
f.child.return = f,
f = f.child;
continue
}
if (f === e)
break e;
for (; null === f.sibling; ) {
if (null === f.return || f.return === e)
break e;
d === f && (d = null),
f = f.return
}
d === f && (d = null),
f.sibling.return = f.return,
f = f.sibling
}
}
break;
case 19:
hu(t, e),
mu(e),
4 & i && fu(e);
case 21:
}
}
function mu(e) {
var t = e.flags;
if (2 & t) {
try {
e: {
for (var r = e.return; null !== r; ) {
if (iu(r)) {
var i = r;
break e
}
r = r.return
}
throw Error(n(160))
}
switch (i.tag) {
case 5:
var o = i.stateNode;
32 & i.flags && (le(o, ""),
i.flags &= -33),
su(e, ou(e), o);
break;
case 3:
case 4:
var a = i.stateNode.containerInfo;
au(e, ou(e), a);
break;
default:
throw Error(n(161))
}
} catch (t) {
_l(e, e.return, t)
}
e.flags &= -3
}
4096 & t && (e.flags &= -4097)
}
function gu(e, t, n) {
Zs = e,
vu(e)
}
function vu(e, t, n) {
for (var r = 0 != (1 & e.mode); null !== Zs; ) {
var i = Zs
, o = i.child;
if (22 === i.tag && r) {
var a = null !== i.memoizedState || $s;
if (!a) {
var s = i.alternate
, u = null !== s && null !== s.memoizedState || Ys;
s = $s;
var l = Ys;
if ($s = a,
(Ys = u) && !l)
for (Zs = i; null !== Zs; )
u = (a = Zs).child,
22 === a.tag && null !== a.memoizedState ?
Au(i) : null !== u ? (u.return = a,
Zs = u) : Au(i);
for (; null !== o; )
Zs = o,
vu(o),
o = o.sibling;
Zs = i,
$s = s,
Ys = l
}
bu(e)
} else
0 != (8772 & i.subtreeFlags) && null !== o ? (o.return = i,
Zs = o) : bu(e)
}
}
function bu(e) {
for (; null !== Zs; ) {
var t = Zs;
if (0 != (8772 & t.flags)) {
var r = t.alternate;
try {
if (0 != (8772 & t.flags))
switch (t.tag) {
case 0:
case 11:
case 15:
Ys || tu(5, t);
break;
case 1:
var i = t.stateNode;
if (4 & t.flags && !Ys)
if (null === r)
i.componentDidMount();
else {
var o = t.elementType === t.type ?
r.memoizedProps : po(t.type, r.memoizedProps);
i.componentDidUpdate(o,
r.memoizedState, i.__reactInternalSnapshotBeforeUpdate)
}
var a = t.updateQueue;
null !== a && Do(t, a, i);
break;
case 3:
var s = t.updateQueue;
if (null !== s) {
if (r = null,
null !== t.child)
switch (t.child.tag) {
case 5:
case 1:
r = t.child.stateNode
}
Do(t, s, r)
}
break;
case 5:
var u = t.stateNode;
if (null === r && 4 & t.flags) {
r = u;
var l = t.memoizedProps;
switch (t.type) {
case "button":
case "input":
case "select":
case "textarea":
l.autoFocus && r.focus();
break;
case "img":
l.src && (r.src = l.src)
}
}
break;
case 6:
case 4:
case 12:
case 19:
case 17:
case 21:
case 22:
case 23:
case 25:
break;
case 13:
if (null === t.memoizedState) {
var c = t.alternate;
if (null !== c) {
var d = c.memoizedState;
if (null !== d) {
var f = d.dehydrated;
null !== f && zt(f)
}
}
}
break;
default:
throw Error(n(163))
}
Ys || 512 & t.flags && nu(t)
} catch (e) {
_l(t, t.return, e)
}
}
if (t === e) {
Zs = null;
break
}
if (null !== (r = t.sibling)) {
r.return = t.return,
Zs = r;
break
}
Zs = t.return
}
}
function yu(e) {
for (; null !== Zs; ) {
var t = Zs;
if (t === e) {
Zs = null;
break
}
var n = t.sibling;
if (null !== n) {
n.return = t.return,
Zs = n;
break
}
Zs = t.return
}
}
function Au(e) {
for (; null !== Zs; ) {
var t = Zs;
try {
switch (t.tag) {
case 0:
case 11:
case 15:
var n = t.return;
try {
tu(4, t)
} catch (e) {
_l(t, n, e)
}
break;
case 1:
var r = t.stateNode;
if ("function" == typeof r.componentDidMount) {
var i = t.return;
try {
r.componentDidMount()
} catch (e) {
_l(t, i, e)
}
}
var o = t.return;
try {
nu(t)
} catch (e) {
_l(t, o, e)
}
break;
case 5:
var a = t.return;
try {
nu(t)
} catch (e) {
_l(t, a, e)
}
}
} catch (e) {
_l(t, t.return, e)
}
if (t === e) {
Zs = null;
break
}
var s = t.sibling;
if (null !== s) {
s.return = t.return,
Zs = s;
break
}
Zs = t.return
}
}
var wu, _u = Math.ceil, Eu = v.ReactCurrentDispatcher, Su =
v.ReactCurrentOwner, ku = v.ReactCurrentBatchConfig, Mu = 0, Cu = null, xu = null, Ru
= 0, Tu = 0, Iu = wi(0), Pu = 0, Lu = null, Ou = 0, Nu = 0, Du = 0, Bu = null, ju = null, zu =
0, Fu = 1 / 0, Uu = null, Ku = !1, qu = null, Hu = null, Vu = !1, Wu = null, $u = 0, Yu = 0,
Qu = null, Zu = -1, Gu = 0;
function Xu() {
return 0 != (6 & Mu) ? Ye() : -1 !== Zu ? Zu : Zu = Ye()
}
function Ju(e) {
return 0 == (1 & e.mode) ? 1 : 0 != (2 & Mu) && 0 !== Ru ? Ru & -
Ru : null !== ho.transition ? (0 === Gu && (Gu = ft()),
Gu) : 0 !== (e = gt) ? e : e = void 0 === (e = window.event) ? 16 :
$t(e.type)
}
function el(e, t, r, i) {
if (50 < Yu)
throw Yu = 0,
Qu = null,
Error(n(185));
pt(e, r, i),
0 != (2 & Mu) && e === Cu || (e === Cu && (0 == (2 & Mu) && (Nu |
= r),
4 === Pu && ol(e, Ru)),
tl(e, i),
1 === r && 0 === Mu && 0 == (1 & t.mode) && (Fu = Ye() + 500,
Di && zi()))
}
function tl(e, t) {
var n = e.callbackNode;
!function(e, t) {
for (var n = e.suspendedLanes, r = e.pingedLanes, i =
e.expirationTimes, o = e.pendingLanes; 0 < o; ) {
var a = 31 - rt(o)
, s = 1 << a
, u = i[a];
-1 === u ? 0 != (s & n) && 0 == (s & r) || (i[a] = ct(s, t)) : u <=
t && (e.expiredLanes |= s),
o &= ~s
}
}(e, t);
var r = lt(e, e === Cu ? Ru : 0);
if (0 === r)
null !== n && Ve(n),
e.callbackNode = null,
e.callbackPriority = 0;
else if (t = r & -r,
e.callbackPriority !== t) {
if (null != n && Ve(n),
1 === t)
0 === e.tag ? function(e) {
Di = !0,
ji(e)
}(al.bind(null, e)) : ji(al.bind(null, e)),
ri((function() {
0 == (6 & Mu) && zi()
}
)),
n = null;
else {
switch (vt(r)) {
case 1:
n = Ze;
break;
case 4:
n = Ge;
break;
case 16:
default:
n = Xe;
break;
case 536870912:
n = et
}
n = Cl(n, nl.bind(null, e))
}
e.callbackPriority = t,
e.callbackNode = n
}
}
function nl(e, t) {
if (Zu = -1,
Gu = 0,
0 != (6 & Mu))
throw Error(n(327));
var r = e.callbackNode;
if (Al() && e.callbackNode !== r)
return null;
var i = lt(e, e === Cu ? Ru : 0);
if (0 === i)
return null;
if (0 != (30 & i) || 0 != (i & e.expiredLanes) || t)
t = pl(e, i);
else {
t = i;
var o = Mu;
Mu |= 2;
var a = fl();
for (Cu === e && Ru === t || (Uu = null,
Fu = Ye() + 500,
cl(e, t)); ; )
try {
gl();
break
} catch (t) {
dl(e, t)
}
yo(),
Eu.current = a,
Mu = o,
null !== xu ? t = 0 : (Cu = null,
Ru = 0,
t = Pu)
}
if (0 !== t) {
if (2 === t && 0 !== (o = dt(e)) && (i = o,
t = rl(e, o)),
1 === t)
throw r = Lu,
cl(e, 0),
ol(e, i),
tl(e, Ye()),
r;
if (6 === t)
ol(e, i);
else {
if (o = e.current.alternate,
0 == (30 & i) && !function(e) {
for (var t = e; ; ) {
if (16384 & t.flags) {
var n = t.updateQueue;
if (null !== n && null !== (n = n.stores))
for (var r = 0; r < n.length; r++) {
var i = n[r]
, o = i.getSnapshot;
i = i.value;
try {
if (!ir(o(), i))
return !1
} catch (e) {
return !1
}
}
}
if (n = t.child,
16384 & t.subtreeFlags && null !== n)
n.return = t,
t = n;
else {
if (t === e)
break;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return !0;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
}
return !0
}(o) && (2 === (t = pl(e, i)) && 0 !== (a = dt(e)) && (i = a,
t = rl(e, a)),
1 === t))
throw r = Lu,
cl(e, 0),
ol(e, i),
tl(e, Ye()),
r;
switch (e.finishedWork = o,
e.finishedLanes = i,
t) {
case 0:
case 1:
throw Error(n(345));
case 2:
case 5:
yl(e, ju, Uu);
break;
case 3:
if (ol(e, i),
(130023424 & i) === i && 10 < (t = zu + 500 - Ye())) {
if (0 !== lt(e, 0))
break;
if (((o = e.suspendedLanes) & i) !== i) {
Xu(),
e.pingedLanes |= e.suspendedLanes & o;
break
}
e.timeoutHandle = ei(yl.bind(null, e, ju, Uu), t);
break
}
yl(e, ju, Uu);
break;
case 4:
if (ol(e, i),
(4194240 & i) === i)
break;
for (t = e.eventTimes,
o = -1; 0 < i; ) {
var s = 31 - rt(i);
a = 1 << s,
(s = t[s]) > o && (o = s),
i &= ~a
}
if (i = o,
10 < (i = (120 > (i = Ye() - i) ? 120 : 480 > i ? 480 : 1080
> i ? 1080 : 1920 > i ? 1920 : 3e3 > i ? 3e3 : 4320 > i ? 4320 : 1960 * _u(i / 1960)) - i)) {
e.timeoutHandle = ei(yl.bind(null, e, ju, Uu), i);
break
}
yl(e, ju, Uu);
break;
default:
throw Error(n(329))
}
}
}
return tl(e, Ye()),
e.callbackNode === r ? nl.bind(null, e) : null
}
function rl(e, t) {
var n = Bu;
return e.current.memoizedState.isDehydrated && (cl(e, t).flags |=
256),
2 !== (e = pl(e, t)) && (t = ju,
ju = n,
null !== t && il(t)),
e
}
function il(e) {
null === ju ? ju = e : ju.push.apply(ju, e)
}
function ol(e, t) {
for (t &= ~Du,
t &= ~Nu,
e.suspendedLanes |= t,
e.pingedLanes &= ~t,
e = e.expirationTimes; 0 < t; ) {
var n = 31 - rt(t)
, r = 1 << n;
e[n] = -1,
t &= ~r
}
}
function al(e) {
if (0 != (6 & Mu))
throw Error(n(327));
Al();
var t = lt(e, 0);
if (0 == (1 & t))
return tl(e, Ye()),
null;
var r = pl(e, t);
if (0 !== e.tag && 2 === r) {
var i = dt(e);
0 !== i && (t = i,
r = rl(e, i))
}
if (1 === r)
throw r = Lu,
cl(e, 0),
ol(e, t),
tl(e, Ye()),
r;
if (6 === r)
throw Error(n(345));
return e.finishedWork = e.current.alternate,
e.finishedLanes = t,
yl(e, ju, Uu),
tl(e, Ye()),
null
}
function sl(e, t) {
var n = Mu;
Mu |= 1;
try {
return e(t)
} finally {
0 === (Mu = n) && (Fu = Ye() + 500,
Di && zi())
}
}
function ul(e) {
null !== Wu && 0 === Wu.tag && 0 == (6 & Mu) && Al();
var t = Mu;
Mu |= 1;
var n = ku.transition
, r = gt;
try {
if (ku.transition = null,
gt = 1,
e)
return e()
} finally {
gt = r,
ku.transition = n,
0 == (6 & (Mu = t)) && zi()
}
}
function ll() {
Tu = Iu.current,
_i(Iu)
}
function cl(e, t) {
e.finishedWork = null,
e.finishedLanes = 0;
var n = e.timeoutHandle;
if (-1 !== n && (e.timeoutHandle = -1,
ti(n)),
null !== xu)
for (n = xu.return; null !== n; ) {
var r = n;
switch (Xi(r),
r.tag) {
case 1:
null != (r = r.type.childContextTypes) && Ti();
break;
case 3:
na(),
_i(Mi),
_i(ki),
ua();
break;
case 5:
ia(r);
break;
case 4:
na();
break;
case 13:
case 19:
_i(oa);
break;
case 10:
Ao(r.type._context);
break;
case 22:
case 23:
ll()
}
n = n.return
}
if (Cu = e,
xu = e = Il(e.current, null),
Ru = Tu = t,
Pu = 0,
Lu = null,
Du = Nu = Ou = 0,
ju = Bu = null,
null !== So) {
for (t = 0; t < So.length; t++)
if (null !== (r = (n = So[t]).interleaved)) {
n.interleaved = null;
var i = r.next
, o = n.pending;
if (null !== o) {
var a = o.next;
o.next = i,
r.next = a
}
n.pending = r
}
So = null
}
return e
}
function dl(e, t) {
for (; ; ) {
var r = xu;
try {
if (yo(),
la.current = rs,
ma) {
for (var i = fa.memoizedState; null !== i; ) {
var o = i.queue;
null !== o && (o.pending = null),
i = i.next
}
ma = !1
}
if (da = 0,
pa = ha = fa = null,
ga = !1,
va = 0,
Su.current = null,
null === r || null === r.return) {
Pu = 1,
Lu = t,
xu = null;
break
}
e: {
var a = e
, s = r.return
,u=r
, l = t;
if (t = Ru,
u.flags |= 32768,
null !== l && "object" == typeof l && "function" == typeof
l.then) {
var c = l
,d=u
, f = d.tag;
if (0 == (1 & d.mode) && (0 === f || 11 === f || 15
=== f)) {
var h = d.alternate;
h ? (d.updateQueue = h.updateQueue,
d.memoizedState = h.memoizedState,
d.lanes = h.lanes) : (d.updateQueue = null,
d.memoizedState = null)
}
var p = ps(s);
if (null !== p) {
p.flags &= -257,
ms(p, s, u, 0, t),
1 & p.mode && hs(a, c, t),
l = c;
var m = (t = p).updateQueue;
if (null === m) {
var g = new Set;
g.add(l),
t.updateQueue = g
} else
m.add(l);
break e
}
if (0 == (1 & t)) {
hs(a, c, t),
hl();
break e
}
l = Error(n(426))
} else if (to && 1 & u.mode) {
var v = ps(s);
if (null !== v) {
0 == (65536 & v.flags) && (v.flags |= 256),
ms(v, s, u, 0, t),
fo(ss(l, u));
break e
}
}
a = l = ss(l, u),
4 !== Pu && (Pu = 2),
null === Bu ? Bu = [a] : Bu.push(a),
a = s;
do {
switch (a.tag) {
case 3:
a.flags |= 65536,
t &= -t,
a.lanes |= t,
Oo(a, ds(0, l, t));
break e;
case 1:
u = l;
var b = a.type
, y = a.stateNode;
if (0 == (128 & a.flags) && ("function" == typeof
b.getDerivedStateFromError || null !== y && "function" == typeof y.componentDidCatch
&& (null === Hu || !Hu.has(y)))) {
a.flags |= 65536,
t &= -t,
a.lanes |= t,
Oo(a, fs(a, u, t));
break e
}
}
a = a.return
} while (null !== a)
}
bl(r)
} catch (e) {
t = e,
xu === r && null !== r && (xu = r = r.return);
continue
}
break
}
}
function fl() {
var e = Eu.current;
return Eu.current = rs,
null === e ? rs : e
}
function hl() {
0 !== Pu && 3 !== Pu && 2 !== Pu || (Pu = 4),
null === Cu || 0 == (268435455 & Ou) && 0 == (268435455 & Nu) ||
ol(Cu, Ru)
}
function pl(e, t) {
var r = Mu;
Mu |= 2;
var i = fl();
for (Cu === e && Ru === t || (Uu = null,
cl(e, t)); ; )
try {
ml();
break
} catch (t) {
dl(e, t)
}
if (yo(),
Mu = r,
Eu.current = i,
null !== xu)
throw Error(n(261));
return Cu = null,
Ru = 0,
Pu
}
function ml() {
for (; null !== xu; )
vl(xu)
}
function gl() {
for (; null !== xu && !We(); )
vl(xu)
}
function vl(e) {
var t = wu(e.alternate, e, Tu);
e.memoizedProps = e.pendingProps,
null === t ? bl(e) : xu = t,
Su.current = null
}
function bl(e) {
var t = e;
do {
var n = t.alternate;
if (e = t.return,
0 == (32768 & t.flags)) {
if (null !== (n = Vs(n, t, Tu)))
return void (xu = n)
} else {
if (null !== (n = Ws(n, t)))
return n.flags &= 32767,
void (xu = n);
if (null === e)
return Pu = 6,
void (xu = null);
e.flags |= 32768,
e.subtreeFlags = 0,
e.deletions = null
}
if (null !== (t = t.sibling))
return void (xu = t);
xu = t = e
} while (null !== t);
0 === Pu && (Pu = 5)
}
function yl(e, t, r) {
var i = gt
, o = ku.transition;
try {
ku.transition = null,
gt = 1,
function(e, t, r, i) {
do {
Al()
} while (null !== Wu);
if (0 != (6 & Mu))
throw Error(n(327));
r = e.finishedWork;
var o = e.finishedLanes;
if (null === r)
return null;
if (e.finishedWork = null,
e.finishedLanes = 0,
r === e.current)
throw Error(n(177));
e.callbackNode = null,
e.callbackPriority = 0;
var a = r.lanes | r.childLanes;
if (function(e, t) {
var n = e.pendingLanes & ~t;
e.pendingLanes = t,
e.suspendedLanes = 0,
e.pingedLanes = 0,
e.expiredLanes &= t,
e.mutableReadLanes &= t,
e.entangledLanes &= t,
t = e.entanglements;
var r = e.eventTimes;
for (e = e.expirationTimes; 0 < n; ) {
var i = 31 - rt(n)
, o = 1 << i;
t[i] = 0,
r[i] = -1,
e[i] = -1,
n &= ~o
}
}(e, a),
e === Cu && (xu = Cu = null,
Ru = 0),
0 == (2064 & r.subtreeFlags) && 0 == (2064 & r.flags) || Vu
|| (Vu = !0,
Cl(Xe, (function() {
return Al(),
null
}
))),
a = 0 != (15990 & r.flags),
0 != (15990 & r.subtreeFlags) || a) {
a = ku.transition,
ku.transition = null;
var s = gt;
gt = 1;
var u = Mu;
Mu |= 4,
Su.current = null,
function(e, t) {
if (Gr = Ut,
cr(e = lr())) {
if ("selectionStart"in e)
var r = {
start: e.selectionStart,
end: e.selectionEnd
};
else
e: {
var i = (r = (r = e.ownerDocument) &&
r.defaultView || window).getSelection && r.getSelection();
if (i && 0 !== i.rangeCount) {
r = i.anchorNode;
var o = i.anchorOffset
, a = i.focusNode;
i = i.focusOffset;
try {
r.nodeType,
a.nodeType
} catch (e) {
r = null;
break e
}
var s = 0
, u = -1
, l = -1
,c=0
,d=0
,f=e
, h = null;
t: for (; ; ) {
for (var p; f !== r || 0 !== o &&
3 !== f.nodeType || (u = s + o),
f !== a || 0 !== i && 3 !==
f.nodeType || (l = s + i),
3 === f.nodeType && (s +=
f.nodeValue.length),
null !== (p = f.firstChild); )
h = f,
f = p;
for (; ; ) {
if (f === e)
break t;
if (h === r && ++c === o
&& (u = s),
h === a && ++d === i && (l
= s),
null !== (p = f.nextSibling))
break;
h = (f = h).parentNode
}
f=p
}
r = -1 === u || -1 === l ? null : {
start: u,
end: l
}
} else
r = null
}
r = r || {
start: 0,
end: 0
}
} else
r = null;
for (Xr = {
focusedElem: e,
selectionRange: r
},
Ut = !1,
Zs = t; null !== Zs; )
if (e = (t = Zs).child,
0 != (1028 & t.subtreeFlags) && null !== e)
e.return = t,
Zs = e;
else
for (; null !== Zs; ) {
t = Zs;
try {
var m = t.alternate;
if (0 != (1024 & t.flags))
switch (t.tag) {
case 0:
case 11:
case 15:
case 5:
case 6:
case 4:
case 17:
break;
case 1:
if (null !== m) {
var g =
m.memoizedProps
,v=
m.memoizedState
, b = t.stateNode
,y=
b.getSnapshotBeforeUpdate(t.elementType === t.type ? g : po(t.type, g), v);
b.__reactInternalSnapshotBeforeUpdate = y
}
break;
case 3:
var A =
t.stateNode.containerInfo;
1 === A.nodeType ?
A.textContent = "" : 9 === A.nodeType && A.documentElement &&
A.removeChild(A.documentElement);
break;
default:
throw Error(n(163))
}
} catch (e) {
_l(t, t.return, e)
}
if (null !== (e = t.sibling)) {
e.return = t.return,
Zs = e;
break
}
Zs = t.return
}
m = Js,
Js = !1
}(e, r),
pu(r, e),
dr(Xr),
Ut = !!Gr,
Xr = Gr = null,
e.current = r,
gu(r),
$e(),
Mu = u,
gt = s,
ku.transition = a
} else
e.current = r;
if (Vu && (Vu = !1,
Wu = e,
$u = o),
0 === (a = e.pendingLanes) && (Hu = null),
function(e) {
if (nt && "function" == typeof nt.onCommitFiberRoot)
try {
nt.onCommitFiberRoot(tt, e, void 0, 128 ==
(128 & e.current.flags))
} catch (e) {}
}(r.stateNode),
tl(e, Ye()),
null !== t)
for (i = e.onRecoverableError,
r = 0; r < t.length; r++)
i((o = t[r]).value, {
componentStack: o.stack,
digest: o.digest
});
if (Ku)
throw Ku = !1,
e = qu,
qu = null,
e;
0 != (1 & $u) && 0 !== e.tag && Al(),
0 != (1 & (a = e.pendingLanes)) ? e === Qu ? Yu++ : (Yu =
0,
Qu = e) : Yu = 0,
zi()
}(e, t, r, i)
} finally {
ku.transition = o,
gt = i
}
return null
}
function Al() {
if (null !== Wu) {
var e = vt($u)
, t = ku.transition
, r = gt;
try {
if (ku.transition = null,
gt = 16 > e ? 16 : e,
null === Wu)
var i = !1;
else {
if (e = Wu,
Wu = null,
$u = 0,
0 != (6 & Mu))
throw Error(n(331));
var o = Mu;
for (Mu |= 4,
Zs = e.current; null !== Zs; ) {
var a = Zs
, s = a.child;
if (0 != (16 & Zs.flags)) {
var u = a.deletions;
if (null !== u) {
for (var l = 0; l < u.length; l++) {
var c = u[l];
for (Zs = c; null !== Zs; ) {
var d = Zs;
switch (d.tag) {
case 0:
case 11:
case 15:
eu(8, d, a)
}
var f = d.child;
if (null !== f)
f.return = d,
Zs = f;
else
for (; null !== Zs; ) {
var h = (d = Zs).sibling
, p = d.return;
if (ru(d),
d === c) {
Zs = null;
break
}
if (null !== h) {
h.return = p,
Zs = h;
break
}
Zs = p
}
}
}
var m = a.alternate;
if (null !== m) {
var g = m.child;
if (null !== g) {
m.child = null;
do {
var v = g.sibling;
g.sibling = null,
g=v
} while (null !== g)
}
}
Zs = a
}
}
if (0 != (2064 & a.subtreeFlags) && null !== s)
s.return = a,
Zs = s;
else
e: for (; null !== Zs; ) {
if (0 != (2048 & (a = Zs).flags))
switch (a.tag) {
case 0:
case 11:
case 15:
eu(9, a, a.return)
}
var b = a.sibling;
if (null !== b) {
b.return = a.return,
Zs = b;
break e
}
Zs = a.return
}
}
var y = e.current;
for (Zs = y; null !== Zs; ) {
var A = (s = Zs).child;
if (0 != (2064 & s.subtreeFlags) && null !== A)
A.return = s,
Zs = A;
else
e: for (s = y; null !== Zs; ) {
if (0 != (2048 & (u = Zs).flags))
try {
switch (u.tag) {
case 0:
case 11:
case 15:
tu(9, u)
}
} catch (e) {
_l(u, u.return, e)
}
if (u === s) {
Zs = null;
break e
}
var w = u.sibling;
if (null !== w) {
w.return = u.return,
Zs = w;
break e
}
Zs = u.return
}
}
if (Mu = o,
zi(),
nt && "function" == typeof nt.onPostCommitFiberRoot)
try {
nt.onPostCommitFiberRoot(tt, e)
} catch (e) {}
i = !0
}
return i
} finally {
gt = r,
ku.transition = t
}
}
return !1
}
function wl(e, t, n) {
e = Po(e, t = ds(0, t = ss(n, t), 1), 1),
t = Xu(),
null !== e && (pt(e, 1, t),
tl(e, t))
}
function _l(e, t, n) {
if (3 === e.tag)
wl(e, e, n);
else
for (; null !== t; ) {
if (3 === t.tag) {
wl(t, e, n);
break
}
if (1 === t.tag) {
var r = t.stateNode;
if ("function" == typeof t.type.getDerivedStateFromError
|| "function" == typeof r.componentDidCatch && (null === Hu || !Hu.has(r))) {
t = Po(t, e = fs(t, e = ss(n, e), 1), 1),
e = Xu(),
null !== t && (pt(t, 1, e),
tl(t, e));
break
}
}
t = t.return
}
}
function El(e, t, n) {
var r = e.pingCache;
null !== r && r.delete(t),
t = Xu(),
e.pingedLanes |= e.suspendedLanes & n,
Cu === e && (Ru & n) === n && (4 === Pu || 3 === Pu &&
(130023424 & Ru) === Ru && 500 > Ye() - zu ? cl(e, 0) : Du |= n),
tl(e, t)
}
function Sl(e, t) {
0 === t && (0 == (1 & e.mode) ? t = 1 : (t = st,
0 == (130023424 & (st <<= 1)) && (st = 4194304)));
var n = Xu();
null !== (e = Co(e, t)) && (pt(e, t, n),
tl(e, n))
}
function kl(e) {
var t = e.memoizedState
, n = 0;
null !== t && (n = t.retryLane),
Sl(e, n)
}
function Ml(e, t) {
var r = 0;
switch (e.tag) {
case 13:
var i = e.stateNode
, o = e.memoizedState;
null !== o && (r = o.retryLane);
break;
case 19:
i = e.stateNode;
break;
default:
throw Error(n(314))
}
null !== i && i.delete(t),
Sl(e, r)
}
function Cl(e, t) {
return He(e, t)
}
function xl(e, t, n, r) {
this.tag = e,
this.key = n,
this.sibling = this.child = this.return = this.stateNode = this.type =
this.elementType = null,
this.index = 0,
this.ref = null,
this.pendingProps = t,
this.dependencies = this.memoizedState = this.updateQueue =
this.memoizedProps = null,
this.mode = r,
this.subtreeFlags = this.flags = 0,
this.deletions = null,
this.childLanes = this.lanes = 0,
this.alternate = null
}
function Rl(e, t, n, r) {
return new xl(e,t,n,r)
}
function Tl(e) {
return !(!(e = e.prototype) || !e.isReactComponent)
}
function Il(e, t) {
var n = e.alternate;
return null === n ? ((n = Rl(e.tag, t, e.key, e.mode)).elementType =
e.elementType,
n.type = e.type,
n.stateNode = e.stateNode,
n.alternate = e,
e.alternate = n) : (n.pendingProps = t,
n.type = e.type,
n.flags = 0,
n.subtreeFlags = 0,
n.deletions = null),
n.flags = 14680064 & e.flags,
n.childLanes = e.childLanes,
n.lanes = e.lanes,
n.child = e.child,
n.memoizedProps = e.memoizedProps,
n.memoizedState = e.memoizedState,
n.updateQueue = e.updateQueue,
t = e.dependencies,
n.dependencies = null === t ? null : {
lanes: t.lanes,
firstContext: t.firstContext
},
n.sibling = e.sibling,
n.index = e.index,
n.ref = e.ref,
n
}
function Pl(e, t, r, i, o, a) {
var s = 2;
if (i = e,
"function" == typeof e)
Tl(e) && (s = 1);
else if ("string" == typeof e)
s = 5;
else
e: switch (e) {
case A:
return Ll(r.children, o, a, t);
case w:
s = 8,
o |= 8;
break;
case _:
return (e = Rl(12, r, t, 2 | o)).elementType = _,
e.lanes = a,
e;
case M:
return (e = Rl(13, r, t, o)).elementType = M,
e.lanes = a,
e;
case C:
return (e = Rl(19, r, t, o)).elementType = C,
e.lanes = a,
e;
case T:
return Ol(r, o, a, t);
default:
if ("object" == typeof e && null !== e)
switch (e.$$typeof) {
case E:
s = 10;
break e;
case S:
s = 9;
break e;
case k:
s = 11;
break e;
case x:
s = 14;
break e;
case R:
s = 16,
i = null;
break e
}
throw Error(n(130, null == e ? e : typeof e, ""))
}
return (t = Rl(s, r, t, o)).elementType = e,
t.type = i,
t.lanes = a,
t
}
function Ll(e, t, n, r) {
return (e = Rl(7, e, r, t)).lanes = n,
e
}
function Ol(e, t, n, r) {
return (e = Rl(22, e, r, t)).elementType = T,
e.lanes = n,
e.stateNode = {
isHidden: !1
},
e
}
function Nl(e, t, n) {
return (e = Rl(6, e, null, t)).lanes = n,
e
}
function Dl(e, t, n) {
return (t = Rl(4, null !== e.children ? e.children : [], e.key, t)).lanes =
n,
t.stateNode = {
containerInfo: e.containerInfo,
pendingChildren: null,
implementation: e.implementation
},
t
}
function Bl(e, t, n, r, i) {
this.tag = t,
this.containerInfo = e,
this.finishedWork = this.pingCache = this.current =
this.pendingChildren = null,
this.timeoutHandle = -1,
this.callbackNode = this.pendingContext = this.context = null,
this.callbackPriority = 0,
this.eventTimes = ht(0),
this.expirationTimes = ht(-1),
this.entangledLanes = this.finishedLanes = this.mutableReadLanes
= this.expiredLanes = this.pingedLanes = this.suspendedLanes = this.pendingLanes =
0,
this.entanglements = ht(0),
this.identifierPrefix = r,
this.onRecoverableError = i,
this.mutableSourceEagerHydrationData = null
}
function jl(e, t, n, r, i, o, a, s, u) {
return e = new Bl(e,t,n,s,u),
1 === t ? (t = 1,
!0 === o && (t |= 8)) : t = 0,
o = Rl(3, null, null, t),
e.current = o,
o.stateNode = e,
o.memoizedState = {
element: r,
isDehydrated: n,
cache: null,
transitions: null,
pendingSuspenseBoundaries: null
},
Ro(o),
e
}
function zl(e) {
if (!e)
return Si;
e: {
if (ze(e = e._reactInternals) !== e || 1 !== e.tag)
throw Error(n(170));
var t = e;
do {
switch (t.tag) {
case 3:
t = t.stateNode.context;
break e;
case 1:
if (Ri(t.type)) {
t=
t.stateNode.__reactInternalMemoizedMergedChildContext;
break e
}
}
t = t.return
} while (null !== t);
throw Error(n(171))
}
if (1 === e.tag) {
var r = e.type;
if (Ri(r))
return Pi(e, r, t)
}
return t
}
function Fl(e, t, n, r, i, o, a, s, u) {
return (e = jl(n, r, !0, e, 0, o, 0, s, u)).context = zl(null),
n = e.current,
(o = Io(r = Xu(), i = Ju(n))).callback = null != t ? t : null,
Po(n, o, i),
e.current.lanes = i,
pt(e, i, r),
tl(e, r),
e
}
function Ul(e, t, n, r) {
var i = t.current
, o = Xu()
, a = Ju(i);
return n = zl(n),
null === t.context ? t.context = n : t.pendingContext = n,
(t = Io(o, a)).payload = {
element: e
},
null !== (r = void 0 === r ? null : r) && (t.callback = r),
null !== (e = Po(i, t, a)) && (el(e, i, a, o),
Lo(e, i, a)),
a
}
function Kl(e) {
return (e = e.current).child ? (e.child.tag,
e.child.stateNode) : null
}
function ql(e, t) {
if (null !== (e = e.memoizedState) && null !== e.dehydrated) {
var n = e.retryLane;
e.retryLane = 0 !== n && n < t ? n : t
}
}
function Hl(e, t) {
ql(e, t),
(e = e.alternate) && ql(e, t)
}
wu = function(e, t, r) {
if (null !== e)
if (e.memoizedProps !== t.pendingProps || Mi.current)
vs = !0;
else {
if (0 == (e.lanes & r) && 0 == (128 & t.flags))
return vs = !1,
function(e, t, n) {
switch (t.tag) {
case 3:
Cs(t),
co();
break;
case 5:
ra(t);
break;
case 1:
Ri(t.type) && Li(t);
break;
case 4:
ta(t, t.stateNode.containerInfo);
break;
case 10:
var r = t.type._context
, i = t.memoizedProps.value;
Ei(mo, r._currentValue),
r._currentValue = i;
break;
case 13:
if (null !== (r = t.memoizedState))
return null !== r.dehydrated ? (Ei(oa, 1 &
oa.current),
t.flags |= 128,
null) : 0 != (n & t.child.childLanes) ? Ns(e, t,
n) : (Ei(oa, 1 & oa.current),
null !== (e = Ks(e, t, n)) ? e.sibling : null);
Ei(oa, 1 & oa.current);
break;
case 19:
if (r = 0 != (n & t.childLanes),
0 != (128 & e.flags)) {
if (r)
return Fs(e, t, n);
t.flags |= 128
}
if (null !== (i = t.memoizedState) && (i.rendering
= null,
i.tail = null,
i.lastEffect = null),
Ei(oa, oa.current),
r)
break;
return null;
case 22:
case 23:
return t.lanes = 0,
_s(e, t, n)
}
return Ks(e, t, n)
}(e, t, r);
vs = 0 != (131072 & e.flags)
}
else
vs = !1,
to && 0 != (1048576 & t.flags) && Zi(t, qi, t.index);
switch (t.lanes = 0,
t.tag) {
case 2:
var i = t.type;
Us(e, t),
e = t.pendingProps;
var o = xi(t, ki.current);
_o(t, r),
o = wa(null, t, i, e, o, r);
var a = _a();
return t.flags |= 1,
"object" == typeof o && null !== o && "function" == typeof
o.render && void 0 === o.$$typeof ? (t.tag = 1,
t.memoizedState = null,
t.updateQueue = null,
Ri(i) ? (a = !0,
Li(t)) : a = !1,
t.memoizedState = null !== o.state && void 0 !== o.state ?
o.state : null,
Ro(t),
o.updater = zo,
t.stateNode = o,
o._reactInternals = t,
qo(t, i, e, r),
t = Ms(null, t, i, !0, a, r)) : (t.tag = 0,
to && a && Gi(t),
bs(null, t, o, r),
t = t.child),
t;
case 16:
i = t.elementType;
e: {
switch (Us(e, t),
e = t.pendingProps,
i = (o = i._init)(i._payload),
t.type = i,
o = t.tag = function(e) {
if ("function" == typeof e)
return Tl(e) ? 1 : 0;
if (null != e) {
if ((e = e.$$typeof) === k)
return 11;
if (e === x)
return 14
}
return 2
}(i),
e = po(i, e),
o) {
case 0:
t = Ss(null, t, i, e, r);
break e;
case 1:
t = ks(null, t, i, e, r);
break e;
case 11:
t = ys(null, t, i, e, r);
break e;
case 14:
t = As(null, t, i, po(i.type, e), r);
break e
}
throw Error(n(306, i, ""))
}
return t;
case 0:
return i = t.type,
o = t.pendingProps,
Ss(e, t, i, o = t.elementType === i ? o : po(i, o), r);
case 1:
return i = t.type,
o = t.pendingProps,
ks(e, t, i, o = t.elementType === i ? o : po(i, o), r);
case 3:
e: {
if (Cs(t),
null === e)
throw Error(n(387));
i = t.pendingProps,
o = (a = t.memoizedState).element,
To(e, t),
No(t, i, null, r);
var s = t.memoizedState;
if (i = s.element,
a.isDehydrated) {
if (a = {
element: i,
isDehydrated: !1,
cache: s.cache,
pendingSuspenseBoundaries:
s.pendingSuspenseBoundaries,
transitions: s.transitions
},
t.updateQueue.baseState = a,
t.memoizedState = a,
256 & t.flags) {
t = xs(e, t, i, r, o = ss(Error(n(423)), t));
break e
}
if (i !== o) {
t = xs(e, t, i, r, o = ss(Error(n(424)), t));
break e
}
for (eo = ai(t.stateNode.containerInfo.firstChild),
Ji = t,
to = !0,
no = null,
r = Qo(t, null, i, r),
t.child = r; r; )
r.flags = -3 & r.flags | 4096,
r = r.sibling
} else {
if (co(),
i === o) {
t = Ks(e, t, r);
break e
}
bs(e, t, i, r)
}
t = t.child
}
return t;
case 5:
return ra(t),
null === e && ao(t),
i = t.type,
o = t.pendingProps,
a = null !== e ? e.memoizedProps : null,
s = o.children,
Jr(i, o) ? s = null : null !== a && Jr(i, a) && (t.flags |= 32),
Es(e, t),
bs(e, t, s, r),
t.child;
case 6:
return null === e && ao(t),
null;
case 13:
return Ns(e, t, r);
case 4:
return ta(t, t.stateNode.containerInfo),
i = t.pendingProps,
null === e ? t.child = Yo(t, null, i, r) : bs(e, t, i, r),
t.child;
case 11:
return i = t.type,
o = t.pendingProps,
ys(e, t, i, o = t.elementType === i ? o : po(i, o), r);
case 7:
return bs(e, t, t.pendingProps, r),
t.child;
case 8:
case 12:
return bs(e, t, t.pendingProps.children, r),
t.child;
case 10:
e: {
if (i = t.type._context,
o = t.pendingProps,
a = t.memoizedProps,
s = o.value,
Ei(mo, i._currentValue),
i._currentValue = s,
null !== a)
if (ir(a.value, s)) {
if (a.children === o.children && !Mi.current) {
t = Ks(e, t, r);
break e
}
} else
for (null !== (a = t.child) && (a.return = t); null !==
a; ) {
var u = a.dependencies;
if (null !== u) {
s = a.child;
for (var l = u.firstContext; null !== l; ) {
if (l.context === i) {
if (1 === a.tag) {
(l = Io(-1, r & -r)).tag = 2;
var c = a.updateQueue;
if (null !== c) {
var d = (c =
c.shared).pending;
null === d ? l.next = l :
(l.next = d.next,
d.next = l),
c.pending = l
}
}
a.lanes |= r,
null !== (l = a.alternate) && (l.lanes
|= r),
wo(a.return, r, t),
u.lanes |= r;
break
}
l = l.next
}
} else if (10 === a.tag)
s = a.type === t.type ? null : a.child;
else if (18 === a.tag) {
if (null === (s = a.return))
throw Error(n(341));
s.lanes |= r,
null !== (u = s.alternate) && (u.lanes |= r),
wo(s, r, t),
s = a.sibling
} else
s = a.child;
if (null !== s)
s.return = a;
else
for (s = a; null !== s; ) {
if (s === t) {
s = null;
break
}
if (null !== (a = s.sibling)) {
a.return = s.return,
s = a;
break
}
s = s.return
}
a=s
}
bs(e, t, o.children, r),
t = t.child
}
return t;
case 9:
return o = t.type,
i = t.pendingProps.children,
_o(t, r),
i = i(o = Eo(o)),
t.flags |= 1,
bs(e, t, i, r),
t.child;
case 14:
return o = po(i = t.type, t.pendingProps),
As(e, t, i, o = po(i.type, o), r);
case 15:
return ws(e, t, t.type, t.pendingProps, r);
case 17:
return i = t.type,
o = t.pendingProps,
o = t.elementType === i ? o : po(i, o),
Us(e, t),
t.tag = 1,
Ri(i) ? (e = !0,
Li(t)) : e = !1,
_o(t, r),
Uo(t, i, o),
qo(t, i, o, r),
Ms(null, t, i, !0, e, r);
case 19:
return Fs(e, t, r);
case 22:
return _s(e, t, r)
}
throw Error(n(156, t.tag))
}
;
var Vl = "function" == typeof reportError ? reportError : function(e) {
console.error(e)
}
;
function Wl(e) {
this._internalRoot = e
}
function $l(e) {
this._internalRoot = e
}
function Yl(e) {
return !(!e || 1 !== e.nodeType && 9 !== e.nodeType && 11 !==
e.nodeType)
}
function Ql(e) {
return !(!e || 1 !== e.nodeType && 9 !== e.nodeType && 11 !==
e.nodeType && (8 !== e.nodeType || " react-mount-point-unstable " !== e.nodeValue))
}
function Zl() {}
function Gl(e, t, n, r, i) {
var o = n._reactRootContainer;
if (o) {
var a = o;
if ("function" == typeof i) {
var s = i;
i = function() {
var e = Kl(a);
s.call(e)
}
}
Ul(t, a, e, i)
} else
a = function(e, t, n, r, i) {
if (i) {
if ("function" == typeof r) {
var o = r;
r = function() {
var e = Kl(a);
o.call(e)
}
}
var a = Fl(t, r, e, 0, null, !1, 0, "", Zl);
return e._reactRootContainer = a,
e[di] = a.current,
zr(8 === e.nodeType ? e.parentNode : e),
ul(),
a
}
for (; i = e.lastChild; )
e.removeChild(i);
if ("function" == typeof r) {
var s = r;
r = function() {
var e = Kl(u);
s.call(e)
}
}
var u = jl(e, 0, !1, null, 0, !1, 0, "", Zl);
return e._reactRootContainer = u,
e[di] = u.current,
zr(8 === e.nodeType ? e.parentNode : e),
ul((function() {
Ul(t, u, n, r)
}
)),
u
}(n, t, e, i, r);
return Kl(a)
}
$l.prototype.render = Wl.prototype.render = function(e) {
var t = this._internalRoot;
if (null === t)
throw Error(n(409));
Ul(e, t, null, null)
}
,
$l.prototype.unmount = Wl.prototype.unmount = function() {
var e = this._internalRoot;
if (null !== e) {
this._internalRoot = null;
var t = e.containerInfo;
ul((function() {
Ul(null, e, null, null)
}
)),
t[di] = null
}
}
,
$l.prototype.unstable_scheduleHydration = function(e) {
if (e) {
var t = wt();
e={
blockedOn: null,
target: e,
priority: t
};
for (var n = 0; n < Tt.length && 0 !== t && t < Tt[n].priority; n++)
;
Tt.splice(n, 0, e),
0 === n && Ot(e)
}
}
,
bt = function(e) {
switch (e.tag) {
case 3:
var t = e.stateNode;
if (t.current.memoizedState.isDehydrated) {
var n = ut(t.pendingLanes);
0 !== n && (mt(t, 1 | n),
tl(t, Ye()),
0 == (6 & Mu) && (Fu = Ye() + 500,
zi()))
}
break;
case 13:
ul((function() {
var t = Co(e, 1);
if (null !== t) {
var n = Xu();
el(t, e, 1, n)
}
}
)),
Hl(e, 1)
}
}
,
yt = function(e) {
if (13 === e.tag) {
var t = Co(e, 134217728);
null !== t && el(t, e, 134217728, Xu()),
Hl(e, 134217728)
}
}
,
At = function(e) {
if (13 === e.tag) {
var t = Ju(e)
, n = Co(e, t);
null !== n && el(n, e, t, Xu()),
Hl(e, t)
}
}
,
wt = function() {
return gt
}
,
_t = function(e, t) {
var n = gt;
try {
return gt = e,
t()
} finally {
gt = n
}
}
,
ye = function(e, t, r) {
switch (t) {
case "input":
if (Q(e, r),
t = r.name,
"radio" === r.type && null != t) {
for (r = e; r.parentNode; )
r = r.parentNode;
for (r = r.querySelectorAll("input[name=" + JSON.stringify(""
+ t) + '][type="radio"]'),
t = 0; t < r.length; t++) {
var i = r[t];
if (i !== e && i.form === e.form) {
var o = bi(i);
if (!o)
throw Error(n(90));
H(i),
Q(i, o)
}
}
}
break;
case "textarea":
ne(e, r);
break;
case "select":
null != (t = r.value) && J(e, !!r.multiple, t, !1)
}
}
,
ke = sl,
Me = ul;
var Xl = {
usingClientEntryPoint: !1,
Events: [gi, vi, bi, Ee, Se, sl]
}
, Jl = {
findFiberByHostInstance: mi,
bundleType: 0,
version: "18.2.0",
rendererPackageName: "react-dom"
}
, ec = {
bundleType: Jl.bundleType,
version: Jl.version,
rendererPackageName: Jl.rendererPackageName,
rendererConfig: Jl.rendererConfig,
overrideHookState: null,
overrideHookStateDeletePath: null,
overrideHookStateRenamePath: null,
overrideProps: null,
overridePropsDeletePath: null,
overridePropsRenamePath: null,
setErrorHandler: null,
setSuspenseHandler: null,
scheduleUpdate: null,
currentDispatcherRef: v.ReactCurrentDispatcher,
findHostInstanceByFiber: function(e) {
return null === (e = Ke(e)) ? null : e.stateNode
},
findFiberByHostInstance: Jl.findFiberByHostInstance || function() {
return null
}
,
findHostInstancesForRefresh: null,
scheduleRefresh: null,
scheduleRoot: null,
setRefreshHandler: null,
getCurrentFiber: null,
reconcilerVersion: "18.2.0-next-9e3b772b8-20220608"
};
if ("undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
var tc = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (!tc.isDisabled && tc.supportsFiber)
try {
tt = tc.inject(ec),
nt = tc
} catch (se) {}
}
return
JR.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = Xl,
JR.createPortal = function(e, t) {
var r = 2 < arguments.length && void 0 !== arguments[2] ?
arguments[2] : null;
if (!Yl(t))
throw Error(n(200));
return function(e, t, n) {
var r = 3 < arguments.length && void 0 !== arguments[3] ?
arguments[3] : null;
return {
$$typeof: y,
key: null == r ? null : "" + r,
children: e,
containerInfo: t,
implementation: n
}
}(e, t, null, r)
}
,
JR.createRoot = function(e, t) {
if (!Yl(e))
throw Error(n(299));
var r = !1
, i = ""
, o = Vl;
return null != t && (!0 === t.unstable_strictMode && (r = !0),
void 0 !== t.identifierPrefix && (i = t.identifierPrefix),
void 0 !== t.onRecoverableError && (o = t.onRecoverableError)),
t = jl(e, 1, !1, null, 0, r, 0, i, o),
e[di] = t.current,
zr(8 === e.nodeType ? e.parentNode : e),
new Wl(t)
}
,
JR.findDOMNode = function(e) {
if (null == e)
return null;
if (1 === e.nodeType)
return e;
var t = e._reactInternals;
if (void 0 === t) {
if ("function" == typeof e.render)
throw Error(n(188));
throw e = Object.keys(e).join(","),
Error(n(268, e))
}
return null === (e = Ke(t)) ? null : e.stateNode
}
,
JR.flushSync = function(e) {
return ul(e)
}
,
JR.hydrate = function(e, t, r) {
if (!Ql(t))
throw Error(n(200));
return Gl(null, e, t, !0, r)
}
,
JR.hydrateRoot = function(e, t, r) {
if (!Yl(e))
throw Error(n(405));
var i = null != r && r.hydratedSources || null
, o = !1
, a = ""
, s = Vl;
if (null != r && (!0 === r.unstable_strictMode && (o = !0),
void 0 !== r.identifierPrefix && (a = r.identifierPrefix),
void 0 !== r.onRecoverableError && (s = r.onRecoverableError)),
t = Fl(t, null, e, 1, null != r ? r : null, o, 0, a, s),
e[di] = t.current,
zr(e),
i)
for (e = 0; e < i.length; e++)
o = (o = (r = i[e])._getVersion)(r._source),
null == t.mutableSourceEagerHydrationData ?
t.mutableSourceEagerHydrationData = [r, o] :
t.mutableSourceEagerHydrationData.push(r, o);
return new $l(t)
}
,
JR.render = function(e, t, r) {
if (!Ql(t))
throw Error(n(200));
return Gl(null, e, t, !1, r)
}
,
JR.unmountComponentAtNode = function(e) {
if (!Ql(e))
throw Error(n(40));
return !!e._reactRootContainer && (ul((function() {
Gl(null, null, e, !1, (function() {
e._reactRootContainer = null,
e[di] = null
}
))
}
)),
!0)
}
,
JR.unstable_batchedUpdates = sl,
JR.unstable_renderSubtreeIntoContainer = function(e, t, r, i) {
if (!Ql(r))
throw Error(n(200));
if (null == e || void 0 === e._reactInternals)
throw Error(n(38));
return Gl(e, t, r, !1, i)
}
,
JR.version = "18.2.0-next-9e3b772b8-20220608",
JR
}
var aT, sT, uT, lT = {};
function cT() {
return aT || (aT = 1,
"production" !== je.env.NODE_ENV && function() {
"undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__
&& "function" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);
var e = WR()
, t = iT()
,n=
e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED
, r = !1;
function i(e) {
if (!r) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
i = 1; i < t; i++)
n[i - 1] = arguments[i];
a("warn", e, n)
}
}
function o(e) {
if (!r) {
for (var t = arguments.length, n = new Array(t > 1 ? t - 1 : 0),
i = 1; i < t; i++)
n[i - 1] = arguments[i];
a("error", e, n)
}
}
function a(e, t, r) {
var i = n.ReactDebugCurrentFrame.getStackAddendum();
"" !== i && (t += "%s",
r = r.concat([i]));
var o = r.map((function(e) {
return String(e)
}
));
o.unshift("Warning: " + t),
Function.prototype.apply.call(console[e], console, o)
}
var s = 0
,u=1
,l=2
,c=3
,d=4
,f=5
,h=6
,p=7
,m=8
,g=9
, v = 10
, b = 11
, y = 12
, A = 13
, w = 14
, _ = 15
, E = 16
, S = 17
, k = 18
, M = 19
, C = 21
, x = 22
, R = 23
, T = 24
, I = 25
, P = !0
, L = !1
, O = !1
, N = !1
, D = !1
, B = !0
, j = !1
, z = !1
, F = !0
, U = !0
, K = !0
, q = new Set
, H = {}
, V = {};
function W(e, t) {
$(e, t),
$(e + "Capture", t)
}
function $(e, t) {
H[e] && o("EventRegistry: More than one plugin attempted to
publish the same registration name, `%s`.", e),
H[e] = t;
var n = e.toLowerCase();
V[n] = e,
"onDoubleClick" === e && (V.ondblclick = e);
for (var r = 0; r < t.length; r++)
q.add(t[r])
}
var Y = !("undefined" == typeof window || void 0 ===
window.document || void 0 === window.document.createElement)
, Q = Object.prototype.hasOwnProperty;
function Z(e) {
return "function" == typeof Symbol && Symbol.toStringTag &&
e[Symbol.toStringTag] || e.constructor.name || "Object"
}
function G(e) {
try {
return X(e),
!1
} catch (e) {
return !0
}
}
function X(e) {
return "" + e
}
function J(e, t) {
if (G(e))
return o("The provided `%s` attribute is an unsupported
type %s. This value must be coerced to a string before before using it here.", t, Z(e)),
X(e)
}
function ee(e) {
if (G(e))
return o("Form field values (value, checked, defaultValue, or
defaultChecked props) must be strings, not %s. This value must be coerced to a string
before before using it here.", Z(e)),
X(e)
}
var te = 0
, ne = 3
, re = 4
, ie = 5
, oe = 6
, ae = ":A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\
u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\
u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD"
, se = ae + "\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040"
, ue = new RegExp("^[" + ae + "][" + se + "]*$")
, le = {}
, ce = {};
function de(e) {
return !!Q.call(ce, e) || !Q.call(le, e) && (ue.test(e) ? (ce[e] = !0,
!0) : (le[e] = !0,
o("Invalid attribute name: `%s`", e),
!1))
}
function fe(e, t, n) {
return null !== t ? t.type === te : !n && e.length > 2 && ("o" ===
e[0] || "O" === e[0]) && ("n" === e[1] || "N" === e[1])
}
function he(e, t, n, r) {
if (null !== n && n.type === te)
return !1;
switch (typeof t) {
case "function":
case "symbol":
return !0;
case "boolean":
if (r)
return !1;
if (null !== n)
return !n.acceptsBooleans;
var i = e.toLowerCase().slice(0, 5);
return "data-" !== i && "aria-" !== i;
default:
return !1
}
}
function pe(e, t, n, r) {
if (null == t)
return !0;
if (he(e, t, n, r))
return !0;
if (r)
return !1;
if (null !== n)
switch (n.type) {
case ne:
return !t;
case re:
return !1 === t;
case ie:
return isNaN(t);
case oe:
return isNaN(t) || t < 1
}
return !1
}
function me(e) {
return ve.hasOwnProperty(e) ? ve[e] : null
}
function ge(e, t, n, r, i, o, a) {
this.acceptsBooleans = 2 === t || t === ne || t === re,
this.attributeName = r,
this.attributeNamespace = i,
this.mustUseProperty = n,
this.propertyName = e,
this.type = t,
this.sanitizeURL = o,
this.removeEmptyString = a
}
var ve = {};
["children", "dangerouslySetInnerHTML", "defaultValue",
"defaultChecked", "innerHTML", "suppressContentEditableWarning",
"suppressHydrationWarning", "style"].forEach((function(e) {
ve[e] = new ge(e,te,!1,e,null,!1,!1)
}
)),
[["acceptCharset", "accept-charset"], ["className", "class"],
["htmlFor", "for"], ["httpEquiv", "http-equiv"]].forEach((function(e) {
var t = e[0]
, n = e[1];
ve[t] = new ge(t,1,!1,n,null,!1,!1)
}
)),
["contentEditable", "draggable", "spellCheck",
"value"].forEach((function(e) {
ve[e] = new ge(e,2,!1,e.toLowerCase(),null,!1,!1)
}
)),
["autoReverse", "externalResourcesRequired", "focusable",
"preserveAlpha"].forEach((function(e) {
ve[e] = new ge(e,2,!1,e,null,!1,!1)
}
)),
["allowFullScreen", "async", "autoFocus", "autoPlay", "controls",
"default", "defer", "disabled", "disablePictureInPicture", "disableRemotePlayback",
"formNoValidate", "hidden", "loop", "noModule", "noValidate", "open", "playsInline",
"readOnly", "required", "reversed", "scoped", "seamless",
"itemScope"].forEach((function(e) {
ve[e] = new ge(e,ne,!1,e.toLowerCase(),null,!1,!1)
}
)),
["checked", "multiple", "muted", "selected"].forEach((function(e) {
ve[e] = new ge(e,ne,!0,e,null,!1,!1)
}
)),
["capture", "download"].forEach((function(e) {
ve[e] = new ge(e,re,!1,e,null,!1,!1)
}
)),
["cols", "rows", "size", "span"].forEach((function(e) {
ve[e] = new ge(e,oe,!1,e,null,!1,!1)
}
)),
["rowSpan", "start"].forEach((function(e) {
ve[e] = new ge(e,ie,!1,e.toLowerCase(),null,!1,!1)
}
));
var be = /[\-\:]([a-z])/g
, ye = function(e) {
return e[1].toUpperCase()
};
["accent-height", "alignment-baseline", "arabic-form", "baseline-
shift", "cap-height", "clip-path", "clip-rule", "color-interpolation", "color-interpolation-
filters", "color-profile", "color-rendering", "dominant-baseline", "enable-background", "fill-
opacity", "fill-rule", "flood-color", "flood-opacity", "font-family", "font-size", "font-size-
adjust", "font-stretch", "font-style", "font-variant", "font-weight", "glyph-name", "glyph-
orientation-horizontal", "glyph-orientation-vertical", "horiz-adv-x", "horiz-origin-x",
"image-rendering", "letter-spacing", "lighting-color", "marker-end", "marker-mid",
"marker-start", "overline-position", "overline-thickness", "paint-order", "panose-1",
"pointer-events", "rendering-intent", "shape-rendering", "stop-color", "stop-opacity",
"strikethrough-position", "strikethrough-thickness", "stroke-dasharray", "stroke-
dashoffset", "stroke-linecap", "stroke-linejoin", "stroke-miterlimit", "stroke-opacity",
"stroke-width", "text-anchor", "text-decoration", "text-rendering", "underline-position",
"underline-thickness", "unicode-bidi", "unicode-range", "units-per-em", "v-alphabetic", "v-
hanging", "v-ideographic", "v-mathematical", "vector-effect", "vert-adv-y", "vert-origin-x",
"vert-origin-y", "word-spacing", "writing-mode", "xmlns:xlink", "x-
height"].forEach((function(e) {
var t = e.replace(be, ye);
ve[t] = new ge(t,1,!1,e,null,!1,!1)
}
)),
["xlink:actuate", "xlink:arcrole", "xlink:role", "xlink:show", "xlink:title",
"xlink:type"].forEach((function(e) {
var t = e.replace(be, ye);
ve[t] = new ge(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)
}
)),
["xml:base", "xml:lang", "xml:space"].forEach((function(e) {
var t = e.replace(be, ye);
ve[t] = new
ge(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)
}
)),
["tabIndex", "crossOrigin"].forEach((function(e) {
ve[e] = new ge(e,1,!1,e.toLowerCase(),null,!1,!1)
}
)),
ve.xlinkHref = new
ge("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),
["src", "href", "action", "formAction"].forEach((function(e) {
ve[e] = new ge(e,1,!1,e.toLowerCase(),null,!0,!0)
}
));
var Ae = /^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\
t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*\:/i
, we = !1;
function _e(e) {
!we && Ae.test(e) && (we = !0,
o("A future version of React will block javascript: URLs as a
security precaution. Use event handlers instead if you can. If you need to generate
unsafe HTML try using dangerouslySetInnerHTML instead. React was passed %s.",
JSON.stringify(e)))
}
function Ee(e, t, n, r) {
if (r.mustUseProperty)
return e[r.propertyName];
J(n, t),
r.sanitizeURL && _e("" + n);
var i = r.attributeName
, o = null;
if (r.type === re) {
if (e.hasAttribute(i)) {
var a = e.getAttribute(i);
return "" === a || (pe(t, n, r, !1) ? a : a === "" + n ? n : a)
}
} else if (e.hasAttribute(i)) {
if (pe(t, n, r, !1))
return e.getAttribute(i);
if (r.type === ne)
return n;
o = e.getAttribute(i)
}
return pe(t, n, r, !1) ? null === o ? n : o : o === "" + n ? n : o
}
function Se(e, t, n, r) {
if (de(t)) {
if (!e.hasAttribute(t))
return void 0 === n ? void 0 : null;
var i = e.getAttribute(t);
return J(n, t),
i === "" + n ? n : i
}
}
function ke(e, t, n, r) {
var i = me(t);
if (!fe(t, i, r))
if (pe(t, n, i, r) && (n = null),
r || null === i) {
if (de(t)) {
var o = t;
null === n ? e.removeAttribute(o) : (J(n, t),
e.setAttribute(o, "" + n))
}
} else if (i.mustUseProperty) {
var a = i.propertyName;
if (null === n) {
var s = i.type;
e[a] = s !== ne && ""
} else
e[a] = n
} else {
var u = i.attributeName
, l = i.attributeNamespace;
if (null === n)
e.removeAttribute(u);
else {
var c, d = i.type;
d === ne || d === re && !0 === n ? c = "" : (J(n, u),
c = "" + n,
i.sanitizeURL && _e(c.toString())),
l ? e.setAttributeNS(l, u, c) : e.setAttribute(u, c)
}
}
}
var Me = Symbol.for("react.element")
, Ce = Symbol.for("react.portal")
, xe = Symbol.for("react.fragment")
, Re = Symbol.for("react.strict_mode")
, Te = Symbol.for("react.profiler")
, Ie = Symbol.for("react.provider")
, Pe = Symbol.for("react.context")
, Le = Symbol.for("react.forward_ref")
, Oe = Symbol.for("react.suspense")
, Ne = Symbol.for("react.suspense_list")
, De = Symbol.for("react.memo")
, Be = Symbol.for("react.lazy")
, je = (Symbol.for("react.scope"),
Symbol.for("react.debug_trace_mode"),
Symbol.for("react.offscreen"))
, ze = (Symbol.for("react.legacy_hidden"),
Symbol.for("react.cache"),
Symbol.for("react.tracing_marker"),
Symbol.iterator)
, Fe = "@@iterator";
function Ue(e) {
if (null === e || "object" != typeof e)
return null;
var t = ze && e[ze] || e[Fe];
return "function" == typeof t ? t : null
}
var Ke, qe, He, Ve, We, $e, Ye, Qe = Object.assign, Ze = 0;
function Ge() {}
Ge.__reactDisabledLog = !0;
var Xe, Je = n.ReactCurrentDispatcher;
function et(e, t, n) {
if (void 0 === Xe)
try {
throw Error()
} catch (e) {
var r = e.stack.trim().match(/\n( *(at )?)/);
Xe = r && r[1] || ""
}
return "\n" + Xe + e
}
var tt, nt = !1, rt = "function" == typeof WeakMap ? WeakMap : Map;
function it(e, t) {
if (!e || nt)
return "";
var n, r = tt.get(e);
if (void 0 !== r)
return r;
nt = !0;
var i, a = Error.prepareStackTrace;
Error.prepareStackTrace = void 0,
i = Je.current,
Je.current = null,
function() {
if (0 === Ze) {
Ke = console.log,
qe = console.info,
He = console.warn,
Ve = console.error,
We = console.group,
$e = console.groupCollapsed,
Ye = console.groupEnd;
var e = {
configurable: !0,
enumerable: !0,
value: Ge,
writable: !0
};
Object.defineProperties(console, {
info: e,
log: e,
warn: e,
error: e,
group: e,
groupCollapsed: e,
groupEnd: e
})
}
Ze++
}();
try {
if (t) {
var s = function() {
throw Error()
};
if (Object.defineProperty(s.prototype, "props", {
set: function() {
throw Error()
}
}),
"object" == typeof Reflect && Reflect.construct) {
try {
Reflect.construct(s, [])
} catch (e) {
n=e
}
Reflect.construct(e, [], s)
} else {
try {
s.call()
} catch (e) {
n=e
}
e.call(s.prototype)
}
} else {
try {
throw Error()
} catch (e) {
n=e
}
e()
}
} catch (t) {
if (t && n && "string" == typeof t.stack) {
for (var u = t.stack.split("\n"), l = n.stack.split("\n"), c =
u.length - 1, d = l.length - 1; c >= 1 && d >= 0 && u[c] !== l[d]; )
d--;
for (; c >= 1 && d >= 0; c--,
d--)
if (u[c] !== l[d]) {
if (1 !== c || 1 !== d)
do {
if (c--,
--d < 0 || u[c] !== l[d]) {
var f = "\n" + u[c].replace(" at new ",
" at ");
return e.displayName &&
f.includes("<anonymous>") && (f = f.replace("<anonymous>", e.displayName)),
"function" == typeof e && tt.set(e, f),
f
}
} while (c >= 1 && d >= 0);
break
}
}
} finally {
nt = !1,
Je.current = i,
function() {
if (0 == --Ze) {
var e = {
configurable: !0,
enumerable: !0,
writable: !0
};
Object.defineProperties(console, {
log: Qe({}, e, {
value: Ke
}),
info: Qe({}, e, {
value: qe
}),
warn: Qe({}, e, {
value: He
}),
error: Qe({}, e, {
value: Ve
}),
group: Qe({}, e, {
value: We
}),
groupCollapsed: Qe({}, e, {
value: $e
}),
groupEnd: Qe({}, e, {
value: Ye
})
})
}
Ze < 0 && o("disabledDepth fell below zero. This is a
bug in React. Please file an issue.")
}(),
Error.prepareStackTrace = a
}
var h = e ? e.displayName || e.name : ""
, p = h ? et(h) : "";
return "function" == typeof e && tt.set(e, p),
p
}
function ot(e, t, n) {
return it(e, !1)
}
function at(e, t, n) {
if (null == e)
return "";
if ("function" == typeof e)
return it(e, !(!(r = e.prototype) || !r.isReactComponent));
var r;
if ("string" == typeof e)
return et(e);
switch (e) {
case Oe:
return et("Suspense");
case Ne:
return et("SuspenseList")
}
if ("object" == typeof e)
switch (e.$$typeof) {
case Le:
return ot(e.render);
case De:
return at(e.type, t, n);
case Be:
var i = e
, o = i._payload
, a = i._init;
try {
return at(a(o), t, n)
} catch (e) {}
}
return ""
}
function st(e) {
switch (e._debugOwner && e._debugOwner.type,
e._debugSource,
e.tag) {
case f:
return et(e.type);
case E:
return et("Lazy");
case A:
return et("Suspense");
case M:
return et("SuspenseList");
case s:
case l:
case _:
return ot(e.type);
case b:
return ot(e.type.render);
case u:
return it(e.type, !0);
default:
return ""
}
}
function ut(e) {
try {
var t = ""
, n = e;
do {
t += st(n),
n = n.return
} while (n);
return t
} catch (e) {
return "\nError generating stack: " + e.message + "\n" +
e.stack
}
}
function lt(e) {
return e.displayName || "Context"
}
function ct(e) {
if (null == e)
return null;
if ("number" == typeof e.tag && o("Received an unexpected
object in getComponentNameFromType(). This is likely a bug in React. Please file an
issue."),
"function" == typeof e)
return e.displayName || e.name || null;
if ("string" == typeof e)
return e;
switch (e) {
case xe:
return "Fragment";
case Ce:
return "Portal";
case Te:
return "Profiler";
case Re:
return "StrictMode";
case Oe:
return "Suspense";
case Ne:
return "SuspenseList"
}
if ("object" == typeof e)
switch (e.$$typeof) {
case Pe:
return lt(e) + ".Consumer";
case Ie:
return lt(e._context) + ".Provider";
case Le:
return function(e, t, n) {
var r = e.displayName;
if (r)
return r;
var i = t.displayName || t.name || "";
return "" !== i ? n + "(" + i + ")" : n
}(e, e.render, "ForwardRef");
case De:
var t = e.displayName || null;
return null !== t ? t : ct(e.type) || "Memo";
case Be:
var n = e
, r = n._payload
, i = n._init;
try {
return ct(i(r))
} catch (e) {
return null
}
}
return null
}
function dt(e) {
return e.displayName || "Context"
}
function ft(e) {
var t, n, r, i, o = e.tag, a = e.type;
switch (o) {
case T:
return "Cache";
case g:
return dt(a) + ".Consumer";
case v:
return dt(a._context) + ".Provider";
case k:
return "DehydratedFragment";
case b:
return t = a,
r = "ForwardRef",
i = (n = a.render).displayName || n.name || "",
t.displayName || ("" !== i ? r + "(" + i + ")" : r);
case p:
return "Fragment";
case f:
return a;
case d:
return "Portal";
case c:
return "Root";
case h:
return "Text";
case E:
return ct(a);
case m:
return a === Re ? "StrictMode" : "Mode";
case x:
return "Offscreen";
case y:
return "Profiler";
case C:
return "Scope";
case A:
return "Suspense";
case M:
return "SuspenseList";
case I:
return "TracingMarker";
case u:
case s:
case S:
case l:
case w:
case _:
if ("function" == typeof a)
return a.displayName || a.name || null;
if ("string" == typeof a)
return a
}
return null
}
tt = new rt;
var ht = n.ReactDebugCurrentFrame
, pt = null
, mt = !1;
function gt() {
if (null === pt)
return null;
var e = pt._debugOwner;
return null != e ? ft(e) : null
}
function vt() {
return null === pt ? "" : ut(pt)
}
function bt() {
ht.getCurrentStack = null,
pt = null,
mt = !1
}
function yt(e) {
ht.getCurrentStack = null === e ? null : vt,
pt = e,
mt = !1
}
function At(e) {
mt = e
}
function wt(e) {
return "" + e
}
function _t(e) {
switch (typeof e) {
case "boolean":
case "number":
case "string":
case "undefined":
return e;
case "object":
return ee(e),
e;
default:
return ""
}
}
var Et = {
button: !0,
checkbox: !0,
image: !0,
hidden: !0,
radio: !0,
reset: !0,
submit: !0
};
function St(e, t) {
Et[t.type] || t.onChange || t.onInput || t.readOnly || t.disabled ||
null == t.value || o("You provided a `value` prop to a form field without an `onChange`
handler. This will render a read-only field. If the field should be mutable use
`defaultValue`. Otherwise, set either `onChange` or `readOnly`."),
t.onChange || t.readOnly || t.disabled || null == t.checked ||
o("You provided a `checked` prop to a form field without an `onChange` handler. This
will render a read-only field. If the field should be mutable use `defaultChecked`.
Otherwise, set either `onChange` or `readOnly`.")
}
function kt(e) {
var t = e.type
, n = e.nodeName;
return n && "input" === n.toLowerCase() && ("checkbox" === t
|| "radio" === t)
}
function Mt(e) {
return e._valueTracker
}
function Ct(e) {
Mt(e) || (e._valueTracker = function(e) {
var t = kt(e) ? "checked" : "value"
,n=
Object.getOwnPropertyDescriptor(e.constructor.prototype, t);
ee(e[t]);
var r = "" + e[t];
if (!e.hasOwnProperty(t) && void 0 !== n && "function" ==
typeof n.get && "function" == typeof n.set) {
var i = n.get
, o = n.set;
Object.defineProperty(e, t, {
configurable: !0,
get: function() {
return i.call(this)
},
set: function(e) {
ee(e),
r = "" + e,
o.call(this, e)
}
}),
Object.defineProperty(e, t, {
enumerable: n.enumerable
});
var a = {
getValue: function() {
return r
},
setValue: function(e) {
ee(e),
r = "" + e
},
stopTracking: function() {
!function(e) {
e._valueTracker = null
}(e),
delete e[t]
}
};
return a
}
}(e))
}
function xt(e) {
if (!e)
return !1;
var t = Mt(e);
if (!t)
return !0;
var n = t.getValue()
, r = function(e) {
var t = "";
return e ? t = kt(e) ? e.checked ? "true" : "false" : e.value : t
}(e);
return r !== n && (t.setValue(r),
!0)
}
function Rt(e) {
if (void 0 === (e = e || ("undefined" != typeof document ?
document : void 0)))
return null;
try {
return e.activeElement || e.body
} catch (t) {
return e.body
}
}
var Tt = !1
, It = !1
, Pt = !1
, Lt = !1;
function Ot(e) {
return "checkbox" === e.type || "radio" === e.type ? null !=
e.checked : null != e.value
}
function Nt(e, t) {
var n = e
, r = t.checked;
return Qe({}, t, {
defaultChecked: void 0,
defaultValue: void 0,
value: void 0,
checked: null != r ? r : n._wrapperState.initialChecked
})
}
function Dt(e, t) {
St(0, t),
void 0 === t.checked || void 0 === t.defaultChecked || It ||
(o("%s contains an input of type %s with both checked and defaultChecked props. Input
elements must be either controlled or uncontrolled (specify either the checked prop, or
the defaultChecked prop, but not both). Decide between using a controlled or
uncontrolled input element and remove one of these props. More info:
https://reactjs.org/link/controlled-components", gt() || "A component", t.type),
It = !0),
void 0 === t.value || void 0 === t.defaultValue || Tt || (o("%s
contains an input of type %s with both value and defaultValue props. Input elements
must be either controlled or uncontrolled (specify either the value prop, or the
defaultValue prop, but not both). Decide between using a controlled or uncontrolled
input element and remove one of these props. More info:
https://reactjs.org/link/controlled-components", gt() || "A component", t.type),
Tt = !0);
var n = e
, r = null == t.defaultValue ? "" : t.defaultValue;
n._wrapperState = {
initialChecked: null != t.checked ? t.checked :
t.defaultChecked,
initialValue: _t(null != t.value ? t.value : r),
controlled: Ot(t)
}
}
function Bt(e, t) {
var n = e
, r = t.checked;
null != r && ke(n, "checked", r, !1)
}
function jt(e, t) {
var n = e
, r = Ot(t);
n._wrapperState.controlled || !r || Lt || (o("A component is
changing an uncontrolled input to be controlled. This is likely caused by the value
changing from undefined to a defined value, which should not happen. Decide between
using a controlled or uncontrolled input element for the lifetime of the component. More
info: https://reactjs.org/link/controlled-components"),
Lt = !0),
!n._wrapperState.controlled || r || Pt || (o("A component is
changing a controlled input to be uncontrolled. This is likely caused by the value
changing from a defined to undefined, which should not happen. Decide between using
a controlled or uncontrolled input element for the lifetime of the component. More info:
https://reactjs.org/link/controlled-components"),
Pt = !0),
Bt(e, t);
var i = _t(t.value)
, a = t.type;
if (null != i)
"number" === a ? (0 === i && "" === n.value || n.value != i)
&& (n.value = wt(i)) : n.value !== wt(i) && (n.value = wt(i));
else if ("submit" === a || "reset" === a)
return void n.removeAttribute("value");
t.hasOwnProperty("value") ? Ut(n, t.type, i) :
t.hasOwnProperty("defaultValue") && Ut(n, t.type, _t(t.defaultValue)),
null == t.checked && null != t.defaultChecked &&
(n.defaultChecked = !!t.defaultChecked)
}
function zt(e, t, n) {
var r = e;
if (t.hasOwnProperty("value") ||
t.hasOwnProperty("defaultValue")) {
var i = t.type;
if (("submit" === i || "reset" === i) && (void 0 === t.value ||
null === t.value))
return;
var o = wt(r._wrapperState.initialValue);
n || o !== r.value && (r.value = o),
r.defaultValue = o
}
var a = r.name;
"" !== a && (r.name = ""),
r.defaultChecked = !r.defaultChecked,
r.defaultChecked = !!r._wrapperState.initialChecked,
"" !== a && (r.name = a)
}
function Ft(e, t) {
var n = e;
jt(n, t),
function(e, t) {
var n = t.name;
if ("radio" === t.type && null != n) {
for (var r = e; r.parentNode; )
r = r.parentNode;
J(n, "name");
for (var i = r.querySelectorAll("input[name=" +
JSON.stringify("" + n) + '][type="radio"]'), o = 0; o < i.length; o++) {
var a = i[o];
if (a !== e && a.form === e.form) {
var s = Qc(a);
if (!s)
throw new Error("ReactDOMInput: Mixing
React and non-React radio inputs with the same `name` is not supported.");
xt(a),
jt(a, s)
}
}
}
}(n, t)
}
function Ut(e, t, n) {
"number" === t && Rt(e.ownerDocument) === e || (null == n ?
e.defaultValue = wt(e._wrapperState.initialValue) : e.defaultValue !== wt(n) &&
(e.defaultValue = wt(n)))
}
var Kt = !1
, qt = !1
, Ht = !1;
function Vt(t, n) {
null == n.value && ("object" == typeof n.children && null !==
n.children ? e.Children.forEach(n.children, (function(e) {
null != e && "string" != typeof e && "number" != typeof e &&
(qt || (qt = !0,
o("Cannot infer the option value of complex children. Pass a
`value` prop or use a plain string as children to <option>.")))
}
)) : null != n.dangerouslySetInnerHTML && (Ht || (Ht = !0,
o("Pass a `value` prop if you set dangerouslyInnerHTML so
React knows which value should be selected.")))),
null == n.selected || Kt || (o("Use the `defaultValue` or `value`
props on <select> instead of setting `selected` on <option>."),
Kt = !0)
}
var Wt, $t = Array.isArray;
function Yt(e) {
return $t(e)
}
function Qt() {
var e = gt();
return e ? "\n\nCheck the render method of `" + e + "`." : ""
}
Wt = !1;
var Zt = ["value", "defaultValue"];
function Gt(e, t, n, r) {
var i = e.options;
if (t) {
for (var o = n, a = {}, s = 0; s < o.length; s++)
a["$" + o[s]] = !0;
for (var u = 0; u < i.length; u++) {
var l = a.hasOwnProperty("$" + i[u].value);
i[u].selected !== l && (i[u].selected = l),
l && r && (i[u].defaultSelected = !0)
}
} else {
for (var c = wt(_t(n)), d = null, f = 0; f < i.length; f++) {
if (i[f].value === c)
return i[f].selected = !0,
void (r && (i[f].defaultSelected = !0));
null !== d || i[f].disabled || (d = i[f])
}
null !== d && (d.selected = !0)
}
}
function Xt(e, t) {
return Qe({}, t, {
value: void 0
})
}
function Jt(e, t) {
var n = e;
!function(e) {
St(0, e);
for (var t = 0; t < Zt.length; t++) {
var n = Zt[t];
if (null != e[n]) {
var r = Yt(e[n]);
e.multiple && !r ? o("The `%s` prop supplied to
<select> must be an array if `multiple` is true.%s", n, Qt()) : !e.multiple && r && o("The `
%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s", n, Qt())
}
}
}(t),
n._wrapperState = {
wasMultiple: !!t.multiple
},
void 0 === t.value || void 0 === t.defaultValue || Wt || (o("Select
elements must be either controlled or uncontrolled (specify either the value prop, or the
defaultValue prop, but not both). Decide between using a controlled or uncontrolled
select element and remove one of these props. More info:
https://reactjs.org/link/controlled-components"),
Wt = !0)
}
var en = !1;
function tn(e, t) {
var n = e;
if (null != t.dangerouslySetInnerHTML)
throw new Error("`dangerouslySetInnerHTML` does not
make sense on <textarea>.");
return Qe({}, t, {
value: void 0,
defaultValue: void 0,
children: wt(n._wrapperState.initialValue)
})
}
function nn(e, t) {
var n = e;
St(0, t),
void 0 === t.value || void 0 === t.defaultValue || en || (o("%s
contains a textarea with both value and defaultValue props. Textarea elements must be
either controlled or uncontrolled (specify either the value prop, or the defaultValue prop,
but not both). Decide between using a controlled or uncontrolled textarea and remove
one of these props. More info: https://reactjs.org/link/controlled-components", gt() || "A
component"),
en = !0);
var r = t.value;
if (null == r) {
var i = t.children
, a = t.defaultValue;
if (null != i) {
if (o("Use the `defaultValue` or `value` props instead of
setting children on <textarea>."),
null != a)
throw new Error("If you supply `defaultValue` on a
<textarea>, do not pass children.");
if (Yt(i)) {
if (i.length > 1)
throw new Error("<textarea> can only have at
most one child.");
i = i[0]
}
a=i
}
null == a && (a = ""),
r=a
}
n._wrapperState = {
initialValue: _t(r)
}
}
function rn(e, t) {
var n = e
, r = _t(t.value)
, i = _t(t.defaultValue);
if (null != r) {
var o = wt(r);
o !== n.value && (n.value = o),
null == t.defaultValue && n.defaultValue !== o &&
(n.defaultValue = o)
}
null != i && (n.defaultValue = wt(i))
}
function on(e, t) {
var n = e
, r = n.textContent;
r === n._wrapperState.initialValue && "" !== r && null !== r &&
(n.value = r)
}
var an = "http://www.w3.org/1999/xhtml"
, sn = "http://www.w3.org/1998/Math/MathML"
, un = "http://www.w3.org/2000/svg";
function ln(e) {
switch (e) {
case "svg":
return un;
case "math":
return sn;
default:
return an
}
}
function cn(e, t) {
return null == e || e === an ? ln(t) : e === un && "foreignObject"
=== t ? an : e
}
var dn, fn, hn = (fn = function(e, t) {
if (e.namespaceURI !== un || "innerHTML"in e)
e.innerHTML = t;
else {
(dn = dn || document.createElement("div")).innerHTML =
"<svg>" + t.valueOf().toString() + "</svg>";
for (var n = dn.firstChild; e.firstChild; )
e.removeChild(e.firstChild);
for (; n.firstChild; )
e.appendChild(n.firstChild)
}
}
,
"undefined" != typeof MSApp &&
MSApp.execUnsafeLocalFunction ? function(e, t, n, r) {
MSApp.execUnsafeLocalFunction((function() {
return fn(e, t, n, r)
}
))
}
: fn), pn = 1, mn = 3, gn = 8, vn = 9, bn = 11, yn = function(e, t) {
if (t) {
var n = e.firstChild;
if (n && n === e.lastChild && n.nodeType === mn)
return void (n.nodeValue = t)
}
e.textContent = t
}, An = {
animation: ["animationDelay", "animationDirection",
"animationDuration", "animationFillMode", "animationIterationCount", "animationName",
"animationPlayState", "animationTimingFunction"],
background: ["backgroundAttachment", "backgroundClip",
"backgroundColor", "backgroundImage", "backgroundOrigin", "backgroundPositionX",
"backgroundPositionY", "backgroundRepeat", "backgroundSize"],
backgroundPosition: ["backgroundPositionX",
"backgroundPositionY"],
border: ["borderBottomColor", "borderBottomStyle",
"borderBottomWidth", "borderImageOutset", "borderImageRepeat", "borderImageSlice",
"borderImageSource", "borderImageWidth", "borderLeftColor", "borderLeftStyle",
"borderLeftWidth", "borderRightColor", "borderRightStyle", "borderRightWidth",
"borderTopColor", "borderTopStyle", "borderTopWidth"],
borderBlockEnd: ["borderBlockEndColor",
"borderBlockEndStyle", "borderBlockEndWidth"],
borderBlockStart: ["borderBlockStartColor",
"borderBlockStartStyle", "borderBlockStartWidth"],
borderBottom: ["borderBottomColor", "borderBottomStyle",
"borderBottomWidth"],
borderColor: ["borderBottomColor", "borderLeftColor",
"borderRightColor", "borderTopColor"],
borderImage: ["borderImageOutset", "borderImageRepeat",
"borderImageSlice", "borderImageSource", "borderImageWidth"],
borderInlineEnd: ["borderInlineEndColor",
"borderInlineEndStyle", "borderInlineEndWidth"],
borderInlineStart: ["borderInlineStartColor",
"borderInlineStartStyle", "borderInlineStartWidth"],
borderLeft: ["borderLeftColor", "borderLeftStyle",
"borderLeftWidth"],
borderRadius: ["borderBottomLeftRadius",
"borderBottomRightRadius", "borderTopLeftRadius", "borderTopRightRadius"],
borderRight: ["borderRightColor", "borderRightStyle",
"borderRightWidth"],
borderStyle: ["borderBottomStyle", "borderLeftStyle",
"borderRightStyle", "borderTopStyle"],
borderTop: ["borderTopColor", "borderTopStyle",
"borderTopWidth"],
borderWidth: ["borderBottomWidth", "borderLeftWidth",
"borderRightWidth", "borderTopWidth"],
columnRule: ["columnRuleColor", "columnRuleStyle",
"columnRuleWidth"],
columns: ["columnCount", "columnWidth"],
flex: ["flexBasis", "flexGrow", "flexShrink"],
flexFlow: ["flexDirection", "flexWrap"],
font: ["fontFamily", "fontFeatureSettings", "fontKerning",
"fontLanguageOverride", "fontSize", "fontSizeAdjust", "fontStretch", "fontStyle",
"fontVariant", "fontVariantAlternates", "fontVariantCaps", "fontVariantEastAsian",
"fontVariantLigatures", "fontVariantNumeric", "fontVariantPosition", "fontWeight",
"lineHeight"],
fontVariant: ["fontVariantAlternates", "fontVariantCaps",
"fontVariantEastAsian", "fontVariantLigatures", "fontVariantNumeric",
"fontVariantPosition"],
gap: ["columnGap", "rowGap"],
grid: ["gridAutoColumns", "gridAutoFlow", "gridAutoRows",
"gridTemplateAreas", "gridTemplateColumns", "gridTemplateRows"],
gridArea: ["gridColumnEnd", "gridColumnStart", "gridRowEnd",
"gridRowStart"],
gridColumn: ["gridColumnEnd", "gridColumnStart"],
gridColumnGap: ["columnGap"],
gridGap: ["columnGap", "rowGap"],
gridRow: ["gridRowEnd", "gridRowStart"],
gridRowGap: ["rowGap"],
gridTemplate: ["gridTemplateAreas", "gridTemplateColumns",
"gridTemplateRows"],
listStyle: ["listStyleImage", "listStylePosition", "listStyleType"],
margin: ["marginBottom", "marginLeft", "marginRight",
"marginTop"],
marker: ["markerEnd", "markerMid", "markerStart"],
mask: ["maskClip", "maskComposite", "maskImage",
"maskMode", "maskOrigin", "maskPositionX", "maskPositionY", "maskRepeat",
"maskSize"],
maskPosition: ["maskPositionX", "maskPositionY"],
outline: ["outlineColor", "outlineStyle", "outlineWidth"],
overflow: ["overflowX", "overflowY"],
padding: ["paddingBottom", "paddingLeft", "paddingRight",
"paddingTop"],
placeContent: ["alignContent", "justifyContent"],
placeItems: ["alignItems", "justifyItems"],
placeSelf: ["alignSelf", "justifySelf"],
textDecoration: ["textDecorationColor", "textDecorationLine",
"textDecorationStyle"],
textEmphasis: ["textEmphasisColor", "textEmphasisStyle"],
transition: ["transitionDelay", "transitionDuration",
"transitionProperty", "transitionTimingFunction"],
wordWrap: ["overflowWrap"]
}, wn = {
animationIterationCount: !0,
aspectRatio: !0,
borderImageOutset: !0,
borderImageSlice: !0,
borderImageWidth: !0,
boxFlex: !0,
boxFlexGroup: !0,
boxOrdinalGroup: !0,
columnCount: !0,
columns: !0,
flex: !0,
flexGrow: !0,
flexPositive: !0,
flexShrink: !0,
flexNegative: !0,
flexOrder: !0,
gridArea: !0,
gridRow: !0,
gridRowEnd: !0,
gridRowSpan: !0,
gridRowStart: !0,
gridColumn: !0,
gridColumnEnd: !0,
gridColumnSpan: !0,
gridColumnStart: !0,
fontWeight: !0,
lineClamp: !0,
lineHeight: !0,
opacity: !0,
order: !0,
orphans: !0,
tabSize: !0,
widows: !0,
zIndex: !0,
zoom: !0,
fillOpacity: !0,
floodOpacity: !0,
stopOpacity: !0,
strokeDasharray: !0,
strokeDashoffset: !0,
strokeMiterlimit: !0,
strokeOpacity: !0,
strokeWidth: !0
}, _n = ["Webkit", "ms", "Moz", "O"];
function En(e, t, n) {
return null == t || "boolean" == typeof t || "" === t ? "" : n ||
"number" != typeof t || 0 === t || wn.hasOwnProperty(e) && wn[e] ? (function(e, t) {
G(e) && (o("The provided `%s` CSS property is an
unsupported type %s. This value must be coerced to a string before before using it
here.", t, Z(e)),
X(e))
}(t, e),
("" + t).trim()) : t + "px"
}
Object.keys(wn).forEach((function(e) {
_n.forEach((function(t) {
wn[function(e, t) {
return e + t.charAt(0).toUpperCase() + t.substring(1)
}(t, e)] = wn[e]
}
))
}
));
var Sn = /([A-Z])/g
, kn = /^ms-/;
function Mn(e) {
return e.replace(Sn, "-$1").toLowerCase().replace(kn, "-ms-")
}
var Cn, xn = /^(?:webkit|moz|o)[A-Z]/, Rn = /^-ms-/, Tn = /-(.)/g, In
= /;\s*$/, Pn = {}, Ln = {}, On = !1, Nn = !1, Dn = function(e) {
Pn.hasOwnProperty(e) && Pn[e] || (Pn[e] = !0,
o("Unsupported style property %s. Did you mean %s?", e,
function(e) {
return e.replace(Tn, (function(e, t) {
return t.toUpperCase()
}
))
}(e.replace(Rn, "ms-"))))
};
Cn = function(e, t) {
e.indexOf("-") > -1 ? Dn(e) : xn.test(e) ? function(e) {
Pn.hasOwnProperty(e) && Pn[e] || (Pn[e] = !0,
o("Unsupported vendor-prefixed style property %s. Did you
mean %s?", e, e.charAt(0).toUpperCase() + e.slice(1)))
}(e) : In.test(t) && function(e, t) {
Ln.hasOwnProperty(t) && Ln[t] || (Ln[t] = !0,
o('Style property values shouldn\'t contain a semicolon. Try
"%s: %s" instead.', e, t.replace(In, "")))
}(e, t),
"number" == typeof t && (isNaN(t) ? function(e, t) {
On || (On = !0,
o("`NaN` is an invalid value for the `%s` css style property.",
e))
}(e) : isFinite(t) || function(e, t) {
Nn || (Nn = !0,
o("`Infinity` is an invalid value for the `%s` css style
property.", e))
}(e))
}
;
var Bn = Cn;
function jn(e) {
var t = ""
, n = "";
for (var r in e)
if (e.hasOwnProperty(r)) {
var i = e[r];
if (null != i) {
var o = 0 === r.indexOf("--");
t += n + (o ? r : Mn(r)) + ":",
t += En(r, i, o),
n = ";"
}
}
return t || null
}
function zn(e, t) {
var n = e.style;
for (var r in t)
if (t.hasOwnProperty(r)) {
var i = 0 === r.indexOf("--");
i || Bn(r, t[r]);
var o = En(r, t[r], i);
"float" === r && (r = "cssFloat"),
i ? n.setProperty(r, o) : n[r] = o
}
}
function Fn(e) {
return null == e || "boolean" == typeof e || "" === e
}
function Un(e) {
var t = {};
for (var n in e)
for (var r = An[n] || [n], i = 0; i < r.length; i++)
t[r[i]] = n;
return t
}
var Kn = Qe({
menuitem: !0
}, {
area: !0,
base: !0,
br: !0,
col: !0,
embed: !0,
hr: !0,
img: !0,
input: !0,
keygen: !0,
link: !0,
meta: !0,
param: !0,
source: !0,
track: !0,
wbr: !0
})
, qn = "__html";
function Hn(e, t) {
if (t) {
if (Kn[e] && (null != t.children || null !=
t.dangerouslySetInnerHTML))
throw new Error(e + " is a void element tag and must
neither have `children` nor use `dangerouslySetInnerHTML`.");
if (null != t.dangerouslySetInnerHTML) {
if (null != t.children)
throw new Error("Can only set one of `children` or
`props.dangerouslySetInnerHTML`.");
if ("object" != typeof t.dangerouslySetInnerHTML || !(qn
in t.dangerouslySetInnerHTML))
throw new
Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit
https://reactjs.org/link/dangerously-set-inner-html for more information.")
}
if (!t.suppressContentEditableWarning && t.contentEditable
&& null != t.children && o("A component is `contentEditable` and contains `children`
managed by React. It is now your responsibility to guarantee that none of those nodes
are unexpectedly modified or duplicated. This is probably not intentional."),
null != t.style && "object" != typeof t.style)
throw new Error("The `style` prop expects a mapping
from style properties to values, not a string. For example, style={{marginRight: spacing
+ 'em'}} when using JSX.")
}
}
function Vn(e, t) {
if (-1 === e.indexOf("-"))
return "string" == typeof t.is;
switch (e) {
case "annotation-xml":
case "color-profile":
case "font-face":
case "font-face-src":
case "font-face-uri":
case "font-face-format":
case "font-face-name":
case "missing-glyph":
return !1;
default:
return !0
}
}
var Wn = {
accept: "accept",
acceptcharset: "acceptCharset",
"accept-charset": "acceptCharset",
accesskey: "accessKey",
action: "action",
allowfullscreen: "allowFullScreen",
alt: "alt",
as: "as",
async: "async",
autocapitalize: "autoCapitalize",
autocomplete: "autoComplete",
autocorrect: "autoCorrect",
autofocus: "autoFocus",
autoplay: "autoPlay",
autosave: "autoSave",
capture: "capture",
cellpadding: "cellPadding",
cellspacing: "cellSpacing",
challenge: "challenge",
charset: "charSet",
checked: "checked",
children: "children",
cite: "cite",
class: "className",
classid: "classID",
classname: "className",
cols: "cols",
colspan: "colSpan",
content: "content",
contenteditable: "contentEditable",
contextmenu: "contextMenu",
controls: "controls",
controlslist: "controlsList",
coords: "coords",
crossorigin: "crossOrigin",
dangerouslysetinnerhtml: "dangerouslySetInnerHTML",
data: "data",
datetime: "dateTime",
default: "default",
defaultchecked: "defaultChecked",
defaultvalue: "defaultValue",
defer: "defer",
dir: "dir",
disabled: "disabled",
disablepictureinpicture: "disablePictureInPicture",
disableremoteplayback: "disableRemotePlayback",
download: "download",
draggable: "draggable",
enctype: "encType",
enterkeyhint: "enterKeyHint",
for: "htmlFor",
form: "form",
formmethod: "formMethod",
formaction: "formAction",
formenctype: "formEncType",
formnovalidate: "formNoValidate",
formtarget: "formTarget",
frameborder: "frameBorder",
headers: "headers",
height: "height",
hidden: "hidden",
high: "high",
href: "href",
hreflang: "hrefLang",
htmlfor: "htmlFor",
httpequiv: "httpEquiv",
"http-equiv": "httpEquiv",
icon: "icon",
id: "id",
imagesizes: "imageSizes",
imagesrcset: "imageSrcSet",
innerhtml: "innerHTML",
inputmode: "inputMode",
integrity: "integrity",
is: "is",
itemid: "itemID",
itemprop: "itemProp",
itemref: "itemRef",
itemscope: "itemScope",
itemtype: "itemType",
keyparams: "keyParams",
keytype: "keyType",
kind: "kind",
label: "label",
lang: "lang",
list: "list",
loop: "loop",
low: "low",
manifest: "manifest",
marginwidth: "marginWidth",
marginheight: "marginHeight",
max: "max",
maxlength: "maxLength",
media: "media",
mediagroup: "mediaGroup",
method: "method",
min: "min",
minlength: "minLength",
multiple: "multiple",
muted: "muted",
name: "name",
nomodule: "noModule",
nonce: "nonce",
novalidate: "noValidate",
open: "open",
optimum: "optimum",
pattern: "pattern",
placeholder: "placeholder",
playsinline: "playsInline",
poster: "poster",
preload: "preload",
profile: "profile",
radiogroup: "radioGroup",
readonly: "readOnly",
referrerpolicy: "referrerPolicy",
rel: "rel",
required: "required",
reversed: "reversed",
role: "role",
rows: "rows",
rowspan: "rowSpan",
sandbox: "sandbox",
scope: "scope",
scoped: "scoped",
scrolling: "scrolling",
seamless: "seamless",
selected: "selected",
shape: "shape",
size: "size",
sizes: "sizes",
span: "span",
spellcheck: "spellCheck",
src: "src",
srcdoc: "srcDoc",
srclang: "srcLang",
srcset: "srcSet",
start: "start",
step: "step",
style: "style",
summary: "summary",
tabindex: "tabIndex",
target: "target",
title: "title",
type: "type",
usemap: "useMap",
value: "value",
width: "width",
wmode: "wmode",
wrap: "wrap",
about: "about",
accentheight: "accentHeight",
"accent-height": "accentHeight",
accumulate: "accumulate",
additive: "additive",
alignmentbaseline: "alignmentBaseline",
"alignment-baseline": "alignmentBaseline",
allowreorder: "allowReorder",
alphabetic: "alphabetic",
amplitude: "amplitude",
arabicform: "arabicForm",
"arabic-form": "arabicForm",
ascent: "ascent",
attributename: "attributeName",
attributetype: "attributeType",
autoreverse: "autoReverse",
azimuth: "azimuth",
basefrequency: "baseFrequency",
baselineshift: "baselineShift",
"baseline-shift": "baselineShift",
baseprofile: "baseProfile",
bbox: "bbox",
begin: "begin",
bias: "bias",
by: "by",
calcmode: "calcMode",
capheight: "capHeight",
"cap-height": "capHeight",
clip: "clip",
clippath: "clipPath",
"clip-path": "clipPath",
clippathunits: "clipPathUnits",
cliprule: "clipRule",
"clip-rule": "clipRule",
color: "color",
colorinterpolation: "colorInterpolation",
"color-interpolation": "colorInterpolation",
colorinterpolationfilters: "colorInterpolationFilters",
"color-interpolation-filters": "colorInterpolationFilters",
colorprofile: "colorProfile",
"color-profile": "colorProfile",
colorrendering: "colorRendering",
"color-rendering": "colorRendering",
contentscripttype: "contentScriptType",
contentstyletype: "contentStyleType",
cursor: "cursor",
cx: "cx",
cy: "cy",
d: "d",
datatype: "datatype",
decelerate: "decelerate",
descent: "descent",
diffuseconstant: "diffuseConstant",
direction: "direction",
display: "display",
divisor: "divisor",
dominantbaseline: "dominantBaseline",
"dominant-baseline": "dominantBaseline",
dur: "dur",
dx: "dx",
dy: "dy",
edgemode: "edgeMode",
elevation: "elevation",
enablebackground: "enableBackground",
"enable-background": "enableBackground",
end: "end",
exponent: "exponent",
externalresourcesrequired: "externalResourcesRequired",
fill: "fill",
fillopacity: "fillOpacity",
"fill-opacity": "fillOpacity",
fillrule: "fillRule",
"fill-rule": "fillRule",
filter: "filter",
filterres: "filterRes",
filterunits: "filterUnits",
floodopacity: "floodOpacity",
"flood-opacity": "floodOpacity",
floodcolor: "floodColor",
"flood-color": "floodColor",
focusable: "focusable",
fontfamily: "fontFamily",
"font-family": "fontFamily",
fontsize: "fontSize",
"font-size": "fontSize",
fontsizeadjust: "fontSizeAdjust",
"font-size-adjust": "fontSizeAdjust",
fontstretch: "fontStretch",
"font-stretch": "fontStretch",
fontstyle: "fontStyle",
"font-style": "fontStyle",
fontvariant: "fontVariant",
"font-variant": "fontVariant",
fontweight: "fontWeight",
"font-weight": "fontWeight",
format: "format",
from: "from",
fx: "fx",
fy: "fy",
g1: "g1",
g2: "g2",
glyphname: "glyphName",
"glyph-name": "glyphName",
glyphorientationhorizontal: "glyphOrientationHorizontal",
"glyph-orientation-horizontal": "glyphOrientationHorizontal",
glyphorientationvertical: "glyphOrientationVertical",
"glyph-orientation-vertical": "glyphOrientationVertical",
glyphref: "glyphRef",
gradienttransform: "gradientTransform",
gradientunits: "gradientUnits",
hanging: "hanging",
horizadvx: "horizAdvX",
"horiz-adv-x": "horizAdvX",
horizoriginx: "horizOriginX",
"horiz-origin-x": "horizOriginX",
ideographic: "ideographic",
imagerendering: "imageRendering",
"image-rendering": "imageRendering",
in2: "in2",
in: "in",
inlist: "inlist",
intercept: "intercept",
k1: "k1",
k2: "k2",
k3: "k3",
k4: "k4",
k: "k",
kernelmatrix: "kernelMatrix",
kernelunitlength: "kernelUnitLength",
kerning: "kerning",
keypoints: "keyPoints",
keysplines: "keySplines",
keytimes: "keyTimes",
lengthadjust: "lengthAdjust",
letterspacing: "letterSpacing",
"letter-spacing": "letterSpacing",
lightingcolor: "lightingColor",
"lighting-color": "lightingColor",
limitingconeangle: "limitingConeAngle",
local: "local",
markerend: "markerEnd",
"marker-end": "markerEnd",
markerheight: "markerHeight",
markermid: "markerMid",
"marker-mid": "markerMid",
markerstart: "markerStart",
"marker-start": "markerStart",
markerunits: "markerUnits",
markerwidth: "markerWidth",
mask: "mask",
maskcontentunits: "maskContentUnits",
maskunits: "maskUnits",
mathematical: "mathematical",
mode: "mode",
numoctaves: "numOctaves",
offset: "offset",
opacity: "opacity",
operator: "operator",
order: "order",
orient: "orient",
orientation: "orientation",
origin: "origin",
overflow: "overflow",
overlineposition: "overlinePosition",
"overline-position": "overlinePosition",
overlinethickness: "overlineThickness",
"overline-thickness": "overlineThickness",
paintorder: "paintOrder",
"paint-order": "paintOrder",
panose1: "panose1",
"panose-1": "panose1",
pathlength: "pathLength",
patterncontentunits: "patternContentUnits",
patterntransform: "patternTransform",
patternunits: "patternUnits",
pointerevents: "pointerEvents",
"pointer-events": "pointerEvents",
points: "points",
pointsatx: "pointsAtX",
pointsaty: "pointsAtY",
pointsatz: "pointsAtZ",
prefix: "prefix",
preservealpha: "preserveAlpha",
preserveaspectratio: "preserveAspectRatio",
primitiveunits: "primitiveUnits",
property: "property",
r: "r",
radius: "radius",
refx: "refX",
refy: "refY",
renderingintent: "renderingIntent",
"rendering-intent": "renderingIntent",
repeatcount: "repeatCount",
repeatdur: "repeatDur",
requiredextensions: "requiredExtensions",
requiredfeatures: "requiredFeatures",
resource: "resource",
restart: "restart",
result: "result",
results: "results",
rotate: "rotate",
rx: "rx",
ry: "ry",
scale: "scale",
security: "security",
seed: "seed",
shaperendering: "shapeRendering",
"shape-rendering": "shapeRendering",
slope: "slope",
spacing: "spacing",
specularconstant: "specularConstant",
specularexponent: "specularExponent",
speed: "speed",
spreadmethod: "spreadMethod",
startoffset: "startOffset",
stddeviation: "stdDeviation",
stemh: "stemh",
stemv: "stemv",
stitchtiles: "stitchTiles",
stopcolor: "stopColor",
"stop-color": "stopColor",
stopopacity: "stopOpacity",
"stop-opacity": "stopOpacity",
strikethroughposition: "strikethroughPosition",
"strikethrough-position": "strikethroughPosition",
strikethroughthickness: "strikethroughThickness",
"strikethrough-thickness": "strikethroughThickness",
string: "string",
stroke: "stroke",
strokedasharray: "strokeDasharray",
"stroke-dasharray": "strokeDasharray",
strokedashoffset: "strokeDashoffset",
"stroke-dashoffset": "strokeDashoffset",
strokelinecap: "strokeLinecap",
"stroke-linecap": "strokeLinecap",
strokelinejoin: "strokeLinejoin",
"stroke-linejoin": "strokeLinejoin",
strokemiterlimit: "strokeMiterlimit",
"stroke-miterlimit": "strokeMiterlimit",
strokewidth: "strokeWidth",
"stroke-width": "strokeWidth",
strokeopacity: "strokeOpacity",
"stroke-opacity": "strokeOpacity",
suppresscontenteditablewarning:
"suppressContentEditableWarning",
suppresshydrationwarning: "suppressHydrationWarning",
surfacescale: "surfaceScale",
systemlanguage: "systemLanguage",
tablevalues: "tableValues",
targetx: "targetX",
targety: "targetY",
textanchor: "textAnchor",
"text-anchor": "textAnchor",
textdecoration: "textDecoration",
"text-decoration": "textDecoration",
textlength: "textLength",
textrendering: "textRendering",
"text-rendering": "textRendering",
to: "to",
transform: "transform",
typeof: "typeof",
u1: "u1",
u2: "u2",
underlineposition: "underlinePosition",
"underline-position": "underlinePosition",
underlinethickness: "underlineThickness",
"underline-thickness": "underlineThickness",
unicode: "unicode",
unicodebidi: "unicodeBidi",
"unicode-bidi": "unicodeBidi",
unicoderange: "unicodeRange",
"unicode-range": "unicodeRange",
unitsperem: "unitsPerEm",
"units-per-em": "unitsPerEm",
unselectable: "unselectable",
valphabetic: "vAlphabetic",
"v-alphabetic": "vAlphabetic",
values: "values",
vectoreffect: "vectorEffect",
"vector-effect": "vectorEffect",
version: "version",
vertadvy: "vertAdvY",
"vert-adv-y": "vertAdvY",
vertoriginx: "vertOriginX",
"vert-origin-x": "vertOriginX",
vertoriginy: "vertOriginY",
"vert-origin-y": "vertOriginY",
vhanging: "vHanging",
"v-hanging": "vHanging",
videographic: "vIdeographic",
"v-ideographic": "vIdeographic",
viewbox: "viewBox",
viewtarget: "viewTarget",
visibility: "visibility",
vmathematical: "vMathematical",
"v-mathematical": "vMathematical",
vocab: "vocab",
widths: "widths",
wordspacing: "wordSpacing",
"word-spacing": "wordSpacing",
writingmode: "writingMode",
"writing-mode": "writingMode",
x1: "x1",
x2: "x2",
x: "x",
xchannelselector: "xChannelSelector",
xheight: "xHeight",
"x-height": "xHeight",
xlinkactuate: "xlinkActuate",
"xlink:actuate": "xlinkActuate",
xlinkarcrole: "xlinkArcrole",
"xlink:arcrole": "xlinkArcrole",
xlinkhref: "xlinkHref",
"xlink:href": "xlinkHref",
xlinkrole: "xlinkRole",
"xlink:role": "xlinkRole",
xlinkshow: "xlinkShow",
"xlink:show": "xlinkShow",
xlinktitle: "xlinkTitle",
"xlink:title": "xlinkTitle",
xlinktype: "xlinkType",
"xlink:type": "xlinkType",
xmlbase: "xmlBase",
"xml:base": "xmlBase",
xmllang: "xmlLang",
"xml:lang": "xmlLang",
xmlns: "xmlns",
"xml:space": "xmlSpace",
xmlnsxlink: "xmlnsXlink",
"xmlns:xlink": "xmlnsXlink",
xmlspace: "xmlSpace",
y1: "y1",
y2: "y2",
y: "y",
ychannelselector: "yChannelSelector",
z: "z",
zoomandpan: "zoomAndPan"
}
, $n = {
"aria-current": 0,
"aria-description": 0,
"aria-details": 0,
"aria-disabled": 0,
"aria-hidden": 0,
"aria-invalid": 0,
"aria-keyshortcuts": 0,
"aria-label": 0,
"aria-roledescription": 0,
"aria-autocomplete": 0,
"aria-checked": 0,
"aria-expanded": 0,
"aria-haspopup": 0,
"aria-level": 0,
"aria-modal": 0,
"aria-multiline": 0,
"aria-multiselectable": 0,
"aria-orientation": 0,
"aria-placeholder": 0,
"aria-pressed": 0,
"aria-readonly": 0,
"aria-required": 0,
"aria-selected": 0,
"aria-sort": 0,
"aria-valuemax": 0,
"aria-valuemin": 0,
"aria-valuenow": 0,
"aria-valuetext": 0,
"aria-atomic": 0,
"aria-busy": 0,
"aria-live": 0,
"aria-relevant": 0,
"aria-dropeffect": 0,
"aria-grabbed": 0,
"aria-activedescendant": 0,
"aria-colcount": 0,
"aria-colindex": 0,
"aria-colspan": 0,
"aria-controls": 0,
"aria-describedby": 0,
"aria-errormessage": 0,
"aria-flowto": 0,
"aria-labelledby": 0,
"aria-owns": 0,
"aria-posinset": 0,
"aria-rowcount": 0,
"aria-rowindex": 0,
"aria-rowspan": 0,
"aria-setsize": 0
}
, Yn = {}
, Qn = new RegExp("^(aria)-[" + se + "]*$")
, Zn = new RegExp("^(aria)[A-Z][" + se + "]*$");
function Gn(e, t) {
if (Q.call(Yn, t) && Yn[t])
return !0;
if (Zn.test(t)) {
var n = "aria-" + t.slice(4).toLowerCase()
, r = $n.hasOwnProperty(n) ? n : null;
if (null == r)
return o("Invalid ARIA attribute `%s`. ARIA attributes
follow the pattern aria-* and must be lowercase.", t),
Yn[t] = !0,
!0;
if (t !== r)
return o("Invalid ARIA attribute `%s`. Did you mean `
%s`?", t, r),
Yn[t] = !0,
!0
}
if (Qn.test(t)) {
var i = t.toLowerCase()
, a = $n.hasOwnProperty(i) ? i : null;
if (null == a)
return Yn[t] = !0,
!1;
if (t !== a)
return o("Unknown ARIA attribute `%s`. Did you mean `
%s`?", t, a),
Yn[t] = !0,
!0
}
return !0
}
function Xn(e, t) {
Vn(e, t) || function(e, t) {
var n = [];
for (var r in t)
Gn(0, r) || n.push(r);
var i = n.map((function(e) {
return "`" + e + "`"
}
)).join(", ");
1 === n.length ? o("Invalid aria prop %s on <%s> tag. For
details, see https://reactjs.org/link/invalid-aria-props", i, e) : n.length > 1 && o("Invalid
aria props %s on <%s> tag. For details, see https://reactjs.org/link/invalid-aria-props", i,
e)
}(e, t)
}
var Jn, er = !1, tr = {}, nr = /^on./, rr = /^on[^A-Z]/, ir = new
RegExp("^(aria)-[" + se + "]*$"), or = new RegExp("^(aria)[A-Z][" + se + "]*$");
function ar(e, t, n) {
Vn(e, t) || function(e, t, n) {
var r = [];
for (var i in t)
Jn(0, i, t[i], n) || r.push(i);
var a = r.map((function(e) {
return "`" + e + "`"
}
)).join(", ");
1 === r.length ? o("Invalid value for prop %s on <%s> tag.
Either remove it from the element, or pass a string or number value to keep it in the
DOM. For details, see https://reactjs.org/link/attribute-behavior ", a, e) : r.length > 1 &&
o("Invalid values for props %s on <%s> tag. Either remove them from the element, or
pass a string or number value to keep them in the DOM. For details, see
https://reactjs.org/link/attribute-behavior ", a, e)
}(e, t, n)
}
Jn = function(e, t, n, r) {
if (Q.call(tr, t) && tr[t])
return !0;
var i = t.toLowerCase();
if ("onfocusin" === i || "onfocusout" === i)
return o("React uses onFocus and onBlur instead of
onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn
and onFocusOut are not needed/supported by React."),
tr[t] = !0,
!0;
if (null != r) {
var a = r.registrationNameDependencies
, s = r.possibleRegistrationNames;
if (a.hasOwnProperty(t))
return !0;
var u = s.hasOwnProperty(i) ? s[i] : null;
if (null != u)
return o("Invalid event handler property `%s`. Did you
mean `%s`?", t, u),
tr[t] = !0,
!0;
if (nr.test(t))
return o("Unknown event handler property `%s`. It will
be ignored.", t),
tr[t] = !0,
!0
} else if (nr.test(t))
return rr.test(t) && o("Invalid event handler property `%s`.
React events use the camelCase naming convention, for example `onClick`.", t),
tr[t] = !0,
!0;
if (ir.test(t) || or.test(t))
return !0;
if ("innerhtml" === i)
return o("Directly setting property `innerHTML` is not
permitted. For more information, lookup documentation on
`dangerouslySetInnerHTML`."),
tr[t] = !0,
!0;
if ("aria" === i)
return o("The `aria` attribute is reserved for future use in
React. Pass individual `aria-` attributes instead."),
tr[t] = !0,
!0;
if ("is" === i && null != n && "string" != typeof n)
return o("Received a `%s` for a string attribute `is`. If this is
expected, cast the value to a string.", typeof n),
tr[t] = !0,
!0;
if ("number" == typeof n && isNaN(n))
return o("Received NaN for the `%s` attribute. If this is
expected, cast the value to a string.", t),
tr[t] = !0,
!0;
var l = me(t)
, c = null !== l && l.type === te;
if (Wn.hasOwnProperty(i)) {
var d = Wn[i];
if (d !== t)
return o("Invalid DOM property `%s`. Did you mean `
%s`?", t, d),
tr[t] = !0,
!0
} else if (!c && t !== i)
return o("React does not recognize the `%s` prop on a
DOM element. If you intentionally want it to appear in the DOM as a custom attribute,
spell it as lowercase `%s` instead. If you accidentally passed it from a parent
component, remove it from the DOM element.", t, i),
tr[t] = !0,
!0;
return "boolean" == typeof n && he(t, n, l, !1) ? (n ? o('Received
`%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a
string instead: %s="%s" or %s={value.toString()}.', n, t, t, n, t) : o('Received `%s` for a
non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead:
%s="%s" or %s={value.toString()}.\n\nIf you used to conditionally omit it with
%s={condition && value}, pass %s={condition ? value : undefined} instead.', n, t, t, n, t,
t, t),
tr[t] = !0,
!0) : !!c || (he(t, n, l, !1) ? (tr[t] = !0,
!1) : ("false" !== n && "true" !== n || null === l || l.type !== ne ||
(o("Received the string `%s` for the boolean attribute `%s`. %s Did you mean
%s={%s}?", n, t, "false" === n ? "The browser will interpret it as a truthy value." :
'Although this works, it will not work as expected if you pass the string "false".', t, n),
tr[t] = !0),
!0))
}
;
var sr = 1
, ur = 2
, lr = 4
, cr = sr | ur | lr
, dr = null;
function fr(e) {
var t = e.target || e.srcElement || window;
return t.correspondingUseElement && (t =
t.correspondingUseElement),
t.nodeType === mn ? t.parentNode : t
}
var hr = null
, pr = null
, mr = null;
function gr(e) {
var t = $c(e);
if (t) {
if ("function" != typeof hr)
throw new Error("setRestoreImplementation() needs to
be called to handle a target for controlled events. This error is likely caused by a bug in
React. Please file an issue.");
var n = t.stateNode;
if (n) {
var r = Qc(n);
hr(t.stateNode, t.type, r)
}
}
}
function vr(e) {
pr ? mr ? mr.push(e) : mr = [e] : pr = e
}
function br() {
if (pr) {
var e = pr
, t = mr;
if (pr = null,
mr = null,
gr(e),
t)
for (var n = 0; n < t.length; n++)
gr(t[n])
}
}
var yr = function(e, t) {
return e(t)
}
, Ar = function() {}
, wr = !1;
function _r() {
(null !== pr || null !== mr) && (Ar(),
br())
}
function Er(e, t, n) {
if (wr)
return e(t, n);
wr = !0;
try {
return yr(e, t, n)
} finally {
wr = !1,
_r()
}
}
function Sr(e, t) {
var n = e.stateNode;
if (null === n)
return null;
var r = Qc(n);
if (null === r)
return null;
var i = r[t];
if (function(e, t, n) {
switch (e) {
case "onClick":
case "onClickCapture":
case "onDoubleClick":
case "onDoubleClickCapture":
case "onMouseDown":
case "onMouseDownCapture":
case "onMouseMove":
case "onMouseMoveCapture":
case "onMouseUp":
case "onMouseUpCapture":
case "onMouseEnter":
return !(!n.disabled || (r = t,
"button" !== r && "input" !== r && "select" !== r &&
"textarea" !== r));
default:
return !1
}
var r
}(t, e.type, r))
return null;
if (i && "function" != typeof i)
throw new Error("Expected `" + t + "` listener to be a
function, instead got a value of `" + typeof i + "` type.");
return i
}
var kr = !1;
if (Y)
try {
var Mr = {};
Object.defineProperty(Mr, "passive", {
get: function() {
kr = !0
}
}),
window.addEventListener("test", Mr, Mr),
window.removeEventListener("test", Mr, Mr)
} catch (e) {
kr = !1
}
function Cr(e, t, n, r, i, o, a, s, u) {
var l = Array.prototype.slice.call(arguments, 3);
try {
t.apply(n, l)
} catch (e) {
this.onError(e)
}
}
var xr = Cr;
if ("undefined" != typeof window && "function" == typeof
window.dispatchEvent && "undefined" != typeof document && "function" == typeof
document.createEvent) {
var Rr = document.createElement("react");
xr = function(e, t, n, r, i, o, a, s, u) {
if ("undefined" == typeof document || null === document)
throw new Error("The `document` global was defined
when React was initialized, but is not defined anymore. This can happen in a test
environment if a component schedules an update from an asynchronous callback, but
the test has already finished running. To solve this, you can either unmount the
component at the end of your test (and ensure that any asynchronous operations get
canceled in `componentWillUnmount`), or you can change the test itself to be
asynchronous.");
var l = document.createEvent("Event")
, c = !1
, d = !0
, f = window.event
, h = Object.getOwnPropertyDescriptor(window, "event");
function p() {
Rr.removeEventListener(w, v, !1),
void 0 !== window.event &&
window.hasOwnProperty("event") && (window.event = f)
}
var m, g = Array.prototype.slice.call(arguments, 3);
function v() {
c = !0,
p(),
t.apply(n, g),
d = !1
}
var b = !1
, y = !1;
function A(e) {
if (m = e.error,
b = !0,
null === m && 0 === e.colno && 0 === e.lineno && (y =
!0),
e.defaultPrevented && null != m && "object" == typeof
m)
try {
m._suppressLogging = !0
} catch (e) {}
}
var w = "react-" + (e || "invokeguardedcallback");
if (window.addEventListener("error", A),
Rr.addEventListener(w, v, !1),
l.initEvent(w, !1, !1),
Rr.dispatchEvent(l),
h && Object.defineProperty(window, "event", h),
c && d && (b ? y && (m = new Error("A cross-origin error
was thrown. React doesn't have access to the actual error object in development. See
https://reactjs.org/link/crossorigin-error for more information.")) : m = new Error("An error
was thrown inside one of your components, but React doesn't know what it was. This is
likely due to browser flakiness. React does its best to preserve the \"Pause on
exceptions\" behavior of the DevTools, which requires some DEV-mode only tricks. It's
possible that these don't work in your browser. Try triggering the error in production
mode, or switching to a modern browser. If you suspect that this is actually an issue with
React, please file an issue."),
this.onError(m)),
window.removeEventListener("error", A),
!c)
return p(),
Cr.apply(this, arguments)
}
}
var Tr = xr
, Ir = !1
, Pr = null
, Lr = !1
, Or = null
, Nr = {
onError: function(e) {
Ir = !0,
Pr = e
}
};
function Dr(e, t, n, r, i, o, a, s, u) {
Ir = !1,
Pr = null,
Tr.apply(Nr, arguments)
}
function Br() {
if (Ir) {
var e = Pr;
return Ir = !1,
Pr = null,
e
}
throw new Error("clearCaughtError was called but no error was
captured. This error is likely caused by a bug in React. Please file an issue.")
}
function jr(e) {
return e._reactInternals
}
var zr = 0
, Fr = 1
, Ur = 2
, Kr = 4
, qr = 16
, Hr = 32
, Vr = 64
, Wr = 128
, $r = 256
, Yr = 512
, Qr = 1024
, Zr = 2048
, Gr = 4096
, Xr = 8192
, Jr = 16384
, ei = Zr | Kr | Vr | Yr | Qr | Jr
, ti = 32767
, ni = 32768
, ri = 65536
, ii = 131072
, oi = 1048576
, ai = 2097152
, si = 4194304
, ui = 8388608
, li = 16777216
, ci = 33554432
, di = Kr | Qr | 0
, fi = Ur | Kr | qr | Hr | Yr | Gr | Xr
, hi = Kr | Vr | Yr | Xr
, pi = Zr | qr
, mi = si | ui | ai
, gi = n.ReactCurrentOwner;
function vi(e) {
var t = e
, n = e;
if (e.alternate)
for (; t.return; )
t = t.return;
else {
var r = t;
do {
((t = r).flags & (Ur | Gr)) !== zr && (n = t.return),
r = t.return
} while (r)
}
return t.tag === c ? n : null
}
function bi(e) {
if (e.tag === A) {
var t = e.memoizedState;
if (null === t) {
var n = e.alternate;
null !== n && (t = n.memoizedState)
}
if (null !== t)
return t.dehydrated
}
return null
}
function yi(e) {
return e.tag === c ? e.stateNode.containerInfo : null
}
function Ai(e) {
if (vi(e) !== e)
throw new Error("Unable to find node on an unmounted
component.")
}
function wi(e) {
var t = e.alternate;
if (!t) {
var n = vi(e);
if (null === n)
throw new Error("Unable to find node on an unmounted
component.");
return n !== e ? null : e
}
for (var r = e, i = t; ; ) {
var o = r.return;
if (null === o)
break;
var a = o.alternate;
if (null === a) {
var s = o.return;
if (null !== s) {
r = i = s;
continue
}
break
}
if (o.child === a.child) {
for (var u = o.child; u; ) {
if (u === r)
return Ai(o),
e;
if (u === i)
return Ai(o),
t;
u = u.sibling
}
throw new Error("Unable to find node on an unmounted
component.")
}
if (r.return !== i.return)
r = o,
i = a;
else {
for (var l = !1, d = o.child; d; ) {
if (d === r) {
l = !0,
r = o,
i = a;
break
}
if (d === i) {
l = !0,
i = o,
r = a;
break
}
d = d.sibling
}
if (!l) {
for (d = a.child; d; ) {
if (d === r) {
l = !0,
r = a,
i = o;
break
}
if (d === i) {
l = !0,
i = a,
r = o;
break
}
d = d.sibling
}
if (!l)
throw new Error("Child was not found in either
parent set. This indicates a bug in React related to the return pointer. Please file an
issue.")
}
}
if (r.alternate !== i)
throw new Error("Return fibers should always be each
others' alternates. This error is likely caused by a bug in React. Please file an issue.")
}
if (r.tag !== c)
throw new Error("Unable to find node on an unmounted
component.");
return r.stateNode.current === r ? e : t
}
function _i(e) {
var t = wi(e);
return null !== t ? Ei(t) : null
}
function Ei(e) {
if (e.tag === f || e.tag === h)
return e;
for (var t = e.child; null !== t; ) {
var n = Ei(t);
if (null !== n)
return n;
t = t.sibling
}
return null
}
function Si(e) {
var t = wi(e);
return null !== t ? ki(t) : null
}
function ki(e) {
if (e.tag === f || e.tag === h)
return e;
for (var t = e.child; null !== t; ) {
if (t.tag !== d) {
var n = ki(t);
if (null !== n)
return n
}
t = t.sibling
}
return null
}
var Mi = t.unstable_scheduleCallback
, Ci = t.unstable_cancelCallback
, xi = t.unstable_shouldYield
, Ri = t.unstable_requestPaint
, Ti = t.unstable_now
, Ii = t.unstable_getCurrentPriorityLevel
, Pi = t.unstable_ImmediatePriority
, Li = t.unstable_UserBlockingPriority
, Oi = t.unstable_NormalPriority
, Ni = t.unstable_LowPriority
, Di = t.unstable_IdlePriority
, Bi = t.unstable_yieldValue
, ji = t.unstable_setDisableYieldValue
, zi = null
, Fi = null
, Ui = null
, Ki = !1
, qi = "undefined" != typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__;
function Hi(e) {
if ("function" == typeof Bi && (ji(e),
r = e),
Fi && "function" == typeof Fi.setStrictMode)
try {
Fi.setStrictMode(zi, e)
} catch (e) {
Ki || (Ki = !0,
o("React instrumentation encountered an error: %s", e))
}
}
function Vi(e) {
Ui = e
}
function Wi() {
for (var e = new Map, t = 1, n = 0; n < ho; n++) {
var r = Go(t);
e.set(t, r),
t *= 2
}
return e
}
function $i() {
null !== Ui && "function" == typeof Ui.markCommitStopped &&
Ui.markCommitStopped()
}
function Yi(e) {
null !== Ui && "function" == typeof
Ui.markComponentRenderStarted && Ui.markComponentRenderStarted(e)
}
function Qi() {
null !== Ui && "function" == typeof
Ui.markComponentRenderStopped && Ui.markComponentRenderStopped()
}
function Zi(e) {
null !== Ui && "function" == typeof
Ui.markComponentLayoutEffectMountStarted &&
Ui.markComponentLayoutEffectMountStarted(e)
}
function Gi(e) {
null !== Ui && "function" == typeof
Ui.markComponentLayoutEffectUnmountStarted &&
Ui.markComponentLayoutEffectUnmountStarted(e)
}
function Xi() {
null !== Ui && "function" == typeof
Ui.markComponentLayoutEffectUnmountStopped &&
Ui.markComponentLayoutEffectUnmountStopped()
}
function Ji(e, t, n) {
null !== Ui && "function" == typeof Ui.markComponentErrored
&& Ui.markComponentErrored(e, t, n)
}
function eo(e, t, n) {
null !== Ui && "function" == typeof
Ui.markComponentSuspended && Ui.markComponentSuspended(e, t, n)
}
function to(e) {
null !== Ui && "function" == typeof Ui.markRenderStarted &&
Ui.markRenderStarted(e)
}
function no() {
null !== Ui && "function" == typeof Ui.markRenderStopped &&
Ui.markRenderStopped()
}
function ro(e, t) {
null !== Ui && "function" == typeof
Ui.markStateUpdateScheduled && Ui.markStateUpdateScheduled(e, t)
}
var io = 0
, oo = 1
, ao = 2
, so = 8
, uo = 16
, lo = Math.clz32 ? Math.clz32 : function(e) {
var t = e >>> 0;
return 0 === t ? 32 : 31 - (co(t) / fo | 0) | 0
}
, co = Math.log
, fo = Math.LN2
, ho = 31
, po = 0
, mo = 0
, go = 1
, vo = 2
, bo = 4
, yo = 8
, Ao = 16
, wo = 32
, _o = 4194240
, Eo = 64
, So = 128
, ko = 256
, Mo = 512
, Co = 1024
, xo = 2048
, Ro = 4096
, To = 8192
, Io = 16384
, Po = 32768
, Lo = 65536
, Oo = 131072
, No = 262144
, Do = 524288
, Bo = 1048576
, jo = 2097152
, zo = 130023424
, Fo = 4194304
, Uo = 8388608
, Ko = 16777216
, qo = 33554432
, Ho = 67108864
, Vo = Fo
, Wo = 134217728
, $o = 268435455
, Yo = 268435456
, Qo = 536870912
, Zo = 1073741824;
function Go(e) {
return e & go ? "Sync" : e & vo ? "InputContinuousHydration" : e
& bo ? "InputContinuous" : e & yo ? "DefaultHydration" : e & Ao ? "Default" : e & wo ?
"TransitionHydration" : e & _o ? "Transition" : e & zo ? "Retry" : e & Wo ?
"SelectiveHydration" : e & Yo ? "IdleHydration" : e & Qo ? "Idle" : e & Zo ? "Offscreen" :
void 0
}
var Xo = -1
, Jo = Eo
, ea = Fo;
function ta(e) {
switch (ca(e)) {
case go:
return go;
case vo:
return vo;
case bo:
return bo;
case yo:
return yo;
case Ao:
return Ao;
case wo:
return wo;
case Eo:
case So:
case ko:
case Mo:
case Co:
case xo:
case Ro:
case To:
case Io:
case Po:
case Lo:
case Oo:
case No:
case Do:
case Bo:
case jo:
return e & _o;
case Fo:
case Uo:
case Ko:
case qo:
case Ho:
return e & zo;
case Wo:
return Wo;
case Yo:
return Yo;
case Qo:
return Qo;
case Zo:
return Zo;
default:
return o("Should have found matching lanes. This is a bug
in React."),
e
}
}
function na(e, t) {
var n = e.pendingLanes;
if (n === po)
return po;
var r = po
, i = e.suspendedLanes
, o = e.pingedLanes
, a = n & $o;
if (a !== po) {
var s = a & ~i;
if (s !== po)
r = ta(s);
else {
var u = a & o;
u !== po && (r = ta(u))
}
} else {
var l = n & ~i;
l !== po ? r = ta(l) : o !== po && (r = ta(o))
}
if (r === po)
return po;
if (t !== po && t !== r && (t & i) === po) {
var c = ca(r)
, d = ca(t);
if (c >= d || c === Ao && (d & _o) !== po)
return t
}
(r & bo) !== po && (r |= n & Ao);
var f = e.entangledLanes;
if (f !== po)
for (var h = e.entanglements, p = r & f; p > 0; ) {
var m = fa(p)
, g = 1 << m;
r |= h[m],
p &= ~g
}
return r
}
function ra(e, t) {
switch (e) {
case go:
case vo:
case bo:
return t + 250;
case yo:
case Ao:
case wo:
case Eo:
case So:
case ko:
case Mo:
case Co:
case xo:
case Ro:
case To:
case Io:
case Po:
case Lo:
case Oo:
case No:
case Do:
case Bo:
case jo:
return t + 5e3;
case Fo:
case Uo:
case Ko:
case qo:
case Ho:
case Wo:
case Yo:
case Qo:
case Zo:
return Xo;
default:
return o("Should have found matching lanes. This is a bug
in React."),
Xo
}
}
function ia(e) {
var t = e.pendingLanes & ~Zo;
return t !== po ? t : t & Zo ? Zo : po
}
function oa(e) {
return (e & $o) !== po
}
function aa(e) {
return (e & zo) === e
}
function sa(e, t) {
return (t & (vo | bo | yo | Ao)) !== po
}
function ua(e) {
return (e & _o) !== po
}
function la() {
var e = Jo;
return ((Jo <<= 1) & _o) === po && (Jo = Eo),
e
}
function ca(e) {
return e & -e
}
function da(e) {
return ca(e)
}
function fa(e) {
return 31 - lo(e)
}
function ha(e) {
return fa(e)
}
function pa(e, t) {
return (e & t) !== po
}
function ma(e, t) {
return (e & t) === t
}
function ga(e, t) {
return e | t
}
function va(e, t) {
return e & ~t
}
function ba(e, t) {
return e & t
}
function ya(e) {
for (var t = [], n = 0; n < ho; n++)
t.push(e);
return t
}
function Aa(e, t, n) {
e.pendingLanes |= t,
t !== Qo && (e.suspendedLanes = po,
e.pingedLanes = po),
e.eventTimes[ha(t)] = n
}
function wa(e, t, n) {
e.pingedLanes |= e.suspendedLanes & t
}
function _a(e, t) {
for (var n = e.entangledLanes |= t, r = e.entanglements, i = n;
i; ) {
var o = fa(i)
, a = 1 << o;
a & t | r[o] & t && (r[o] |= t),
i &= ~a
}
}
function Ea(e, t, n) {
if (qi)
for (var r = e.pendingUpdatersLaneMap; n > 0; ) {
var i = ha(n)
, o = 1 << i;
r[i].add(t),
n &= ~o
}
}
function Sa(e, t) {
if (qi)
for (var n = e.pendingUpdatersLaneMap, r =
e.memoizedUpdaters; t > 0; ) {
var i = ha(t)
, o = 1 << i
, a = n[i];
a.size > 0 && (a.forEach((function(e) {
var t = e.alternate;
null !== t && r.has(t) || r.add(e)
}
)),
a.clear()),
t &= ~o
}
}
var ka, Ma, Ca, xa, Ra, Ta = go, Ia = bo, Pa = Ao, La = Qo, Oa =
mo;
function Na() {
return Oa
}
function Da(e) {
Oa = e
}
function Ba(e, t) {
return 0 !== e && e < t
}
function ja(e) {
var t = ca(e);
return Ba(Ta, t) ? Ba(Ia, t) ? oa(t) ? Pa : La : Ia : Ta
}
function za(e) {
return e.current.memoizedState.isDehydrated
}
function Fa(e) {
ka(e)
}
var Ua = !1
, Ka = []
, qa = null
, Ha = null
, Va = null
, Wa = new Map
, $a = new Map
, Ya = []
, Qa = ["mousedown", "mouseup", "touchcancel", "touchend",
"touchstart", "auxclick", "dblclick", "pointercancel", "pointerdown", "pointerup",
"dragend", "dragstart", "drop", "compositionend", "compositionstart", "keydown",
"keypress", "keyup", "input", "textInput", "copy", "cut", "paste", "click", "change",
"contextmenu", "reset", "submit"];
function Za(e, t) {
switch (e) {
case "focusin":
case "focusout":
qa = null;
break;
case "dragenter":
case "dragleave":
Ha = null;
break;
case "mouseover":
case "mouseout":
Va = null;
break;
case "pointerover":
case "pointerout":
var n = t.pointerId;
Wa.delete(n);
break;
case "gotpointercapture":
case "lostpointercapture":
var r = t.pointerId;
$a.delete(r)
}
}
function Ga(e, t, n, r, i, o) {
if (null === e || e.nativeEvent !== o) {
var a = function(e, t, n, r, i) {
return {
blockedOn: e,
domEventName: t,
eventSystemFlags: n,
nativeEvent: i,
targetContainers: [r]
}
}(t, n, r, i, o);
if (null !== t) {
var s = $c(t);
null !== s && Ma(s)
}
return a
}
e.eventSystemFlags |= r;
var u = e.targetContainers;
return null !== i && -1 === u.indexOf(i) && u.push(i),
e
}
function Xa(e) {
var t = Wc(e.target);
if (null !== t) {
var n = vi(t);
if (null !== n) {
var r = n.tag;
if (r === A) {
var i = bi(n);
if (null !== i)
return e.blockedOn = i,
void Ra(e.priority, (function() {
Ca(n)
}
))
} else if (r === c && za(n.stateNode))
return void (e.blockedOn = yi(n))
}
}
e.blockedOn = null
}
function Ja(e) {
if (null !== e.blockedOn)
return !1;
for (var t, n = e.targetContainers; n.length > 0; ) {
var r = n[0]
, i = ds(e.domEventName, e.eventSystemFlags, r,
e.nativeEvent);
if (null !== i) {
var a = $c(i);
return null !== a && Ma(a),
e.blockedOn = i,
!1
}
var s = e.nativeEvent
, u = new s.constructor(s.type,s);
t = u,
null !== dr && o("Expected currently replaying event to be
null. This error is likely caused by a bug in React. Please file an issue."),
dr = t,
s.target.dispatchEvent(u),
null === dr && o("Expected currently replaying event to not
be null. This error is likely caused by a bug in React. Please file an issue."),
dr = null,
n.shift()
}
return !0
}
function es(e, t, n) {
Ja(e) && n.delete(t)
}
function ts() {
Ua = !1,
null !== qa && Ja(qa) && (qa = null),
null !== Ha && Ja(Ha) && (Ha = null),
null !== Va && Ja(Va) && (Va = null),
Wa.forEach(es),
$a.forEach(es)
}
function ns(e, n) {
e.blockedOn === n && (e.blockedOn = null,
Ua || (Ua = !0,
t.unstable_scheduleCallback(t.unstable_NormalPriority, ts)))
}
function rs(e) {
if (Ka.length > 0) {
ns(Ka[0], e);
for (var t = 1; t < Ka.length; t++) {
var n = Ka[t];
n.blockedOn === e && (n.blockedOn = null)
}
}
null !== qa && ns(qa, e),
null !== Ha && ns(Ha, e),
null !== Va && ns(Va, e);
var r = function(t) {
return ns(t, e)
};
Wa.forEach(r),
$a.forEach(r);
for (var i = 0; i < Ya.length; i++) {
var o = Ya[i];
o.blockedOn === e && (o.blockedOn = null)
}
for (; Ya.length > 0; ) {
var a = Ya[0];
if (null !== a.blockedOn)
break;
Xa(a),
null === a.blockedOn && Ya.shift()
}
}
var is = n.ReactCurrentBatchConfig
, os = !0;
function as(e) {
os = !!e
}
function ss(e, t, n, r) {
var i = Na()
, o = is.transition;
is.transition = null;
try {
Da(Ta),
ls(e, t, n, r)
} finally {
Da(i),
is.transition = o
}
}
function us(e, t, n, r) {
var i = Na()
, o = is.transition;
is.transition = null;
try {
Da(Ia),
ls(e, t, n, r)
} finally {
Da(i),
is.transition = o
}
}
function ls(e, t, n, r) {
os && function(e, t, n, r) {
var i = ds(e, t, n, r);
if (null === i)
return bl(e, t, r, cs, n),
void Za(e, r);
if (function(e, t, n, r, i) {
switch (t) {
case "focusin":
return qa = Ga(qa, e, t, n, r, i),
!0;
case "dragenter":
return Ha = Ga(Ha, e, t, n, r, i),
!0;
case "mouseover":
return Va = Ga(Va, e, t, n, r, i),
!0;
case "pointerover":
var o = i
, a = o.pointerId;
return Wa.set(a, Ga(Wa.get(a) || null, e, t, n, r, o)),
!0;
case "gotpointercapture":
var s = i
, u = s.pointerId;
return $a.set(u, Ga($a.get(u) || null, e, t, n, r, s)),
!0
}
return !1
}(i, e, t, n, r))
r.stopPropagation();
else if (Za(e, r),
t & lr && function(e) {
return Qa.indexOf(e) > -1
}(e)) {
for (; null !== i; ) {
var o = $c(i);
null !== o && Fa(o);
var a = ds(e, t, n, r);
if (null === a && bl(e, t, r, cs, n),
a === i)
break;
i=a
}
null !== i && r.stopPropagation()
} else
bl(e, t, r, null, n)
}(e, t, n, r)
}
var cs = null;
function ds(e, t, n, r) {
cs = null;
var i = Wc(fr(r));
if (null !== i) {
var o = vi(i);
if (null === o)
i = null;
else {
var a = o.tag;
if (a === A) {
var s = bi(o);
if (null !== s)
return s;
i = null
} else if (a === c) {
if (za(o.stateNode))
return yi(o);
i = null
} else
o !== i && (i = null)
}
}
return cs = i,
null
}
function fs(e) {
switch (e) {
case "cancel":
case "click":
case "close":
case "contextmenu":
case "copy":
case "cut":
case "auxclick":
case "dblclick":
case "dragend":
case "dragstart":
case "drop":
case "focusin":
case "focusout":
case "input":
case "invalid":
case "keydown":
case "keypress":
case "keyup":
case "mousedown":
case "mouseup":
case "paste":
case "pause":
case "play":
case "pointercancel":
case "pointerdown":
case "pointerup":
case "ratechange":
case "reset":
case "resize":
case "seeked":
case "submit":
case "touchcancel":
case "touchend":
case "touchstart":
case "volumechange":
case "change":
case "selectionchange":
case "textInput":
case "compositionstart":
case "compositionend":
case "compositionupdate":
case "beforeblur":
case "afterblur":
case "beforeinput":
case "blur":
case "fullscreenchange":
case "focus":
case "hashchange":
case "popstate":
case "select":
case "selectstart":
return Ta;
case "drag":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "mousemove":
case "mouseout":
case "mouseover":
case "pointermove":
case "pointerout":
case "pointerover":
case "scroll":
case "toggle":
case "touchmove":
case "wheel":
case "mouseenter":
case "mouseleave":
case "pointerenter":
case "pointerleave":
return Ia;
case "message":
switch (Ii()) {
case Pi:
return Ta;
case Li:
return Ia;
case Oi:
case Ni:
return Pa;
case Di:
return La;
default:
return Pa
}
default:
return Pa
}
}
var hs = null
, ps = null
, ms = null;
function gs() {
if (ms)
return ms;
var e, t, n = ps, r = n.length, i = vs(), o = i.length;
for (e = 0; e < r && n[e] === i[e]; e++)
;
var a = r - e;
for (t = 1; t <= a && n[r - t] === i[o - t]; t++)
;
var s = t > 1 ? 1 - t : void 0;
return ms = i.slice(e, s)
}
function vs() {
return "value"in hs ? hs.value : hs.textContent
}
function bs(e) {
var t, n = e.keyCode;
return "charCode"in e ? 0 === (t = e.charCode) && 13 === n &&
(t = 13) : t = n,
10 === t && (t = 13),
t >= 32 || 13 === t ? t : 0
}
function ys() {
return !0
}
function As() {
return !1
}
function ws(e) {
function t(t, n, r, i, o) {
for (var a in this._reactName = t,
this._targetInst = r,
this.type = n,
this.nativeEvent = i,
this.target = o,
this.currentTarget = null,
e)
if (e.hasOwnProperty(a)) {
var s = e[a];
this[a] = s ? s(i) : i[a]
}
var u = null != i.defaultPrevented ? i.defaultPrevented : !1
=== i.returnValue;
return this.isDefaultPrevented = u ? ys : As,
this.isPropagationStopped = As,
this
}
return Qe(t.prototype, {
preventDefault: function() {
this.defaultPrevented = !0;
var e = this.nativeEvent;
e && (e.preventDefault ? e.preventDefault() :
"unknown" != typeof e.returnValue && (e.returnValue = !1),
this.isDefaultPrevented = ys)
},
stopPropagation: function() {
var e = this.nativeEvent;
e && (e.stopPropagation ? e.stopPropagation() :
"unknown" != typeof e.cancelBubble && (e.cancelBubble = !0),
this.isPropagationStopped = ys)
},
persist: function() {},
isPersistent: ys
}),
t
}
var _s, Es, Ss, ks = {
eventPhase: 0,
bubbles: 0,
cancelable: 0,
timeStamp: function(e) {
return e.timeStamp || Date.now()
},
defaultPrevented: 0,
isTrusted: 0
}, Ms = ws(ks), Cs = Qe({}, ks, {
view: 0,
detail: 0
}), xs = ws(Cs), Rs = Qe({}, Cs, {
screenX: 0,
screenY: 0,
clientX: 0,
clientY: 0,
pageX: 0,
pageY: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
getModifierState: Us,
button: 0,
buttons: 0,
relatedTarget: function(e) {
return void 0 === e.relatedTarget ? e.fromElement ===
e.srcElement ? e.toElement : e.fromElement : e.relatedTarget
},
movementX: function(e) {
return "movementX"in e ? e.movementX : (function(e) {
e !== Ss && (Ss && "mousemove" === e.type ? (_s =
e.screenX - Ss.screenX,
Es = e.screenY - Ss.screenY) : (_s = 0,
Es = 0),
Ss = e)
}(e),
_s)
},
movementY: function(e) {
return "movementY"in e ? e.movementY : Es
}
}), Ts = ws(Rs), Is = ws(Qe({}, Rs, {
dataTransfer: 0
})), Ps = ws(Qe({}, Cs, {
relatedTarget: 0
})), Ls = ws(Qe({}, ks, {
animationName: 0,
elapsedTime: 0,
pseudoElement: 0
})), Os = ws(Qe({}, ks, {
clipboardData: function(e) {
return "clipboardData"in e ? e.clipboardData :
window.clipboardData
}
})), Ns = ws(Qe({}, ks, {
data: 0
})), Ds = Ns, Bs = {
Esc: "Escape",
Spacebar: " ",
Left: "ArrowLeft",
Up: "ArrowUp",
Right: "ArrowRight",
Down: "ArrowDown",
Del: "Delete",
Win: "OS",
Menu: "ContextMenu",
Apps: "ContextMenu",
Scroll: "ScrollLock",
MozPrintableKey: "Unidentified"
}, js = {
8: "Backspace",
9: "Tab",
12: "Clear",
13: "Enter",
16: "Shift",
17: "Control",
18: "Alt",
19: "Pause",
20: "CapsLock",
27: "Escape",
32: " ",
33: "PageUp",
34: "PageDown",
35: "End",
36: "Home",
37: "ArrowLeft",
38: "ArrowUp",
39: "ArrowRight",
40: "ArrowDown",
45: "Insert",
46: "Delete",
112: "F1",
113: "F2",
114: "F3",
115: "F4",
116: "F5",
117: "F6",
118: "F7",
119: "F8",
120: "F9",
121: "F10",
122: "F11",
123: "F12",
144: "NumLock",
145: "ScrollLock",
224: "Meta"
}, zs = {
Alt: "altKey",
Control: "ctrlKey",
Meta: "metaKey",
Shift: "shiftKey"
};
function Fs(e) {
var t = this.nativeEvent;
if (t.getModifierState)
return t.getModifierState(e);
var n = zs[e];
return !!n && !!t[n]
}
function Us(e) {
return Fs
}
var Ks = Qe({}, Cs, {
key: function(e) {
if (e.key) {
var t = Bs[e.key] || e.key;
if ("Unidentified" !== t)
return t
}
if ("keypress" === e.type) {
var n = bs(e);
return 13 === n ? "Enter" : String.fromCharCode(n)
}
return "keydown" === e.type || "keyup" === e.type ?
js[e.keyCode] || "Unidentified" : ""
},
code: 0,
location: 0,
ctrlKey: 0,
shiftKey: 0,
altKey: 0,
metaKey: 0,
repeat: 0,
locale: 0,
getModifierState: Us,
charCode: function(e) {
return "keypress" === e.type ? bs(e) : 0
},
keyCode: function(e) {
return "keydown" === e.type || "keyup" === e.type ?
e.keyCode : 0
},
which: function(e) {
return "keypress" === e.type ? bs(e) : "keydown" === e.type
|| "keyup" === e.type ? e.keyCode : 0
}
})
, qs = ws(Ks)
, Hs = ws(Qe({}, Rs, {
pointerId: 0,
width: 0,
height: 0,
pressure: 0,
tangentialPressure: 0,
tiltX: 0,
tiltY: 0,
twist: 0,
pointerType: 0,
isPrimary: 0
}))
, Vs = ws(Qe({}, Cs, {
touches: 0,
targetTouches: 0,
changedTouches: 0,
altKey: 0,
metaKey: 0,
ctrlKey: 0,
shiftKey: 0,
getModifierState: Us
}))
, Ws = ws(Qe({}, ks, {
propertyName: 0,
elapsedTime: 0,
pseudoElement: 0
}))
, $s = ws(Qe({}, Rs, {
deltaX: function(e) {
return "deltaX"in e ? e.deltaX : "wheelDeltaX"in e ? -
e.wheelDeltaX : 0
},
deltaY: function(e) {
return "deltaY"in e ? e.deltaY : "wheelDeltaY"in e ? -
e.wheelDeltaY : "wheelDelta"in e ? -e.wheelDelta : 0
},
deltaZ: 0,
deltaMode: 0
}))
, Ys = [9, 13, 27, 32]
, Qs = 229
, Zs = Y && "CompositionEvent"in window
, Gs = null;
Y && "documentMode"in document && (Gs =
document.documentMode);
var Xs = Y && "TextEvent"in window && !Gs
, Js = Y && (!Zs || Gs && Gs > 8 && Gs <= 11)
, eu = 32
, tu = String.fromCharCode(eu)
, nu = !1;
function ru(e, t) {
switch (e) {
case "keyup":
return -1 !== Ys.indexOf(t.keyCode);
case "keydown":
return t.keyCode !== Qs;
case "keypress":
case "mousedown":
case "focusout":
return !0;
default:
return !1
}
}
function iu(e) {
var t = e.detail;
return "object" == typeof t && "data"in t ? t.data : null
}
function ou(e) {
return "ko" === e.locale
}
var au = !1;
function su(e, t, n, r, i) {
var o, a;
if (Zs ? o = function(e) {
switch (e) {
case "compositionstart":
return "onCompositionStart";
case "compositionend":
return "onCompositionEnd";
case "compositionupdate":
return "onCompositionUpdate"
}
}(t) : au ? ru(t, r) && (o = "onCompositionEnd") : function(e, t) {
return "keydown" === e && t.keyCode === Qs
}(t, r) && (o = "onCompositionStart"),
!o)
return null;
Js && !ou(r) && (au || "onCompositionStart" !== o ?
"onCompositionEnd" === o && au && (a = gs()) : au = function(e) {
return hs = e,
ps = vs(),
!0
}(i));
var s = Al(n, o);
if (s.length > 0) {
var u = new Ns(o,t,null,r,i);
if (e.push({
event: u,
listeners: s
}),
a)
u.data = a;
else {
var l = iu(r);
null !== l && (u.data = l)
}
}
}
function uu(e, t) {
if (au) {
if ("compositionend" === e || !Zs && ru(e, t)) {
var n = gs();
return hs = null,
ps = null,
ms = null,
au = !1,
n
}
return null
}
switch (e) {
case "paste":
default:
return null;
case "keypress":
if (!function(e) {
return (e.ctrlKey || e.altKey || e.metaKey) && !(e.ctrlKey
&& e.altKey)
}(t)) {
if (t.char && t.char.length > 1)
return t.char;
if (t.which)
return String.fromCharCode(t.which)
}
return null;
case "compositionend":
return Js && !ou(t) ? null : t.data
}
}
function lu(e, t, n, r, i) {
var o;
if (!(o = Xs ? function(e, t) {
switch (e) {
case "compositionend":
return iu(t);
case "keypress":
return t.which !== eu ? null : (nu = !0,
tu);
case "textInput":
var n = t.data;
return n === tu && nu ? null : n;
default:
return null
}
}(t, r) : uu(t, r)))
return null;
var a = Al(n, "onBeforeInput");
if (a.length > 0) {
var s = new Ds("onBeforeInput","beforeinput",null,r,i);
e.push({
event: s,
listeners: a
}),
s.data = o
}
}
var cu = {
color: !0,
date: !0,
datetime: !0,
"datetime-local": !0,
email: !0,
month: !0,
number: !0,
password: !0,
range: !0,
search: !0,
tel: !0,
text: !0,
time: !0,
url: !0,
week: !0
};
function du(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return "input" === t ? !!cu[e.type] : "textarea" === t
}
function fu(e, t, n, r) {
vr(r);
var i = Al(t, "onChange");
if (i.length > 0) {
var o = new Ms("onChange","change",null,n,r);
e.push({
event: o,
listeners: i
})
}
}
var hu = null
, pu = null;
function mu(e) {
dl(e, 0)
}
function gu(e) {
if (xt(Yc(e)))
return e
}
function vu(e, t) {
if ("change" === e)
return t
}
var bu = !1;
function yu() {
hu && (hu.detachEvent("onpropertychange", Au),
hu = null,
pu = null)
}
function Au(e) {
"value" === e.propertyName && gu(pu) && function(e) {
var t = [];
fu(t, pu, e, fr(e)),
Er(mu, t)
}(e)
}
function wu(e, t, n) {
"focusin" === e ? (yu(),
function(e, t) {
pu = t,
(hu = e).attachEvent("onpropertychange", Au)
}(t, n)) : "focusout" === e && yu()
}
function _u(e, t) {
if ("selectionchange" === e || "keyup" === e || "keydown" === e)
return gu(pu)
}
function Eu(e, t) {
if ("click" === e)
return gu(t)
}
function Su(e, t) {
if ("input" === e || "change" === e)
return gu(t)
}
function ku(e, t, n, r, i, o, a) {
var s, u, l, c, d = n ? Yc(n) : window;
if ("select" === (c = (l = d).nodeName &&
l.nodeName.toLowerCase()) || "input" === c && "file" === l.type ? s = vu : du(d) ? bu ? s
= Su : (s = _u,
u = wu) : function(e) {
var t = e.nodeName;
return t && "input" === t.toLowerCase() && ("checkbox" ===
e.type || "radio" === e.type)
}(d) && (s = Eu),
s) {
var f = s(t, n);
if (f)
return void fu(e, f, r, i)
}
u && u(t, d, n),
"focusout" === t && function(e) {
var t = e._wrapperState;
t && t.controlled && "number" === e.type && Ut(e,
"number", e.value)
}(d)
}
function Mu(e, t, n, r, i, o, a) {
var s = "mouseover" === t || "pointerover" === t
, u = "mouseout" === t || "pointerout" === t;
if (s && r !== dr) {
var l = r.relatedTarget || r.fromElement;
if (l && (Wc(l) || Vc(l)))
return
}
if (u || s) {
var c, d, p;
if (i.window === i)
c = i;
else {
var m = i.ownerDocument;
c = m ? m.defaultView || m.parentWindow : window
}
if (u) {
var g = r.relatedTarget || r.toElement;
d = n,
null !== (p = g ? Wc(g) : null) && (p !== vi(p) || p.tag !==
f && p.tag !== h) && (p = null)
} else
d = null,
p = n;
if (d !== p) {
var v = Ts
, b = "onMouseLeave"
, y = "onMouseEnter"
, A = "mouse";
"pointerout" !== t && "pointerover" !== t || (v = Hs,
b = "onPointerLeave",
y = "onPointerEnter",
A = "pointer");
var w = null == d ? c : Yc(d)
, _ = null == p ? c : Yc(p)
, E = new v(b,A + "leave",d,r,i);
E.target = w,
E.relatedTarget = _;
var S = null;
if (Wc(i) === n) {
var k = new v(y,A + "enter",p,r,i);
k.target = _,
k.relatedTarget = w,
S=k
}
!function(e, t, n, r, i) {
var o = r && i ? function(e, t) {
for (var n = e, r = t, i = 0, o = n; o; o = wl(o))
i++;
for (var a = 0, s = r; s; s = wl(s))
a++;
for (; i - a > 0; )
n = wl(n),
i--;
for (; a - i > 0; )
r = wl(r),
a--;
for (var u = i; u--; ) {
if (n === r || null !== r && n === r.alternate)
return n;
n = wl(n),
r = wl(r)
}
return null
}(r, i) : null;
null !== r && _l(e, t, r, o, !1),
null !== i && null !== n && _l(e, n, i, o, !0)
}(e, E, S, d, p)
}
}
}
Y && (bu = function(e) {
if (!Y)
return !1;
var t = "oninput"
, n = t in document;
if (!n) {
var r = document.createElement("div");
r.setAttribute(t, "return;"),
n = "function" == typeof r[t]
}
return n
}() && (!document.documentMode || document.documentMode >
9));
var Cu = "function" == typeof Object.is ? Object.is : function(e, t) {
return e === t && (0 !== e || 1 / e == 1 / t) || e != e && t != t
}
;
function xu(e, t) {
if (Cu(e, t))
return !0;
if ("object" != typeof e || null === e || "object" != typeof t || null
=== t)
return !1;
var n = Object.keys(e)
, r = Object.keys(t);
if (n.length !== r.length)
return !1;
for (var i = 0; i < n.length; i++) {
var o = n[i];
if (!Q.call(t, o) || !Cu(e[o], t[o]))
return !1
}
return !0
}
function Ru(e) {
for (; e && e.firstChild; )
e = e.firstChild;
return e
}
function Tu(e) {
for (; e; ) {
if (e.nextSibling)
return e.nextSibling;
e = e.parentNode
}
}
function Iu(e, t) {
for (var n = Ru(e), r = 0, i = 0; n; ) {
if (n.nodeType === mn) {
if (i = r + n.textContent.length,
r <= t && i >= t)
return {
node: n,
offset: t - r
};
r=i
}
n = Ru(Tu(n))
}
}
function Pu(e) {
var t = e.ownerDocument
, n = t && t.defaultView || window
, r = n.getSelection && n.getSelection();
if (!r || 0 === r.rangeCount)
return null;
var i = r.anchorNode
, o = r.anchorOffset
, a = r.focusNode
, s = r.focusOffset;
try {
i.nodeType,
a.nodeType
} catch (e) {
return null
}
return function(e, t, n, r, i) {
var o = 0
, a = -1
, s = -1
,u=0
,l=0
,c=e
, d = null;
e: for (; ; ) {
for (var f = null; c !== t || 0 !== n && c.nodeType !== mn
|| (a = o + n),
c !== r || 0 !== i && c.nodeType !== mn || (s = o + i),
c.nodeType === mn && (o += c.nodeValue.length),
null !== (f = c.firstChild); )
d = c,
c = f;
for (; ; ) {
if (c === e)
break e;
if (d === t && ++u === n && (a = o),
d === r && ++l === i && (s = o),
null !== (f = c.nextSibling))
break;
d = (c = d).parentNode
}
c=f
}
return -1 === a || -1 === s ? null : {
start: a,
end: s
}
}(e, i, o, a, s)
}
function Lu(e) {
return e && e.nodeType === mn
}
function Ou(e, t) {
return !(!e || !t) && (e === t || !Lu(e) && (Lu(t) ? Ou(e,
t.parentNode) : "contains"in e ? e.contains(t) : !!e.compareDocumentPosition && !!(16 &
e.compareDocumentPosition(t))))
}
function Nu(e) {
return e && e.ownerDocument &&
Ou(e.ownerDocument.documentElement, e)
}
function Du(e) {
try {
return "string" == typeof e.contentWindow.location.href
} catch (e) {
return !1
}
}
function Bu() {
for (var e = window, t = Rt(); t instanceof
e.HTMLIFrameElement; ) {
if (!Du(t))
return t;
t = Rt((e = t.contentWindow).document)
}
return t
}
function ju(e) {
var t = e && e.nodeName && e.nodeName.toLowerCase();
return t && ("input" === t && ("text" === e.type || "search" ===
e.type || "tel" === e.type || "url" === e.type || "password" === e.type) || "textarea" === t ||
"true" === e.contentEditable)
}
function zu(e) {
var t = Bu()
, n = e.focusedElem
, r = e.selectionRange;
if (t !== n && Nu(n)) {
null !== r && ju(n) && function(e, t) {
var n = t.start
, r = t.end;
void 0 === r && (r = n),
"selectionStart"in e ? (e.selectionStart = n,
e.selectionEnd = Math.min(r, e.value.length)) :
function(e, t) {
var n = e.ownerDocument || document
, r = n && n.defaultView || window;
if (r.getSelection) {
var i = r.getSelection()
, o = e.textContent.length
, a = Math.min(t.start, o)
, s = void 0 === t.end ? a : Math.min(t.end, o);
if (!i.extend && a > s) {
var u = s;
s = a,
a=u
}
var l = Iu(e, a)
, c = Iu(e, s);
if (l && c) {
if (1 === i.rangeCount && i.anchorNode
=== l.node && i.anchorOffset === l.offset && i.focusNode === c.node && i.focusOffset
=== c.offset)
return;
var d = n.createRange();
d.setStart(l.node, l.offset),
i.removeAllRanges(),
a > s ? (i.addRange(d),
i.extend(c.node, c.offset)) :
(d.setEnd(c.node, c.offset),
i.addRange(d))
}
}
}(e, t)
}(n, r);
for (var i = [], o = n; o = o.parentNode; )
o.nodeType === pn && i.push({
element: o,
left: o.scrollLeft,
top: o.scrollTop
});
"function" == typeof n.focus && n.focus();
for (var a = 0; a < i.length; a++) {
var s = i[a];
s.element.scrollLeft = s.left,
s.element.scrollTop = s.top
}
}
}
function Fu(e) {
return ("selectionStart"in e ? {
start: e.selectionStart,
end: e.selectionEnd
} : Pu(e)) || {
start: 0,
end: 0
}
}
var Uu = Y && "documentMode"in document &&
document.documentMode <= 11
, Ku = null
, qu = null
, Hu = null
, Vu = !1;
function Wu(e, t, n) {
var r, i = (r = n).window === r ? r.document : r.nodeType ===
vn ? r : r.ownerDocument;
if (!Vu && null != Ku && Ku === Rt(i)) {
var o = function(e) {
if ("selectionStart"in e && ju(e))
return {
start: e.selectionStart,
end: e.selectionEnd
};
var t = (e.ownerDocument &&
e.ownerDocument.defaultView || window).getSelection();
return {
anchorNode: t.anchorNode,
anchorOffset: t.anchorOffset,
focusNode: t.focusNode,
focusOffset: t.focusOffset
}
}(Ku);
if (!Hu || !xu(Hu, o)) {
Hu = o;
var a = Al(qu, "onSelect");
if (a.length > 0) {
var s = new Ms("onSelect","select",null,t,n);
e.push({
event: s,
listeners: a
}),
s.target = Ku
}
}
}
}
function $u(e, t) {
var n = {};
return n[e.toLowerCase()] = t.toLowerCase(),
n["Webkit" + e] = "webkit" + t,
n["Moz" + e] = "moz" + t,
n
}
var Yu = {
animationend: $u("Animation", "AnimationEnd"),
animationiteration: $u("Animation", "AnimationIteration"),
animationstart: $u("Animation", "AnimationStart"),
transitionend: $u("Transition", "TransitionEnd")
}
, Qu = {}
, Zu = {};
function Gu(e) {
if (Qu[e])
return Qu[e];
if (!Yu[e])
return e;
var t = Yu[e];
for (var n in t)
if (t.hasOwnProperty(n) && n in Zu)
return Qu[e] = t[n];
return e
}
Y && (Zu = document.createElement("div").style,
"AnimationEvent"in window || (delete Yu.animationend.animation,
delete Yu.animationiteration.animation,
delete Yu.animationstart.animation),
"TransitionEvent"in window || delete Yu.transitionend.transition);
var Xu = Gu("animationend")
, Ju = Gu("animationiteration")
, el = Gu("animationstart")
, tl = Gu("transitionend")
, nl = new Map
, rl = ["abort", "auxClick", "cancel", "canPlay", "canPlayThrough",
"click", "close", "contextMenu", "copy", "cut", "drag", "dragEnd", "dragEnter", "dragExit",
"dragLeave", "dragOver", "dragStart", "drop", "durationChange", "emptied", "encrypted",
"ended", "error", "gotPointerCapture", "input", "invalid", "keyDown", "keyPress", "keyUp",
"load", "loadedData", "loadedMetadata", "loadStart", "lostPointerCapture",
"mouseDown", "mouseMove", "mouseOut", "mouseOver", "mouseUp", "paste", "pause",
"play", "playing", "pointerCancel", "pointerDown", "pointerMove", "pointerOut",
"pointerOver", "pointerUp", "progress", "rateChange", "reset", "resize", "seeked",
"seeking", "stalled", "submit", "suspend", "timeUpdate", "touchCancel", "touchEnd",
"touchStart", "volumeChange", "scroll", "toggle", "touchMove", "waiting", "wheel"];
function il(e, t) {
nl.set(e, t),
W(t, [e])
}
function ol(e, t, n, r, i, o, a) {
var s = nl.get(t);
if (void 0 !== s) {
var u = Ms
, l = t;
switch (t) {
case "keypress":
if (0 === bs(r))
return;
case "keydown":
case "keyup":
u = qs;
break;
case "focusin":
l = "focus",
u = Ps;
break;
case "focusout":
l = "blur",
u = Ps;
break;
case "beforeblur":
case "afterblur":
u = Ps;
break;
case "click":
if (2 === r.button)
return;
case "auxclick":
case "dblclick":
case "mousedown":
case "mousemove":
case "mouseup":
case "mouseout":
case "mouseover":
case "contextmenu":
u = Ts;
break;
case "drag":
case "dragend":
case "dragenter":
case "dragexit":
case "dragleave":
case "dragover":
case "dragstart":
case "drop":
u = Is;
break;
case "touchcancel":
case "touchend":
case "touchmove":
case "touchstart":
u = Vs;
break;
case Xu:
case Ju:
case el:
u = Ls;
break;
case tl:
u = Ws;
break;
case "scroll":
u = xs;
break;
case "wheel":
u = $s;
break;
case "copy":
case "cut":
case "paste":
u = Os;
break;
case "gotpointercapture":
case "lostpointercapture":
case "pointercancel":
case "pointerdown":
case "pointermove":
case "pointerout":
case "pointerover":
case "pointerup":
u = Hs
}
var c = 0 != (o & lr)
, d = !c && "scroll" === t
, h = function(e, t, n, r, i, o) {
for (var a = r ? null !== t ? t + "Capture" : null : t, s = [], u
= e, l = null; null !== u; ) {
var c = u
, d = c.stateNode;
if (c.tag === f && null !== d && (l = d,
null !== a)) {
var h = Sr(u, a);
null != h && s.push(yl(u, h, l))
}
if (i)
break;
u = u.return
}
return s
}(n, s, r.type, c, d);
if (h.length > 0) {
var p = new u(s,l,null,r,i);
e.push({
event: p,
listeners: h
})
}
}
}
function al(e, t, n, r, i, o, a) {
ol(e, t, n, r, i, o),
0 == (o & cr) && (Mu(e, t, n, r, i),
ku(e, t, n, r, i),
function(e, t, n, r, i, o, a) {
var s = n ? Yc(n) : window;
switch (t) {
case "focusin":
(du(s) || "true" === s.contentEditable) && (Ku = s,
qu = n,
Hu = null);
break;
case "focusout":
Ku = null,
qu = null,
Hu = null;
break;
case "mousedown":
Vu = !0;
break;
case "contextmenu":
case "mouseup":
case "dragend":
Vu = !1,
Wu(e, r, i);
break;
case "selectionchange":
if (Uu)
break;
case "keydown":
case "keyup":
Wu(e, r, i)
}
}(e, t, n, r, i),
function(e, t, n, r, i, o, a) {
su(e, t, n, r, i),
lu(e, t, n, r, i)
}(e, t, n, r, i))
}
!function() {
for (var e = 0; e < rl.length; e++) {
var t = rl[e];
il(t.toLowerCase(), "on" + (t[0].toUpperCase() + t.slice(1)))
}
il(Xu, "onAnimationEnd"),
il(Ju, "onAnimationIteration"),
il(el, "onAnimationStart"),
il("dblclick", "onDoubleClick"),
il("focusin", "onFocus"),
il("focusout", "onBlur"),
il(tl, "onTransitionEnd")
}(),
$("onMouseEnter", ["mouseout", "mouseover"]),
$("onMouseLeave", ["mouseout", "mouseover"]),
$("onPointerEnter", ["pointerout", "pointerover"]),
$("onPointerLeave", ["pointerout", "pointerover"]),
W("onChange", ["change", "click", "focusin", "focusout", "input",
"keydown", "keyup", "selectionchange"]),
W("onSelect", ["focusout", "contextmenu", "dragend", "focusin",
"keydown", "keyup", "mousedown", "mouseup", "selectionchange"]),
W("onBeforeInput", ["compositionend", "keypress", "textInput",
"paste"]),
W("onCompositionEnd", ["compositionend", "focusout", "keydown",
"keypress", "keyup", "mousedown"]),
W("onCompositionStart", ["compositionstart", "focusout",
"keydown", "keypress", "keyup", "mousedown"]),
W("onCompositionUpdate", ["compositionupdate", "focusout",
"keydown", "keypress", "keyup", "mousedown"]);
var sl = ["abort", "canplay", "canplaythrough", "durationchange",
"emptied", "encrypted", "ended", "error", "loadeddata", "loadedmetadata", "loadstart",
"pause", "play", "playing", "progress", "ratechange", "resize", "seeked", "seeking",
"stalled", "suspend", "timeupdate", "volumechange", "waiting"]
, ul = new Set(["cancel", "close", "invalid", "load", "scroll",
"toggle"].concat(sl));
function ll(e, t, n) {
var r = e.type || "unknown-event";
e.currentTarget = n,
function(e, t, n, r, i, o, a, s, u) {
if (Dr.apply(this, arguments),
Ir) {
var l = Br();
Lr || (Lr = !0,
Or = l)
}
}(r, t, void 0, e),
e.currentTarget = null
}
function cl(e, t, n) {
var r;
if (n)
for (var i = t.length - 1; i >= 0; i--) {
var o = t[i]
, a = o.instance
, s = o.currentTarget
, u = o.listener;
if (a !== r && e.isPropagationStopped())
return;
ll(e, u, s),
r=a
}
else
for (var l = 0; l < t.length; l++) {
var c = t[l]
, d = c.instance
, f = c.currentTarget
, h = c.listener;
if (d !== r && e.isPropagationStopped())
return;
ll(e, h, f),
r=d
}
}
function dl(e, t) {
for (var n = 0 != (t & lr), r = 0; r < e.length; r++) {
var i = e[r];
cl(i.event, i.listeners, n)
}
!function() {
if (Lr) {
var e = Or;
throw Lr = !1,
Or = null,
e
}
}()
}
function fl(e, t) {
ul.has(e) || o('Did not expect a listenToNonDelegatedEvent()
call for "%s". This is a bug in React. Please file an issue.', e);
var n = function(e) {
var t = e[zc];
return void 0 === t && (t = e[zc] = new Set),
t
}(t)
, r = function(e, t) {
return e + "__bubble"
}(e);
n.has(r) || (gl(t, e, ur, !1),
n.add(r))
}
function hl(e, t, n) {
ul.has(e) && !t && o('Did not expect a listenToNativeEvent() call
for "%s" in the bubble phase. This is a bug in React. Please file an issue.', e);
var r = 0;
t && (r |= lr),
gl(n, e, r, t)
}
var pl = "_reactListening" + Math.random().toString(36).slice(2);
function ml(e) {
if (!e[pl]) {
e[pl] = !0,
q.forEach((function(t) {
"selectionchange" !== t && (ul.has(t) || hl(t, !1, e),
hl(t, !0, e))
}
));
var t = e.nodeType === vn ? e : e.ownerDocument;
null !== t && (t[pl] || (t[pl] = !0,
hl("selectionchange", !1, t)))
}
}
function gl(e, t, n, r, i) {
var o = function(e, t, n) {
var r;
switch (fs(t)) {
case Ta:
r = ss;
break;
case Ia:
r = us;
break;
default:
r = ls
}
return r.bind(null, t, n, e)
}(e, t, n)
, a = void 0;
kr && ("touchstart" !== t && "touchmove" !== t && "wheel" !== t
|| (a = !0)),
r ? void 0 !== a ? function(e, t, n, r) {
e.addEventListener(t, n, {
capture: !0,
passive: r
})
}(e, t, o, a) : function(e, t, n) {
e.addEventListener(t, n, !0)
}(e, t, o) : void 0 !== a ? function(e, t, n, r) {
e.addEventListener(t, n, {
passive: r
})
}(e, t, o, a) : function(e, t, n) {
e.addEventListener(t, n, !1)
}(e, t, o)
}
function vl(e, t) {
return e === t || e.nodeType === gn && e.parentNode === t
}
function bl(e, t, n, r, i) {
var o = r;
if (0 == (t & sr) && 0 == (t & ur)) {
var a = i;
if (null !== r) {
var s = r;
e: for (; ; ) {
if (null === s)
return;
var u = s.tag;
if (u === c || u === d) {
var l = s.stateNode.containerInfo;
if (vl(l, a))
break;
if (u === d)
for (var p = s.return; null !== p; ) {
var m = p.tag;
if ((m === c || m === d) &&
vl(p.stateNode.containerInfo, a))
return;
p = p.return
}
for (; null !== l; ) {
var g = Wc(l);
if (null === g)
return;
var v = g.tag;
if (v === f || v === h) {
s = o = g;
continue e
}
l = l.parentNode
}
}
s = s.return
}
}
}
Er((function() {
return function(e, t, n, r, i) {
var o = [];
al(o, e, r, n, fr(n), t),
dl(o, t)
}(e, t, n, o)
}
))
}
function yl(e, t, n) {
return {
instance: e,
listener: t,
currentTarget: n
}
}
function Al(e, t) {
for (var n = t + "Capture", r = [], i = e; null !== i; ) {
var o = i
, a = o.stateNode;
if (o.tag === f && null !== a) {
var s = a
, u = Sr(i, n);
null != u && r.unshift(yl(i, u, s));
var l = Sr(i, t);
null != l && r.push(yl(i, l, s))
}
i = i.return
}
return r
}
function wl(e) {
if (null === e)
return null;
do {
e = e.return
} while (e && e.tag !== f);
return e || null
}
function _l(e, t, n, r, i) {
for (var o = t._reactName, a = [], s = n; null !== s && s !== r; ) {
var u = s
, l = u.alternate
, c = u.stateNode
, d = u.tag;
if (null !== l && l === r)
break;
if (d === f && null !== c) {
var h = c;
if (i) {
var p = Sr(s, o);
null != p && a.unshift(yl(s, p, h))
} else if (!i) {
var m = Sr(s, o);
null != m && a.push(yl(s, m, h))
}
}
s = s.return
}
0 !== a.length && e.push({
event: t,
listeners: a
})
}
var El, Sl, kl, Ml, Cl, xl, Rl, Tl = !1, Il = "dangerouslySetInnerHTML",
Pl = "suppressContentEditableWarning", Ll = "suppressHydrationWarning", Ol =
"autoFocus", Nl = "children", Dl = "style", Bl = "__html";
El = {
dialog: !0,
webview: !0
},
Sl = function(e, t) {
Xn(e, t),
function(e, t) {
"input" !== e && "textarea" !== e && "select" !== e || null ==
t || null !== t.value || er || (er = !0,
"select" === e && t.multiple ? o("`value` prop on `%s`
should not be null. Consider using an empty array when `multiple` is set to `true` to
clear the component or `undefined` for uncontrolled components.", e) : o("`value` prop
on `%s` should not be null. Consider using an empty string to clear the component or
`undefined` for uncontrolled components.", e))
}(e, t),
ar(e, t, {
registrationNameDependencies: H,
possibleRegistrationNames: V
})
}
,
xl = Y && !document.documentMode,
kl = function(e, t, n) {
if (!Tl) {
var r = Fl(n)
, i = Fl(t);
i !== r && (Tl = !0,
o("Prop `%s` did not match. Server: %s Client: %s", e,
JSON.stringify(i), JSON.stringify(r)))
}
}
,
Ml = function(e) {
if (!Tl) {
Tl = !0;
var t = [];
e.forEach((function(e) {
t.push(e)
}
)),
o("Extra attributes from the server: %s", t)
}
}
,
Cl = function(e, t) {
!1 === t ? o("Expected `%s` listener to be a function, instead
got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass
%s={condition ? value : undefined} instead.", e, e, e) : o("Expected `%s` listener to be a
function, instead got a value of `%s` type.", e, typeof t)
}
,
Rl = function(e, t) {
var n = e.namespaceURI === an ?
e.ownerDocument.createElement(e.tagName) :
e.ownerDocument.createElementNS(e.namespaceURI, e.tagName);
return n.innerHTML = t,
n.innerHTML
}
;
var jl = /\r\n?/g
, zl = /\u0000|\uFFFD/g;
function Fl(e) {
return function(e) {
G(e) && (o("The provided HTML markup uses a value of
unsupported type %s. This value must be coerced to a string before before using it
here.", Z(e)),
X(e))
}(e),
("string" == typeof e ? e : "" + e).replace(jl, "\n").replace(zl, "")
}
function Ul(e, t, n, r) {
var i = Fl(t)
, a = Fl(e);
if (a !== i && (r && (Tl || (Tl = !0,
o('Text content did not match. Server: "%s" Client: "%s"', a, i))),
n && P))
throw new Error("Text content does not match server-
rendered HTML.")
}
function Kl(e) {
return e.nodeType === vn ? e : e.ownerDocument
}
function ql() {}
function Hl(e) {
e.onclick = ql
}
function Vl(e, t, n, r) {
var i, o = Vn(t, n);
switch (Sl(t, n),
t) {
case "dialog":
fl("cancel", e),
fl("close", e),
i = n;
break;
case "iframe":
case "object":
case "embed":
fl("load", e),
i = n;
break;
case "video":
case "audio":
for (var a = 0; a < sl.length; a++)
fl(sl[a], e);
i = n;
break;
case "source":
fl("error", e),
i = n;
break;
case "img":
case "image":
case "link":
fl("error", e),
fl("load", e),
i = n;
break;
case "details":
fl("toggle", e),
i = n;
break;
case "input":
Dt(e, n),
i = Nt(e, n),
fl("invalid", e);
break;
case "option":
Vt(0, n),
i = n;
break;
case "select":
Jt(e, n),
i = Xt(0, n),
fl("invalid", e);
break;
case "textarea":
nn(e, n),
i = tn(e, n),
fl("invalid", e);
break;
default:
i=n
}
switch (Hn(t, i),
function(e, t, n, r, i) {
for (var o in r)
if (r.hasOwnProperty(o)) {
var a = r[o];
if (o === Dl)
a && Object.freeze(a),
zn(t, a);
else if (o === Il) {
var s = a ? a[Bl] : void 0;
null != s && hn(t, s)
} else
o === Nl ? "string" == typeof a ? ("textarea" !==
e || "" !== a) && yn(t, a) : "number" == typeof a && yn(t, "" + a) : o === Pl || o === Ll || o
=== Ol || (H.hasOwnProperty(o) ? null != a && ("function" != typeof a && Cl(o, a),
"onScroll" === o && fl("scroll", t)) : null != a &&
ke(t, o, a, i))
}
}(t, e, 0, i, o),
t) {
case "input":
Ct(e),
zt(e, n, !1);
break;
case "textarea":
Ct(e),
on(e);
break;
case "option":
!function(e, t) {
null != t.value && e.setAttribute("value", wt(_t(t.value)))
}(e, n);
break;
case "select":
!function(e, t) {
var n = e;
n.multiple = !!t.multiple;
var r = t.value;
null != r ? Gt(n, !!t.multiple, r, !1) : null != t.defaultValue
&& Gt(n, !!t.multiple, t.defaultValue, !0)
}(e, n);
break;
default:
"function" == typeof i.onClick && Hl(e)
}
}
function Wl(e, t, n, r, i) {
Sl(t, r);
var a, s, u, l, c = null;
switch (t) {
case "input":
a = Nt(e, n),
s = Nt(e, r),
c = [];
break;
case "select":
a = Xt(0, n),
s = Xt(0, r),
c = [];
break;
case "textarea":
a = tn(e, n),
s = tn(e, r),
c = [];
break;
default:
s = r,
"function" != typeof (a = n).onClick && "function" == typeof
s.onClick && Hl(e)
}
Hn(t, s);
var d = null;
for (u in a)
if (!s.hasOwnProperty(u) && a.hasOwnProperty(u) && null !
= a[u])
if (u === Dl) {
var f = a[u];
for (l in f)
f.hasOwnProperty(l) && (d || (d = {}),
d[l] = "")
} else
u === Il || u === Nl || u === Pl || u === Ll || u === Ol
|| (H.hasOwnProperty(u) ? c || (c = []) : (c = c || []).push(u, null));
for (u in s) {
var h = s[u]
, p = null != a ? a[u] : void 0;
if (s.hasOwnProperty(u) && h !== p && (null != h || null !=
p))
if (u === Dl)
if (h && Object.freeze(h),
p) {
for (l in p)
!p.hasOwnProperty(l) || h &&
h.hasOwnProperty(l) || (d || (d = {}),
d[l] = "");
for (l in h)
h.hasOwnProperty(l) && p[l] !== h[l] && (d ||
(d = {}),
d[l] = h[l])
} else
d || (c || (c = []),
c.push(u, d)),
d = h;
else if (u === Il) {
var m = h ? h[Bl] : void 0
, g = p ? p[Bl] : void 0;
null != m && g !== m && (c = c || []).push(u, m)
} else
u === Nl ? "string" != typeof h && "number" !=
typeof h || (c = c || []).push(u, "" + h) : u === Pl || u === Ll || (H.hasOwnProperty(u) ?
(null != h && ("function" != typeof h && Cl(u, h),
"onScroll" === u && fl("scroll", e)),
c || p === h || (c = [])) : (c = c || []).push(u, h))
}
return d && (function(e, t) {
if (t) {
var n = Un(e)
, r = Un(t)
, i = {};
for (var a in n) {
var s = n[a]
, u = r[a];
if (u && s !== u) {
var l = s + "," + u;
if (i[l])
continue;
i[l] = !0,
o("%s a style property during rerender (%s)
when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix
shorthand and non-shorthand properties for the same value; instead, replace the
shorthand with separate values.", Fn(e[s]) ? "Removing" : "Updating", s, u)
}
}
}
}(d, s[Dl]),
(c = c || []).push(Dl, d)),
c
}
function $l(e, t, n, r, i) {
switch ("input" === n && "radio" === i.type && null != i.name &&
Bt(e, i),
Vn(n, r),
function(e, t, n, r) {
for (var i = 0; i < t.length; i += 2) {
var o = t[i]
, a = t[i + 1];
o === Dl ? zn(e, a) : o === Il ? hn(e, a) : o === Nl ?
yn(e, a) : ke(e, o, a, r)
}
}(e, t, 0, Vn(n, i)),
n) {
case "input":
jt(e, i);
break;
case "textarea":
rn(e, i);
break;
case "select":
!function(e, t) {
var n = e
, r = n._wrapperState.wasMultiple;
n._wrapperState.wasMultiple = !!t.multiple;
var i = t.value;
null != i ? Gt(n, !!t.multiple, i, !1) : r !== !!t.multiple &&
(null != t.defaultValue ? Gt(n, !!t.multiple, t.defaultValue, !0) : Gt(n, !!t.multiple,
t.multiple ? [] : "", !1))
}(e, i)
}
}
function Yl(e, t) {
Tl || (Tl = !0,
o("Did not expect server HTML to contain a <%s> in <%s>.",
t.nodeName.toLowerCase(), e.nodeName.toLowerCase()))
}
function Ql(e, t) {
Tl || (Tl = !0,
o('Did not expect server HTML to contain the text node "%s" in
<%s>.', t.nodeValue, e.nodeName.toLowerCase()))
}
function Zl(e, t, n) {
Tl || (Tl = !0,
o("Expected server HTML to contain a matching <%s> in <
%s>.", t, e.nodeName.toLowerCase()))
}
function Gl(e, t) {
"" !== t && (Tl || (Tl = !0,
o('Expected server HTML to contain a matching text node for
"%s" in <%s>.', t, e.nodeName.toLowerCase())))
}
var Xl = function() {}
, Jl = function() {}
, ec = ["address", "applet", "area", "article", "aside", "base",
"basefont", "bgsound", "blockquote", "body", "br", "button", "caption", "center", "col",
"colgroup", "dd", "details", "dir", "div", "dl", "dt", "embed", "fieldset", "figcaption", "figure",
"footer", "form", "frame", "frameset", "h1", "h2", "h3", "h4", "h5", "h6", "head", "header",
"hgroup", "hr", "html", "iframe", "img", "input", "isindex", "li", "link", "listing", "main",
"marquee", "menu", "menuitem", "meta", "nav", "noembed", "noframes", "noscript",
"object", "ol", "p", "param", "plaintext", "pre", "script", "section", "select", "source", "style",
"summary", "table", "tbody", "td", "template", "textarea", "tfoot", "th", "thead", "title", "tr",
"track", "ul", "wbr", "xmp"]
, tc = ["applet", "caption", "html", "table", "td", "th", "marquee",
"object", "template", "foreignObject", "desc", "title"]
, nc = tc.concat(["button"])
, rc = ["dd", "dt", "li", "option", "optgroup", "p", "rp", "rt"]
, ic = {
current: null,
formTag: null,
aTagInScope: null,
buttonTagInScope: null,
nobrTagInScope: null,
pTagInButtonScope: null,
listItemTagAutoclosing: null,
dlItemTagAutoclosing: null
};
Jl = function(e, t) {
var n = Qe({}, e || ic)
,r={
tag: t
};
return -1 !== tc.indexOf(t) && (n.aTagInScope = null,
n.buttonTagInScope = null,
n.nobrTagInScope = null),
-1 !== nc.indexOf(t) && (n.pTagInButtonScope = null),
-1 !== ec.indexOf(t) && "address" !== t && "div" !== t && "p" !==
t && (n.listItemTagAutoclosing = null,
n.dlItemTagAutoclosing = null),
n.current = r,
"form" === t && (n.formTag = r),
"a" === t && (n.aTagInScope = r),
"button" === t && (n.buttonTagInScope = r),
"nobr" === t && (n.nobrTagInScope = r),
"p" === t && (n.pTagInButtonScope = r),
"li" === t && (n.listItemTagAutoclosing = r),
"dd" !== t && "dt" !== t || (n.dlItemTagAutoclosing = r),
n
}
;
var oc = {};
Xl = function(e, t, n) {
var r = (n = n || ic).current
, i = r && r.tag;
null != t && (null != e && o("validateDOMNesting: when
childText is passed, childTag should be null"),
e = "#text");
var a = function(e, t) {
switch (t) {
case "select":
return "option" === e || "optgroup" === e || "#text" ===
e;
case "optgroup":
return "option" === e || "#text" === e;
case "option":
return "#text" === e;
case "tr":
return "th" === e || "td" === e || "style" === e || "script"
=== e || "template" === e;
case "tbody":
case "thead":
case "tfoot":
return "tr" === e || "style" === e || "script" === e ||
"template" === e;
case "colgroup":
return "col" === e || "template" === e;
case "table":
return "caption" === e || "colgroup" === e || "tbody" ===
e || "tfoot" === e || "thead" === e || "style" === e || "script" === e || "template" === e;
case "head":
return "base" === e || "basefont" === e || "bgsound" ===
e || "link" === e || "meta" === e || "title" === e || "noscript" === e || "noframes" === e ||
"style" === e || "script" === e || "template" === e;
case "html":
return "head" === e || "body" === e || "frameset" === e;
case "frameset":
return "frame" === e;
case "#document":
return "html" === e
}
switch (e) {
case "h1":
case "h2":
case "h3":
case "h4":
case "h5":
case "h6":
return "h1" !== t && "h2" !== t && "h3" !== t && "h4" !==
t && "h5" !== t && "h6" !== t;
case "rp":
case "rt":
return -1 === rc.indexOf(t);
case "body":
case "caption":
case "col":
case "colgroup":
case "frameset":
case "frame":
case "head":
case "html":
case "tbody":
case "td":
case "tfoot":
case "th":
case "thead":
case "tr":
return null == t
}
return !0
}(e, i) ? null : r
, s = a ? null : function(e, t) {
switch (e) {
case "address":
case "article":
case "aside":
case "blockquote":
case "center":
case "details":
case "dialog":
case "dir":
case "div":
case "dl":
case "fieldset":
case "figcaption":
case "figure":
case "footer":
case "header":
case "hgroup":
case "main":
case "menu":
case "nav":
case "ol":
case "p":
case "section":
case "summary":
case "ul":
case "pre":
case "listing":
case "table":
case "hr":
case "xmp":
case "h1":
case "h2":
case "h3":
case "h4":
case "h5":
case "h6":
return t.pTagInButtonScope;
case "form":
return t.formTag || t.pTagInButtonScope;
case "li":
return t.listItemTagAutoclosing;
case "dd":
case "dt":
return t.dlItemTagAutoclosing;
case "button":
return t.buttonTagInScope;
case "a":
return t.aTagInScope;
case "nobr":
return t.nobrTagInScope
}
return null
}(e, n)
, u = a || s;
if (u) {
var l = u.tag
, c = !!a + "|" + e + "|" + l;
if (!oc[c]) {
oc[c] = !0;
var d = e
, f = "";
if ("#text" === e ? /\S/.test(t) ? d = "Text nodes" : (d =
"Whitespace text nodes",
f = " Make sure you don't have any extra whitespace
between tags on each line of your source code.") : d = "<" + e + ">",
a) {
var h = "";
"table" === l && "tr" === e && (h += " Add a
<tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the
browser."),
o("validateDOMNesting(...): %s cannot appear as a
child of <%s>.%s%s", d, l, f, h)
} else
o("validateDOMNesting(...): %s cannot appear as a
descendant of <%s>.", d, l)
}
}
}
;
var ac = "suppressHydrationWarning"
, sc = "$"
, uc = "/$"
, lc = "$?"
, cc = "$!"
, dc = "style"
, fc = null
, hc = null;
function pc(e) {
var t;
return fc = os,
t = Bu(),
hc = {
focusedElem: t,
selectionRange: ju(t) ? Fu(t) : null
},
as(!1),
null
}
function mc(e, t, n, r, i) {
var a = r;
if (Xl(e, null, a.ancestorInfo),
"string" == typeof t.children || "number" == typeof t.children) {
var s = "" + t.children
, u = Jl(a.ancestorInfo, e);
Xl(null, s, u)
}
var l = function(e, t, n, r) {
var i, a, s = Kl(n), u = r;
if (u === an && (u = ln(e)),
u === an) {
if ((i = Vn(e, t)) || e === e.toLowerCase() || o("<%s /> is
using incorrect casing. Use PascalCase for React components, or lowercase for HTML
elements.", e),
"script" === e) {
var l = s.createElement("div");
l.innerHTML = "<script><\/script>";
var c = l.firstChild;
a = l.removeChild(c)
} else if ("string" == typeof t.is)
a = s.createElement(e, {
is: t.is
});
else if (a = s.createElement(e),
"select" === e) {
var d = a;
t.multiple ? d.multiple = !0 : t.size && (d.size =
t.size)
}
} else
a = s.createElementNS(u, e);
return u === an && (i || "[object HTMLUnknownElement]" !
== Object.prototype.toString.call(a) || Q.call(El, e) || (El[e] = !0,
o("The tag <%s> is unrecognized in this browser. If you
meant to render a React component, start its name with an uppercase letter.", e))),
a
}(e, t, n, a.namespace);
return Kc(i, l),
Zc(l, t),
l
}
function gc(e, t) {
return "textarea" === e || "noscript" === e || "string" == typeof
t.children || "number" == typeof t.children || "object" == typeof
t.dangerouslySetInnerHTML && null !== t.dangerouslySetInnerHTML && null !=
t.dangerouslySetInnerHTML.__html
}
function vc(e, t, n, r) {
Xl(null, e, n.ancestorInfo);
var i = function(e, t) {
return Kl(t).createTextNode(e)
}(e, t);
return Kc(r, i),
i
}
var bc = "function" == typeof setTimeout ? setTimeout : void 0
, yc = "function" == typeof clearTimeout ? clearTimeout : void 0
, Ac = -1
, wc = "function" == typeof Promise ? Promise : void 0
, _c = "function" == typeof queueMicrotask ? queueMicrotask :
void 0 !== wc ? function(e) {
return wc.resolve(null).then(e).catch(Ec)
}
: bc;
function Ec(e) {
setTimeout((function() {
throw e
}
))
}
function Sc(e) {
yn(e, "")
}
function kc(e, t) {
var n = t
, r = 0;
do {
var i = n.nextSibling;
if (e.removeChild(n),
i && i.nodeType === gn) {
var o = i.data;
if (o === uc) {
if (0 === r)
return e.removeChild(i),
void rs(t);
r--
} else
o !== sc && o !== lc && o !== cc || r++
}
n=i
} while (n);
rs(t)
}
function Mc(e) {
var t = e.style;
"function" == typeof t.setProperty ? t.setProperty("display",
"none", "important") : t.display = "none"
}
function Cc(e, t) {
var n = t[dc]
, r = null != n && n.hasOwnProperty("display") ? n.display :
null;
e.style.display = En("display", r)
}
function xc(e, t) {
e.nodeValue = t
}
function Rc(e) {
return e.data === lc
}
function Tc(e) {
return e.data === cc
}
function Ic(e) {
for (; null != e; e = e.nextSibling) {
var t = e.nodeType;
if (t === pn || t === mn)
break;
if (t === gn) {
var n = e.data;
if (n === sc || n === cc || n === lc)
break;
if (n === uc)
return null
}
}
return e
}
function Pc(e) {
return Ic(e.nextSibling)
}
function Lc(e, t, n, r, i, o, a) {
return Kc(o, e),
Zc(e, n),
function(e, t, n, r, i, o, a) {
var s, u;
switch (s = Vn(t, n),
Sl(t, n),
t) {
case "dialog":
fl("cancel", e),
fl("close", e);
break;
case "iframe":
case "object":
case "embed":
fl("load", e);
break;
case "video":
case "audio":
for (var l = 0; l < sl.length; l++)
fl(sl[l], e);
break;
case "source":
fl("error", e);
break;
case "img":
case "image":
case "link":
fl("error", e),
fl("load", e);
break;
case "details":
fl("toggle", e);
break;
case "input":
Dt(e, n),
fl("invalid", e);
break;
case "option":
Vt(0, n);
break;
case "select":
Jt(e, n),
fl("invalid", e);
break;
case "textarea":
nn(e, n),
fl("invalid", e)
}
Hn(t, n),
u = new Set;
for (var c = e.attributes, d = 0; d < c.length; d++)
switch (c[d].name.toLowerCase()) {
case "value":
case "checked":
case "selected":
break;
default:
u.add(c[d].name)
}
var f, h = null;
for (var p in n)
if (n.hasOwnProperty(p)) {
var m = n[p];
if (p === Nl)
"string" == typeof m ? e.textContent !== m && (!
0 !== n[Ll] && Ul(e.textContent, m, o, a),
h = [Nl, m]) : "number" == typeof m &&
e.textContent !== "" + m && (!0 !== n[Ll] && Ul(e.textContent, m, o, a),
h = [Nl, "" + m]);
else if (H.hasOwnProperty(p))
null != m && ("function" != typeof m && Cl(p, m),
"onScroll" === p && fl("scroll", e));
else if (a && "boolean" == typeof s) {
var g = void 0
, v = s && j ? null : me(p);
if (!0 === n[Ll])
;
else if (p === Pl || p === Ll || "value" === p ||
"checked" === p || "selected" === p)
;
else if (p === Il) {
var b = e.innerHTML
, y = m ? m[Bl] : void 0;
if (null != y) {
var A = Rl(e, y);
A !== b && kl(p, b, A)
}
} else if (p === Dl) {
if (u.delete(p),
xl) {
var w = jn(m);
w !== (g = e.getAttribute("style")) &&
kl(p, g, w)
}
} else if (s && !j)
u.delete(p.toLowerCase()),
m !== (g = Se(e, p, m)) && kl(p, g, m);
else if (!fe(p, v, s) && !pe(p, m, v, s)) {
var _ = !1;
if (null !== v)
u.delete(v.attributeName),
g = Ee(e, p, m, v);
else {
var E = r;
if (E === an && (E = ln(t)),
E === an)
u.delete(p.toLowerCase());
else {
var S = (f = void 0,
f = p.toLowerCase(),
Wn.hasOwnProperty(f) && Wn[f] ||
null);
null !== S && S !== p && (_ = !0,
u.delete(S)),
u.delete(p)
}
g = Se(e, p, m)
}
j || m === g || _ || kl(p, g, m)
}
}
}
switch (a && u.size > 0 && !0 !== n[Ll] && Ml(u),
t) {
case "input":
Ct(e),
zt(e, n, !0);
break;
case "textarea":
Ct(e),
on(e);
break;
case "select":
case "option":
break;
default:
"function" == typeof n.onClick && Hl(e)
}
return h
}(e, t, n, i.namespace, 0, (o.mode & oo) !== io, a)
}
function Oc(e) {
for (var t = e.previousSibling, n = 0; t; ) {
if (t.nodeType === gn) {
var r = t.data;
if (r === sc || r === cc || r === lc) {
if (0 === n)
return t;
n--
} else
r === uc && n++
}
t = t.previousSibling
}
return null
}
var Nc = Math.random().toString(36).slice(2)
, Dc = "__reactFiber$" + Nc
, Bc = "__reactProps$" + Nc
, jc = "__reactContainer$" + Nc
, zc = "__reactEvents$" + Nc
, Fc = "__reactListeners$" + Nc
, Uc = "__reactHandles$" + Nc;
function Kc(e, t) {
t[Dc] = e
}
function qc(e, t) {
t[jc] = e
}
function Hc(e) {
e[jc] = null
}
function Vc(e) {
return !!e[jc]
}
function Wc(e) {
var t = e[Dc];
if (t)
return t;
for (var n = e.parentNode; n; ) {
if (t = n[jc] || n[Dc]) {
var r = t.alternate;
if (null !== t.child || null !== r && null !== r.child)
for (var i = Oc(e); null !== i; ) {
var o = i[Dc];
if (o)
return o;
i = Oc(i)
}
return t
}
n = (e = n).parentNode
}
return null
}
function $c(e) {
var t = e[Dc] || e[jc];
return !t || t.tag !== f && t.tag !== h && t.tag !== A && t.tag !==
c ? null : t
}
function Yc(e) {
if (e.tag === f || e.tag === h)
return e.stateNode;
throw new Error("getNodeFromInstance: Invalid argument.")
}
function Qc(e) {
return e[Bc] || null
}
function Zc(e, t) {
e[Bc] = t
}
var Gc = {}
, Xc = n.ReactDebugCurrentFrame;
function Jc(e) {
if (e) {
var t = e._owner
, n = at(e.type, e._source, t ? t.type : null);
Xc.setExtraStackFrame(n)
} else
Xc.setExtraStackFrame(null)
}
function ed(e, t, n, r, i) {
var a = Function.call.bind(Q);
for (var s in e)
if (a(e, s)) {
var u = void 0;
try {
if ("function" != typeof e[s]) {
var l = Error((r || "React class") + ": " + n + "
type `" + s + "` is invalid; it must be a function, usually from the `prop-types` package,
but received `" + typeof e[s] + "`.This often happens because of typos such as
`PropTypes.function` instead of `PropTypes.func`.");
throw l.name = "Invariant Violation",
l
}
u = e[s](t, s, r, n, null,
"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")
} catch (e) {
u=e
}
!u || u instanceof Error || (Jc(i),
o("%s: type specification of %s `%s` is invalid; the type
checker function must return `null` or an `Error` but returned a %s. You may have
forgotten to pass an argument to the type checker creator (arrayOf, instanceOf,
objectOf, oneOf, oneOfType, and shape all require an argument).", r || "React class", n,
s, typeof u),
Jc(null)),
u instanceof Error && !(u.message in Gc) &&
(Gc[u.message] = !0,
Jc(i),
o("Failed %s type: %s", n, u.message),
Jc(null))
}
}
var td, nd = [];
td = [];
var rd, id = -1;
function od(e) {
return {
current: e
}
}
function ad(e, t) {
id < 0 ? o("Unexpected pop.") : (t !== td[id] && o("Unexpected
Fiber popped."),
e.current = nd[id],
nd[id] = null,
td[id] = null,
id--)
}
function sd(e, t, n) {
id++,
nd[id] = e.current,
td[id] = n,
e.current = t
}
rd = {};
var ud = {};
Object.freeze(ud);
var ld = od(ud)
, cd = od(!1)
, dd = ud;
function fd(e, t, n) {
return n && gd(t) ? dd : ld.current
}
function hd(e, t, n) {
var r = e.stateNode;
r.__reactInternalMemoizedUnmaskedChildContext = t,
r.__reactInternalMemoizedMaskedChildContext = n
}
function pd(e, t) {
var n = e.type.contextTypes;
if (!n)
return ud;
var r = e.stateNode;
if (r && r.__reactInternalMemoizedUnmaskedChildContext ===
t)
return r.__reactInternalMemoizedMaskedChildContext;
var i = {};
for (var o in n)
i[o] = t[o];
return ed(n, i, "context", ft(e) || "Unknown"),
r && hd(e, t, i),
i
}
function md() {
return cd.current
}
function gd(e) {
return null != e.childContextTypes
}
function vd(e) {
ad(cd, e),
ad(ld, e)
}
function bd(e) {
ad(cd, e),
ad(ld, e)
}
function yd(e, t, n) {
if (ld.current !== ud)
throw new Error("Unexpected context found on stack. This
error is likely caused by a bug in React. Please file an issue.");
sd(ld, t, e),
sd(cd, n, e)
}
function Ad(e, t, n) {
var r = e.stateNode
, i = t.childContextTypes;
if ("function" != typeof r.getChildContext) {
var a = ft(e) || "Unknown";
return rd[a] || (rd[a] = !0,
o("%s.childContextTypes is specified but there is no
getChildContext() method on the instance. You can either define getChildContext() on
%s or remove childContextTypes from it.", a, a)),
n
}
var s = r.getChildContext();
for (var u in s)
if (!(u in i))
throw new Error((ft(e) || "Unknown") +
'.getChildContext(): key "' + u + '" is not defined in childContextTypes.');
return ed(i, s, "child context", ft(e) || "Unknown"),
Qe({}, n, s)
}
function wd(e) {
var t = e.stateNode
, n = t && t.__reactInternalMemoizedMergedChildContext ||
ud;
return dd = ld.current,
sd(ld, n, e),
sd(cd, cd.current, e),
!0
}
function _d(e, t, n) {
var r = e.stateNode;
if (!r)
throw new Error("Expected to have an instance by this
point. This error is likely caused by a bug in React. Please file an issue.");
if (n) {
var i = Ad(e, t, dd);
r.__reactInternalMemoizedMergedChildContext = i,
ad(cd, e),
ad(ld, e),
sd(ld, i, e),
sd(cd, n, e)
} else
ad(cd, e),
sd(cd, n, e)
}
function Ed(e) {
if (!function(e) {
return vi(e) === e
}(e) || e.tag !== u)
throw new Error("Expected subtree parent to be a mounted
class component. This error is likely caused by a bug in React. Please file an issue.");
var t = e;
do {
switch (t.tag) {
case c:
return t.stateNode.context;
case u:
if (gd(t.type))
return
t.stateNode.__reactInternalMemoizedMergedChildContext
}
t = t.return
} while (null !== t);
throw new Error("Found unexpected detached subtree parent.
This error is likely caused by a bug in React. Please file an issue.")
}
var Sd = 0
, kd = 1
, Md = null
, Cd = !1
, xd = !1;
function Rd(e) {
null === Md ? Md = [e] : Md.push(e)
}
function Td() {
Cd && Id()
}
function Id() {
if (!xd && null !== Md) {
xd = !0;
var e = 0
, t = Na();
try {
var n = Md;
for (Da(Ta); e < n.length; e++) {
var r = n[e];
do {
r = r(!0)
} while (null !== r)
}
Md = null,
Cd = !1
} catch (t) {
throw null !== Md && (Md = Md.slice(e + 1)),
Mi(Pi, Id),
t
} finally {
Da(t),
xd = !1
}
}
return null
}
var Pd = []
, Ld = 0
, Od = null
, Nd = 0
, Dd = []
, Bd = 0
, jd = null
, zd = 1
, Fd = "";
function Ud() {
var e = Fd;
return (zd & ~function(e) {
return 1 << Vd(e) - 1
}(zd)).toString(32) + e
}
function Kd(e, t) {
$d(),
Pd[Ld++] = Nd,
Pd[Ld++] = Od,
Od = e,
Nd = t
}
function qd(e, t, n) {
$d(),
Dd[Bd++] = zd,
Dd[Bd++] = Fd,
Dd[Bd++] = jd,
jd = e;
var r = zd
, i = Fd
, o = Vd(r) - 1
, a = r & ~(1 << o)
,s=n+1
, u = Vd(t) + o;
if (u > 30) {
var l = o - o % 5
, c = (a & (1 << l) - 1).toString(32)
, d = a >> l
,f=o-l
, h = Vd(t) + f;
zd = 1 << h | s << f | d,
Fd = c + i
} else
zd = 1 << u | s << o | a,
Fd = i
}
function Hd(e) {
$d(),
null !== e.return && (Kd(e, 1),
qd(e, 1, 0))
}
function Vd(e) {
return 32 - lo(e)
}
function Wd(e) {
for (; e === Od; )
Od = Pd[--Ld],
Pd[Ld] = null,
Nd = Pd[--Ld],
Pd[Ld] = null;
for (; e === jd; )
jd = Dd[--Bd],
Dd[Bd] = null,
Fd = Dd[--Bd],
Dd[Bd] = null,
zd = Dd[--Bd],
Dd[Bd] = null
}
function $d() {
Af() || o("Expected to be hydrating. This is a bug in React.
Please file an issue.")
}
var Yd = null
, Qd = null
, Zd = !1
, Gd = !1
, Xd = null;
function Jd() {
Zd && o("We should not be hydrating here. This is a bug in
React. Please file a bug.")
}
function ef() {
Gd = !0
}
function tf(e) {
var t = e.stateNode.containerInfo;
return Qd = Ic(t.firstChild),
Yd = e,
Zd = !0,
Xd = null,
Gd = !1,
!0
}
function nf(e, t, n) {
return Qd = Ic(t.nextSibling),
Yd = e,
Zd = !0,
Xd = null,
Gd = !1,
null !== n && function(e, t) {
$d(),
Dd[Bd++] = zd,
Dd[Bd++] = Fd,
Dd[Bd++] = jd,
zd = t.id,
Fd = t.overflow,
jd = e
}(e, n),
!0
}
function rf(e, t) {
switch (e.tag) {
case c:
!function(e, t) {
t.nodeType === pn ? Yl(e, t) : t.nodeType === gn ||
Ql(e, t)
}(e.stateNode.containerInfo, t);
break;
case f:
var n = (e.mode & oo) !== io;
!function(e, t, n, r, i) {
(i || !0 !== t[ac]) && (r.nodeType === pn ? Yl(n, r) :
r.nodeType === gn || Ql(n, r))
}(e.type, e.memoizedProps, e.stateNode, t, n);
break;
case A:
var r = e.memoizedState;
null !== r.dehydrated && function(e, t) {
var n = e.parentNode;
null !== n && (t.nodeType === pn ? Yl(n, t) : t.nodeType
=== gn || Ql(n, t))
}(r.dehydrated, t)
}
}
function of(e, t) {
rf(e, t);
var n, r = ((n = sw(f, null, null, io)).elementType = "DELETED",
n);
r.stateNode = t,
r.return = e;
var i = e.deletions;
null === i ? (e.deletions = [r],
e.flags |= qr) : i.push(r)
}
function af(e, t) {
if (!Gd)
switch (e.tag) {
case c:
var n = e.stateNode.containerInfo;
switch (t.tag) {
case f:
var r = t.type;
t.pendingProps,
function(e, t, n) {
Zl(e, t)
}(n, r);
break;
case h:
!function(e, t) {
Gl(e, t)
}(n, t.pendingProps)
}
break;
case f:
e.type;
var i = e.memoizedProps
, o = e.stateNode;
switch (t.tag) {
case f:
var a = t.type;
t.pendingProps,
function(e, t, n, r, i, o) {
(o || !0 !== t[ac]) && Zl(n, r)
}(0, i, o, a, 0, (e.mode & oo) !== io);
break;
case h:
!function(e, t, n, r, i) {
(i || !0 !== t[ac]) && Gl(n, r)
}(0, i, o, t.pendingProps, (e.mode & oo) !== io)
}
break;
case A:
var s = e.memoizedState.dehydrated;
if (null !== s)
switch (t.tag) {
case f:
var u = t.type;
t.pendingProps,
function(e, t, n) {
var r = e.parentNode;
null !== r && Zl(r, t)
}(s, u);
break;
case h:
!function(e, t) {
var n = e.parentNode;
null !== n && Gl(n, t)
}(s, t.pendingProps)
}
break;
default:
return
}
}
function sf(e, t) {
t.flags = t.flags & ~Gr | Ur,
af(e, t)
}
function uf(e, t) {
switch (e.tag) {
case f:
var n = e.type;
e.pendingProps;
var r = function(e, t, n) {
return e.nodeType !== pn || t.toLowerCase() !==
e.nodeName.toLowerCase() ? null : e
}(t, n);
return null !== r && (e.stateNode = r,
Yd = e,
Qd = Ic(r.firstChild),
!0);
case h:
var i = function(e, t) {
return "" === t || e.nodeType !== mn ? null : e
}(t, e.pendingProps);
return null !== i && (e.stateNode = i,
Yd = e,
Qd = null,
!0);
case A:
var o = function(e) {
return e.nodeType !== gn ? null : e
}(t);
if (null !== o) {
var a = {
dehydrated: o,
treeContext: ($d(),
null !== jd ? {
id: zd,
overflow: Fd
} : null),
retryLane: Zo
};
e.memoizedState = a;
var s = function(e) {
var t = sw(k, null, null, io);
return t.stateNode = e,
t
}(o);
return s.return = e,
e.child = s,
Yd = e,
Qd = null,
!0
}
return !1;
default:
return !1
}
}
function lf(e) {
return (e.mode & oo) !== io && (e.flags & Wr) === zr
}
function cf(e) {
throw new Error("Hydration failed because the initial UI does
not match what was rendered on the server.")
}
function df(e) {
if (Zd) {
var t = Qd;
if (!t)
return lf(e) && (af(Yd, e),
cf()),
sf(Yd, e),
Zd = !1,
void (Yd = e);
var n = t;
if (!uf(e, t)) {
lf(e) && (af(Yd, e),
cf()),
t = Pc(n);
var r = Yd;
if (!t || !uf(e, t))
return sf(Yd, e),
Zd = !1,
void (Yd = e);
of(r, n)
}
}
}
function ff(e) {
var t = e.stateNode
, n = e.memoizedProps
, r = function(e, t, n, r) {
return Kc(n, e),
n.mode,
function(e, t, n) {
return e.nodeValue !== t
}(e, t)
}(t, n, e);
if (r) {
var i = Yd;
if (null !== i)
switch (i.tag) {
case c:
i.stateNode.containerInfo,
function(e, t, n, r) {
Ul(t.nodeValue, n, r, !0)
}(0, t, n, (i.mode & oo) !== io);
break;
case f:
i.type;
var o = i.memoizedProps;
i.stateNode,
function(e, t, n, r, i, o) {
!0 !== t[ac] && Ul(r.nodeValue, i, o, !0)
}(0, o, 0, t, n, (i.mode & oo) !== io)
}
}
return r
}
function hf(e) {
var t = e.memoizedState
, n = null !== t ? t.dehydrated : null;
if (!n)
throw new Error("Expected to have a hydrated suspense
instance. This error is likely caused by a bug in React. Please file an issue.");
!function(e, t) {
Kc(t, e)
}(n, e)
}
function pf(e) {
var t = e.memoizedState
, n = null !== t ? t.dehydrated : null;
if (!n)
throw new Error("Expected to have a hydrated suspense
instance. This error is likely caused by a bug in React. Please file an issue.");
return function(e) {
for (var t = e.nextSibling, n = 0; t; ) {
if (t.nodeType === gn) {
var r = t.data;
if (r === uc) {
if (0 === n)
return Pc(t);
n--
} else
r !== sc && r !== cc && r !== lc || n++
}
t = t.nextSibling
}
return null
}(n)
}
function mf(e) {
for (var t = e.return; null !== t && t.tag !== f && t.tag !== c &&
t.tag !== A; )
t = t.return;
Yd = t
}
function gf(e) {
if (e !== Yd)
return !1;
if (!Zd)
return mf(e),
Zd = !0,
!1;
if (e.tag !== c && (e.tag !== f || "head" !== (n = e.type) &&
"body" !== n && !gc(e.type, e.memoizedProps))) {
var t = Qd;
if (t)
if (lf(e))
vf(e),
cf();
else
for (; t; )
of(e, t),
t = Pc(t)
}
var n;
return mf(e),
Qd = e.tag === A ? pf(e) : Yd ? Pc(e.stateNode) : null,
!0
}
function vf(e) {
for (var t = Qd; t; )
rf(e, t),
t = Pc(t)
}
function bf() {
Yd = null,
Qd = null,
Zd = !1,
Gd = !1
}
function yf() {
null !== Xd && (rA(Xd),
Xd = null)
}
function Af() {
return Zd
}
function wf(e) {
null === Xd ? Xd = [e] : Xd.push(e)
}
var _f = n.ReactCurrentBatchConfig
, Ef = null
, Sf = {
recordUnsafeLifecycleWarnings: function(e, t) {},
flushPendingUnsafeLifecycleWarnings: function() {},
recordLegacyContextWarning: function(e, t) {},
flushLegacyContextWarning: function() {},
discardPendingWarnings: function() {}
}
, kf = function(e) {
var t = [];
return e.forEach((function(e) {
t.push(e)
}
)),
t.sort().join(", ")
}
, Mf = []
, Cf = []
, xf = []
, Rf = []
, Tf = []
, If = []
, Pf = new Set;
Sf.recordUnsafeLifecycleWarnings = function(e, t) {
Pf.has(e.type) || ("function" == typeof t.componentWillMount &&
!0 !== t.componentWillMount.__suppressDeprecationWarning && Mf.push(e),
e.mode & so && "function" == typeof
t.UNSAFE_componentWillMount && Cf.push(e),
"function" == typeof t.componentWillReceiveProps && !0 !==
t.componentWillReceiveProps.__suppressDeprecationWarning && xf.push(e),
e.mode & so && "function" == typeof
t.UNSAFE_componentWillReceiveProps && Rf.push(e),
"function" == typeof t.componentWillUpdate && !0 !==
t.componentWillUpdate.__suppressDeprecationWarning && Tf.push(e),
e.mode & so && "function" == typeof
t.UNSAFE_componentWillUpdate && If.push(e))
}
,
Sf.flushPendingUnsafeLifecycleWarnings = function() {
var e = new Set;
Mf.length > 0 && (Mf.forEach((function(t) {
e.add(ft(t) || "Component"),
Pf.add(t.type)
}
)),
Mf = []);
var t = new Set;
Cf.length > 0 && (Cf.forEach((function(e) {
t.add(ft(e) || "Component"),
Pf.add(e.type)
}
)),
Cf = []);
var n = new Set;
xf.length > 0 && (xf.forEach((function(e) {
n.add(ft(e) || "Component"),
Pf.add(e.type)
}
)),
xf = []);
var r = new Set;
Rf.length > 0 && (Rf.forEach((function(e) {
r.add(ft(e) || "Component"),
Pf.add(e.type)
}
)),
Rf = []);
var a = new Set;
Tf.length > 0 && (Tf.forEach((function(e) {
a.add(ft(e) || "Component"),
Pf.add(e.type)
}
)),
Tf = []);
var s = new Set;
If.length > 0 && (If.forEach((function(e) {
s.add(ft(e) || "Component"),
Pf.add(e.type)
}
)),
If = []),
t.size > 0 && o("Using UNSAFE_componentWillMount in strict
mode is not recommended and may indicate bugs in your code. See
https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move code with side
effects to componentDidMount, and set initial state in the constructor.\n\nPlease update
the following components: %s", kf(t)),
r.size > 0 && o("Using UNSAFE_componentWillReceiveProps
in strict mode is not recommended and may indicate bugs in your code. See
https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching
code or side effects to componentDidUpdate.\n* If you're updating state whenever props
change, refactor your code to use memoization techniques or move it to static
getDerivedStateFromProps. Learn more at: https://reactjs.org/link/derived-state\n\
nPlease update the following components: %s", kf(r)),
s.size > 0 && o("Using UNSAFE_componentWillUpdate in strict
mode is not recommended and may indicate bugs in your code. See
https://reactjs.org/link/unsafe-component-lifecycles for details.\n\n* Move data fetching
code or side effects to componentDidUpdate.\n\nPlease update the following
components: %s", kf(s)),
e.size > 0 && i("componentWillMount has been renamed, and is
not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for
details.\n\n* Move code with side effects to componentDidMount, and set initial state in
the constructor.\n* Rename componentWillMount to UNSAFE_componentWillMount to
suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will
work. To rename all deprecated lifecycles to their new names, you can run `npx react-
codemod rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the
following components: %s", kf(e)),
n.size > 0 && i("componentWillReceiveProps has been
renamed, and is not recommended for use. See https://reactjs.org/link/unsafe-
component-lifecycles for details.\n\n* Move data fetching code or side effects to
componentDidUpdate.\n* If you're updating state whenever props change, refactor your
code to use memoization techniques or move it to static getDerivedStateFromProps.
Learn more at: https://reactjs.org/link/derived-state\n* Rename
componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this
warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To
rename all deprecated lifecycles to their new names, you can run `npx react-codemod
rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following
components: %s", kf(n)),
a.size > 0 && i("componentWillUpdate has been renamed, and
is not recommended for use. See https://reactjs.org/link/unsafe-component-lifecycles for
details.\n\n* Move data fetching code or side effects to componentDidUpdate.\n*
Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this
warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To
rename all deprecated lifecycles to their new names, you can run `npx react-codemod
rename-unsafe-lifecycles` in your project source folder.\n\nPlease update the following
components: %s", kf(a))
}
;
var Lf = new Map
, Of = new Set;
function Nf(e, t) {
if (e && e.defaultProps) {
var n = Qe({}, t)
, r = e.defaultProps;
for (var i in r)
void 0 === n[i] && (n[i] = r[i]);
return n
}
return t
}
Sf.recordLegacyContextWarning = function(e, t) {
var n = function(e) {
for (var t = null, n = e; null !== n; )
n.mode & so && (t = n),
n = n.return;
return t
}(e);
if (null !== n) {
if (!Of.has(e.type)) {
var r = Lf.get(n);
(null != e.type.contextTypes || null !=
e.type.childContextTypes || null !== t && "function" == typeof t.getChildContext) && (void
0 === r && (r = [],
Lf.set(n, r)),
r.push(e))
}
} else
o("Expected to find a StrictMode component in a strict
mode tree. This error is likely caused by a bug in React. Please file an issue.")
}
,
Sf.flushLegacyContextWarning = function() {
Lf.forEach((function(e, t) {
if (0 !== e.length) {
var n = e[0]
, r = new Set;
e.forEach((function(e) {
r.add(ft(e) || "Component"),
Of.add(e.type)
}
));
var i = kf(r);
try {
yt(n),
o("Legacy context API has been detected within a
strict-mode tree.\n\nThe old API will be supported in all 16.x releases, but applications
using it should migrate to the new version.\n\nPlease update the following components:
%s\n\nLearn more about this warning here: https://reactjs.org/link/legacy-context", i)
} finally {
bt()
}
}
}
))
}
,
Sf.discardPendingWarnings = function() {
Mf = [],
Cf = [],
xf = [],
Rf = [],
Tf = [],
If = [],
Lf = new Map
}
;
var Df, Bf = od(null);
Df = {};
var jf = null
, zf = null
, Ff = null
, Uf = !1;
function Kf() {
jf = null,
zf = null,
Ff = null,
Uf = !1
}
function qf() {
Uf = !0
}
function Hf() {
Uf = !1
}
function Vf(e, t, n) {
sd(Bf, t._currentValue, e),
t._currentValue = n,
void 0 !== t._currentRenderer && null !== t._currentRenderer
&& t._currentRenderer !== Df && o("Detected multiple renderers concurrently rendering
the same context provider. This is currently unsupported."),
t._currentRenderer = Df
}
function Wf(e, t) {
var n = Bf.current;
ad(Bf, t),
e._currentValue = n
}
function $f(e, t, n) {
for (var r = e; null !== r; ) {
var i = r.alternate;
if (ma(r.childLanes, t) ? null === i || ma(i.childLanes, t) ||
(i.childLanes = ga(i.childLanes, t)) : (r.childLanes = ga(r.childLanes, t),
null !== i && (i.childLanes = ga(i.childLanes, t))),
r === n)
break;
r = r.return
}
r !== n && o("Expected to find the propagation root when
scheduling context work. This error is likely caused by a bug in React. Please file an
issue.")
}
function Yf(e, t, n) {
!function(e, t, n) {
var r = e.child;
for (null !== r && (r.return = e); null !== r; ) {
var i = void 0
, o = r.dependencies;
if (null !== o) {
i = r.child;
for (var a = o.firstContext; null !== a; ) {
if (a.context === t) {
if (r.tag === u) {
var s = da(n)
, l = fh(Xo, s);
l.tag = sh;
var c = r.updateQueue;
if (null === c)
;
else {
var d = c.shared
, f = d.pending;
null === f ? l.next = l : (l.next =
f.next,
f.next = l),
d.pending = l
}
}
r.lanes = ga(r.lanes, n);
var h = r.alternate;
null !== h && (h.lanes = ga(h.lanes, n)),
$f(r.return, n, e),
o.lanes = ga(o.lanes, n);
break
}
a = a.next
}
} else if (r.tag === v)
i = r.type === e.type ? null : r.child;
else if (r.tag === k) {
var p = r.return;
if (null === p)
throw new Error("We just came from a parent
so we must have had a parent. This is a bug in React.");
p.lanes = ga(p.lanes, n);
var m = p.alternate;
null !== m && (m.lanes = ga(m.lanes, n)),
$f(p, n, e),
i = r.sibling
} else
i = r.child;
if (null !== i)
i.return = r;
else
for (i = r; null !== i; ) {
if (i === e) {
i = null;
break
}
var g = i.sibling;
if (null !== g) {
g.return = i.return,
i = g;
break
}
i = i.return
}
r=i
}
}(e, t, n)
}
function Qf(e, t) {
jf = e,
zf = null,
Ff = null;
var n = e.dependencies;
null !== n && null !== n.firstContext && (pa(n.lanes, t) && Cv(),
n.firstContext = null)
}
function Zf(e) {
Uf && o("Context can only be read while React is rendering. In
classes, you can read it in the render method or getDerivedStateFromProps. In function
components, you can read it directly in the function body, but not inside Hooks like
useReducer() or useMemo().");
var t = e._currentValue;
if (Ff === e)
;
else {
var n = {
context: e,
memoizedValue: t,
next: null
};
if (null === zf) {
if (null === jf)
throw new Error("Context can only be read while
React is rendering. In classes, you can read it in the render method or
getDerivedStateFromProps. In function components, you can read it directly in the
function body, but not inside Hooks like useReducer() or useMemo().");
zf = n,
jf.dependencies = {
lanes: po,
firstContext: n
}
} else
zf = zf.next = n
}
return t
}
var Gf = null;
function Xf(e) {
null === Gf ? Gf = [e] : Gf.push(e)
}
function Jf(e, t, n, r) {
var i = t.interleaved;
return null === i ? (n.next = n,
Xf(t)) : (n.next = i.next,
i.next = n),
t.interleaved = n,
nh(e, r)
}
function eh(e, t) {
return nh(e, t)
}
var th = nh;
function nh(e, t) {
e.lanes = ga(e.lanes, t);
var n = e.alternate;
null !== n && (n.lanes = ga(n.lanes, t)),
null === n && (e.flags & (Ur | Gr)) !== zr && DA(e);
for (var r = e, i = e.return; null !== i; )
i.childLanes = ga(i.childLanes, t),
null !== (n = i.alternate) ? n.childLanes = ga(n.childLanes, t)
: (i.flags & (Ur | Gr)) !== zr && DA(e),
r = i,
i = i.return;
return r.tag === c ? r.stateNode : null
}
var rh, ih, oh = 0, ah = 1, sh = 2, uh = 3, lh = !1;
function ch(e) {
var t = {
baseState: e.memoizedState,
firstBaseUpdate: null,
lastBaseUpdate: null,
shared: {
pending: null,
interleaved: null,
lanes: po
},
effects: null
};
e.updateQueue = t
}
function dh(e, t) {
var n = t.updateQueue
, r = e.updateQueue;
if (n === r) {
var i = {
baseState: r.baseState,
firstBaseUpdate: r.firstBaseUpdate,
lastBaseUpdate: r.lastBaseUpdate,
shared: r.shared,
effects: r.effects
};
t.updateQueue = i
}
}
function fh(e, t) {
return {
eventTime: e,
lane: t,
tag: oh,
payload: null,
callback: null,
next: null
}
}
function hh(e, t, n) {
var r = e.updateQueue;
if (null === r)
return null;
var i = r.shared;
if (ih !== i || rh || (o("An update (setState, replaceState, or
forceUpdate) was scheduled from inside an update function. Update functions should
be pure, with zero side-effects. Consider using componentDidUpdate or a callback."),
rh = !0),
(cy & ty) !== Jb) {
var a = i.pending;
return null === a ? t.next = t : (t.next = a.next,
a.next = t),
i.pending = t,
th(e, n)
}
return function(e, t, n, r) {
var i = t.interleaved;
return null === i ? (n.next = n,
Xf(t)) : (n.next = i.next,
i.next = n),
t.interleaved = n,
nh(e, r)
}(e, i, t, n)
}
function ph(e, t, n) {
var r = t.updateQueue;
if (null !== r) {
var i = r.shared;
if (ua(n)) {
var o = i.lanes
, a = ga(o = ba(o, e.pendingLanes), n);
i.lanes = a,
_a(e, a)
}
}
}
function mh(e, t) {
var n = e.updateQueue
, r = e.alternate;
if (null !== r) {
var i = r.updateQueue;
if (n === i) {
var o = null
, a = null
, s = n.firstBaseUpdate;
if (null !== s) {
var u = s;
do {
var l = {
eventTime: u.eventTime,
lane: u.lane,
tag: u.tag,
payload: u.payload,
callback: u.callback,
next: null
};
null === a ? o = a = l : (a.next = l,
a = l),
u = u.next
} while (null !== u);
null === a ? o = a = t : (a.next = t,
a = t)
} else
o = a = t;
return n = {
baseState: i.baseState,
firstBaseUpdate: o,
lastBaseUpdate: a,
shared: i.shared,
effects: i.effects
},
void (e.updateQueue = n)
}
}
var c = n.lastBaseUpdate;
null === c ? n.firstBaseUpdate = t : c.next = t,
n.lastBaseUpdate = t
}
function gh(e, t, n, r, i, o) {
switch (n.tag) {
case ah:
var a = n.payload;
if ("function" == typeof a) {
qf();
var s = a.call(o, r, i);
if (e.mode & so) {
Hi(!0);
try {
a.call(o, r, i)
} finally {
Hi(!1)
}
}
return Hf(),
s
}
return a;
case uh:
e.flags = e.flags & ~ri | Wr;
case oh:
var u, l = n.payload;
if ("function" == typeof l) {
if (qf(),
u = l.call(o, r, i),
e.mode & so) {
Hi(!0);
try {
l.call(o, r, i)
} finally {
Hi(!1)
}
}
Hf()
} else
u = l;
return null == u ? r : Qe({}, r, u);
case sh:
return lh = !0,
r
}
return r
}
function vh(e, t, n, r) {
var i = e.updateQueue;
lh = !1,
ih = i.shared;
var o = i.firstBaseUpdate
, a = i.lastBaseUpdate
, s = i.shared.pending;
if (null !== s) {
i.shared.pending = null;
var u = s
, l = u.next;
u.next = null,
null === a ? o = l : a.next = l,
a = u;
var c = e.alternate;
if (null !== c) {
var d = c.updateQueue
, f = d.lastBaseUpdate;
f !== a && (null === f ? d.firstBaseUpdate = l : f.next = l,
d.lastBaseUpdate = u)
}
}
if (null !== o) {
for (var h = i.baseState, p = po, m = null, g = null, v = null, b
= o; ; ) {
var y = b.lane
, A = b.eventTime;
if (ma(r, y)) {
if (null !== v) {
var w = {
eventTime: A,
lane: mo,
tag: b.tag,
payload: b.payload,
callback: b.callback,
next: null
};
v = v.next = w
}
if (h = gh(e, 0, b, h, t, n),
null !== b.callback && b.lane !== mo) {
e.flags |= Vr;
var _ = i.effects;
null === _ ? i.effects = [b] : _.push(b)
}
} else {
var E = {
eventTime: A,
lane: y,
tag: b.tag,
payload: b.payload,
callback: b.callback,
next: null
};
null === v ? (g = v = E,
m = h) : v = v.next = E,
p = ga(p, y)
}
if (null === (b = b.next)) {
if (null === (s = i.shared.pending))
break;
var S = s
, k = S.next;
S.next = null,
b = k,
i.lastBaseUpdate = S,
i.shared.pending = null
}
}
null === v && (m = h),
i.baseState = m,
i.firstBaseUpdate = g,
i.lastBaseUpdate = v;
var M = i.shared.interleaved;
if (null !== M) {
var C = M;
do {
p = ga(p, C.lane),
C = C.next
} while (C !== M)
} else
null === o && (i.shared.lanes = po);
mA(p),
e.lanes = p,
e.memoizedState = h
}
ih = null
}
function bh(e, t) {
if ("function" != typeof e)
throw new Error("Invalid argument passed as callback.
Expected a function. Instead received: " + e);
e.call(t)
}
function yh() {
lh = !1
}
function Ah() {
return lh
}
function wh(e, t, n) {
var r = t.effects;
if (t.effects = null,
null !== r)
for (var i = 0; i < r.length; i++) {
var o = r[i]
, a = o.callback;
null !== a && (o.callback = null,
bh(a, n))
}
}
rh = !1,
ih = null;
var _h, Eh, Sh, kh, Mh, Ch, xh, Rh, Th, Ih, Ph = {}, Lh = (new
e.Component).refs;
_h = new Set,
Eh = new Set,
Sh = new Set,
kh = new Set,
Rh = new Set,
Mh = new Set,
Th = new Set,
Ih = new Set;
var Oh = new Set;
function Nh(e, t, n, r) {
var i = e.memoizedState
, o = n(r, i);
if (e.mode & so) {
Hi(!0);
try {
o = n(r, i)
} finally {
Hi(!1)
}
}
Ch(t, o);
var a = null == o ? i : Qe({}, i, o);
e.memoizedState = a,
e.lanes === po && (e.updateQueue.baseState = a)
}
xh = function(e, t) {
if (null !== e && "function" != typeof e) {
var n = t + "_" + e;
Oh.has(n) || (Oh.add(n),
o("%s(...): Expected the last optional `callback` argument to
be a function. Instead received: %s.", t, e))
}
}
,
Ch = function(e, t) {
if (void 0 === t) {
var n = ct(e) || "Component";
Mh.has(n) || (Mh.add(n),
o("%s.getDerivedStateFromProps(): A valid state object (or
null) must be returned. You have returned undefined.", n))
}
}
,
Object.defineProperty(Ph, "_processChildContext", {
enumerable: !1,
value: function() {
throw new Error("_processChildContext is not available in
React 16+. This likely means you have multiple copies of React and are attempting to
nest a React 15 tree inside a React 16 tree using unstable_renderSubtreeIntoContainer,
which isn't supported. Try to make sure you have only one copy of React (and ideally,
switch to ReactDOM.createPortal).")
}
}),
Object.freeze(Ph);
var Dh, Bh, jh, zh, Fh, Uh, Kh = {
isMounted: function(e) {
var t = gi.current;
if (null !== t && t.tag === u) {
var n = t
, r = n.stateNode;
r._warnedAboutRefsInRender || o("%s is accessing
isMounted inside its render() function. render() should be a pure function of props and
state. It should never access something that requires stale data from the previous
render, such as refs. Move this logic to componentDidMount and componentDidUpdate
instead.", ft(n) || "A component"),
r._warnedAboutRefsInRender = !0
}
var i = jr(e);
return !!i && vi(i) === i
},
enqueueSetState: function(e, t, n) {
var r = jr(e)
, i = Zy()
, o = Gy(r)
, a = fh(i, o);
a.payload = t,
null != n && (xh(n, "setState"),
a.callback = n);
var s = hh(r, a, o);
null !== s && (Jy(s, r, o, i),
ph(s, r, o)),
ro(r, o)
},
enqueueReplaceState: function(e, t, n) {
var r = jr(e)
, i = Zy()
, o = Gy(r)
, a = fh(i, o);
a.tag = ah,
a.payload = t,
null != n && (xh(n, "replaceState"),
a.callback = n);
var s = hh(r, a, o);
null !== s && (Jy(s, r, o, i),
ph(s, r, o)),
ro(r, o)
},
enqueueForceUpdate: function(e, t) {
var n = jr(e)
, r = Zy()
, i = Gy(n)
, o = fh(r, i);
o.tag = sh,
null != t && (xh(t, "forceUpdate"),
o.callback = t);
var a = hh(n, o, i);
null !== a && (Jy(a, n, i, r),
ph(a, n, i)),
function(e, t) {
null !== Ui && "function" == typeof
Ui.markForceUpdateScheduled && Ui.markForceUpdateScheduled(e, t)
}(n, i)
}
};
function qh(e, t, n, r, i, a, s) {
var u = e.stateNode;
if ("function" == typeof u.shouldComponentUpdate) {
var l = u.shouldComponentUpdate(r, a, s);
if (e.mode & so) {
Hi(!0);
try {
l = u.shouldComponentUpdate(r, a, s)
} finally {
Hi(!1)
}
}
return void 0 === l && o("%s.shouldComponentUpdate():
Returned undefined instead of a boolean value. Make sure to return true or false.", ct(t)
|| "Component"),
l
}
return !t.prototype || !t.prototype.isPureReactComponent || !
xu(n, r) || !xu(i, a)
}
function Hh(e, t) {
t.updater = Kh,
e.stateNode = t,
function(e, t) {
e._reactInternals = t
}(t, e),
t._reactInternalInstance = Ph
}
function Vh(e, t, n) {
var r = !1
, i = ud
, a = ud
, s = t.contextType;
if ("contextType"in t && null !== s && (void 0 === s || s.$
$typeof !== Pe || void 0 !== s._context) && !Ih.has(t)) {
Ih.add(t);
var u = "";
u = void 0 === s ? " However, it is set to undefined. This
can be caused by a typo or by mixing up named and default imports. This can also
happen due to a circular dependency, so try moving the createContext() call to a
separate file." : "object" != typeof s ? " However, it is set to a " + typeof s + "." : s.$
$typeof === Ie ? " Did you accidentally pass the Context.Provider instead?" : void 0 !==
s._context ? " Did you accidentally pass the Context.Consumer instead?" : " However, it
is set to an object with keys {" + Object.keys(s).join(", ") + "}.",
o("%s defines an invalid contextType. contextType should
point to the Context object returned by React.createContext().%s", ct(t) || "Component",
u)
}
"object" == typeof s && null !== s ? a = Zf(s) : (i = fd(0, t, !0),
a = (r = null != t.contextTypes) ? pd(e, i) : ud);
var l = new t(n,a);
if (e.mode & so) {
Hi(!0);
try {
l = new t(n,a)
} finally {
Hi(!1)
}
}
var c = e.memoizedState = null !== l.state && void 0 !==
l.state ? l.state : null;
if (Hh(e, l),
"function" == typeof t.getDerivedStateFromProps && null === c)
{
var d = ct(t) || "Component";
Eh.has(d) || (Eh.add(d),
o("`%s` uses `getDerivedStateFromProps` but its initial
state is %s. This is not recommended. Instead, define the initial state by assigning an
object to `this.state` in the constructor of `%s`. This ensures that
`getDerivedStateFromProps` arguments have a consistent shape.", d, null === l.state ?
"null" : "undefined", d))
}
if ("function" == typeof t.getDerivedStateFromProps || "function"
== typeof l.getSnapshotBeforeUpdate) {
var f = null
, h = null
, p = null;
if ("function" == typeof l.componentWillMount && !0 !==
l.componentWillMount.__suppressDeprecationWarning ? f = "componentWillMount" :
"function" == typeof l.UNSAFE_componentWillMount && (f =
"UNSAFE_componentWillMount"),
"function" == typeof l.componentWillReceiveProps && !0 !
== l.componentWillReceiveProps.__suppressDeprecationWarning ? h =
"componentWillReceiveProps" : "function" == typeof
l.UNSAFE_componentWillReceiveProps && (h =
"UNSAFE_componentWillReceiveProps"),
"function" == typeof l.componentWillUpdate && !0 !==
l.componentWillUpdate.__suppressDeprecationWarning ? p = "componentWillUpdate" :
"function" == typeof l.UNSAFE_componentWillUpdate && (p =
"UNSAFE_componentWillUpdate"),
null !== f || null !== h || null !== p) {
var m = ct(t) || "Component"
, g = "function" == typeof t.getDerivedStateFromProps
? "getDerivedStateFromProps()" : "getSnapshotBeforeUpdate()";
kh.has(m) || (kh.add(m),
o("Unsafe legacy lifecycles will not be called for
components using new component APIs.\n\n%s uses %s but also contains the following
legacy lifecycles:%s%s%s\n\nThe above lifecycles should be removed. Learn more
about this warning here:\nhttps://reactjs.org/link/unsafe-component-lifecycles", m, g, null
!== f ? "\n " + f : "", null !== h ? "\n " + h : "", null !== p ? "\n " + p : ""))
}
}
return r && hd(e, i, a),
l
}
function Wh(e, t, n, r) {
var i = t.state;
if ("function" == typeof t.componentWillReceiveProps &&
t.componentWillReceiveProps(n, r),
"function" == typeof t.UNSAFE_componentWillReceiveProps
&& t.UNSAFE_componentWillReceiveProps(n, r),
t.state !== i) {
var a = ft(e) || "Component";
_h.has(a) || (_h.add(a),
o("%s.componentWillReceiveProps(): Assigning directly to
this.state is deprecated (except inside a component's constructor). Use setState
instead.", a)),
Kh.enqueueReplaceState(t, t.state, null)
}
}
function $h(e, t, n, r) {
!function(e, t, n) {
var r = e.stateNode
, i = ct(t) || "Component";
r.render || (t.prototype && "function" == typeof
t.prototype.render ? o("%s(...): No `render` method found on the returned component
instance: did you accidentally return an object from the constructor?", i) : o("%s(...): No
`render` method found on the returned component instance: you may have forgotten to
define `render`.", i)),
!r.getInitialState || r.getInitialState.isReactClassApproved ||
r.state || o("getInitialState was defined on %s, a plain JavaScript class. This is only
supported for classes created using React.createClass. Did you mean to define a state
property instead?", i),
r.getDefaultProps && !
r.getDefaultProps.isReactClassApproved && o("getDefaultProps was defined on %s, a
plain JavaScript class. This is only supported for classes created using
React.createClass. Use a static property to define defaultProps instead.", i),
r.propTypes && o("propTypes was defined as an instance
property on %s. Use a static property to define propTypes instead.", i),
r.contextType && o("contextType was defined as an
instance property on %s. Use a static property to define contextType instead.", i),
r.contextTypes && o("contextTypes was defined as an
instance property on %s. Use a static property to define contextTypes instead.", i),
t.contextType && t.contextTypes && !Th.has(t) &&
(Th.add(t),
o("%s declares both contextTypes and contextType static
properties. The legacy contextTypes property will be ignored.", i)),
"function" == typeof r.componentShouldUpdate && o("%s
has a method called componentShouldUpdate(). Did you mean
shouldComponentUpdate()? The name is phrased as a question because the function is
expected to return a value.", i),
t.prototype && t.prototype.isPureReactComponent && void
0 !== r.shouldComponentUpdate && o("%s has a method called
shouldComponentUpdate(). shouldComponentUpdate should not be used when
extending React.PureComponent. Please extend React.Component if
shouldComponentUpdate is used.", ct(t) || "A pure component"),
"function" == typeof r.componentDidUnmount && o("%s has
a method called componentDidUnmount(). But there is no such lifecycle method. Did
you mean componentWillUnmount()?", i),
"function" == typeof r.componentDidReceiveProps &&
o("%s has a method called componentDidReceiveProps(). But there is no such lifecycle
method. If you meant to update the state in response to changing props, use
componentWillReceiveProps(). If you meant to fetch data or run side-effects or
mutations after React has updated the UI, use componentDidUpdate().", i),
"function" == typeof r.componentWillRecieveProps &&
o("%s has a method called componentWillRecieveProps(). Did you mean
componentWillReceiveProps()?", i),
"function" == typeof
r.UNSAFE_componentWillRecieveProps && o("%s has a method called
UNSAFE_componentWillRecieveProps(). Did you mean
UNSAFE_componentWillReceiveProps()?", i);
var a = r.props !== n;
void 0 !== r.props && a && o("%s(...): When calling super()
in `%s`, make sure to pass up the same props that your component's constructor was
passed.", i, i),
r.defaultProps && o("Setting defaultProps as an instance
property on %s is not supported and will be ignored. Instead, define defaultProps as a
static property on %s.", i, i),
"function" != typeof r.getSnapshotBeforeUpdate || "function"
== typeof r.componentDidUpdate || Sh.has(t) || (Sh.add(t),
o("%s: getSnapshotBeforeUpdate() should be used with
componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",
ct(t))),
"function" == typeof r.getDerivedStateFromProps && o("%s:
getDerivedStateFromProps() is defined as an instance method and will be ignored.
Instead, declare it as a static method.", i),
"function" == typeof r.getDerivedStateFromError && o("%s:
getDerivedStateFromError() is defined as an instance method and will be ignored.
Instead, declare it as a static method.", i),
"function" == typeof t.getSnapshotBeforeUpdate && o("%s:
getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead,
declare it as an instance method.", i);
var s = r.state;
s && ("object" != typeof s || Yt(s)) && o("%s.state: must be
set to an object or null", i),
"function" == typeof r.getChildContext && "object" != typeof
t.childContextTypes && o("%s.getChildContext(): childContextTypes must be defined in
order to use getChildContext().", i)
}(e, t, n);
var i = e.stateNode;
i.props = n,
i.state = e.memoizedState,
i.refs = Lh,
ch(e);
var a = t.contextType;
if ("object" == typeof a && null !== a)
i.context = Zf(a);
else {
var s = fd(0, t, !0);
i.context = pd(e, s)
}
if (i.state === n) {
var u = ct(t) || "Component";
Rh.has(u) || (Rh.add(u),
o("%s: It is not recommended to assign props directly to
state because updates to props won't be reflected in state. In most cases, it is better to
use props directly.", u))
}
e.mode & so && Sf.recordLegacyContextWarning(e, i),
Sf.recordUnsafeLifecycleWarnings(e, i),
i.state = e.memoizedState;
var l = t.getDerivedStateFromProps;
if ("function" == typeof l && (Nh(e, t, l, n),
i.state = e.memoizedState),
"function" == typeof t.getDerivedStateFromProps || "function"
== typeof i.getSnapshotBeforeUpdate || "function" != typeof
i.UNSAFE_componentWillMount && "function" != typeof i.componentWillMount ||
(function(e, t) {
var n = t.state;
"function" == typeof t.componentWillMount &&
t.componentWillMount(),
"function" == typeof t.UNSAFE_componentWillMount &&
t.UNSAFE_componentWillMount(),
n !== t.state && (o("%s.componentWillMount(): Assigning
directly to this.state is deprecated (except inside a component's constructor). Use
setState instead.", ft(e) || "Component"),
Kh.enqueueReplaceState(t, t.state, null))
}(e, i),
vh(e, n, i, r),
i.state = e.memoizedState),
"function" == typeof i.componentDidMount) {
var c = Kr;
c |= si,
(e.mode & uo) !== io && (c |= li),
e.flags |= c
}
}
function Yh(e, t, n) {
var r = n.ref;
if (null !== r && "function" != typeof r && "object" != typeof r) {
if ((e.mode & so || z) && (!n._owner || !n._self ||
n._owner.stateNode === n._self)) {
var i = ft(e) || "Component";
jh[i] || (o('A string ref, "%s", has been found within a
strict mode tree. String refs are a source of potential bugs and should be avoided. We
recommend using useRef() or createRef() instead. Learn more about using refs safely
here: https://reactjs.org/link/strict-mode-string-ref', r),
jh[i] = !0)
}
if (n._owner) {
var a, s = n._owner;
if (s) {
var l = s;
if (l.tag !== u)
throw new Error("Function components cannot
have string refs. We recommend using useRef() instead. Learn more about using refs
safely here: https://reactjs.org/link/strict-mode-string-ref");
a = l.stateNode
}
if (!a)
throw new Error("Missing owner for string ref " + r +
". This error is likely caused by a bug in React. Please file an issue.");
var c = a;
!function(e, t) {
G(e) && (o("The provided `%s` prop is an
unsupported type %s. This value must be coerced to a string before before using it
here.", t, Z(e)),
X(e))
}(r, "ref");
var d = "" + r;
if (null !== t && null !== t.ref && "function" == typeof t.ref
&& t.ref._stringRef === d)
return t.ref;
var f = function(e) {
var t = c.refs;
t === Lh && (t = c.refs = {}),
null === e ? delete t[d] : t[d] = e
};
return f._stringRef = d,
f
}
if ("string" != typeof r)
throw new Error("Expected ref to be a function, a string,
an object returned by React.createRef(), or null.");
if (!n._owner)
throw new Error("Element ref was specified as a string
(" + r + ") but no owner was set. This could happen for one of the following reasons:\n1.
You may be adding a ref to a function component\n2. You may be adding a ref to a
component that was not created inside a component's render method\n3. You have
multiple copies of React loaded\nSee https://reactjs.org/link/refs-must-have-owner for
more information.")
}
return r
}
function Qh(e, t) {
var n = Object.prototype.toString.call(t);
throw new Error("Objects are not valid as a React child (found: "
+ ("[object Object]" === n ? "object with keys {" + Object.keys(t).join(", ") + "}" : n) + "). If
you meant to render a collection of children, use an array instead.")
}
function Zh(e) {
var t = ft(e) || "Component";
Fh[t] || (Fh[t] = !0,
o("Functions are not valid as a React child. This may happen if
you return a Component instead of <Component /> from render. Or maybe you meant to
call this function rather than return it."))
}
function Gh(e) {
var t = e._payload;
return (0,
e._init)(t)
}
function Xh(e) {
function t(t, n) {
if (e) {
var r = t.deletions;
null === r ? (t.deletions = [n],
t.flags |= qr) : r.push(n)
}
}
function n(n, r) {
if (!e)
return null;
for (var i = r; null !== i; )
t(n, i),
i = i.sibling;
return null
}
function r(e, t) {
for (var n = new Map, r = t; null !== r; )
null !== r.key ? n.set(r.key, r) : n.set(r.index, r),
r = r.sibling;
return n
}
function i(e, t) {
var n = lw(e, t);
return n.index = 0,
n.sibling = null,
n
}
function a(t, n, r) {
if (t.index = r,
!e)
return t.flags |= oi,
n;
var i = t.alternate;
if (null !== i) {
var o = i.index;
return o < n ? (t.flags |= Ur,
n) : o
}
return t.flags |= Ur,
n
}
function s(t) {
return e && null === t.alternate && (t.flags |= Ur),
t
}
function u(e, t, n, r) {
if (null === t || t.tag !== h) {
var o = mw(n, e.mode, r);
return o.return = e,
o
}
var a = i(t, n);
return a.return = e,
a
}
function l(e, t, n, r) {
var o = n.type;
if (o === xe)
return f(e, t, n.props.children, r, n.key);
if (null !== t && (t.elementType === o || GA(t, n) || "object"
== typeof o && null !== o && o.$$typeof === Be && Gh(o) === t.type)) {
var a = i(t, n.props);
return a.ref = Yh(e, t, n),
a.return = e,
a._debugSource = n._source,
a._debugOwner = n._owner,
a
}
var s = fw(n, e.mode, r);
return s.ref = Yh(e, t, n),
s.return = e,
s
}
function c(e, t, n, r) {
if (null === t || t.tag !== d || t.stateNode.containerInfo !==
n.containerInfo || t.stateNode.implementation !== n.implementation) {
var o = gw(n, e.mode, r);
return o.return = e,
o
}
var a = i(t, n.children || []);
return a.return = e,
a
}
function f(e, t, n, r, o) {
if (null === t || t.tag !== p) {
var a = hw(n, e.mode, r, o);
return a.return = e,
a
}
var s = i(t, n);
return s.return = e,
s
}
function m(e, t, n) {
if ("string" == typeof t && "" !== t || "number" == typeof t) {
var r = mw("" + t, e.mode, n);
return r.return = e,
r
}
if ("object" == typeof t && null !== t) {
switch (t.$$typeof) {
case Me:
var i = fw(t, e.mode, n);
return i.ref = Yh(e, null, t),
i.return = e,
i;
case Ce:
var o = gw(t, e.mode, n);
return o.return = e,
o;
case Be:
var a = t._payload;
return m(e, (0,
t._init)(a), n)
}
if (Yt(t) || Ue(t)) {
var s = hw(t, e.mode, n, null);
return s.return = e,
s
}
Qh(0, t)
}
return "function" == typeof t && Zh(e),
null
}
function g(e, t, n, r) {
var i = null !== t ? t.key : null;
if ("string" == typeof n && "" !== n || "number" == typeof n)
return null !== i ? null : u(e, t, "" + n, r);
if ("object" == typeof n && null !== n) {
switch (n.$$typeof) {
case Me:
return n.key === i ? l(e, t, n, r) : null;
case Ce:
return n.key === i ? c(e, t, n, r) : null;
case Be:
var o = n._payload;
return g(e, t, (0,
n._init)(o), r)
}
if (Yt(n) || Ue(n))
return null !== i ? null : f(e, t, n, r, null);
Qh(0, n)
}
return "function" == typeof n && Zh(e),
null
}
function v(e, t, n, r, i) {
if ("string" == typeof r && "" !== r || "number" == typeof r)
return u(t, e.get(n) || null, "" + r, i);
if ("object" == typeof r && null !== r) {
switch (r.$$typeof) {
case Me:
return l(t, e.get(null === r.key ? n : r.key) || null, r, i);
case Ce:
return c(t, e.get(null === r.key ? n : r.key) || null, r, i);
case Be:
var o = r._payload;
return v(e, t, n, (0,
r._init)(o), i)
}
if (Yt(r) || Ue(r))
return f(t, e.get(n) || null, r, i, null);
Qh(0, r)
}
return "function" == typeof r && Zh(t),
null
}
function b(e, t, n) {
if ("object" != typeof e || null === e)
return t;
switch (e.$$typeof) {
case Me:
case Ce:
Uh(e, n);
var r = e.key;
if ("string" != typeof r)
break;
if (null === t) {
(t = new Set).add(r);
break
}
if (!t.has(r)) {
t.add(r);
break
}
o("Encountered two children with the same key, `%s`.
Keys should be unique so that components maintain their identity across updates. Non-
unique keys may cause children to be duplicated and/or omitted \u2014 the behavior is
unsupported and could change in a future version.", r);
break;
case Be:
var i = e._payload;
b((0,
e._init)(i), t, n)
}
return t
}
return function u(l, c, f, y) {
if ("object" == typeof f && null !== f && f.type === xe && null
=== f.key && (f = f.props.children),
"object" == typeof f && null !== f) {
switch (f.$$typeof) {
case Me:
return s(function(e, r, o, a) {
for (var s = o.key, u = r; null !== u; ) {
if (u.key === s) {
var l = o.type;
if (l === xe) {
if (u.tag === p) {
n(e, u.sibling);
var c = i(u, o.props.children);
return c.return = e,
c._debugSource = o._source,
c._debugOwner = o._owner,
c
}
} else if (u.elementType === l || GA(u,
o) || "object" == typeof l && null !== l && l.$$typeof === Be && Gh(l) === u.type) {
n(e, u.sibling);
var d = i(u, o.props);
return d.ref = Yh(e, u, o),
d.return = e,
d._debugSource = o._source,
d._debugOwner = o._owner,
d
}
n(e, u);
break
}
t(e, u),
u = u.sibling
}
if (o.type === xe) {
var f = hw(o.props.children, e.mode, a,
o.key);
return f.return = e,
f
}
var h = fw(o, e.mode, a);
return h.ref = Yh(e, r, o),
h.return = e,
h
}(l, c, f, y));
case Ce:
return s(function(e, r, o, a) {
for (var s = o.key, u = r; null !== u; ) {
if (u.key === s) {
if (u.tag === d &&
u.stateNode.containerInfo === o.containerInfo && u.stateNode.implementation ===
o.implementation) {
n(e, u.sibling);
var l = i(u, o.children || []);
return l.return = e,
l
}
n(e, u);
break
}
t(e, u),
u = u.sibling
}
var c = gw(o, e.mode, a);
return c.return = e,
c
}(l, c, f, y));
case Be:
var A = f._payload;
return u(l, c, (0,
f._init)(A), y)
}
if (Yt(f))
return function(i, o, s, u) {
for (var l = null, c = 0; c < s.length; c++)
l = b(s[c], l, i);
for (var d = null, f = null, h = o, p = 0, y = 0, A =
null; null !== h && y < s.length; y++) {
h.index > y ? (A = h,
h = null) : A = h.sibling;
var w = g(i, h, s[y], u);
if (null === w) {
null === h && (h = A);
break
}
e && h && null === w.alternate && t(i, h),
p = a(w, p, y),
null === f ? d = w : f.sibling = w,
f = w,
h=A
}
if (y === s.length)
return n(i, h),
Af() && Kd(i, y),
d;
if (null === h) {
for (; y < s.length; y++) {
var _ = m(i, s[y], u);
null !== _ && (p = a(_, p, y),
null === f ? d = _ : f.sibling = _,
f = _)
}
return Af() && Kd(i, y),
d
}
for (var E = r(0, h); y < s.length; y++) {
var S = v(E, i, y, s[y], u);
null !== S && (e && null !== S.alternate &&
E.delete(null === S.key ? y : S.key),
p = a(S, p, y),
null === f ? d = S : f.sibling = S,
f = S)
}
return e && E.forEach((function(e) {
return t(i, e)
}
)),
Af() && Kd(i, y),
d
}(l, c, f, y);
if (Ue(f))
return function(i, s, u, l) {
var c = Ue(u);
if ("function" != typeof c)
throw new Error("An object is not an
iterable. This error is likely caused by a bug in React. Please file an issue.");
"function" == typeof Symbol && "Generator"
=== u[Symbol.toStringTag] && (Bh || o("Using Generators as children is unsupported
and will likely yield unexpected results because enumerating a generator mutates it. You
may convert it to an array with `Array.from()` or the `[...spread]` operator before
rendering. Keep in mind you might need to polyfill these features for older browsers."),
Bh = !0),
u.entries === c && (Dh || o("Using Maps as
children is not supported. Use an array of keyed ReactElements instead."),
Dh = !0);
var d = c.call(u);
if (d)
for (var f = null, h = d.next(); !h.done; h =
d.next())
f = b(h.value, f, i);
var p = c.call(u);
if (null == p)
throw new Error("An iterable object
provided no iterator.");
for (var y = null, A = null, w = s, _ = 0, E = 0, S =
null, k = p.next(); null !== w && !k.done; E++,
k = p.next()) {
w.index > E ? (S = w,
w = null) : S = w.sibling;
var M = g(i, w, k.value, l);
if (null === M) {
null === w && (w = S);
break
}
e && w && null === M.alternate && t(i, w),
_ = a(M, _, E),
null === A ? y = M : A.sibling = M,
A = M,
w=S
}
if (k.done)
return n(i, w),
Af() && Kd(i, E),
y;
if (null === w) {
for (; !k.done; E++,
k = p.next()) {
var C = m(i, k.value, l);
null !== C && (_ = a(C, _, E),
null === A ? y = C : A.sibling = C,
A = C)
}
return Af() && Kd(i, E),
y
}
for (var x = r(0, w); !k.done; E++,
k = p.next()) {
var R = v(x, i, E, k.value, l);
null !== R && (e && null !== R.alternate &&
x.delete(null === R.key ? E : R.key),
_ = a(R, _, E),
null === A ? y = R : A.sibling = R,
A = R)
}
return e && x.forEach((function(e) {
return t(i, e)
}
)),
Af() && Kd(i, E),
y
}(l, c, f, y);
Qh(0, f)
}
return "string" == typeof f && "" !== f || "number" == typeof
f ? s(function(e, t, r, o) {
if (null !== t && t.tag === h) {
n(e, t.sibling);
var a = i(t, r);
return a.return = e,
a
}
n(e, t);
var s = mw(r, e.mode, o);
return s.return = e,
s
}(l, c, "" + f, y)) : ("function" == typeof f && Zh(l),
n(l, c))
}
}
Dh = !1,
Bh = !1,
jh = {},
zh = {},
Fh = {},
Uh = function(e, t) {
if (null !== e && "object" == typeof e && e._store && !
e._store.validated && null == e.key) {
if ("object" != typeof e._store)
throw new Error("React Component in
warnForMissingKey should have a _store. This error is likely caused by a bug in React.
Please file an issue.");
e._store.validated = !0;
var n = ft(t) || "Component";
zh[n] || (zh[n] = !0,
o('Each child in a list should have a unique "key" prop. See
https://reactjs.org/link/warning-keys for more information.'))
}
}
;
var Jh = Xh(!0)
, ep = Xh(!1);
function tp(e, t) {
for (var n = e.child; null !== n; )
cw(n, t),
n = n.sibling
}
var np = {}
, rp = od(np)
, ip = od(np)
, op = od(np);
function ap(e) {
if (e === np)
throw new Error("Expected host context to exist. This error
is likely caused by a bug in React. Please file an issue.");
return e
}
function sp() {
return ap(op.current)
}
function up(e, t) {
sd(op, t, e),
sd(ip, e, e),
sd(rp, np, e);
var n = function(e) {
var t, n, r = e.nodeType;
switch (r) {
case vn:
case bn:
t = r === vn ? "#document" : "#fragment";
var i = e.documentElement;
n = i ? i.namespaceURI : cn(null, "");
break;
default:
var o = r === gn ? e.parentNode : e;
n = cn(o.namespaceURI || null, t = o.tagName)
}
var a = t.toLowerCase();
return {
namespace: n,
ancestorInfo: Jl(null, a)
}
}(t);
ad(rp, e),
sd(rp, n, e)
}
function lp(e) {
ad(rp, e),
ad(ip, e),
ad(op, e)
}
function cp() {
return ap(rp.current)
}
function dp(e) {
ap(op.current);
var t, n, r, i = ap(rp.current), o = (t = i,
n = e.type,
{
namespace: cn((r = t).namespace, n),
ancestorInfo: Jl(r.ancestorInfo, n)
});
i !== o && (sd(ip, e, e),
sd(rp, o, e))
}
function fp(e) {
ip.current === e && (ad(rp, e),
ad(ip, e))
}
var hp = 1
, pp = 1
, mp = 2
, gp = od(0);
function vp(e, t) {
return 0 != (e & t)
}
function bp(e) {
return e & hp
}
function yp(e, t) {
return e & hp | t
}
function Ap(e, t) {
sd(gp, t, e)
}
function wp(e) {
ad(gp, e)
}
function _p(e, t) {
var n = e.memoizedState;
return null !== n ? null !== n.dehydrated : (e.memoizedProps,
!0)
}
function Ep(e) {
for (var t = e; null !== t; ) {
if (t.tag === A) {
var n = t.memoizedState;
if (null !== n) {
var r = n.dehydrated;
if (null === r || Rc(r) || Tc(r))
return t
}
} else if (t.tag === M && void 0 !==
t.memoizedProps.revealOrder) {
if ((t.flags & Wr) !== zr)
return t
} else if (null !== t.child) {
t.child.return = t,
t = t.child;
continue
}
if (t === e)
return null;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return null;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
return null
}
var Sp = 0
, kp = 1
, Mp = 2
, Cp = 4
, xp = 8
, Rp = [];
function Tp() {
for (var e = 0; e < Rp.length; e++)
Rp[e]._workInProgressVersionPrimary = null;
Rp.length = 0
}
function Ip(e, t) {
var n = (0,
t._getVersion)(t._source);
null == e.mutableSourceEagerHydrationData ?
e.mutableSourceEagerHydrationData = [t, n] :
e.mutableSourceEagerHydrationData.push(t, n)
}
var Pp, Lp, Op = n.ReactCurrentDispatcher, Np =
n.ReactCurrentBatchConfig;
Pp = new Set;
var Dp = po
, Bp = null
, jp = null
, zp = null
, Fp = !1
, Up = !1
, Kp = 0
, qp = 0
, Hp = 25
, Vp = null
, Wp = null
, $p = -1
, Yp = !1;
function Qp() {
var e = Vp;
null === Wp ? Wp = [e] : Wp.push(e)
}
function Zp() {
var e = Vp;
null !== Wp && ($p++,
Wp[$p] !== e && function(e) {
var t = ft(Bp);
if (!Pp.has(t) && (Pp.add(t),
null !== Wp)) {
for (var n = "", r = 30, i = 0; i <= $p; i++) {
for (var a = Wp[i], s = i === $p ? e : a, u = i + 1 + ". "
+ a; u.length < r; )
u += " ";
n += u += s + "\n"
}
o("React has detected a change in the order of Hooks
called by %s. This will lead to bugs and errors if not fixed. For more information, read
the Rules of Hooks: https://reactjs.org/link/rules-of-hooks\n\n Previous render
Next render\n ------------------------------------------------------\n%s
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n", t, n)
}
}(e))
}
function Gp(e) {
null == e || Yt(e) || o("%s received a final argument that is not an
array (instead, received `%s`). When specified, the final argument must be an array.",
Vp, typeof e)
}
function Xp() {
throw new Error("Invalid hook call. Hooks can only be called
inside of the body of a function component. This could happen for one of the following
reasons:\n1. You might have mismatching versions of React and the renderer (such as
React DOM)\n2. You might be breaking the Rules of Hooks\n3. You might have more
than one copy of React in the same app\nSee https://reactjs.org/link/invalid-hook-call for
tips about how to debug and fix this problem.")
}
function Jp(e, t) {
if (Yp)
return !1;
if (null === t)
return o("%s received a final argument during this render,
but not during the previous render. Even though the final argument is optional, its type
cannot change between renders.", Vp),
!1;
e.length !== t.length && o("The final argument passed to %s
changed size between renders. The order and size of this array must remain constant.\
n\nPrevious: %s\nIncoming: %s", Vp, "[" + t.join(", ") + "]", "[" + e.join(", ") + "]");
for (var n = 0; n < t.length && n < e.length; n++)
if (!Cu(e[n], t[n]))
return !1;
return !0
}
function em(e, t, n, r, i, a) {
Dp = a,
Bp = t,
Wp = null !== e ? e._debugHookTypes : null,
$p = -1,
Yp = null !== e && e.type !== t.type,
t.memoizedState = null,
t.updateQueue = null,
t.lanes = po,
null !== e && null !== e.memoizedState ? Op.current = ag :
Op.current = null !== Wp ? og : ig;
var s = n(r, i);
if (Up) {
var u = 0;
do {
if (Up = !1,
Kp = 0,
u >= Hp)
throw new Error("Too many re-renders. React limits
the number of renders to prevent an infinite loop.");
u += 1,
Yp = !1,
jp = null,
zp = null,
t.updateQueue = null,
$p = -1,
Op.current = sg,
s = n(r, i)
} while (Up)
}
Op.current = rg,
t._debugHookTypes = Wp;
var l = null !== jp && null !== jp.next;
if (Dp = po,
Bp = null,
jp = null,
zp = null,
Vp = null,
Wp = null,
$p = -1,
null !== e && (e.flags & mi) != (t.flags & mi) && (e.mode & oo) !
== io && o("Internal React error: Expected static flag was missing. Please notify the
React team."),
Fp = !1,
l)
throw new Error("Rendered fewer hooks than expected.
This may be caused by an accidental early return statement.");
return s
}
function tm() {
var e = 0 !== Kp;
return Kp = 0,
e
}
function nm(e, t, n) {
t.updateQueue = e.updateQueue,
(t.mode & uo) !== io ? t.flags &= ~(ci | li | Zr | Kr) : t.flags &=
~(Zr | Kr),
e.lanes = va(e.lanes, n)
}
function rm() {
if (Op.current = rg,
Fp) {
for (var e = Bp.memoizedState; null !== e; ) {
var t = e.queue;
null !== t && (t.pending = null),
e = e.next
}
Fp = !1
}
Dp = po,
Bp = null,
jp = null,
zp = null,
Wp = null,
$p = -1,
Vp = null,
Ym = !1,
Up = !1,
Kp = 0
}
function im() {
var e = {
memoizedState: null,
baseState: null,
baseQueue: null,
queue: null,
next: null
};
return null === zp ? Bp.memoizedState = zp = e : zp = zp.next
= e,
zp
}
function om() {
var e, t;
if (null === jp) {
var n = Bp.alternate;
e = null !== n ? n.memoizedState : null
} else
e = jp.next;
if (null !== (t = null === zp ? Bp.memoizedState : zp.next))
t = (zp = t).next,
jp = e;
else {
if (null === e)
throw new Error("Rendered more hooks than during the
previous render.");
var r = {
memoizedState: (jp = e).memoizedState,
baseState: jp.baseState,
baseQueue: jp.baseQueue,
queue: jp.queue,
next: null
};
null === zp ? Bp.memoizedState = zp = r : zp = zp.next = r
}
return zp
}
function am(e, t) {
return "function" == typeof t ? t(e) : t
}
function sm(e, t, n) {
var r, i = im();
r = void 0 !== n ? n(t) : t,
i.memoizedState = i.baseState = r;
var o = {
pending: null,
interleaved: null,
lanes: po,
dispatch: null,
lastRenderedReducer: e,
lastRenderedState: r
};
i.queue = o;
var a = o.dispatch = Gm.bind(null, Bp, o);
return [i.memoizedState, a]
}
function um(e, t, n) {
var r = om()
, i = r.queue;
if (null === i)
throw new Error("Should have a queue. This is likely a bug
in React. Please file an issue.");
i.lastRenderedReducer = e;
var a = jp
, s = a.baseQueue
, u = i.pending;
if (null !== u) {
if (null !== s) {
var l = s.next
, c = u.next;
s.next = c,
u.next = l
}
a.baseQueue !== s && o("Internal error: Expected work-in-
progress queue to be a clone. This is a bug in React."),
a.baseQueue = s = u,
i.pending = null
}
if (null !== s) {
var d = s.next
, f = a.baseState
, h = null
, p = null
, m = null
, g = d;
do {
var v = g.lane;
if (ma(Dp, v)) {
if (null !== m) {
var b = {
lane: mo,
action: g.action,
hasEagerState: g.hasEagerState,
eagerState: g.eagerState,
next: null
};
m = m.next = b
}
f = g.hasEagerState ? g.eagerState : e(f, g.action)
} else {
var y = {
lane: v,
action: g.action,
hasEagerState: g.hasEagerState,
eagerState: g.eagerState,
next: null
};
null === m ? (p = m = y,
h = f) : m = m.next = y,
Bp.lanes = ga(Bp.lanes, v),
mA(v)
}
g = g.next
} while (null !== g && g !== d);
null === m ? h = f : m.next = p,
Cu(f, r.memoizedState) || Cv(),
r.memoizedState = f,
r.baseState = h,
r.baseQueue = m,
i.lastRenderedState = f
}
var A = i.interleaved;
if (null !== A) {
var w = A;
do {
var _ = w.lane;
Bp.lanes = ga(Bp.lanes, _),
mA(_),
w = w.next
} while (w !== A)
} else
null === s && (i.lanes = po);
var E = i.dispatch;
return [r.memoizedState, E]
}
function lm(e, t, n) {
var r = om()
, i = r.queue;
if (null === i)
throw new Error("Should have a queue. This is likely a bug
in React. Please file an issue.");
i.lastRenderedReducer = e;
var o = i.dispatch
, a = i.pending
, s = r.memoizedState;
if (null !== a) {
i.pending = null;
var u = a.next
, l = u;
do {
s = e(s, l.action),
l = l.next
} while (l !== u);
Cu(s, r.memoizedState) || Cv(),
r.memoizedState = s,
null === r.baseQueue && (r.baseState = s),
i.lastRenderedState = s
}
return [s, o]
}
function cm(e, t, n) {
var r, i = Bp, a = im();
if (Af()) {
if (void 0 === n)
throw new Error("Missing getServerSnapshot, which is
required for server-rendered content. Will revert to client rendering.");
r = n(),
Lp || r !== n() && (o("The result of getServerSnapshot
should be cached to avoid an infinite loop"),
Lp = !0)
} else {
if (r = t(),
!Lp) {
var s = t();
Cu(r, s) || (o("The result of getSnapshot should be
cached to avoid an infinite loop"),
Lp = !0)
}
if (null === Qy())
throw new Error("Expected a work-in-progress root.
This is a bug in React. Please file an issue.");
sa(0, Dp) || fm(i, t, r)
}
a.memoizedState = r;
var u = {
value: r,
getSnapshot: t
};
return a.queue = u,
km(pm.bind(null, i, u, e), [e]),
i.flags |= Zr,
Am(kp | xp, hm.bind(null, i, u, r, t), void 0, null),
r
}
function dm(e, t, n) {
var r = Bp
, i = om()
, a = t();
if (!Lp) {
var s = t();
Cu(a, s) || (o("The result of getSnapshot should be cached
to avoid an infinite loop"),
Lp = !0)
}
var u = i.memoizedState
, l = !Cu(u, a);
l && (i.memoizedState = a,
Cv());
var c = i.queue;
if (Mm(pm.bind(null, r, c, e), [e]),
c.getSnapshot !== t || l || null !== zp && zp.memoizedState.tag
& kp) {
if (r.flags |= Zr,
Am(kp | xp, hm.bind(null, r, c, a, t), void 0, null),
null === Qy())
throw new Error("Expected a work-in-progress root.
This is a bug in React. Please file an issue.");
sa(0, Dp) || fm(r, t, a)
}
return a
}
function fm(e, t, n) {
e.flags |= Jr;
var r = {
getSnapshot: t,
value: n
}
, i = Bp.updateQueue;
if (null === i)
i={
lastEffect: null,
stores: null
},
Bp.updateQueue = i,
i.stores = [r];
else {
var o = i.stores;
null === o ? i.stores = [r] : o.push(r)
}
}
function hm(e, t, n, r) {
t.value = n,
t.getSnapshot = r,
mm(t) && gm(e)
}
function pm(e, t, n) {
return n((function() {
mm(t) && gm(e)
}
))
}
function mm(e) {
var t = e.getSnapshot
, n = e.value;
try {
var r = t();
return !Cu(n, r)
} catch (e) {
return !0
}
}
function gm(e) {
var t = eh(e, go);
null !== t && Jy(t, e, go, Xo)
}
function vm(e) {
var t = im();
"function" == typeof e && (e = e()),
t.memoizedState = t.baseState = e;
var n = {
pending: null,
interleaved: null,
lanes: po,
dispatch: null,
lastRenderedReducer: am,
lastRenderedState: e
};
t.queue = n;
var r = n.dispatch = Xm.bind(null, Bp, n);
return [t.memoizedState, r]
}
function bm(e) {
return um(am)
}
function ym(e) {
return lm(am)
}
function Am(e, t, n, r) {
var i = {
tag: e,
create: t,
destroy: n,
deps: r,
next: null
}
, o = Bp.updateQueue;
if (null === o)
o={
lastEffect: null,
stores: null
},
Bp.updateQueue = o,
o.lastEffect = i.next = i;
else {
var a = o.lastEffect;
if (null === a)
o.lastEffect = i.next = i;
else {
var s = a.next;
a.next = i,
i.next = s,
o.lastEffect = i
}
}
return i
}
function wm(e) {
var t = {
current: e
};
return im().memoizedState = t,
t
}
function _m(e) {
return om().memoizedState
}
function Em(e, t, n, r) {
var i = im()
, o = void 0 === r ? null : r;
Bp.flags |= e,
i.memoizedState = Am(kp | t, n, void 0, o)
}
function Sm(e, t, n, r) {
var i = om()
, o = void 0 === r ? null : r
, a = void 0;
if (null !== jp) {
var s = jp.memoizedState;
if (a = s.destroy,
null !== o && Jp(o, s.deps))
return void (i.memoizedState = Am(t, n, a, o))
}
Bp.flags |= e,
i.memoizedState = Am(kp | t, n, a, o)
}
function km(e, t) {
return (Bp.mode & uo) !== io ? Em(ci | Zr | ui, xp, e, t) : Em(Zr |
ui, xp, e, t)
}
function Mm(e, t) {
return Sm(Zr, xp, e, t)
}
function Cm(e, t) {
return Em(Kr, Mp, e, t)
}
function xm(e, t) {
return Sm(Kr, Mp, e, t)
}
function Rm(e, t) {
var n = Kr;
return n |= si,
(Bp.mode & uo) !== io && (n |= li),
Em(n, Cp, e, t)
}
function Tm(e, t) {
return Sm(Kr, Cp, e, t)
}
function Im(e, t) {
if ("function" == typeof t) {
var n = t
, r = e();
return n(r),
function() {
n(null)
}
}
if (null != t) {
var i = t;
i.hasOwnProperty("current") || o("Expected
useImperativeHandle() first argument to either be a ref callback or React.createRef()
object. Instead received: %s.", "an object with keys {" + Object.keys(i).join(", ") + "}");
var a = e();
return i.current = a,
function() {
i.current = null
}
}
}
function Pm(e, t, n) {
"function" != typeof t && o("Expected useImperativeHandle()
second argument to be a function that creates a handle. Instead received: %s.", null !==
t ? typeof t : "null");
var r = null != n ? n.concat([e]) : null
, i = Kr;
return i |= si,
(Bp.mode & uo) !== io && (i |= li),
Em(i, Cp, Im.bind(null, t, e), r)
}
function Lm(e, t, n) {
"function" != typeof t && o("Expected useImperativeHandle()
second argument to be a function that creates a handle. Instead received: %s.", null !==
t ? typeof t : "null");
var r = null != n ? n.concat([e]) : null;
return Sm(Kr, Cp, Im.bind(null, t, e), r)
}
function Om(e, t) {}
var Nm = Om;
function Dm(e, t) {
var n = void 0 === t ? null : t;
return im().memoizedState = [e, n],
e
}
function Bm(e, t) {
var n = om()
, r = void 0 === t ? null : t
, i = n.memoizedState;
return null !== i && null !== r && Jp(r, i[1]) ? i[0] :
(n.memoizedState = [e, r],
e)
}
function jm(e, t) {
var n = im()
, r = void 0 === t ? null : t
, i = e();
return n.memoizedState = [i, r],
i
}
function zm(e, t) {
var n = om()
, r = void 0 === t ? null : t
, i = n.memoizedState;
if (null !== i && null !== r && Jp(r, i[1]))
return i[0];
var o = e();
return n.memoizedState = [o, r],
o
}
function Fm(e) {
return im().memoizedState = e,
e
}
function Um(e) {
return qm(om(), jp.memoizedState, e)
}
function Km(e) {
var t = om();
return null === jp ? (t.memoizedState = e,
e) : qm(t, jp.memoizedState, e)
}
function qm(e, t, n) {
if ((Dp & (go | bo | Ao)) !== po) {
if (!Cu(n, t)) {
var r = la();
Bp.lanes = ga(Bp.lanes, r),
mA(r),
e.baseState = !0
}
return t
}
return e.baseState && (e.baseState = !1,
Cv()),
e.memoizedState = n,
n
}
function Hm(e, t, n) {
var r = Na();
Da(function(e, t) {
return 0 !== e && e < t ? e : t
}(r, Ia)),
e(!0);
var o = Np.transition;
Np.transition = {};
var a = Np.transition;
Np.transition._updatedFibers = new Set;
try {
e(!1),
t()
} finally {
Da(r),
Np.transition = o,
null === o && a._updatedFibers && (a._updatedFibers.size
> 10 && i("Detected a large number of updates inside startTransition. If this is due to a
subscription please re-write it to use React provided hooks. Otherwise concurrent mode
guarantees are off the table."),
a._updatedFibers.clear())
}
}
function Vm() {
var e = vm(!1)
, t = e[0]
, n = e[1]
, r = Hm.bind(null, n);
return im().memoizedState = r,
[t, r]
}
function Wm() {
return [bm()[0], om().memoizedState]
}
function $m() {
return [ym()[0], om().memoizedState]
}
var Ym = !1;
function Qm() {
var e, t = im(), n = Qy().identifierPrefix;
if (Af()) {
e = ":" + n + "R" + Ud();
var r = Kp++;
r > 0 && (e += "H" + r.toString(32)),
e += ":"
} else
e = ":" + n + "r" + (qp++).toString(32) + ":";
return t.memoizedState = e,
e
}
function Zm() {
return om().memoizedState
}
function Gm(e, t, n) {
"function" == typeof arguments[3] && o("State updates from the
useState() and useReducer() Hooks don't support the second callback argument. To
execute a side effect after rendering, declare it in the component body with
useEffect().");
var r = Gy(e)
,i={
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
};
if (Jm(e))
eg(t, i);
else {
var a = Jf(e, t, i, r);
null !== a && (Jy(a, e, r, Zy()),
tg(a, t, r))
}
ng(e, r)
}
function Xm(e, t, n) {
"function" == typeof arguments[3] && o("State updates from the
useState() and useReducer() Hooks don't support the second callback argument. To
execute a side effect after rendering, declare it in the component body with
useEffect().");
var r = Gy(e)
,i={
lane: r,
action: n,
hasEagerState: !1,
eagerState: null,
next: null
};
if (Jm(e))
eg(t, i);
else {
var a = e.alternate;
if (e.lanes === po && (null === a || a.lanes === po)) {
var s = t.lastRenderedReducer;
if (null !== s) {
var u;
u = Op.current,
Op.current = lg;
try {
var l = t.lastRenderedState
, c = s(l, n);
if (i.hasEagerState = !0,
i.eagerState = c,
Cu(c, l))
return void function(e, t, n, r) {
var i = t.interleaved;
null === i ? (n.next = n,
Xf(t)) : (n.next = i.next,
i.next = n),
t.interleaved = n
}(0, t, i)
} catch (e) {} finally {
Op.current = u
}
}
}
var d = Jf(e, t, i, r);
null !== d && (Jy(d, e, r, Zy()),
tg(d, t, r))
}
ng(e, r)
}
function Jm(e) {
var t = e.alternate;
return e === Bp || null !== t && t === Bp
}
function eg(e, t) {
Up = Fp = !0;
var n = e.pending;
null === n ? t.next = t : (t.next = n.next,
n.next = t),
e.pending = t
}
function tg(e, t, n) {
if (ua(n)) {
var r = t.lanes
, i = ga(r = ba(r, e.pendingLanes), n);
t.lanes = i,
_a(e, i)
}
}
function ng(e, t, n) {
ro(e, t)
}
var rg = {
readContext: Zf,
useCallback: Xp,
useContext: Xp,
useEffect: Xp,
useImperativeHandle: Xp,
useInsertionEffect: Xp,
useLayoutEffect: Xp,
useMemo: Xp,
useReducer: Xp,
useRef: Xp,
useState: Xp,
useDebugValue: Xp,
useDeferredValue: Xp,
useTransition: Xp,
useMutableSource: Xp,
useSyncExternalStore: Xp,
useId: Xp,
unstable_isNewReconciler: L
}
, ig = null
, og = null
, ag = null
, sg = null
, ug = null
, lg = null
, cg = null
, dg = function() {
o("Context can only be read while React is rendering. In
classes, you can read it in the render method or getDerivedStateFromProps. In function
components, you can read it directly in the function body, but not inside Hooks like
useReducer() or useMemo().")
}
, fg = function() {
o("Do not call Hooks inside useEffect(...), useMemo(...), or
other built-in Hooks. You can only call Hooks at the top level of your React function. For
more information, see https://reactjs.org/link/rules-of-hooks")
};
ig = {
readContext: function(e) {
return Zf(e)
},
useCallback: function(e, t) {
return Vp = "useCallback",
Qp(),
Gp(t),
Dm(e, t)
},
useContext: function(e) {
return Vp = "useContext",
Qp(),
Zf(e)
},
useEffect: function(e, t) {
return Vp = "useEffect",
Qp(),
Gp(t),
km(e, t)
},
useImperativeHandle: function(e, t, n) {
return Vp = "useImperativeHandle",
Qp(),
Gp(n),
Pm(e, t, n)
},
useInsertionEffect: function(e, t) {
return Vp = "useInsertionEffect",
Qp(),
Gp(t),
Cm(e, t)
},
useLayoutEffect: function(e, t) {
return Vp = "useLayoutEffect",
Qp(),
Gp(t),
Rm(e, t)
},
useMemo: function(e, t) {
Vp = "useMemo",
Qp(),
Gp(t);
var n = Op.current;
Op.current = ug;
try {
return jm(e, t)
} finally {
Op.current = n
}
},
useReducer: function(e, t, n) {
Vp = "useReducer",
Qp();
var r = Op.current;
Op.current = ug;
try {
return sm(e, t, n)
} finally {
Op.current = r
}
},
useRef: function(e) {
return Vp = "useRef",
Qp(),
wm(e)
},
useState: function(e) {
Vp = "useState",
Qp();
var t = Op.current;
Op.current = ug;
try {
return vm(e)
} finally {
Op.current = t
}
},
useDebugValue: function(e, t) {
Vp = "useDebugValue",
Qp()
},
useDeferredValue: function(e) {
return Vp = "useDeferredValue",
Qp(),
Fm(e)
},
useTransition: function() {
return Vp = "useTransition",
Qp(),
Vm()
},
useMutableSource: function(e, t, n) {
Vp = "useMutableSource",
Qp()
},
useSyncExternalStore: function(e, t, n) {
return Vp = "useSyncExternalStore",
Qp(),
cm(e, t, n)
},
useId: function() {
return Vp = "useId",
Qp(),
Qm()
},
unstable_isNewReconciler: L
},
og = {
readContext: function(e) {
return Zf(e)
},
useCallback: function(e, t) {
return Vp = "useCallback",
Zp(),
Dm(e, t)
},
useContext: function(e) {
return Vp = "useContext",
Zp(),
Zf(e)
},
useEffect: function(e, t) {
return Vp = "useEffect",
Zp(),
km(e, t)
},
useImperativeHandle: function(e, t, n) {
return Vp = "useImperativeHandle",
Zp(),
Pm(e, t, n)
},
useInsertionEffect: function(e, t) {
return Vp = "useInsertionEffect",
Zp(),
Cm(e, t)
},
useLayoutEffect: function(e, t) {
return Vp = "useLayoutEffect",
Zp(),
Rm(e, t)
},
useMemo: function(e, t) {
Vp = "useMemo",
Zp();
var n = Op.current;
Op.current = ug;
try {
return jm(e, t)
} finally {
Op.current = n
}
},
useReducer: function(e, t, n) {
Vp = "useReducer",
Zp();
var r = Op.current;
Op.current = ug;
try {
return sm(e, t, n)
} finally {
Op.current = r
}
},
useRef: function(e) {
return Vp = "useRef",
Zp(),
wm(e)
},
useState: function(e) {
Vp = "useState",
Zp();
var t = Op.current;
Op.current = ug;
try {
return vm(e)
} finally {
Op.current = t
}
},
useDebugValue: function(e, t) {
Vp = "useDebugValue",
Zp()
},
useDeferredValue: function(e) {
return Vp = "useDeferredValue",
Zp(),
Fm(e)
},
useTransition: function() {
return Vp = "useTransition",
Zp(),
Vm()
},
useMutableSource: function(e, t, n) {
Vp = "useMutableSource",
Zp()
},
useSyncExternalStore: function(e, t, n) {
return Vp = "useSyncExternalStore",
Zp(),
cm(e, t, n)
},
useId: function() {
return Vp = "useId",
Zp(),
Qm()
},
unstable_isNewReconciler: L
},
ag = {
readContext: function(e) {
return Zf(e)
},
useCallback: function(e, t) {
return Vp = "useCallback",
Zp(),
Bm(e, t)
},
useContext: function(e) {
return Vp = "useContext",
Zp(),
Zf(e)
},
useEffect: function(e, t) {
return Vp = "useEffect",
Zp(),
Mm(e, t)
},
useImperativeHandle: function(e, t, n) {
return Vp = "useImperativeHandle",
Zp(),
Lm(e, t, n)
},
useInsertionEffect: function(e, t) {
return Vp = "useInsertionEffect",
Zp(),
xm(e, t)
},
useLayoutEffect: function(e, t) {
return Vp = "useLayoutEffect",
Zp(),
Tm(e, t)
},
useMemo: function(e, t) {
Vp = "useMemo",
Zp();
var n = Op.current;
Op.current = lg;
try {
return zm(e, t)
} finally {
Op.current = n
}
},
useReducer: function(e, t, n) {
Vp = "useReducer",
Zp();
var r = Op.current;
Op.current = lg;
try {
return um(e)
} finally {
Op.current = r
}
},
useRef: function(e) {
return Vp = "useRef",
Zp(),
_m()
},
useState: function(e) {
Vp = "useState",
Zp();
var t = Op.current;
Op.current = lg;
try {
return bm()
} finally {
Op.current = t
}
},
useDebugValue: function(e, t) {
return Vp = "useDebugValue",
Zp(),
Nm()
},
useDeferredValue: function(e) {
return Vp = "useDeferredValue",
Zp(),
Um(e)
},
useTransition: function() {
return Vp = "useTransition",
Zp(),
Wm()
},
useMutableSource: function(e, t, n) {
Vp = "useMutableSource",
Zp()
},
useSyncExternalStore: function(e, t, n) {
return Vp = "useSyncExternalStore",
Zp(),
dm(e, t)
},
useId: function() {
return Vp = "useId",
Zp(),
Zm()
},
unstable_isNewReconciler: L
},
sg = {
readContext: function(e) {
return Zf(e)
},
useCallback: function(e, t) {
return Vp = "useCallback",
Zp(),
Bm(e, t)
},
useContext: function(e) {
return Vp = "useContext",
Zp(),
Zf(e)
},
useEffect: function(e, t) {
return Vp = "useEffect",
Zp(),
Mm(e, t)
},
useImperativeHandle: function(e, t, n) {
return Vp = "useImperativeHandle",
Zp(),
Lm(e, t, n)
},
useInsertionEffect: function(e, t) {
return Vp = "useInsertionEffect",
Zp(),
xm(e, t)
},
useLayoutEffect: function(e, t) {
return Vp = "useLayoutEffect",
Zp(),
Tm(e, t)
},
useMemo: function(e, t) {
Vp = "useMemo",
Zp();
var n = Op.current;
Op.current = cg;
try {
return zm(e, t)
} finally {
Op.current = n
}
},
useReducer: function(e, t, n) {
Vp = "useReducer",
Zp();
var r = Op.current;
Op.current = cg;
try {
return lm(e)
} finally {
Op.current = r
}
},
useRef: function(e) {
return Vp = "useRef",
Zp(),
_m()
},
useState: function(e) {
Vp = "useState",
Zp();
var t = Op.current;
Op.current = cg;
try {
return ym()
} finally {
Op.current = t
}
},
useDebugValue: function(e, t) {
return Vp = "useDebugValue",
Zp(),
Nm()
},
useDeferredValue: function(e) {
return Vp = "useDeferredValue",
Zp(),
Km(e)
},
useTransition: function() {
return Vp = "useTransition",
Zp(),
$m()
},
useMutableSource: function(e, t, n) {
Vp = "useMutableSource",
Zp()
},
useSyncExternalStore: function(e, t, n) {
return Vp = "useSyncExternalStore",
Zp(),
dm(e, t)
},
useId: function() {
return Vp = "useId",
Zp(),
Zm()
},
unstable_isNewReconciler: L
},
ug = {
readContext: function(e) {
return dg(),
Zf(e)
},
useCallback: function(e, t) {
return Vp = "useCallback",
fg(),
Qp(),
Dm(e, t)
},
useContext: function(e) {
return Vp = "useContext",
fg(),
Qp(),
Zf(e)
},
useEffect: function(e, t) {
return Vp = "useEffect",
fg(),
Qp(),
km(e, t)
},
useImperativeHandle: function(e, t, n) {
return Vp = "useImperativeHandle",
fg(),
Qp(),
Pm(e, t, n)
},
useInsertionEffect: function(e, t) {
return Vp = "useInsertionEffect",
fg(),
Qp(),
Cm(e, t)
},
useLayoutEffect: function(e, t) {
return Vp = "useLayoutEffect",
fg(),
Qp(),
Rm(e, t)
},
useMemo: function(e, t) {
Vp = "useMemo",
fg(),
Qp();
var n = Op.current;
Op.current = ug;
try {
return jm(e, t)
} finally {
Op.current = n
}
},
useReducer: function(e, t, n) {
Vp = "useReducer",
fg(),
Qp();
var r = Op.current;
Op.current = ug;
try {
return sm(e, t, n)
} finally {
Op.current = r
}
},
useRef: function(e) {
return Vp = "useRef",
fg(),
Qp(),
wm(e)
},
useState: function(e) {
Vp = "useState",
fg(),
Qp();
var t = Op.current;
Op.current = ug;
try {
return vm(e)
} finally {
Op.current = t
}
},
useDebugValue: function(e, t) {
Vp = "useDebugValue",
fg(),
Qp()
},
useDeferredValue: function(e) {
return Vp = "useDeferredValue",
fg(),
Qp(),
Fm(e)
},
useTransition: function() {
return Vp = "useTransition",
fg(),
Qp(),
Vm()
},
useMutableSource: function(e, t, n) {
Vp = "useMutableSource",
fg(),
Qp()
},
useSyncExternalStore: function(e, t, n) {
return Vp = "useSyncExternalStore",
fg(),
Qp(),
cm(e, t, n)
},
useId: function() {
return Vp = "useId",
fg(),
Qp(),
Qm()
},
unstable_isNewReconciler: L
},
lg = {
readContext: function(e) {
return dg(),
Zf(e)
},
useCallback: function(e, t) {
return Vp = "useCallback",
fg(),
Zp(),
Bm(e, t)
},
useContext: function(e) {
return Vp = "useContext",
fg(),
Zp(),
Zf(e)
},
useEffect: function(e, t) {
return Vp = "useEffect",
fg(),
Zp(),
Mm(e, t)
},
useImperativeHandle: function(e, t, n) {
return Vp = "useImperativeHandle",
fg(),
Zp(),
Lm(e, t, n)
},
useInsertionEffect: function(e, t) {
return Vp = "useInsertionEffect",
fg(),
Zp(),
xm(e, t)
},
useLayoutEffect: function(e, t) {
return Vp = "useLayoutEffect",
fg(),
Zp(),
Tm(e, t)
},
useMemo: function(e, t) {
Vp = "useMemo",
fg(),
Zp();
var n = Op.current;
Op.current = lg;
try {
return zm(e, t)
} finally {
Op.current = n
}
},
useReducer: function(e, t, n) {
Vp = "useReducer",
fg(),
Zp();
var r = Op.current;
Op.current = lg;
try {
return um(e)
} finally {
Op.current = r
}
},
useRef: function(e) {
return Vp = "useRef",
fg(),
Zp(),
_m()
},
useState: function(e) {
Vp = "useState",
fg(),
Zp();
var t = Op.current;
Op.current = lg;
try {
return bm()
} finally {
Op.current = t
}
},
useDebugValue: function(e, t) {
return Vp = "useDebugValue",
fg(),
Zp(),
Nm()
},
useDeferredValue: function(e) {
return Vp = "useDeferredValue",
fg(),
Zp(),
Um(e)
},
useTransition: function() {
return Vp = "useTransition",
fg(),
Zp(),
Wm()
},
useMutableSource: function(e, t, n) {
Vp = "useMutableSource",
fg(),
Zp()
},
useSyncExternalStore: function(e, t, n) {
return Vp = "useSyncExternalStore",
fg(),
Zp(),
dm(e, t)
},
useId: function() {
return Vp = "useId",
fg(),
Zp(),
Zm()
},
unstable_isNewReconciler: L
},
cg = {
readContext: function(e) {
return dg(),
Zf(e)
},
useCallback: function(e, t) {
return Vp = "useCallback",
fg(),
Zp(),
Bm(e, t)
},
useContext: function(e) {
return Vp = "useContext",
fg(),
Zp(),
Zf(e)
},
useEffect: function(e, t) {
return Vp = "useEffect",
fg(),
Zp(),
Mm(e, t)
},
useImperativeHandle: function(e, t, n) {
return Vp = "useImperativeHandle",
fg(),
Zp(),
Lm(e, t, n)
},
useInsertionEffect: function(e, t) {
return Vp = "useInsertionEffect",
fg(),
Zp(),
xm(e, t)
},
useLayoutEffect: function(e, t) {
return Vp = "useLayoutEffect",
fg(),
Zp(),
Tm(e, t)
},
useMemo: function(e, t) {
Vp = "useMemo",
fg(),
Zp();
var n = Op.current;
Op.current = lg;
try {
return zm(e, t)
} finally {
Op.current = n
}
},
useReducer: function(e, t, n) {
Vp = "useReducer",
fg(),
Zp();
var r = Op.current;
Op.current = lg;
try {
return lm(e)
} finally {
Op.current = r
}
},
useRef: function(e) {
return Vp = "useRef",
fg(),
Zp(),
_m()
},
useState: function(e) {
Vp = "useState",
fg(),
Zp();
var t = Op.current;
Op.current = lg;
try {
return ym()
} finally {
Op.current = t
}
},
useDebugValue: function(e, t) {
return Vp = "useDebugValue",
fg(),
Zp(),
Nm()
},
useDeferredValue: function(e) {
return Vp = "useDeferredValue",
fg(),
Zp(),
Km(e)
},
useTransition: function() {
return Vp = "useTransition",
fg(),
Zp(),
$m()
},
useMutableSource: function(e, t, n) {
Vp = "useMutableSource",
fg(),
Zp()
},
useSyncExternalStore: function(e, t, n) {
return Vp = "useSyncExternalStore",
fg(),
Zp(),
dm(e, t)
},
useId: function() {
return Vp = "useId",
fg(),
Zp(),
Zm()
},
unstable_isNewReconciler: L
};
var hg = t.unstable_now
, pg = 0
, mg = -1
, gg = -1
, vg = -1
, bg = !1
, yg = !1;
function Ag() {
return bg
}
function wg() {
return pg
}
function _g() {
pg = hg()
}
function Eg(e) {
gg = hg(),
e.actualStartTime < 0 && (e.actualStartTime = hg())
}
function Sg(e) {
gg = -1
}
function kg(e, t) {
if (gg >= 0) {
var n = hg() - gg;
e.actualDuration += n,
t && (e.selfBaseDuration = n),
gg = -1
}
}
function Mg(e) {
if (mg >= 0) {
var t = hg() - mg;
mg = -1;
for (var n = e.return; null !== n; ) {
switch (n.tag) {
case c:
case y:
return void (n.stateNode.effectDuration += t)
}
n = n.return
}
}
}
function Cg(e) {
if (vg >= 0) {
var t = hg() - vg;
vg = -1;
for (var n = e.return; null !== n; ) {
switch (n.tag) {
case c:
var r = n.stateNode;
return void (null !== r && (r.passiveEffectDuration
+= t));
case y:
var i = n.stateNode;
return void (null !== i && (i.passiveEffectDuration +=
t))
}
n = n.return
}
}
}
function xg() {
mg = hg()
}
function Rg() {
vg = hg()
}
function Tg(e) {
for (var t = e.child; t; )
e.actualDuration += t.actualDuration,
t = t.sibling
}
function Ig(e, t) {
return {
value: e,
source: t,
stack: ut(t),
digest: null
}
}
function Pg(e, t, n) {
return {
value: e,
source: null,
stack: null != n ? n : null,
digest: null != t ? t : null
}
}
function Lg(e, t) {
try {
var n = t.value
, r = t.source
, i = t.stack
, o = null !== i ? i : "";
if (null != n && n._suppressLogging) {
if (e.tag === u)
return;
console.error(n)
}
var a = r ? ft(r) : null
, s = (a ? "The above error occurred in the <" + a + ">
component:" : "The above error occurred in one of your React components:") + "\n" + o
+ "\n\n" + (e.tag === c ? "Consider adding an error boundary to your tree to customize
error handling behavior.\nVisit https://reactjs.org/link/error-boundaries to learn more
about error boundaries." : "React will try to recreate this component tree from scratch
using the error boundary you provided, " + (ft(e) || "Anonymous") + ".");
console.error(s)
} catch (e) {
setTimeout((function() {
throw e
}
))
}
}
var Og = "function" == typeof WeakMap ? WeakMap : Map;
function Ng(e, t, n) {
var r = fh(Xo, n);
r.tag = uh,
r.payload = {
element: null
};
var i = t.value;
return r.callback = function() {
kA(i),
Lg(e, t)
}
,
r
}
function Dg(e, t, n) {
var r = fh(Xo, n);
r.tag = uh;
var i = e.type.getDerivedStateFromError;
if ("function" == typeof i) {
var a = t.value;
r.payload = function() {
return i(a)
}
,
r.callback = function() {
XA(e),
Lg(e, t)
}
}
var s = e.stateNode;
return null !== s && "function" == typeof s.componentDidCatch
&& (r.callback = function() {
XA(e),
Lg(e, t),
"function" != typeof i && function(e) {
null === Py ? Py = new Set([e]) : Py.add(e)
}(this);
var n = t.value
, r = t.stack;
this.componentDidCatch(n, {
componentStack: null !== r ? r : ""
}),
"function" != typeof i && (pa(e.lanes, go) || o("%s: Error
boundaries should implement getDerivedStateFromError(). In that method, return a
state update to display an error message or fallback UI.", ft(e) || "Unknown"))
}
),
r
}
function Bg(e, t, n) {
var r, i = e.pingCache;
if (null === i ? (i = e.pingCache = new Og,
r = new Set,
i.set(t, r)) : void 0 === (r = i.get(t)) && (r = new Set,
i.set(t, r)),
!r.has(n)) {
r.add(n);
var o = xA.bind(null, e, t, n);
qi && zA(e, n),
t.then(o, o)
}
}
function jg(e) {
var t = e;
do {
if (t.tag === A && _p(t))
return t;
t = t.return
} while (null !== t);
return null
}
function zg(e, t, n, r, i) {
if ((e.mode & oo) === io) {
if (e === t)
e.flags |= ri;
else {
if (e.flags |= Wr,
n.flags |= ii,
n.flags &= ~(ei | ni),
n.tag === u)
if (null === n.alternate)
n.tag = S;
else {
var o = fh(Xo, go);
o.tag = sh,
hh(n, o, go)
}
n.lanes = ga(n.lanes, go)
}
return e
}
return e.flags |= ri,
e.lanes = i,
e
}
function Fg(e, t, n, r, i) {
if (n.flags |= ni,
qi && zA(e, i),
null !== r && "object" == typeof r && "function" == typeof r.then)
{
var o = r;
!function(e, t) {
var n = e.tag;
if ((e.mode & oo) === io && (n === s || n === b || n ===
_)) {
var r = e.alternate;
r ? (e.updateQueue = r.updateQueue,
e.memoizedState = r.memoizedState,
e.lanes = r.lanes) : (e.updateQueue = null,
e.memoizedState = null)
}
}(n),
Af() && n.mode & oo && ef();
var a = jg(t);
if (null !== a)
return a.flags &= ~$r,
zg(a, t, n, 0, i),
a.mode & oo && Bg(e, o, i),
void function(e, t, n, r) {
var i = e.updateQueue;
if (null === i) {
var o = new Set;
o.add(n),
e.updateQueue = o
} else
i.add(n)
}(a, 0, o);
if ((i & go) === po)
return Bg(e, o, i),
void gA();
r = new Error("A component suspended while responding to
synchronous input. This will cause the UI to be replaced with a loading indicator. To fix,
updates that suspend should be wrapped with startTransition.")
} else if (Af() && n.mode & oo) {
ef();
var l = jg(t);
if (null !== l)
return (l.flags & ri) === zr && (l.flags |= $r),
zg(l, t, n, 0, i),
void wf(Ig(r, n))
}
!function(e) {
gy !== sy && (gy = oy),
null === wy ? wy = [e] : wy.push(e)
}(r = Ig(r, n));
var d = t;
do {
switch (d.tag) {
case c:
var f = r;
d.flags |= ri;
var h = da(i);
return d.lanes = ga(d.lanes, h),
void mh(d, Ng(d, f, h));
case u:
var p = r
, m = d.type
, g = d.stateNode;
if ((d.flags & Wr) === zr && ("function" == typeof
m.getDerivedStateFromError || null !== g && "function" == typeof g.componentDidCatch
&& !SA(g))) {
d.flags |= ri;
var v = da(i);
return d.lanes = ga(d.lanes, v),
void mh(d, Dg(d, p, v))
}
}
d = d.return
} while (null !== d)
}
var Ug, Kg, qg, Hg, Vg, Wg, $g, Yg, Qg = n.ReactCurrentOwner, Zg
= !1;
function Gg(e, t, n, r) {
t.child = null === e ? ep(t, null, n, r) : Jh(t, e.child, n, r)
}
function Xg(e, t, n, r, i) {
if (t.type !== t.elementType) {
var o = n.propTypes;
o && ed(o, r, "prop", ct(n))
}
var a, s, u = n.render, l = t.ref;
if (Qf(t, i),
Yi(t),
Qg.current = t,
At(!0),
a = em(e, t, u, r, l, i),
s = tm(),
t.mode & so) {
Hi(!0);
try {
a = em(e, t, u, r, l, i),
s = tm()
} finally {
Hi(!1)
}
}
return At(!1),
Qi(),
null === e || Zg ? (Af() && s && Hd(t),
t.flags |= Fr,
Gg(e, t, a, i),
t.child) : (nm(e, t, i),
Rv(e, t, i))
}
function Jg(e, t, n, r, i) {
if (null === e) {
var o, a = n.type;
if (function(e) {
return "function" == typeof e && !uw(e) && void 0 ===
e.defaultProps
}(a) && null === n.compare && void 0 === n.defaultProps)
return o = YA(a),
t.tag = _,
t.type = o,
lv(t, a),
ev(e, t, o, r, i);
var s = a.propTypes;
s && ed(s, r, "prop", ct(a));
var u = dw(n.type, null, r, t, t.mode, i);
return u.ref = t.ref,
u.return = t,
t.child = u,
u
}
var l = n.type
, c = l.propTypes;
c && ed(c, r, "prop", ct(l));
var d = e.child;
if (!Tv(e, i)) {
var f = d.memoizedProps
, h = n.compare;
if ((h = null !== h ? h : xu)(f, r) && e.ref === t.ref)
return Rv(e, t, i)
}
t.flags |= Fr;
var p = lw(d, r);
return p.ref = t.ref,
p.return = t,
t.child = p,
p
}
function ev(e, t, n, r, i) {
if (t.type !== t.elementType) {
var o = t.elementType;
if (o.$$typeof === Be) {
var a = o
, s = a._payload
, u = a._init;
try {
o = u(s)
} catch (e) {
o = null
}
var l = o && o.propTypes;
l && ed(l, r, "prop", ct(o))
}
}
if (null !== e) {
var c = e.memoizedProps;
if (xu(c, r) && e.ref === t.ref && t.type === e.type) {
if (Zg = !1,
t.pendingProps = r = c,
!Tv(e, i))
return t.lanes = e.lanes,
Rv(e, t, i);
(e.flags & ii) !== zr && (Zg = !0)
}
}
return rv(e, t, n, r, i)
}
function tv(e, t, n) {
var r, i = t.pendingProps, o = i.children, a = null !== e ?
e.memoizedState : null;
if ("hidden" === i.mode || N)
if ((t.mode & oo) === io) {
var s = {
baseLanes: po,
cachePool: null,
transitions: null
};
t.memoizedState = s,
lA(t, n)
} else {
if (!pa(n, Zo)) {
var u;
u = null !== a ? ga(a.baseLanes, n) : n,
t.lanes = t.childLanes = Zo;
var l = {
baseLanes: u,
cachePool: null,
transitions: null
};
return t.memoizedState = l,
t.updateQueue = null,
lA(t, u),
null
}
var c = {
baseLanes: po,
cachePool: null,
transitions: null
};
t.memoizedState = c,
lA(t, null !== a ? a.baseLanes : n)
}
else
null !== a ? (r = ga(a.baseLanes, n),
t.memoizedState = null) : r = n,
lA(t, r);
return Gg(e, t, o, n),
t.child
}
function nv(e, t) {
var n = t.ref;
(null === e && null !== n || null !== e && e.ref !== n) && (t.flags |
= Yr,
t.flags |= ai)
}
function rv(e, t, n, r, i) {
if (t.type !== t.elementType) {
var o = n.propTypes;
o && ed(o, r, "prop", ct(n))
}
var a, s, u;
if (a = pd(t, fd(0, n, !0)),
Qf(t, i),
Yi(t),
Qg.current = t,
At(!0),
s = em(e, t, n, r, a, i),
u = tm(),
t.mode & so) {
Hi(!0);
try {
s = em(e, t, n, r, a, i),
u = tm()
} finally {
Hi(!1)
}
}
return At(!1),
Qi(),
null === e || Zg ? (Af() && u && Hd(t),
t.flags |= Fr,
Gg(e, t, s, i),
t.child) : (nm(e, t, i),
Rv(e, t, i))
}
function iv(e, t, n, r, i) {
switch (Uw(t)) {
case !1:
var a = t.stateNode
, s = new (0,
t.type)(t.memoizedProps,a.context).state;
a.updater.enqueueSetState(a, s, null);
break;
case !0:
t.flags |= Wr,
t.flags |= ri;
var u = new Error("Simulated error coming from DevTools")
, l = da(i);
t.lanes = ga(t.lanes, l),
mh(t, Dg(t, Ig(u, t), l))
}
if (t.type !== t.elementType) {
var c = n.propTypes;
c && ed(c, r, "prop", ct(n))
}
var d, f;
gd(n) ? (d = !0,
wd(t)) : d = !1,
Qf(t, i),
null === t.stateNode ? (xv(e, t),
Vh(t, n, r),
$h(t, n, r, i),
f = !0) : f = null === e ? function(e, t, n, r) {
var i = e.stateNode
, o = e.memoizedProps;
i.props = o;
var a = i.context
, s = t.contextType
, u = ud;
u = "object" == typeof s && null !== s ? Zf(s) : pd(e, fd(0, t, !
0));
var l = t.getDerivedStateFromProps
, c = "function" == typeof l || "function" == typeof
i.getSnapshotBeforeUpdate;
c || "function" != typeof
i.UNSAFE_componentWillReceiveProps && "function" != typeof
i.componentWillReceiveProps || o === n && a === u || Wh(e, i, n, u),
yh();
var d = e.memoizedState
, f = i.state = d;
if (vh(e, n, i, r),
f = e.memoizedState,
o === n && d === f && !md() && !Ah()) {
if ("function" == typeof i.componentDidMount) {
var h = Kr;
h |= si,
(e.mode & uo) !== io && (h |= li),
e.flags |= h
}
return !1
}
"function" == typeof l && (Nh(e, t, l, n),
f = e.memoizedState);
var p = Ah() || qh(e, t, o, n, d, f, u);
if (p) {
if (c || "function" != typeof
i.UNSAFE_componentWillMount && "function" != typeof i.componentWillMount ||
("function" == typeof i.componentWillMount && i.componentWillMount(),
"function" == typeof i.UNSAFE_componentWillMount
&& i.UNSAFE_componentWillMount()),
"function" == typeof i.componentDidMount) {
var m = Kr;
m |= si,
(e.mode & uo) !== io && (m |= li),
e.flags |= m
}
} else {
if ("function" == typeof i.componentDidMount) {
var g = Kr;
g |= si,
(e.mode & uo) !== io && (g |= li),
e.flags |= g
}
e.memoizedProps = n,
e.memoizedState = f
}
return i.props = n,
i.state = f,
i.context = u,
p
}(t, n, r, i) : function(e, t, n, r, i) {
var o = t.stateNode;
dh(e, t);
var a = t.memoizedProps
, s = t.type === t.elementType ? a : Nf(t.type, a);
o.props = s;
var u = t.pendingProps
, l = o.context
, c = n.contextType
, d = ud;
d = "object" == typeof c && null !== c ? Zf(c) : pd(t, fd(0, n, !
0));
var f = n.getDerivedStateFromProps
, h = "function" == typeof f || "function" == typeof
o.getSnapshotBeforeUpdate;
h || "function" != typeof
o.UNSAFE_componentWillReceiveProps && "function" != typeof
o.componentWillReceiveProps || a === u && l === d || Wh(t, o, r, d),
yh();
var p = t.memoizedState
, m = o.state = p;
if (vh(t, r, o, i),
m = t.memoizedState,
a === u && p === m && !md() && !Ah() && !O)
return "function" == typeof o.componentDidUpdate &&
(a === e.memoizedProps && p === e.memoizedState || (t.flags |= Kr)),
"function" == typeof o.getSnapshotBeforeUpdate && (a
=== e.memoizedProps && p === e.memoizedState || (t.flags |= Qr)),
!1;
"function" == typeof f && (Nh(t, n, f, r),
m = t.memoizedState);
var g = Ah() || qh(t, n, s, r, p, m, d) || O;
return g ? (h || "function" != typeof
o.UNSAFE_componentWillUpdate && "function" != typeof o.componentWillUpdate ||
("function" == typeof o.componentWillUpdate && o.componentWillUpdate(r, m, d),
"function" == typeof o.UNSAFE_componentWillUpdate &&
o.UNSAFE_componentWillUpdate(r, m, d)),
"function" == typeof o.componentDidUpdate && (t.flags |=
Kr),
"function" == typeof o.getSnapshotBeforeUpdate && (t.flags
|= Qr)) : ("function" == typeof o.componentDidUpdate && (a === e.memoizedProps &&
p === e.memoizedState || (t.flags |= Kr)),
"function" == typeof o.getSnapshotBeforeUpdate && (a ===
e.memoizedProps && p === e.memoizedState || (t.flags |= Qr)),
t.memoizedProps = r,
t.memoizedState = m),
o.props = r,
o.state = m,
o.context = d,
g
}(e, t, n, r, i);
var h = ov(e, t, n, f, d, i)
, p = t.stateNode;
return f && p.props !== r && (Wg || o("It looks like %s is
reassigning its own `this.props` while rendering. This is not supported and can lead to
confusing bugs.", ft(t) || "a component"),
Wg = !0),
h
}
function ov(e, t, n, r, i, o) {
nv(e, t);
var a = (t.flags & Wr) !== zr;
if (!r && !a)
return i && _d(t, n, !1),
Rv(e, t, o);
var s, u = t.stateNode;
if (Qg.current = t,
a && "function" != typeof n.getDerivedStateFromError)
s = null,
Sg();
else {
if (Yi(t),
At(!0),
s = u.render(),
t.mode & so) {
Hi(!0);
try {
u.render()
} finally {
Hi(!1)
}
}
At(!1),
Qi()
}
return t.flags |= Fr,
null !== e && a ? function(e, t, n, r) {
t.child = Jh(t, e.child, null, r),
t.child = Jh(t, null, n, r)
}(e, t, s, o) : Gg(e, t, s, o),
t.memoizedState = u.state,
i && _d(t, n, !0),
t.child
}
function av(e) {
var t = e.stateNode;
t.pendingContext ? yd(e, t.pendingContext, t.pendingContext !
== t.context) : t.context && yd(e, t.context, !1),
up(e, t.containerInfo)
}
function sv(e, t, n, r, i) {
return bf(),
wf(i),
t.flags |= $r,
Gg(e, t, n, r),
t.child
}
function uv(e, t, n, r) {
xv(e, t);
var i = t.pendingProps
,o=n
, a = o._payload
, c = (0,
o._init)(a);
t.type = c;
var d = t.tag = function(e) {
if ("function" == typeof e)
return uw(e) ? u : s;
if (null != e) {
var t = e.$$typeof;
if (t === Le)
return b;
if (t === De)
return w
}
return l
}(c)
, f = Nf(c, i);
switch (d) {
case s:
return lv(t, c),
t.type = c = YA(c),
rv(null, t, c, f, r);
case u:
return t.type = c = QA(c),
iv(null, t, c, f, r);
case b:
return t.type = c = ZA(c),
Xg(null, t, c, f, r);
case w:
if (t.type !== t.elementType) {
var h = c.propTypes;
h && ed(h, f, "prop", ct(c))
}
return Jg(null, t, c, Nf(c.type, f), r)
}
var p = "";
throw null !== c && "object" == typeof c && c.$$typeof === Be
&& (p = " Did you wrap a component in React.lazy() more than once?"),
new Error("Element type is invalid. Received a promise that
resolves to: " + c + ". Lazy element type must resolve to a class or function." + p)
}
function lv(e, t) {
if (t && t.childContextTypes && o("%s(...): childContextTypes
cannot be defined on a function component.", t.displayName || t.name || "Component"),
null !== e.ref) {
var n = ""
, r = gt();
r && (n += "\n\nCheck the render method of `" + r + "`.");
var i = r || ""
, a = e._debugSource;
a && (i = a.fileName + ":" + a.lineNumber),
Vg[i] || (Vg[i] = !0,
o("Function components cannot be given refs. Attempts to
access this ref will fail. Did you mean to use React.forwardRef()?%s", n))
}
if ("function" == typeof t.getDerivedStateFromProps) {
var s = ct(t) || "Unknown";
Hg[s] || (o("%s: Function components do not support
getDerivedStateFromProps.", s),
Hg[s] = !0)
}
if ("object" == typeof t.contextType && null !== t.contextType) {
var u = ct(t) || "Unknown";
qg[u] || (o("%s: Function components do not support
contextType.", u),
qg[u] = !0)
}
}
Ug = {},
Kg = {},
qg = {},
Hg = {},
Vg = {},
Wg = !1,
$g = {},
Yg = {};
var cv = {
dehydrated: null,
treeContext: null,
retryLane: mo
};
function dv(e) {
return {
baseLanes: e,
cachePool: null,
transitions: null
}
}
function fv(e, t, n) {
var r = t.pendingProps;
Kw(t) && (t.flags |= Wr);
var i = gp.current
, a = !1
, s = (t.flags & Wr) !== zr;
if (s || function(e, t, n, r) {
return (null === t || null !== t.memoizedState) && vp(e, mp)
}(i, e) ? (a = !0,
t.flags &= ~Wr) : null !== e && null === e.memoizedState || (i |=
pp),
Ap(t, i = bp(i)),
null === e) {
df(t);
var u = t.memoizedState;
if (null !== u) {
var l = u.dehydrated;
if (null !== l)
return function(e, t, n) {
return (e.mode & oo) === io ? (o("Cannot
hydrate Suspense in legacy mode. Switch from ReactDOM.hydrate(element, container)
to ReactDOMClient.hydrateRoot(container, <App />).render(element) or remove the
Suspense components from the server rendered components."),
e.lanes = go) : Tc(t) ? e.lanes = yo : e.lanes =
Zo,
null
}(t, l)
}
var c = r.children
, d = r.fallback;
if (a) {
var f = function(e, t, n, r) {
var i, o, a = e.mode, s = e.child, u = {
mode: "hidden",
children: t
};
return (a & oo) === io && null !== s ? ((i =
s).childLanes = po,
i.pendingProps = u,
e.mode & ao && (i.actualDuration = 0,
i.actualStartTime = -1,
i.selfBaseDuration = 0,
i.treeBaseDuration = 0),
o = hw(n, a, r, null)) : (i = pv(u, a),
o = hw(n, a, r, null)),
i.return = e,
o.return = e,
i.sibling = o,
e.child = i,
o
}(t, c, d, n);
return t.child.memoizedState = dv(n),
t.memoizedState = cv,
f
}
return hv(t, c)
}
var h = e.memoizedState;
if (null !== h) {
var p = h.dehydrated;
if (null !== p)
return function(e, t, n, r, i, o, a) {
if (n) {
if (t.flags & $r)
return t.flags &= ~$r,
gv(e, t, a, Pg(new Error("There was an
error while hydrating this Suspense boundary. Switched to client rendering.")));
if (null !== t.memoizedState)
return t.child = e.child,
t.flags |= Wr,
null;
var s = function(e, t, n, r, i) {
var o = t.mode
, a = pv({
mode: "visible",
children: n
}, o)
, s = hw(r, o, i, null);
return s.flags |= Ur,
a.return = t,
s.return = t,
a.sibling = s,
t.child = a,
(t.mode & oo) !== io && Jh(t, e.child, null, i),
s
}(e, t, r.children, r.fallback, a);
return t.child.memoizedState = dv(a),
t.memoizedState = cv,
s
}
if (Jd(),
(t.mode & oo) === io)
return gv(e, t, a, null);
if (Tc(i)) {
var u, l, c, d = function(e) {
var t, n, r, i = e.nextSibling &&
e.nextSibling.dataset;
return i && (t = i.dgst,
n = i.msg,
r = i.stck),
{
message: n,
digest: t,
stack: r
}
}(i);
return u = d.digest,
l = d.message,
c = d.stack,
gv(e, t, a, Pg(l ? new Error(l) : new Error("The
server could not finish this Suspense boundary, likely due to an error during server
rendering. Switched to client rendering."), u, c))
}
var f = pa(a, e.childLanes);
if (Zg || f) {
var h = Qy();
if (null !== h) {
var p = function(e, t) {
var n;
switch (ca(t)) {
case bo:
n = vo;
break;
case Ao:
n = yo;
break;
case Eo:
case So:
case ko:
case Mo:
case Co:
case xo:
case Ro:
case To:
case Io:
case Po:
case Lo:
case Oo:
case No:
case Do:
case Bo:
case jo:
case Fo:
case Uo:
case Ko:
case qo:
case Ho:
n = wo;
break;
case Qo:
n = Yo;
break;
default:
n = mo
}
return (n & (e.suspendedLanes | t)) !==
mo ? mo : n
}(h, a);
if (p !== mo && p !== o.retryLane) {
o.retryLane = p;
var m = Xo;
eh(e, p),
Jy(h, e, p, m)
}
}
return gA(),
gv(e, t, a, Pg(new Error("This Suspense
boundary received an update before it finished hydrating. This caused the boundary to
switch to client rendering. The usual way to fix this is to wrap the original update in
startTransition.")))
}
if (Rc(i))
return t.flags |= Wr,
t.child = e.child,
function(e, t) {
e._reactRetry = t
}(i, TA.bind(null, e)),
null;
nf(t, i, o.treeContext);
var g = hv(t, r.children);
return g.flags |= Gr,
g
}(e, t, s, r, p, h, n)
}
if (a) {
var m = r.fallback
, g = function(e, t, n, r, i) {
var o, a, s = t.mode, u = e.child, l = u.sibling, c = {
mode: "hidden",
children: n
};
return (s & oo) === io && t.child !== u ? ((o =
t.child).childLanes = po,
o.pendingProps = c,
t.mode & ao && (o.actualDuration = 0,
o.actualStartTime = -1,
o.selfBaseDuration = u.selfBaseDuration,
o.treeBaseDuration = u.treeBaseDuration),
t.deletions = null) : (o = mv(u, c)).subtreeFlags =
u.subtreeFlags & mi,
null !== l ? a = lw(l, r) : (a = hw(r, s, i, null)).flags |= Ur,
a.return = t,
o.return = t,
o.sibling = a,
t.child = o,
a
}(e, t, r.children, m, n)
, v = t.child
, b = e.child.memoizedState;
return v.memoizedState = null === b ? dv(n) : function(e, t) {
return {
baseLanes: ga(e.baseLanes, t),
cachePool: null,
transitions: e.transitions
}
}(b, n),
v.childLanes = function(e, t) {
return va(e.childLanes, t)
}(e, n),
t.memoizedState = cv,
g
}
var y = function(e, t, n, r) {
var i = e.child
, o = i.sibling
, a = mv(i, {
mode: "visible",
children: n
});
if ((t.mode & oo) === io && (a.lanes = r),
a.return = t,
a.sibling = null,
null !== o) {
var s = t.deletions;
null === s ? (t.deletions = [o],
t.flags |= qr) : s.push(o)
}
return t.child = a,
a
}(e, t, r.children, n);
return t.memoizedState = null,
y
}
function hv(e, t, n) {
var r = pv({
mode: "visible",
children: t
}, e.mode);
return r.return = e,
e.child = r,
r
}
function pv(e, t, n) {
return pw(e, t, po, null)
}
function mv(e, t) {
return lw(e, t)
}
function gv(e, t, n, r) {
null !== r && wf(r),
Jh(t, e.child, null, n);
var i = hv(t, t.pendingProps.children);
return i.flags |= Ur,
t.memoizedState = null,
i
}
function vv(e, t, n) {
e.lanes = ga(e.lanes, t);
var r = e.alternate;
null !== r && (r.lanes = ga(r.lanes, t)),
$f(e.return, t, n)
}
function bv(e, t) {
var n = Yt(e)
, r = !n && "function" == typeof Ue(e);
if (n || r) {
var i = n ? "array" : "iterable";
return o("A nested %s was passed to row #%s in
<SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder:
<SuspenseList revealOrder=...> ... <SuspenseList
revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>", i, t, i),
!1
}
return !0
}
function yv(e, t, n, r, i) {
var o = e.memoizedState;
null === o ? e.memoizedState = {
isBackwards: t,
rendering: null,
renderingStartTime: 0,
last: r,
tail: n,
tailMode: i
} : (o.isBackwards = t,
o.rendering = null,
o.renderingStartTime = 0,
o.last = r,
o.tail = n,
o.tailMode = i)
}
function Av(e, t, n) {
var r = t.pendingProps
, i = r.revealOrder
, a = r.tail
, s = r.children;
!function(e) {
if (void 0 !== e && "forwards" !== e && "backwards" !== e
&& "together" !== e && !$g[e])
if ($g[e] = !0,
"string" == typeof e)
switch (e.toLowerCase()) {
case "together":
case "forwards":
case "backwards":
o('"%s" is not a valid value for revealOrder on
<SuspenseList />. Use lowercase "%s" instead.', e, e.toLowerCase());
break;
case "forward":
case "backward":
o('"%s" is not a valid value for revealOrder on
<SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.', e,
e.toLowerCase());
break;
default:
o('"%s" is not a supported revealOrder on
<SuspenseList />. Did you mean "together", "forwards" or "backwards"?', e)
}
else
o('%s is not a supported value for revealOrder on
<SuspenseList />. Did you mean "together", "forwards" or "backwards"?', e)
}(i),
function(e, t) {
void 0 === e || Yg[e] || ("collapsed" !== e && "hidden" !==
e ? (Yg[e] = !0,
o('"%s" is not a supported value for tail on <SuspenseList
/>. Did you mean "collapsed" or "hidden"?', e)) : "forwards" !== t && "backwards" !== t
&& (Yg[e] = !0,
o('<SuspenseList tail="%s" /> is only valid if revealOrder is
"forwards" or "backwards". Did you mean to specify revealOrder="forwards"?', e)))
}(a, i),
function(e, t) {
if (("forwards" === t || "backwards" === t) && null != e && !
1 !== e)
if (Yt(e)) {
for (var n = 0; n < e.length; n++)
if (!bv(e[n], n))
return
} else {
var r = Ue(e);
if ("function" == typeof r) {
var i = r.call(e);
if (i)
for (var a = i.next(), s = 0; !a.done; a =
i.next()) {
if (!bv(a.value, s))
return;
s++
}
} else
o('A single row was passed to a <SuspenseList
revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to
pass multiple children or an array?', t)
}
}(s, i),
Gg(e, t, s, n);
var u = gp.current;
if (vp(u, mp) ? (u = yp(u, mp),
t.flags |= Wr) : (null !== e && (e.flags & Wr) !== zr && function(e,
t, n) {
for (var r = t; null !== r; ) {
if (r.tag === A)
null !== r.memoizedState && vv(r, n, e);
else if (r.tag === M)
vv(r, n, e);
else if (null !== r.child) {
r.child.return = r,
r = r.child;
continue
}
if (r === e)
return;
for (; null === r.sibling; ) {
if (null === r.return || r.return === e)
return;
r = r.return
}
r.sibling.return = r.return,
r = r.sibling
}
}(t, t.child, n),
u = bp(u)),
Ap(t, u),
(t.mode & oo) === io)
t.memoizedState = null;
else
switch (i) {
case "forwards":
var l, c = function(e) {
for (var t = e, n = null; null !== t; ) {
var r = t.alternate;
null !== r && null === Ep(r) && (n = t),
t = t.sibling
}
return n
}(t.child);
null === c ? (l = t.child,
t.child = null) : (l = c.sibling,
c.sibling = null),
yv(t, !1, l, c, a);
break;
case "backwards":
var d = null
, f = t.child;
for (t.child = null; null !== f; ) {
var h = f.alternate;
if (null !== h && null === Ep(h)) {
t.child = f;
break
}
var p = f.sibling;
f.sibling = d,
d = f,
f=p
}
yv(t, !0, d, null, a);
break;
case "together":
yv(t, !1, null, null, void 0);
break;
default:
t.memoizedState = null
}
return t.child
}
var wv, _v, Ev, Sv, kv = !1, Mv = !1;
function Cv() {
Zg = !0
}
function xv(e, t) {
(t.mode & oo) === io && null !== e && (e.alternate = null,
t.alternate = null,
t.flags |= Ur)
}
function Rv(e, t, n) {
return null !== e && (t.dependencies = e.dependencies),
Sg(),
mA(t.lanes),
pa(n, t.childLanes) ? (function(e, t) {
if (null !== e && t.child !== e.child)
throw new Error("Resuming work not yet
implemented.");
if (null !== t.child) {
var n = t.child
, r = lw(n, n.pendingProps);
for (t.child = r,
r.return = t; null !== n.sibling; )
n = n.sibling,
(r = r.sibling = lw(n, n.pendingProps)).return = t;
r.sibling = null
}
}(e, t),
t.child) : null
}
function Tv(e, t) {
return !!pa(e.lanes, t)
}
function Iv(e, t, n) {
if (t._debugNeedsRemount && null !== e)
return function(e, t, n) {
var r = t.return;
if (null === r)
throw new Error("Cannot swap the root fiber.");
if (e.alternate = null,
t.alternate = null,
n.index = t.index,
n.sibling = t.sibling,
n.return = t.return,
n.ref = t.ref,
t === r.child)
r.child = n;
else {
var i = r.child;
if (null === i)
throw new Error("Expected parent to have a
child.");
for (; i.sibling !== t; )
if (null === (i = i.sibling))
throw new Error("Expected to find the
previous sibling.");
i.sibling = n
}
var o = r.deletions;
return null === o ? (r.deletions = [e],
r.flags |= qr) : o.push(e),
n.flags |= Ur,
n
}(e, t, dw(t.type, t.key, t.pendingProps, t._debugOwner ||
null, t.mode, t.lanes));
if (null !== e)
if (e.memoizedProps !== t.pendingProps || md() || t.type !==
e.type)
Zg = !0;
else {
if (!Tv(e, n) && (t.flags & Wr) === zr)
return Zg = !1,
function(e, t, n) {
switch (t.tag) {
case c:
av(t),
t.stateNode,
bf();
break;
case f:
dp(t);
break;
case u:
gd(t.type) && wd(t);
break;
case d:
up(t, t.stateNode.containerInfo);
break;
case v:
var r = t.memoizedProps.value;
Vf(t, t.type._context, r);
break;
case y:
pa(n, t.childLanes) && (t.flags |= Kr);
var i = t.stateNode;
i.effectDuration = 0,
i.passiveEffectDuration = 0;
break;
case A:
var o = t.memoizedState;
if (null !== o) {
if (null !== o.dehydrated)
return Ap(t, bp(gp.current)),
t.flags |= Wr,
null;
if (pa(n, t.child.childLanes))
return fv(e, t, n);
Ap(t, bp(gp.current));
var a = Rv(e, t, n);
return null !== a ? a.sibling : null
}
Ap(t, bp(gp.current));
break;
case M:
var s = (e.flags & Wr) !== zr
, l = pa(n, t.childLanes);
if (s) {
if (l)
return Av(e, t, n);
t.flags |= Wr
}
var h = t.memoizedState;
if (null !== h && (h.rendering = null,
h.tail = null,
h.lastEffect = null),
Ap(t, gp.current),
l)
break;
return null;
case x:
case R:
return t.lanes = po,
tv(e, t, n)
}
return Rv(e, t, n)
}(e, t, n);
Zg = (e.flags & ii) !== zr
}
else if (Zg = !1,
Af() && function(e) {
return $d(),
(e.flags & oi) !== zr
}(t)) {
var r = t.index;
qd(t, ($d(),
Nd), r)
}
switch (t.lanes = po,
t.tag) {
case l:
return function(e, t, n, r) {
xv(e, t);
var i, a, l, c = t.pendingProps;
if (i = pd(t, fd(0, n, !1)),
Qf(t, r),
Yi(t),
n.prototype && "function" == typeof n.prototype.render)
{
var d = ct(n) || "Unknown";
Ug[d] || (o("The <%s /> component appears to have
a render method, but doesn't extend React.Component. This is likely to cause errors.
Change %s to extend React.Component instead.", d, d),
Ug[d] = !0)
}
if (t.mode & so && Sf.recordLegacyContextWarning(t,
null),
At(!0),
Qg.current = t,
a = em(null, t, n, c, i, r),
l = tm(),
At(!1),
Qi(),
t.flags |= Fr,
"object" == typeof a && null !== a && "function" ==
typeof a.render && void 0 === a.$$typeof) {
var f = ct(n) || "Unknown";
Kg[f] || (o("The <%s /> component appears to be a
function component that returns a class instance. Change %s to a class that extends
React.Component instead. If you can't use a class try assigning the prototype on the
function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an
arrow function since it cannot be called with `new` by React.", f, f, f),
Kg[f] = !0)
}
if ("object" == typeof a && null !== a && "function" ==
typeof a.render && void 0 === a.$$typeof) {
var h = ct(n) || "Unknown";
Kg[h] || (o("The <%s /> component appears to be a
function component that returns a class instance. Change %s to a class that extends
React.Component instead. If you can't use a class try assigning the prototype on the
function as a workaround. `%s.prototype = React.Component.prototype`. Don't use an
arrow function since it cannot be called with `new` by React.", h, h, h),
Kg[h] = !0),
t.tag = u,
t.memoizedState = null,
t.updateQueue = null;
var p = !1;
return gd(n) ? (p = !0,
wd(t)) : p = !1,
t.memoizedState = null !== a.state && void 0 !==
a.state ? a.state : null,
ch(t),
Hh(t, a),
$h(t, n, c, r),
ov(null, t, n, !0, p, r)
}
if (t.tag = s,
t.mode & so) {
Hi(!0);
try {
a = em(null, t, n, c, i, r),
l = tm()
} finally {
Hi(!1)
}
}
return Af() && l && Hd(t),
Gg(null, t, a, r),
lv(t, n),
t.child
}(e, t, t.type, n);
case E:
return uv(e, t, t.elementType, n);
case s:
var i = t.type
, a = t.pendingProps;
return rv(e, t, i, t.elementType === i ? a : Nf(i, a), n);
case u:
var k = t.type
, T = t.pendingProps;
return iv(e, t, k, t.elementType === k ? T : Nf(k, T), n);
case c:
return function(e, t, n) {
if (av(t),
null === e)
throw new Error("Should have a current fiber. This
is a bug in React.");
var r = t.pendingProps
, i = t.memoizedState
, o = i.element;
dh(e, t),
vh(t, r, null, n);
var a = t.memoizedState;
t.stateNode;
var s = a.element;
if (i.isDehydrated) {
var u = {
element: s,
isDehydrated: !1,
cache: a.cache,
pendingSuspenseBoundaries:
a.pendingSuspenseBoundaries,
transitions: a.transitions
};
if (t.updateQueue.baseState = u,
t.memoizedState = u,
t.flags & $r)
return sv(e, t, s, n, Ig(new Error("There was an
error while hydrating. Because the error happened outside of a Suspense boundary, the
entire root will switch to client rendering."), t));
if (s !== o)
return sv(e, t, s, n, Ig(new Error("This root
received an early update, before anything was able hydrate. Switched the entire root to
client rendering."), t));
tf(t);
var l = ep(t, null, s, n);
t.child = l;
for (var c = l; c; )
c.flags = c.flags & ~Ur | Gr,
c = c.sibling
} else {
if (bf(),
s === o)
return Rv(e, t, n);
Gg(e, t, s, n)
}
return t.child
}(e, t, n);
case f:
return function(e, t, n) {
dp(t),
null === e && df(t);
var r = t.type
, i = t.pendingProps
, o = null !== e ? e.memoizedProps : null
, a = i.children;
return gc(r, i) ? a = null : null !== o && gc(r, o) &&
(t.flags |= Hr),
nv(e, t),
Gg(e, t, a, n),
t.child
}(e, t, n);
case h:
return function(e, t) {
return null === e && df(t),
null
}(e, t);
case A:
return fv(e, t, n);
case d:
return function(e, t, n) {
up(t, t.stateNode.containerInfo);
var r = t.pendingProps;
return null === e ? t.child = Jh(t, null, r, n) : Gg(e, t, r, n),
t.child
}(e, t, n);
case b:
var I = t.type
, P = t.pendingProps;
return Xg(e, t, I, t.elementType === I ? P : Nf(I, P), n);
case p:
return function(e, t, n) {
return Gg(e, t, t.pendingProps, n),
t.child
}(e, t, n);
case m:
return function(e, t, n) {
return Gg(e, t, t.pendingProps.children, n),
t.child
}(e, t, n);
case y:
return function(e, t, n) {
t.flags |= Kr;
var r = t.stateNode;
return r.effectDuration = 0,
r.passiveEffectDuration = 0,
Gg(e, t, t.pendingProps.children, n),
t.child
}(e, t, n);
case v:
return function(e, t, n) {
var r = t.type._context
, i = t.pendingProps
, a = t.memoizedProps
, s = i.value;
"value"in i || kv || (kv = !0,
o("The `value` prop is required for the
`<Context.Provider>`. Did you misspell it or forget to pass it?"));
var u = t.type.propTypes;
if (u && ed(u, i, "prop", "Context.Provider"),
Vf(t, r, s),
null !== a) {
var l = a.value;
if (Cu(l, s)) {
if (a.children === i.children && !md())
return Rv(e, t, n)
} else
Yf(t, r, n)
}
return Gg(e, t, i.children, n),
t.child
}(e, t, n);
case g:
return function(e, t, n) {
var r = t.type;
void 0 === r._context ? r !== r.Consumer && (Mv || (Mv
= !0,
o("Rendering <Context> directly is not supported and
will be removed in a future major release. Did you mean to render <Context.Consumer>
instead?"))) : r = r._context;
var i = t.pendingProps.children;
"function" != typeof i && o("A context consumer was
rendered with multiple children, or a child that isn't a function. A context consumer
expects a single child that is a function. If you did pass a function, make sure there is no
trailing or leading whitespace around it."),
Qf(t, n);
var a, s = Zf(r);
return Yi(t),
Qg.current = t,
At(!0),
a = i(s),
At(!1),
Qi(),
t.flags |= Fr,
Gg(e, t, a, n),
t.child
}(e, t, n);
case w:
var L = t.type
, O = Nf(L, t.pendingProps);
if (t.type !== t.elementType) {
var N = L.propTypes;
N && ed(N, O, "prop", ct(L))
}
return Jg(e, t, L, O = Nf(L.type, O), n);
case _:
return ev(e, t, t.type, t.pendingProps, n);
case S:
var D = t.type
, B = t.pendingProps;
return function(e, t, n, r, i) {
var o;
return xv(e, t),
t.tag = u,
gd(n) ? (o = !0,
wd(t)) : o = !1,
Qf(t, i),
Vh(t, n, r),
$h(t, n, r, i),
ov(null, t, n, !0, o, i)
}(e, t, D, t.elementType === D ? B : Nf(D, B), n);
case M:
return Av(e, t, n);
case C:
break;
case x:
return tv(e, t, n)
}
throw new Error("Unknown unit of work tag (" + t.tag + "). This
error is likely caused by a bug in React. Please file an issue.")
}
function Pv(e) {
e.flags |= Kr
}
function Lv(e) {
e.flags |= Yr,
e.flags |= ai
}
function Ov(e, t) {
if (!Af())
switch (e.tailMode) {
case "hidden":
for (var n = e.tail, r = null; null !== n; )
null !== n.alternate && (r = n),
n = n.sibling;
null === r ? e.tail = null : r.sibling = null;
break;
case "collapsed":
for (var i = e.tail, o = null; null !== i; )
null !== i.alternate && (o = i),
i = i.sibling;
null === o ? t || null === e.tail ? e.tail = null :
e.tail.sibling = null : o.sibling = null
}
}
function Nv(e) {
var t = null !== e.alternate && e.alternate.child === e.child
, n = po
, r = zr;
if (t) {
if ((e.mode & ao) !== io) {
for (var i = e.selfBaseDuration, o = e.child; null !== o; )
n = ga(n, ga(o.lanes, o.childLanes)),
r |= o.subtreeFlags & mi,
r |= o.flags & mi,
i += o.treeBaseDuration,
o = o.sibling;
e.treeBaseDuration = i
} else
for (var a = e.child; null !== a; )
n = ga(n, ga(a.lanes, a.childLanes)),
r |= a.subtreeFlags & mi,
r |= a.flags & mi,
a.return = e,
a = a.sibling;
e.subtreeFlags |= r
} else {
if ((e.mode & ao) !== io) {
for (var s = e.actualDuration, u = e.selfBaseDuration, l =
e.child; null !== l; )
n = ga(n, ga(l.lanes, l.childLanes)),
r |= l.subtreeFlags,
r |= l.flags,
s += l.actualDuration,
u += l.treeBaseDuration,
l = l.sibling;
e.actualDuration = s,
e.treeBaseDuration = u
} else
for (var c = e.child; null !== c; )
n = ga(n, ga(c.lanes, c.childLanes)),
r |= c.subtreeFlags,
r |= c.flags,
c.return = e,
c = c.sibling;
e.subtreeFlags |= r
}
return e.childLanes = n,
t
}
function Dv(e, t, n) {
if (Zd && null !== Qd && (t.mode & oo) !== io && (t.flags & Wr)
=== zr)
return vf(t),
bf(),
t.flags |= $r | ni | ri,
!1;
var r = gf(t);
if (null !== n && null !== n.dehydrated) {
if (null === e) {
if (!r)
throw new Error("A dehydrated suspense
component was completed without a hydrated node. This is probably a bug in React.");
if (hf(t),
Nv(t),
(t.mode & ao) !== io && null !== n) {
var i = t.child;
null !== i && (t.treeBaseDuration -=
i.treeBaseDuration)
}
return !1
}
if (bf(),
(t.flags & Wr) === zr && (t.memoizedState = null),
t.flags |= Kr,
Nv(t),
(t.mode & ao) !== io && null !== n) {
var o = t.child;
null !== o && (t.treeBaseDuration -=
o.treeBaseDuration)
}
return !1
}
return yf(),
!0
}
function Bv(e, t, n) {
var r = t.pendingProps;
switch (Wd(t),
t.tag) {
case l:
case E:
case _:
case s:
case b:
case p:
case m:
case y:
case g:
case w:
return Nv(t),
null;
case u:
return gd(t.type) && vd(t),
Nv(t),
null;
case c:
var i = t.stateNode;
return lp(t),
bd(t),
Tp(),
i.pendingContext && (i.context = i.pendingContext,
i.pendingContext = null),
(null === e || null === e.child) && (gf(t) ? Pv(t) : null !== e
&& (e.memoizedState.isDehydrated && (t.flags & $r) === zr || (t.flags |= Qr,
yf()))),
_v(e, t),
Nv(t),
null;
case f:
fp(t);
var o = sp()
, a = t.type;
if (null !== e && null != t.stateNode)
Ev(e, t, a, r, o),
e.ref !== t.ref && Lv(t);
else {
if (!r) {
if (null === t.stateNode)
throw new Error("We must have new props for
new mounts. This error is likely caused by a bug in React. Please file an issue.");
return Nv(t),
null
}
var k = cp();
if (gf(t))
(function(e, t, n) {
var r = e.stateNode
, i = !Gd
, o = Lc(r, e.type, e.memoizedProps, 0, n, e,
i);
return e.updateQueue = o,
null !== o
}
)(t, 0, k) && Pv(t);
else {
var P = mc(a, r, o, k, t);
wv(P, t, !1, !1),
t.stateNode = P,
function(e, t, n, r, i) {
switch (Vl(e, t, n),
t) {
case "button":
case "input":
case "select":
case "textarea":
return !!n.autoFocus;
case "img":
return !0;
default:
return !1
}
}(P, a, r) && Pv(t)
}
null !== t.ref && Lv(t)
}
return Nv(t),
null;
case h:
var L = r;
if (e && null != t.stateNode) {
var O = e.memoizedProps;
Sv(e, t, O, L)
} else {
if ("string" != typeof L && null === t.stateNode)
throw new Error("We must have new props for new
mounts. This error is likely caused by a bug in React. Please file an issue.");
var B = sp()
, j = cp();
gf(t) ? ff(t) && Pv(t) : t.stateNode = vc(L, B, j, t)
}
return Nv(t),
null;
case A:
wp(t);
var z = t.memoizedState;
if ((null === e || null !== e.memoizedState && null !==
e.memoizedState.dehydrated) && !Dv(e, t, z))
return t.flags & ri ? t : null;
if ((t.flags & Wr) !== zr)
return t.lanes = n,
(t.mode & ao) !== io && Tg(t),
t;
var F = null !== z;
if (F !== (null !== e && null !== e.memoizedState) && F &&
(t.child.flags |= Xr,
(t.mode & oo) !== io && (null === e && (!0 !==
t.memoizedProps.unstable_avoidThisFallback || !D) || vp(gp.current, pp) ? gy === ry &&
(gy = ay) : gA())),
null !== t.updateQueue && (t.flags |= Kr),
Nv(t),
(t.mode & ao) !== io && F) {
var U = t.child;
null !== U && (t.treeBaseDuration -=
U.treeBaseDuration)
}
return null;
case d:
return lp(t),
_v(e, t),
null === e && ml(t.stateNode.containerInfo),
Nv(t),
null;
case v:
return Wf(t.type._context, t),
Nv(t),
null;
case S:
return gd(t.type) && vd(t),
Nv(t),
null;
case M:
wp(t);
var K = t.memoizedState;
if (null === K)
return Nv(t),
null;
var q = (t.flags & Wr) !== zr
, H = K.rendering;
if (null === H)
if (q)
Ov(K, !1);
else {
if (gy !== ry || null !== e && (e.flags & Wr) !== zr)
for (var V = t.child; null !== V; ) {
var W = Ep(V);
if (null !== W) {
q = !0,
t.flags |= Wr,
Ov(K, !1);
var $ = W.updateQueue;
return null !== $ && (t.updateQueue =
$,
t.flags |= Kr),
t.subtreeFlags = zr,
tp(t, n),
Ap(t, yp(gp.current, mp)),
t.child
}
V = V.sibling
}
null !== K.tail && Ti() > Ry() && (t.flags |= Wr,
q = !0,
Ov(K, !1),
t.lanes = Vo)
}
else {
if (!q) {
var Y = Ep(H);
if (null !== Y) {
t.flags |= Wr,
q = !0;
var Q = Y.updateQueue;
if (null !== Q && (t.updateQueue = Q,
t.flags |= Kr),
Ov(K, !0),
null === K.tail && "hidden" === K.tailMode && !
H.alternate && !Af())
return Nv(t),
null
} else
2 * Ti() - K.renderingStartTime > Ry() && n !==
Zo && (t.flags |= Wr,
q = !0,
Ov(K, !1),
t.lanes = Vo)
}
if (K.isBackwards)
H.sibling = t.child,
t.child = H;
else {
var Z = K.last;
null !== Z ? Z.sibling = H : t.child = H,
K.last = H
}
}
if (null !== K.tail) {
var G = K.tail;
K.rendering = G,
K.tail = G.sibling,
K.renderingStartTime = Ti(),
G.sibling = null;
var X = gp.current;
return Ap(t, X = q ? yp(X, mp) : bp(X)),
G
}
return Nv(t),
null;
case C:
break;
case x:
case R:
cA(t);
var J = null !== t.memoizedState;
return null !== e && (null !== e.memoizedState === J || N ||
(t.flags |= Xr)),
J && (t.mode & oo) !== io ? pa(py, Zo) && (Nv(t),
t.subtreeFlags & (Ur | Kr) && (t.flags |= Xr)) : Nv(t),
null;
case T:
case I:
return null
}
throw new Error("Unknown unit of work tag (" + t.tag + "). This
error is likely caused by a bug in React. Please file an issue.")
}
function jv(e, t, n) {
switch (Wd(t),
t.tag) {
case u:
gd(t.type) && vd(t);
var r = t.flags;
return r & ri ? (t.flags = r & ~ri | Wr,
(t.mode & ao) !== io && Tg(t),
t) : null;
case c:
t.stateNode,
lp(t),
bd(t),
Tp();
var i = t.flags;
return (i & ri) !== zr && (i & Wr) === zr ? (t.flags = i & ~ri |
Wr,
t) : null;
case f:
return fp(t),
null;
case A:
wp(t);
var o = t.memoizedState;
if (null !== o && null !== o.dehydrated) {
if (null === t.alternate)
throw new Error("Threw in newly mounted
dehydrated component. This is likely a bug in React. Please file an issue.");
bf()
}
var a = t.flags;
return a & ri ? (t.flags = a & ~ri | Wr,
(t.mode & ao) !== io && Tg(t),
t) : null;
case M:
return wp(t),
null;
case d:
return lp(t),
null;
case v:
return Wf(t.type._context, t),
null;
case x:
case R:
return cA(t),
null;
default:
return null
}
}
function zv(e, t, n) {
switch (Wd(t),
t.tag) {
case u:
null != t.type.childContextTypes && vd(t);
break;
case c:
t.stateNode,
lp(t),
bd(t),
Tp();
break;
case f:
fp(t);
break;
case d:
lp(t);
break;
case A:
case M:
wp(t);
break;
case v:
Wf(t.type._context, t);
break;
case x:
case R:
cA(t)
}
}
wv = function(e, t, n, r) {
for (var i, o, a = t.child; null !== a; ) {
if (a.tag === f || a.tag === h)
i = e,
o = a.stateNode,
i.appendChild(o);
else if (a.tag === d)
;
else if (null !== a.child) {
a.child.return = a,
a = a.child;
continue
}
if (a === t)
return;
for (; null === a.sibling; ) {
if (null === a.return || a.return === t)
return;
a = a.return
}
a.sibling.return = a.return,
a = a.sibling
}
}
,
_v = function(e, t) {}
,
Ev = function(e, t, n, r, i) {
var o = e.memoizedProps;
if (o !== r) {
var a = function(e, t, n, r, i, o) {
var a = o;
if (typeof r.children != typeof n.children && ("string" ==
typeof r.children || "number" == typeof r.children)) {
var s = "" + r.children
, u = Jl(a.ancestorInfo, t);
Xl(null, s, u)
}
return Wl(e, t, n, r)
}(t.stateNode, n, o, r, 0, cp());
t.updateQueue = a,
a && Pv(t)
}
}
,
Sv = function(e, t, n, r) {
n !== r && Pv(t)
}
;
var Fv = null;
Fv = new Set;
var Uv = !1
, Kv = !1
, qv = "function" == typeof WeakSet ? WeakSet : Set
, Hv = null
, Vv = null
, Wv = null
, $v = function(e, t) {
if (t.props = e.memoizedProps,
t.state = e.memoizedState,
e.mode & ao)
try {
xg(),
t.componentWillUnmount()
} finally {
Mg(e)
}
else
t.componentWillUnmount()
};
function Yv(e, t) {
try {
ib(Cp, e)
} catch (n) {
CA(e, t, n)
}
}
function Qv(e, t, n) {
try {
$v(e, n)
} catch (n) {
CA(e, t, n)
}
}
function Zv(e, t) {
try {
ub(e)
} catch (n) {
CA(e, t, n)
}
}
function Gv(e, t) {
var n = e.ref;
if (null !== n)
if ("function" == typeof n) {
var r;
try {
if (U && K && e.mode & ao)
try {
xg(),
r = n(null)
} finally {
Mg(e)
}
else
r = n(null)
} catch (n) {
CA(e, t, n)
}
"function" == typeof r && o("Unexpected return value
from a callback ref in %s. A callback ref should not return a function.", ft(e))
} else
n.current = null
}
function Xv(e, t, n) {
try {
n()
} catch (n) {
CA(e, t, n)
}
}
var Jv = !1;
function eb(e, t) {
pc(e.containerInfo),
Hv = t,
function() {
for (; null !== Hv; ) {
var e = Hv
, t = e.child;
(e.subtreeFlags & di) !== zr && null !== t ? (t.return = e,
Hv = t) : tb()
}
}();
var n = Jv;
return Jv = !1,
n
}
function tb() {
for (; null !== Hv; ) {
var e = Hv;
yt(e);
try {
nb(e)
} catch (t) {
CA(e, e.return, t)
}
bt();
var t = e.sibling;
if (null !== t)
return t.return = e.return,
void (Hv = t);
Hv = e.return
}
}
function nb(e) {
var t, n = e.alternate;
if ((e.flags & Qr) !== zr) {
switch (yt(e),
e.tag) {
case s:
case b:
case _:
break;
case u:
if (null !== n) {
var r = n.memoizedProps
, i = n.memoizedState
, a = e.stateNode;
e.type !== e.elementType || Wg || (a.props !==
e.memoizedProps && o("Expected %s props to match memoized props before
getSnapshotBeforeUpdate. This might either be because of a bug in React, or because
a component reassigns its own `this.props`. Please file an issue.", ft(e) || "instance"),
a.state !== e.memoizedState && o("Expected %s
state to match memoized state before getSnapshotBeforeUpdate. This might either be
because of a bug in React, or because a component reassigns its own `this.state`.
Please file an issue.", ft(e) || "instance"));
var l = a.getSnapshotBeforeUpdate(e.elementType
=== e.type ? r : Nf(e.type, r), i)
, p = Fv;
void 0 !== l || p.has(e.type) || (p.add(e.type),
o("%s.getSnapshotBeforeUpdate(): A snapshot
value (or null) must be returned. You have returned undefined.", ft(e))),
a.__reactInternalSnapshotBeforeUpdate = l
}
break;
case c:
(t = e.stateNode.containerInfo).nodeType === pn ?
t.textContent = "" : t.nodeType === vn && t.documentElement &&
t.removeChild(t.documentElement);
break;
case f:
case h:
case d:
case S:
break;
default:
throw new Error("This unit of work tag should not have
side-effects. This error is likely caused by a bug in React. Please file an issue.")
}
bt()
}
}
function rb(e, t, n) {
var r, i = t.updateQueue, o = null !== i ? i.lastEffect : null;
if (null !== o) {
var a = o.next
, s = a;
do {
if ((s.tag & e) === e) {
var u = s.destroy;
s.destroy = void 0,
void 0 !== u && ((e & xp) !== Sp ? (r = t,
null !== Ui && "function" == typeof
Ui.markComponentPassiveEffectUnmountStarted &&
Ui.markComponentPassiveEffectUnmountStarted(r)) : (e & Cp) !== Sp && Gi(t),
(e & Mp) !== Sp && HA(!0),
Xv(t, n, u),
(e & Mp) !== Sp && HA(!1),
(e & xp) !== Sp ? null !== Ui && "function" == typeof
Ui.markComponentPassiveEffectUnmountStopped &&
Ui.markComponentPassiveEffectUnmountStopped() : (e & Cp) !== Sp && Xi())
}
s = s.next
} while (s !== a)
}
}
function ib(e, t) {
var n, r = t.updateQueue, i = null !== r ? r.lastEffect : null;
if (null !== i) {
var a = i.next
, s = a;
do {
if ((s.tag & e) === e) {
(e & xp) !== Sp ? (n = t,
null !== Ui && "function" == typeof
Ui.markComponentPassiveEffectMountStarted &&
Ui.markComponentPassiveEffectMountStarted(n)) : (e & Cp) !== Sp && Zi(t);
var u = s.create;
(e & Mp) !== Sp && HA(!0),
s.destroy = u(),
(e & Mp) !== Sp && HA(!1),
(e & xp) !== Sp ? null !== Ui && "function" == typeof
Ui.markComponentPassiveEffectMountStopped &&
Ui.markComponentPassiveEffectMountStopped() : (e & Cp) !== Sp && null !== Ui &&
"function" == typeof Ui.markComponentLayoutEffectMountStopped &&
Ui.markComponentLayoutEffectMountStopped();
var l = s.destroy;
if (void 0 !== l && "function" != typeof l) {
var c = void 0;
o("%s must not return anything besides a
function, which is used for clean-up.%s", c = (s.tag & Cp) !== zr ? "useLayoutEffect" :
(s.tag & Mp) !== zr ? "useInsertionEffect" : "useEffect", null === l ? " You returned null. If
your effect does not require clean up, return undefined (or nothing)." : "function" ==
typeof l.then ? "\n\nIt looks like you wrote " + c + "(async () => ...) or returned a Promise.
Instead, write the async function inside your effect and call it immediately:\n\n" + c + "(()
=> {\n async function fetchData() {\n // You can await here\n const response =
await MyAPI.getData(someId);\n // ...\n }\n fetchData();\n}, [someId]); // Or [] if
effect doesn't need props or state\n\nLearn more about data fetching with Hooks:
https://reactjs.org/link/hooks-data-fetching" : " You returned: " + l)
}
}
s = s.next
} while (s !== a)
}
}
function ob(e, t) {
if ((t.flags & Kr) !== zr && t.tag === y) {
var n = t.stateNode.passiveEffectDuration
, r = t.memoizedProps
, i = r.id
, o = r.onPostCommit
, a = wg()
, s = null === t.alternate ? "mount" : "update";
Ag() && (s = "nested-update"),
"function" == typeof o && o(i, s, n, a);
var u = t.return;
e: for (; null !== u; ) {
switch (u.tag) {
case c:
case y:
u.stateNode.passiveEffectDuration += n;
break e
}
u = u.return
}
}
}
function ab(e, t, n, r) {
if ((n.flags & hi) !== zr)
switch (n.tag) {
case s:
case b:
case _:
if (!Kv)
if (n.mode & ao)
try {
xg(),
ib(Cp | kp, n)
} finally {
Mg(n)
}
else
ib(Cp | kp, n);
break;
case u:
var i = n.stateNode;
if (n.flags & Kr && !Kv)
if (null === t)
if (n.type !== n.elementType || Wg || (i.props !==
n.memoizedProps && o("Expected %s props to match memoized props before
componentDidMount. This might either be because of a bug in React, or because a
component reassigns its own `this.props`. Please file an issue.", ft(n) || "instance"),
i.state !== n.memoizedState && o("Expected
%s state to match memoized state before componentDidMount. This might either be
because of a bug in React, or because a component reassigns its own `this.state`.
Please file an issue.", ft(n) || "instance")),
n.mode & ao)
try {
xg(),
i.componentDidMount()
} finally {
Mg(n)
}
else
i.componentDidMount();
else {
var a = n.elementType === n.type ?
t.memoizedProps : Nf(n.type, t.memoizedProps)
, l = t.memoizedState;
if (n.type !== n.elementType || Wg || (i.props !==
n.memoizedProps && o("Expected %s props to match memoized props before
componentDidUpdate. This might either be because of a bug in React, or because a
component reassigns its own `this.props`. Please file an issue.", ft(n) || "instance"),
i.state !== n.memoizedState && o("Expected
%s state to match memoized state before componentDidUpdate. This might either be
because of a bug in React, or because a component reassigns its own `this.state`.
Please file an issue.", ft(n) || "instance")),
n.mode & ao)
try {
xg(),
i.componentDidUpdate(a, l,
i.__reactInternalSnapshotBeforeUpdate)
} finally {
Mg(n)
}
else
i.componentDidUpdate(a, l,
i.__reactInternalSnapshotBeforeUpdate)
}
var p = n.updateQueue;
null !== p && (n.type !== n.elementType || Wg || (i.props
!== n.memoizedProps && o("Expected %s props to match memoized props before
processing the update queue. This might either be because of a bug in React, or
because a component reassigns its own `this.props`. Please file an issue.", ft(n) ||
"instance"),
i.state !== n.memoizedState && o("Expected %s state
to match memoized state before processing the update queue. This might either be
because of a bug in React, or because a component reassigns its own `this.state`.
Please file an issue.", ft(n) || "instance")),
wh(0, p, i));
break;
case c:
var m = n.updateQueue;
if (null !== m) {
var g = null;
if (null !== n.child)
switch (n.child.tag) {
case f:
case u:
g = n.child.stateNode
}
wh(0, m, g)
}
break;
case f:
var v = n.stateNode;
null === t && n.flags & Kr && function(e, t, n, r) {
switch (t) {
case "button":
case "input":
case "select":
case "textarea":
return void (n.autoFocus && e.focus());
case "img":
n.src && (e.src = n.src)
}
}(v, n.type, n.memoizedProps);
break;
case h:
case d:
break;
case y:
var w = n.memoizedProps
, E = w.onCommit
, k = w.onRender
, T = n.stateNode.effectDuration
, P = wg()
, L = null === t ? "mount" : "update";
Ag() && (L = "nested-update"),
"function" == typeof k && k(n.memoizedProps.id, L,
n.actualDuration, n.treeBaseDuration, n.actualStartTime, P),
"function" == typeof E && E(n.memoizedProps.id, L, T,
P),
N = n,
Dy.push(N),
Ly || (Ly = !0,
UA(Oi, (function() {
return EA(),
null
}
)));
var O = n.return;
e: for (; null !== O; ) {
switch (O.tag) {
case c:
case y:
O.stateNode.effectDuration += T;
break e
}
O = O.return
}
break;
case A:
!function(e, t) {
if (null === t.memoizedState) {
var n = t.alternate;
if (null !== n) {
var r = n.memoizedState;
if (null !== r) {
var i = r.dehydrated;
null !== i && function(e) {
rs(e)
}(i)
}
}
}
}(0, n);
break;
case M:
case S:
case C:
case x:
case R:
case I:
break;
default:
throw new Error("This unit of work tag should not have
side-effects. This error is likely caused by a bug in React. Please file an issue.")
}
var N;
Kv || n.flags & Yr && ub(n)
}
function sb(e) {
switch (e.tag) {
case s:
case b:
case _:
if (e.mode & ao)
try {
xg(),
Yv(e, e.return)
} finally {
Mg(e)
}
else
Yv(e, e.return);
break;
case u:
var t = e.stateNode;
"function" == typeof t.componentDidMount && function(e, t,
n) {
try {
n.componentDidMount()
} catch (n) {
CA(e, t, n)
}
}(e, e.return, t),
Zv(e, e.return);
break;
case f:
Zv(e, e.return)
}
}
function ub(e) {
var t = e.ref;
if (null !== t) {
var n, r = e.stateNode;
if (e.tag,
n = r,
"function" == typeof t) {
var i;
if (e.mode & ao)
try {
xg(),
i = t(n)
} finally {
Mg(e)
}
else
i = t(n);
"function" == typeof i && o("Unexpected return value
from a callback ref in %s. A callback ref should not return a function.", ft(e))
} else
t.hasOwnProperty("current") || o("Unexpected ref object
provided for %s. Use either a ref-setter function or React.createRef().", ft(e)),
t.current = n
}
}
function lb(e) {
var t = e.alternate;
if (null !== t && (e.alternate = null,
lb(t)),
e.child = null,
e.deletions = null,
e.sibling = null,
e.tag === f) {
var n = e.stateNode;
null !== n && function(e) {
delete e[Dc],
delete e[Bc],
delete e[zc],
delete e[Fc],
delete e[Uc]
}(n)
}
e.stateNode = null,
e._debugOwner = null,
e.return = null,
e.dependencies = null,
e.memoizedProps = null,
e.memoizedState = null,
e.pendingProps = null,
e.stateNode = null,
e.updateQueue = null
}
function cb(e) {
return e.tag === f || e.tag === c || e.tag === d
}
function db(e) {
var t = e;
e: for (; ; ) {
for (; null === t.sibling; ) {
if (null === t.return || cb(t.return))
return null;
t = t.return
}
for (t.sibling.return = t.return,
t = t.sibling; t.tag !== f && t.tag !== h && t.tag !== k; ) {
if (t.flags & Ur)
continue e;
if (null === t.child || t.tag === d)
continue e;
t.child.return = t,
t = t.child
}
if (!(t.flags & Ur))
return t.stateNode
}
}
function fb(e) {
var t = function(e) {
for (var t = e.return; null !== t; ) {
if (cb(t))
return t;
t = t.return
}
throw new Error("Expected to find a host parent. This error
is likely caused by a bug in React. Please file an issue.")
}(e);
switch (t.tag) {
case f:
var n = t.stateNode;
t.flags & Hr && (Sc(n),
t.flags &= ~Hr),
pb(e, db(e), n);
break;
case c:
case d:
var r = t.stateNode.containerInfo;
hb(e, db(e), r);
break;
default:
throw new Error("Invalid host parent fiber. This error is likely
caused by a bug in React. Please file an issue.")
}
}
function hb(e, t, n) {
var r = e.tag;
if (r === f || r === h) {
var i = e.stateNode;
t ? function(e, t, n) {
e.nodeType === gn ? e.parentNode.insertBefore(t, n) :
e.insertBefore(t, n)
}(n, i, t) : function(e, t) {
var n;
e.nodeType === gn ? (n = e.parentNode).insertBefore(t,
e) : (n = e).appendChild(t),
null == e._reactRootContainer && null === n.onclick &&
Hl(n)
}(n, i)
} else if (r === d)
;
else {
var o = e.child;
if (null !== o) {
hb(o, t, n);
for (var a = o.sibling; null !== a; )
hb(a, t, n),
a = a.sibling
}
}
}
function pb(e, t, n) {
var r = e.tag;
if (r === f || r === h) {
var i = e.stateNode;
t ? function(e, t, n) {
e.insertBefore(t, n)
}(n, i, t) : function(e, t) {
e.appendChild(t)
}(n, i)
} else if (r === d)
;
else {
var o = e.child;
if (null !== o) {
pb(o, t, n);
for (var a = o.sibling; null !== a; )
pb(a, t, n),
a = a.sibling
}
}
}
var mb = null
, gb = !1;
function vb(e, t, n) {
var r, i, o = t;
e: for (; null !== o; ) {
switch (o.tag) {
case f:
mb = o.stateNode,
gb = !1;
break e;
case c:
case d:
mb = o.stateNode.containerInfo,
gb = !0;
break e
}
o = o.return
}
if (null === mb)
throw new Error("Expected to find a host parent. This error
is likely caused by a bug in React. Please file an issue.");
yb(e, t, n),
mb = null,
gb = !1,
null !== (i = (r = n).alternate) && (i.return = null),
r.return = null
}
function bb(e, t, n) {
for (var r = n.child; null !== r; )
yb(e, t, r),
r = r.sibling
}
function yb(e, t, n) {
switch (function(e) {
if (Fi && "function" == typeof Fi.onCommitFiberUnmount)
try {
Fi.onCommitFiberUnmount(zi, e)
} catch (e) {
Ki || (Ki = !0,
o("React instrumentation encountered an error:
%s", e))
}
}(n),
n.tag) {
case f:
Kv || Gv(n, t);
case h:
var r = mb
, i = gb;
return mb = null,
bb(e, t, n),
gb = i,
void (null !== (mb = r) && (gb ? (M = mb,
R = n.stateNode,
M.nodeType === gn ? M.parentNode.removeChild(R) :
M.removeChild(R)) : function(e, t) {
e.removeChild(t)
}(mb, n.stateNode)));
case k:
return void (null !== mb && (gb ? function(e, t) {
e.nodeType === gn ? kc(e.parentNode, t) : e.nodeType
=== pn && kc(e, t),
rs(e)
}(mb, n.stateNode) : kc(mb, n.stateNode)));
case d:
var a = mb
, l = gb;
return mb = n.stateNode.containerInfo,
gb = !0,
bb(e, t, n),
mb = a,
void (gb = l);
case s:
case b:
case w:
case _:
if (!Kv) {
var c = n.updateQueue;
if (null !== c) {
var p = c.lastEffect;
if (null !== p) {
var m = p.next
, g = m;
do {
var v = g
, y = v.destroy
, A = v.tag;
void 0 !== y && ((A & Mp) !== Sp ? Xv(n, t,
y) : (A & Cp) !== Sp && (Gi(n),
n.mode & ao ? (xg(),
Xv(n, t, y),
Mg(n)) : Xv(n, t, y),
Xi())),
g = g.next
} while (g !== m)
}
}
}
return void bb(e, t, n);
case u:
if (!Kv) {
Gv(n, t);
var E = n.stateNode;
"function" == typeof E.componentWillUnmount &&
Qv(n, t, E)
}
return void bb(e, t, n);
case C:
return void bb(e, t, n);
case x:
if (n.mode & oo) {
var S = Kv;
Kv = S || null !== n.memoizedState,
bb(e, t, n),
Kv = S
} else
bb(e, t, n);
break;
default:
return void bb(e, t, n)
}
var M, R
}
function Ab(e) {
var t = e.updateQueue;
if (null !== t) {
e.updateQueue = null;
var n = e.stateNode;
null === n && (n = e.stateNode = new qv),
t.forEach((function(t) {
var r = IA.bind(null, e, t);
if (!n.has(t)) {
if (n.add(t),
qi) {
if (null === Vv || null === Wv)
throw Error("Expected finished root and
lanes to be set. This is a bug in React.");
zA(Wv, Vv)
}
t.then(r, r)
}
}
))
}
}
function wb(e, t, n) {
var r = t.deletions;
if (null !== r)
for (var i = 0; i < r.length; i++) {
var o = r[i];
try {
vb(e, t, o)
} catch (e) {
CA(o, t, e)
}
}
var a = pt;
if (t.subtreeFlags & fi)
for (var s = t.child; null !== s; )
yt(s),
_b(s, e),
s = s.sibling;
yt(a)
}
function _b(e, t, n) {
var r = e.alternate
, i = e.flags;
switch (e.tag) {
case s:
case b:
case w:
case _:
if (wb(t, e),
Eb(e),
i & Kr) {
try {
rb(Mp | kp, e, e.return),
ib(Mp | kp, e)
} catch (t) {
CA(e, e.return, t)
}
if (e.mode & ao) {
try {
xg(),
rb(Cp | kp, e, e.return)
} catch (t) {
CA(e, e.return, t)
}
Mg(e)
} else
try {
rb(Cp | kp, e, e.return)
} catch (t) {
CA(e, e.return, t)
}
}
return;
case u:
return wb(t, e),
Eb(e),
void (i & Yr && null !== r && Gv(r, r.return));
case f:
if (wb(t, e),
Eb(e),
i & Yr && null !== r && Gv(r, r.return),
e.flags & Hr) {
var o = e.stateNode;
try {
Sc(o)
} catch (t) {
CA(e, e.return, t)
}
}
if (i & Kr) {
var a = e.stateNode;
if (null != a) {
var l = e.memoizedProps
, p = null !== r ? r.memoizedProps : l
, m = e.type
, g = e.updateQueue;
if (e.updateQueue = null,
null !== g)
try {
!function(e, t, n, r, i, o) {
$l(e, t, n, r, i),
Zc(e, i)
}(a, g, m, p, l)
} catch (t) {
CA(e, e.return, t)
}
}
}
return;
case h:
if (wb(t, e),
Eb(e),
i & Kr) {
if (null === e.stateNode)
throw new Error("This should have a text node
initialized. This error is likely caused by a bug in React. Please file an issue.");
var v = e.stateNode
, y = e.memoizedProps;
null !== r && r.memoizedProps;
try {
!function(e, t, n) {
e.nodeValue = n
}(v, 0, y)
} catch (t) {
CA(e, e.return, t)
}
}
return;
case c:
if (wb(t, e),
Eb(e),
i & Kr && null !== r && r.memoizedState.isDehydrated)
try {
rs(t.containerInfo)
} catch (t) {
CA(e, e.return, t)
}
return;
case d:
return wb(t, e),
void Eb(e);
case A:
wb(t, e),
Eb(e);
var E = e.child;
if (E.flags & Xr) {
var S = E.stateNode
, k = null !== E.memoizedState;
S.isHidden = k,
k && (null !== E.alternate && null !==
E.alternate.memoizedState || (Ey = Ti()))
}
if (i & Kr) {
try {
!function(e) {
e.memoizedState
}(e)
} catch (t) {
CA(e, e.return, t)
}
Ab(e)
}
return;
case x:
var T = null !== r && null !== r.memoizedState;
if (e.mode & oo) {
var I = Kv;
Kv = I || T,
wb(t, e),
Kv = I
} else
wb(t, e);
if (Eb(e),
i & Xr) {
var P = e.stateNode
, L = null !== e.memoizedState
, O = e;
if (P.isHidden = L,
L && !T && (O.mode & oo) !== io) {
Hv = O;
for (var N = O.child; null !== N; )
Hv = N,
Cb(N),
N = N.sibling
}
!function(e, t) {
for (var n = null, r = e; ; ) {
if (r.tag === f) {
if (null === n) {
n = r;
try {
var i = r.stateNode;
t ? Mc(i) : Cc(r.stateNode,
r.memoizedProps)
} catch (t) {
CA(e, e.return, t)
}
}
} else if (r.tag === h) {
if (null === n)
try {
var o = r.stateNode;
t ? o.nodeValue = "" : xc(o,
r.memoizedProps)
} catch (t) {
CA(e, e.return, t)
}
} else if ((r.tag !== x && r.tag !== R || null ===
r.memoizedState || r === e) && null !== r.child) {
r.child.return = r,
r = r.child;
continue
}
if (r === e)
return;
for (; null === r.sibling; ) {
if (null === r.return || r.return === e)
return;
n === r && (n = null),
r = r.return
}
n === r && (n = null),
r.sibling.return = r.return,
r = r.sibling
}
}(O, L)
}
return;
case M:
return wb(t, e),
Eb(e),
void (i & Kr && Ab(e));
case C:
return;
default:
return wb(t, e),
void Eb(e)
}
}
function Eb(e) {
var t = e.flags;
if (t & Ur) {
try {
fb(e)
} catch (t) {
CA(e, e.return, t)
}
e.flags &= ~Ur
}
t & Gr && (e.flags &= ~Gr)
}
function Sb(e, t, n) {
Vv = n,
Wv = t,
Hv = e,
kb(e, t, n),
Vv = null,
Wv = null
}
function kb(e, t, n) {
for (var r = (e.mode & oo) !== io; null !== Hv; ) {
var i = Hv
, o = i.child;
if (i.tag === x && r) {
var a = null !== i.memoizedState || Uv;
if (a) {
Mb(e, t, n);
continue
}
var s = i.alternate
, u = null !== s && null !== s.memoizedState
, l = Uv
, c = Kv;
Uv = a,
(Kv = u || Kv) && !c && (Hv = i,
Rb(i));
for (var d = o; null !== d; )
Hv = d,
kb(d, t, n),
d = d.sibling;
Hv = i,
Uv = l,
Kv = c,
Mb(e, t, n)
} else
(i.subtreeFlags & hi) !== zr && null !== o ? (o.return = i,
Hv = o) : Mb(e, t, n)
}
}
function Mb(e, t, n) {
for (; null !== Hv; ) {
var r = Hv;
if ((r.flags & hi) !== zr) {
var i = r.alternate;
yt(r);
try {
ab(0, i, r)
} catch (e) {
CA(r, r.return, e)
}
bt()
}
if (r === e)
return void (Hv = null);
var o = r.sibling;
if (null !== o)
return o.return = r.return,
void (Hv = o);
Hv = r.return
}
}
function Cb(e) {
for (; null !== Hv; ) {
var t = Hv
, n = t.child;
switch (t.tag) {
case s:
case b:
case w:
case _:
if (t.mode & ao)
try {
xg(),
rb(Cp, t, t.return)
} finally {
Mg(t)
}
else
rb(Cp, t, t.return);
break;
case u:
Gv(t, t.return);
var r = t.stateNode;
"function" == typeof r.componentWillUnmount && Qv(t,
t.return, r);
break;
case f:
Gv(t, t.return);
break;
case x:
if (null !== t.memoizedState) {
xb(e);
continue
}
}
null !== n ? (n.return = t,
Hv = n) : xb(e)
}
}
function xb(e) {
for (; null !== Hv; ) {
var t = Hv;
if (t === e)
return void (Hv = null);
var n = t.sibling;
if (null !== n)
return n.return = t.return,
void (Hv = n);
Hv = t.return
}
}
function Rb(e) {
for (; null !== Hv; ) {
var t = Hv
, n = t.child;
(t.tag !== x || null === t.memoizedState) && null !== n ?
(n.return = t,
Hv = n) : Tb(e)
}
}
function Tb(e) {
for (; null !== Hv; ) {
var t = Hv;
yt(t);
try {
sb(t)
} catch (e) {
CA(t, t.return, e)
}
if (bt(),
t === e)
return void (Hv = null);
var n = t.sibling;
if (null !== n)
return n.return = t.return,
void (Hv = n);
Hv = t.return
}
}
function Ib(e, t, n, r) {
Hv = t,
function(e, t, n, r) {
for (; null !== Hv; ) {
var i = Hv
, o = i.child;
(i.subtreeFlags & pi) !== zr && null !== o ? (o.return = i,
Hv = o) : Pb(e, t, n, r)
}
}(t, e, n, r)
}
function Pb(e, t, n, r) {
for (; null !== Hv; ) {
var i = Hv;
if ((i.flags & Zr) !== zr) {
yt(i);
try {
Lb(t, i, n, r)
} catch (e) {
CA(i, i.return, e)
}
bt()
}
if (i === e)
return void (Hv = null);
var o = i.sibling;
if (null !== o)
return o.return = i.return,
void (Hv = o);
Hv = i.return
}
}
function Lb(e, t, n, r) {
switch (t.tag) {
case s:
case b:
case _:
if (t.mode & ao) {
Rg();
try {
ib(xp | kp, t)
} finally {
Cg(t)
}
} else
ib(xp | kp, t)
}
}
function Ob(e) {
Hv = e,
function() {
for (; null !== Hv; ) {
var e = Hv
, t = e.child;
if ((Hv.flags & qr) !== zr) {
var n = e.deletions;
if (null !== n) {
for (var r = 0; r < n.length; r++) {
var i = n[r];
Hv = i,
Bb(i, e)
}
var o = e.alternate;
if (null !== o) {
var a = o.child;
if (null !== a) {
o.child = null;
do {
var s = a.sibling;
a.sibling = null,
a=s
} while (null !== a)
}
}
Hv = e
}
}
(e.subtreeFlags & pi) !== zr && null !== t ? (t.return = e,
Hv = t) : Nb()
}
}()
}
function Nb() {
for (; null !== Hv; ) {
var e = Hv;
(e.flags & Zr) !== zr && (yt(e),
Db(e),
bt());
var t = e.sibling;
if (null !== t)
return t.return = e.return,
void (Hv = t);
Hv = e.return
}
}
function Db(e) {
switch (e.tag) {
case s:
case b:
case _:
e.mode & ao ? (Rg(),
rb(xp | kp, e, e.return),
Cg(e)) : rb(xp | kp, e, e.return)
}
}
function Bb(e, t) {
for (; null !== Hv; ) {
var n = Hv;
yt(n),
zb(n, t),
bt();
var r = n.child;
null !== r ? (r.return = n,
Hv = r) : jb(e)
}
}
function jb(e) {
for (; null !== Hv; ) {
var t = Hv
, n = t.sibling
, r = t.return;
if (lb(t),
t === e)
return void (Hv = null);
if (null !== n)
return n.return = r,
void (Hv = n);
Hv = r
}
}
function zb(e, t) {
switch (e.tag) {
case s:
case b:
case _:
e.mode & ao ? (Rg(),
rb(xp, e, t),
Cg(e)) : rb(xp, e, t)
}
}
function Fb(e) {
switch (e.tag) {
case s:
case b:
case _:
try {
ib(Cp | kp, e)
} catch (t) {
CA(e, e.return, t)
}
break;
case u:
var t = e.stateNode;
try {
t.componentDidMount()
} catch (t) {
CA(e, e.return, t)
}
}
}
function Ub(e) {
switch (e.tag) {
case s:
case b:
case _:
try {
ib(xp | kp, e)
} catch (t) {
CA(e, e.return, t)
}
}
}
function Kb(e) {
switch (e.tag) {
case s:
case b:
case _:
try {
rb(Cp | kp, e, e.return)
} catch (t) {
CA(e, e.return, t)
}
break;
case u:
var t = e.stateNode;
"function" == typeof t.componentWillUnmount && Qv(e,
e.return, t)
}
}
function qb(e) {
switch (e.tag) {
case s:
case b:
case _:
try {
rb(xp | kp, e, e.return)
} catch (t) {
CA(e, e.return, t)
}
}
}
if ("function" == typeof Symbol && Symbol.for) {
var Hb = Symbol.for;
Hb("selector.component"),
Hb("selector.has_pseudo_class"),
Hb("selector.role"),
Hb("selector.test_id"),
Hb("selector.text")
}
var Vb = []
, Wb = n.ReactCurrentActQueue;
function $b() {
var e = "undefined" != typeof IS_REACT_ACT_ENVIRONMENT
? IS_REACT_ACT_ENVIRONMENT : void 0;
return e || null === Wb.current || o("The current testing
environment is not configured to support act(...)"),
e
}
var Yb = Math.ceil
, Qb = n.ReactCurrentDispatcher
, Zb = n.ReactCurrentOwner
, Gb = n.ReactCurrentBatchConfig
, Xb = n.ReactCurrentActQueue
, Jb = 0
, ey = 1
, ty = 2
, ny = 4
, ry = 0
, iy = 1
, oy = 2
, ay = 3
, sy = 4
, uy = 5
, ly = 6
, cy = Jb
, dy = null
, fy = null
, hy = po
, py = po
, my = od(po)
, gy = ry
, vy = null
, by = po
, yy = po
, Ay = po
, wy = null
, _y = null
, Ey = 0
, Sy = 500
, ky = 1 / 0
, My = 500
, Cy = null;
function xy() {
ky = Ti() + My
}
function Ry() {
return ky
}
var Ty = !1
, Iy = null
, Py = null
, Ly = !1
, Oy = null
, Ny = po
, Dy = []
, By = null
, jy = 50
, zy = 0
, Fy = null
, Uy = !1
, Ky = !1
, qy = 50
, Hy = 0
, Vy = null
, Wy = Xo
, $y = po
, Yy = !1;
function Qy() {
return dy
}
function Zy() {
return (cy & (ty | ny)) !== Jb ? Ti() : Wy !== Xo ? Wy : Wy = Ti()
}
function Gy(e) {
if ((e.mode & oo) === io)
return go;
if ((cy & ty) !== Jb && hy !== po)
return da(hy);
if (_f.transition !== Ef) {
if (null !== Gb.transition) {
var t = Gb.transition;
t._updatedFibers || (t._updatedFibers = new Set),
t._updatedFibers.add(e)
}
return $y === mo && ($y = la()),
$y
}
var n, r = Na();
return r !== mo ? r : void 0 === (n = window.event) ? Pa :
fs(n.type)
}
function Xy(e) {
var t;
return (e.mode & oo) === io ? go : (t = ea,
((ea <<= 1) & zo) === po && (ea = Fo),
t)
}
function Jy(e, t, n, r) {
!function() {
if (zy > jy)
throw zy = 0,
Fy = null,
new Error("Maximum update depth exceeded. This can
happen when a component repeatedly calls setState inside componentWillUpdate or
componentDidUpdate. React limits the number of nested updates to prevent infinite
loops.");
Hy > qy && (Hy = 0,
Vy = null,
o("Maximum update depth exceeded. This can happen
when a component calls setState inside useEffect, but useEffect either doesn't have a
dependency array, or one of the dependencies changes on every render."))
}(),
Yy && o("useInsertionEffect must not schedule updates."),
Uy && (Ky = !0),
Aa(e, n, r),
(cy & ty) !== po && e === dy ? function(e) {
if (mt && !Ym)
switch (e.tag) {
case s:
case b:
case _:
var t = fy && ft(fy) || "Unknown"
, n = t;
BA.has(n) || (BA.add(n),
o("Cannot update a component (`%s`) while
rendering a different component (`%s`). To locate the bad setState() call inside `%s`,
follow the stack trace as described in https://reactjs.org/link/setstate-in-render", ft(e) ||
"Unknown", t, t));
break;
case u:
jA || (o("Cannot update during an existing state
transition (such as within `render`). Render methods should be a pure function of props
and state."),
jA = !0)
}
}(t) : (qi && Ea(e, t, n),
function(e) {
if (e.mode & oo) {
if (!$b())
return
} else {
if (t = "undefined" != typeof
IS_REACT_ACT_ENVIRONMENT ? IS_REACT_ACT_ENVIRONMENT : void 0,
"undefined" == typeof jest || !1 === t)
return;
if (cy !== Jb)
return;
if (e.tag !== s && e.tag !== b && e.tag !== _)
return
}
var t;
if (null === Xb.current) {
var n = pt;
try {
yt(e),
o("An update to %s inside a test was not wrapped
in act(...).\n\nWhen testing, code that causes React state updates should be wrapped
into act(...):\n\nact(() => {\n /* fire events that update state */\n});\n/* assert on the
output */\n\nThis ensures that you're testing the behavior the user would see in the
browser. Learn more at https://reactjs.org/link/wrap-tests-with-act", ft(e))
} finally {
n ? yt(e) : bt()
}
}
}(t),
e === dy && ((cy & ty) === Jb && (yy = ga(yy, n)),
gy === sy && iA(e, hy)),
eA(e, r),
n !== go || cy !== Jb || (t.mode & oo) !== io ||
Xb.isBatchingLegacy || (xy(),
Td()))
}
function eA(e, t) {
var n = e.callbackNode;
!function(e, t) {
for (var n = e.pendingLanes, r = e.suspendedLanes, i =
e.pingedLanes, o = e.expirationTimes, a = n; a > 0; ) {
var s = fa(a)
, u = 1 << s
, l = o[s];
l === Xo ? (u & r) !== po && (u & i) === po || (o[s] =
ra(u, t)) : l <= t && (e.expiredLanes |= u),
a &= ~u
}
}(e, t);
var r = na(e, e === dy ? hy : po);
if (r === po)
return null !== n && KA(n),
e.callbackNode = null,
void (e.callbackPriority = mo);
var i = ca(r)
, a = e.callbackPriority;
if (a !== i || null !== Xb.current && n !== FA) {
var s, u;
if (null != n && KA(n),
i === go)
e.tag === Sd ? (null !== Xb.isBatchingLegacy &&
(Xb.didScheduleLegacyUpdate = !0),
u = oA.bind(null, e),
Cd = !0,
Rd(u)) : Rd(oA.bind(null, e)),
null !== Xb.current ? Xb.current.push(Id) : _c((function()
{
(cy & (ty | ny)) === Jb && Id()
}
)),
s = null;
else {
var l;
switch (ja(r)) {
case Ta:
l = Pi;
break;
case Ia:
l = Li;
break;
case Pa:
l = Oi;
break;
case La:
l = Di;
break;
default:
l = Oi
}
s = UA(l, tA.bind(null, e))
}
e.callbackPriority = i,
e.callbackNode = s
} else
null == n && a !== go && o("Expected scheduled callback to
exist. This error is likely caused by a bug in React. Please file an issue.")
}
function tA(e, t) {
if (bg = !1,
yg = !1,
Wy = Xo,
$y = po,
(cy & (ty | ny)) !== Jb)
throw new Error("Should not already be working.");
var n = e.callbackNode;
if (EA() && e.callbackNode !== n)
return null;
var r = na(e, e === dy ? hy : po);
if (r === po)
return null;
var i = !sa(0, r) && !function(e, t) {
return (t & e.expiredLanes) !== po
}(e, r) && !t
, o = i ? function(e, t) {
var n = cy;
cy |= ty;
var r = hA();
if (dy !== e || hy !== t) {
if (qi) {
var i = e.memoizedUpdaters;
i.size > 0 && (zA(e, hy),
i.clear()),
Sa(e, t)
}
Cy = null,
xy(),
dA(e, t)
}
for (to(t); ; )
try {
yA();
break
} catch (t) {
fA(e, t)
}
return Kf(),
pA(r),
cy = n,
null !== fy ? (null !== Ui && "function" == typeof
Ui.markRenderYielded && Ui.markRenderYielded(),
ry) : (no(),
dy = null,
hy = po,
gy)
}(e, r) : vA(e, r);
if (o !== ry) {
if (o === oy) {
var a = ia(e);
a !== po && (r = a,
o = nA(e, a))
}
if (o === iy) {
var s = vy;
throw dA(e, po),
iA(e, r),
eA(e, Ti()),
s
}
if (o === ly)
iA(e, r);
else {
var u = !sa(0, r)
, l = e.current.alternate;
if (u && !function(e) {
for (var t = e; ; ) {
if (t.flags & Jr) {
var n = t.updateQueue;
if (null !== n) {
var r = n.stores;
if (null !== r)
for (var i = 0; i < r.length; i++) {
var o = r[i]
, a = o.getSnapshot
, s = o.value;
try {
if (!Cu(a(), s))
return !1
} catch (e) {
return !1
}
}
}
}
var u = t.child;
if (t.subtreeFlags & Jr && null !== u)
u.return = t,
t = u;
else {
if (t === e)
return !0;
for (; null === t.sibling; ) {
if (null === t.return || t.return === e)
return !0;
t = t.return
}
t.sibling.return = t.return,
t = t.sibling
}
}
return !0
}(l)) {
if ((o = vA(e, r)) === oy) {
var c = ia(e);
c !== po && (r = c,
o = nA(e, c))
}
if (o === iy) {
var d = vy;
throw dA(e, po),
iA(e, r),
eA(e, Ti()),
d
}
}
e.finishedWork = l,
e.finishedLanes = r,
function(e, t, n) {
switch (t) {
case ry:
case iy:
throw new Error("Root did not complete. This is
a bug in React.");
case oy:
_A(e, _y, Cy);
break;
case ay:
if (iA(e, n),
aa(n) && !qA()) {
var r = Ey + Sy - Ti();
if (r > 10) {
if (na(e, po) !== po)
break;
var i = e.suspendedLanes;
if (!ma(i, n)) {
Zy(),
wa(e, i);
break
}
e.timeoutHandle = bc(_A.bind(null, e,
_y, Cy), r);
break
}
}
_A(e, _y, Cy);
break;
case sy:
if (iA(e, n),
function(e) {
return (e & _o) === e
}(n))
break;
if (!qA()) {
var o = function(e, t) {
for (var n = e.eventTimes, r = Xo; t >
0; ) {
var i = fa(t)
, o = 1 << i
, a = n[i];
a > r && (r = a),
t &= ~o
}
return r
}(e, n)
,a=o
, s = Ti() - a
, u = ((l = s) < 120 ? 120 : l < 480 ? 480 : l
< 1080 ? 1080 : l < 1920 ? 1920 : l < 3e3 ? 3e3 : l < 4320 ? 4320 : 1960 * Yb(l / 1960)) -
s;
if (u > 10) {
e.timeoutHandle = bc(_A.bind(null, e,
_y, Cy), u);
break
}
}
_A(e, _y, Cy);
break;
case uy:
_A(e, _y, Cy);
break;
default:
throw new Error("Unknown root exit status.")
}
var l
}(e, o, r)
}
}
return eA(e, Ti()),
e.callbackNode === n ? tA.bind(null, e) : null
}
function nA(e, t) {
var n = wy;
za(e) && (dA(e, t).flags |= $r,
o("An error occurred during hydration. The server HTML was
replaced with client content in <%s>.", e.containerInfo.nodeName.toLowerCase()));
var r = vA(e, t);
if (r !== oy) {
var i = _y;
_y = n,
null !== i && rA(i)
}
return r
}
function rA(e) {
null === _y ? _y = e : _y.push.apply(_y, e)
}
function iA(e, t) {
t = va(t, Ay),
function(e, t) {
e.suspendedLanes |= t,
e.pingedLanes &= ~t;
for (var n = e.expirationTimes, r = t; r > 0; ) {
var i = fa(r)
, o = 1 << i;
n[i] = Xo,
r &= ~o
}
}(e, t = va(t, yy))
}
function oA(e) {
if (bg = yg,
yg = !1,
(cy & (ty | ny)) !== Jb)
throw new Error("Should not already be working.");
EA();
var t = na(e, po);
if (!pa(t, go))
return eA(e, Ti()),
null;
var n = vA(e, t);
if (e.tag !== Sd && n === oy) {
var r = ia(e);
r !== po && (t = r,
n = nA(e, r))
}
if (n === iy) {
var i = vy;
throw dA(e, po),
iA(e, t),
eA(e, Ti()),
i
}
if (n === ly)
throw new Error("Root did not complete. This is a bug in
React.");
var o = e.current.alternate;
return e.finishedWork = o,
e.finishedLanes = t,
_A(e, _y, Cy),
eA(e, Ti()),
null
}
function aA(e, t) {
var n = cy;
cy |= ey;
try {
return e(t)
} finally {
(cy = n) !== Jb || Xb.isBatchingLegacy || (xy(),
Td())
}
}
function sA(e) {
null !== Oy && Oy.tag === Sd && (cy & (ty | ny)) === Jb &&
EA();
var t = cy;
cy |= ey;
var n = Gb.transition
, r = Na();
try {
return Gb.transition = null,
Da(Ta),
e ? e() : void 0
} finally {
Da(r),
Gb.transition = n,
((cy = t) & (ty | ny)) === Jb && Id()
}
}
function uA() {
return (cy & (ty | ny)) !== Jb
}
function lA(e, t) {
sd(my, py, e),
py = ga(py, t)
}
function cA(e) {
py = my.current,
ad(my, e)
}
function dA(e, t) {
e.finishedWork = null,
e.finishedLanes = po;
var n = e.timeoutHandle;
if (n !== Ac && (e.timeoutHandle = Ac,
yc(n)),
null !== fy)
for (var r = fy.return; null !== r; )
r.alternate,
zv(0, r),
r = r.return;
dy = e;
var i = lw(e.current, null);
return fy = i,
hy = py = t,
gy = ry,
vy = null,
by = po,
yy = po,
Ay = po,
wy = null,
_y = null,
function() {
if (null !== Gf) {
for (var e = 0; e < Gf.length; e++) {
var t = Gf[e]
, n = t.interleaved;
if (null !== n) {
t.interleaved = null;
var r = n.next
, i = t.pending;
if (null !== i) {
var o = i.next;
i.next = r,
n.next = o
}
t.pending = n
}
}
Gf = null
}
}(),
Sf.discardPendingWarnings(),
i
}
function fA(e, t) {
for (; ; ) {
var n = fy;
try {
if (Kf(),
rm(),
bt(),
Zb.current = null,
null === n || null === n.return)
return gy = iy,
vy = t,
void (fy = null);
U && n.mode & ao && kg(n, !0),
F && (Qi(),
null !== t && "object" == typeof t && "function" == typeof
t.then ? eo(n, t, hy) : Ji(n, t, hy)),
Fg(e, n.return, n, t, hy),
wA(n)
} catch (e) {
t = e,
fy === n && null !== n ? (n = n.return,
fy = n) : n = fy;
continue
}
return
}
}
function hA() {
var e = Qb.current;
return Qb.current = rg,
null === e ? rg : e
}
function pA(e) {
Qb.current = e
}
function mA(e) {
by = ga(e, by)
}
function gA() {
gy !== ry && gy !== ay && gy !== oy || (gy = sy),
null !== dy && (oa(by) || oa(yy)) && iA(dy, hy)
}
function vA(e, t) {
var n = cy;
cy |= ty;
var r = hA();
if (dy !== e || hy !== t) {
if (qi) {
var i = e.memoizedUpdaters;
i.size > 0 && (zA(e, hy),
i.clear()),
Sa(e, t)
}
Cy = null,
dA(e, t)
}
for (to(t); ; )
try {
bA();
break
} catch (t) {
fA(e, t)
}
if (Kf(),
cy = n,
pA(r),
null !== fy)
throw new Error("Cannot commit an incomplete root. This
error is likely caused by a bug in React. Please file an issue.");
return no(),
dy = null,
hy = po,
gy
}
function bA() {
for (; null !== fy; )
AA(fy)
}
function yA() {
for (; null !== fy && !xi(); )
AA(fy)
}
function AA(e) {
var t, n = e.alternate;
yt(e),
(e.mode & ao) !== io ? (Eg(e),
t = OA(n, e, py),
kg(e, !0)) : t = OA(n, e, py),
bt(),
e.memoizedProps = e.pendingProps,
null === t ? wA(e) : fy = t,
Zb.current = null
}
function wA(e) {
var t = e;
do {
var n = t.alternate
, r = t.return;
if ((t.flags & ni) === zr) {
yt(t);
var i = void 0;
if ((t.mode & ao) === io ? i = Bv(n, t, py) : (Eg(t),
i = Bv(n, t, py),
kg(t, !1)),
bt(),
null !== i)
return void (fy = i)
} else {
var o = jv(0, t);
if (null !== o)
return o.flags &= ti,
void (fy = o);
if ((t.mode & ao) !== io) {
kg(t, !1);
for (var a = t.actualDuration, s = t.child; null !== s; )
a += s.actualDuration,
s = s.sibling;
t.actualDuration = a
}
if (null === r)
return gy = ly,
void (fy = null);
r.flags |= ni,
r.subtreeFlags = zr,
r.deletions = null
}
var u = t.sibling;
if (null !== u)
return void (fy = u);
fy = t = r
} while (null !== t);
gy === ry && (gy = uy)
}
function _A(e, t, n) {
var r = Na()
, i = Gb.transition;
try {
Gb.transition = null,
Da(Ta),
function(e, t, n, r) {
do {
EA()
} while (null !== Oy);
if (Sf.flushLegacyContextWarning(),
Sf.flushPendingUnsafeLifecycleWarnings(),
(cy & (ty | ny)) !== Jb)
throw new Error("Should not already be working.");
var i = e.finishedWork
, a = e.finishedLanes;
if (function(e) {
null !== Ui && "function" == typeof
Ui.markCommitStarted && Ui.markCommitStarted(e)
}(a),
null === i)
return $i(),
null;
if (a === po && o("root.finishedLanes should not be
empty during a commit. This is a bug in React."),
e.finishedWork = null,
e.finishedLanes = po,
i === e.current)
throw new Error("Cannot commit the same tree as
before. This error is likely caused by a bug in React. Please file an issue.");
e.callbackNode = null,
e.callbackPriority = mo;
var s = ga(i.lanes, i.childLanes);
(function(e, t) {
var n = e.pendingLanes & ~t;
e.pendingLanes = t,
e.suspendedLanes = po,
e.pingedLanes = po,
e.expiredLanes &= t,
e.mutableReadLanes &= t,
e.entangledLanes &= t;
for (var r = e.entanglements, i = e.eventTimes, o =
e.expirationTimes, a = n; a > 0; ) {
var s = fa(a)
, u = 1 << s;
r[s] = po,
i[s] = Xo,
o[s] = Xo,
a &= ~u
}
}
)(e, s),
e === dy && (dy = null,
fy = null,
hy = po),
(i.subtreeFlags & pi) === zr && (i.flags & pi) === zr || Ly
|| (Ly = !0,
By = n,
UA(Oi, (function() {
return EA(),
null
}
)));
var u = (i.subtreeFlags & (di | fi | hi | pi)) !== zr
, l = (i.flags & (di | fi | hi | pi)) !== zr;
if (u || l) {
var c = Gb.transition;
Gb.transition = null;
var d = Na();
Da(Ta);
var f = cy;
cy |= ny,
Zb.current = null,
eb(e, i),
_g(),
function(e, t, n) {
Vv = n,
Wv = e,
yt(t),
_b(t, e),
yt(t),
Vv = null,
Wv = null
}(e, i, a),
e.containerInfo,
zu(hc),
as(fc),
fc = null,
hc = null,
e.current = i,
function(e) {
null !== Ui && "function" == typeof
Ui.markLayoutEffectsStarted && Ui.markLayoutEffectsStarted(e)
}(a),
Sb(i, e, a),
null !== Ui && "function" == typeof
Ui.markLayoutEffectsStopped && Ui.markLayoutEffectsStopped(),
Ri(),
cy = f,
Da(d),
Gb.transition = c
} else
e.current = i,
_g();
var h = Ly;
if (Ly ? (Ly = !1,
Oy = e,
Ny = a) : (Hy = 0,
Vy = null),
(s = e.pendingLanes) === po && (Py = null),
h || PA(e.current, !1),
function(e, t) {
if (Fi && "function" == typeof
Fi.onCommitFiberRoot)
try {
var n = (e.current.flags & Wr) === Wr;
if (U) {
var r;
switch (t) {
case Ta:
r = Pi;
break;
case Ia:
r = Li;
break;
case Pa:
r = Oi;
break;
case La:
r = Di;
break;
default:
r = Oi
}
Fi.onCommitFiberRoot(zi, e, r, n)
}
} catch (e) {
Ki || (Ki = !0,
o("React instrumentation encountered an
error: %s", e))
}
}(i.stateNode, r),
qi && e.memoizedUpdaters.clear(),
Vb.forEach((function(e) {
return e()
}
)),
eA(e, Ti()),
null !== t)
for (var p = e.onRecoverableError, m = 0; m <
t.length; m++) {
var g = t[m]
, v = g.stack
, b = g.digest;
p(g.value, {
componentStack: v,
digest: b
})
}
if (Ty) {
Ty = !1;
var y = Iy;
throw Iy = null,
y
}
pa(Ny, go) && e.tag !== Sd && EA(),
pa(s = e.pendingLanes, go) ? (yg = !0,
e === Fy ? zy++ : (zy = 0,
Fy = e)) : zy = 0,
Id(),
$i()
}(e, t, n, r)
} finally {
Gb.transition = i,
Da(r)
}
return null
}
function EA() {
if (null !== Oy) {
var e = ja(Ny)
, t = function(e, t) {
return 0 === e || e > t ? e : t
}(Pa, e)
, n = Gb.transition
, r = Na();
try {
return Gb.transition = null,
Da(t),
function() {
if (null === Oy)
return !1;
var e = By;
By = null;
var t = Oy
, n = Ny;
if (Oy = null,
Ny = po,
(cy & (ty | ny)) !== Jb)
throw new Error("Cannot flush passive effects
while already rendering.");
Uy = !0,
Ky = !1,
function(e) {
null !== Ui && "function" == typeof
Ui.markPassiveEffectsStarted && Ui.markPassiveEffectsStarted(e)
}(n);
var r = cy;
cy |= ny,
Ob(t.current),
Ib(t, t.current, n, e);
var i = Dy;
Dy = [];
for (var a = 0; a < i.length; a++)
ob(0, i[a]);
null !== Ui && "function" == typeof
Ui.markPassiveEffectsStopped && Ui.markPassiveEffectsStopped(),
PA(t.current, !0),
cy = r,
Id(),
Ky ? t === Vy ? Hy++ : (Hy = 0,
Vy = t) : Hy = 0,
Uy = !1,
Ky = !1,
function(e) {
if (Fi && "function" == typeof
Fi.onPostCommitFiberRoot)
try {
Fi.onPostCommitFiberRoot(zi, e)
} catch (e) {
Ki || (Ki = !0,
o("React instrumentation encountered
an error: %s", e))
}
}(t);
var s = t.current.stateNode;
return s.effectDuration = 0,
s.passiveEffectDuration = 0,
!0
}()
} finally {
Da(r),
Gb.transition = n
}
}
return !1
}
function SA(e) {
return null !== Py && Py.has(e)
}
var kA = function(e) {
Ty || (Ty = !0,
Iy = e)
};
function MA(e, t, n) {
var r = hh(e, Ng(e, Ig(n, t), go), go)
, i = Zy();
null !== r && (Aa(r, go, i),
eA(r, i))
}
function CA(e, t, n) {
if (function(e) {
Dr(null, (function() {
throw e
}
)),
Br()
}(n),
HA(!1),
e.tag !== c) {
var r = null;
for (r = t; null !== r; ) {
if (r.tag === c)
return void MA(r, e, n);
if (r.tag === u) {
var i = r.type
, a = r.stateNode;
if ("function" == typeof i.getDerivedStateFromError
|| "function" == typeof a.componentDidCatch && !SA(a)) {
var s = hh(r, Dg(r, Ig(n, e), go), go)
, l = Zy();
return void (null !== s && (Aa(s, go, l),
eA(s, l)))
}
}
r = r.return
}
o("Internal React error: Attempted to capture a commit
phase error inside a detached tree. This indicates a bug in React. Likely causes include
deleting the same fiber more than once, committing an already-finished tree, or an
inconsistent return pointer.\n\nError message:\n\n%s", n)
} else
MA(e, e, n)
}
function xA(e, t, n) {
var r = e.pingCache;
null !== r && r.delete(t);
var i = Zy();
wa(e, n),
function(e) {
e.tag !== Sd && $b() && null === Xb.current && o("A
suspended resource finished loading inside a test, but the event was not wrapped in
act(...).\n\nWhen testing, code that resolves suspended data should be wrapped into
act(...):\n\nact(() => {\n /* finish loading suspended data */\n});\n/* assert on the output
*/\n\nThis ensures that you're testing the behavior the user would see in the browser.
Learn more at https://reactjs.org/link/wrap-tests-with-act")
}(e),
dy === e && ma(hy, n) && (gy === sy || gy === ay && aa(hy)
&& Ti() - Ey < Sy ? dA(e, po) : Ay = ga(Ay, n)),
eA(e, i)
}
function RA(e, t) {
t === mo && (t = Xy(e));
var n = Zy()
, r = eh(e, t);
null !== r && (Aa(r, t, n),
eA(r, n))
}
function TA(e) {
var t = e.memoizedState
, n = mo;
null !== t && (n = t.retryLane),
RA(e, n)
}
function IA(e, t) {
var n, r = mo;
switch (e.tag) {
case A:
n = e.stateNode;
var i = e.memoizedState;
null !== i && (r = i.retryLane);
break;
case M:
n = e.stateNode;
break;
default:
throw new Error("Pinged unknown suspense boundary
type. This is probably a bug in React.")
}
null !== n && n.delete(t),
RA(e, r)
}
function PA(e, t) {
yt(e),
LA(e, li, Kb),
t && LA(e, ci, qb),
LA(e, li, Fb),
t && LA(e, ci, Ub),
bt()
}
function LA(e, t, n) {
for (var r = e, i = null; null !== r; ) {
var o = r.subtreeFlags & t;
r !== i && null !== r.child && o !== zr ? r = r.child : ((r.flags &
t) !== zr && n(r),
r = null !== r.sibling ? r.sibling : i = r.return)
}
}
var OA, NA = null;
function DA(e) {
if ((cy & ty) === Jb && e.mode & oo) {
var t = e.tag;
if (t === l || t === c || t === u || t === s || t === b || t === w || t
=== _) {
var n = ft(e) || "ReactComponent";
if (null !== NA) {
if (NA.has(n))
return;
NA.add(n)
} else
NA = new Set([n]);
var r = pt;
try {
yt(e),
o("Can't perform a React state update on a
component that hasn't mounted yet. This indicates that you have a side-effect in your
render function that asynchronously later calls tries to update the component. Move this
work to useEffect instead.")
} finally {
r ? yt(e) : bt()
}
}
}
}
OA = function(e, t, n) {
var r = vw(null, t);
try {
return Iv(e, t, n)
} catch (o) {
if (Gd || null !== o && "object" == typeof o && "function" ==
typeof o.then)
throw o;
if (Kf(),
rm(),
zv(0, t),
vw(t, r),
t.mode & ao && Eg(t),
Dr(null, Iv, null, e, t, n),
Ir) {
var i = Br();
"object" == typeof i && null !== i && i._suppressLogging
&& "object" == typeof o && null !== o && !o._suppressLogging && (o._suppressLogging
= !0)
}
throw o
}
}
;
var BA, jA = !1;
function zA(e, t) {
qi && e.memoizedUpdaters.forEach((function(n) {
Ea(e, n, t)
}
))
}
BA = new Set;
var FA = {};
function UA(e, t) {
var n = Xb.current;
return null !== n ? (n.push(t),
FA) : Mi(e, t)
}
function KA(e) {
if (e !== FA)
return Ci(e)
}
function qA() {
return null !== Xb.current
}
function HA(e) {
Yy = e
}
var VA = null
, WA = null
, $A = function(e) {
VA = e
};
function YA(e) {
if (null === VA)
return e;
var t = VA(e);
return void 0 === t ? e : t.current
}
function QA(e) {
return YA(e)
}
function ZA(e) {
if (null === VA)
return e;
var t = VA(e);
if (void 0 === t) {
if (null != e && "function" == typeof e.render) {
var n = YA(e.render);
if (e.render !== n) {
var r = {
$$typeof: Le,
render: n
};
return void 0 !== e.displayName && (r.displayName
= e.displayName),
r
}
}
return e
}
return t.current
}
function GA(e, t) {
if (null === VA)
return !1;
var n = e.elementType
, r = t.type
, i = !1
, o = "object" == typeof r && null !== r ? r.$$typeof : null;
switch (e.tag) {
case u:
"function" == typeof r && (i = !0);
break;
case s:
("function" == typeof r || o === Be) && (i = !0);
break;
case b:
(o === Le || o === Be) && (i = !0);
break;
case w:
case _:
(o === De || o === Be) && (i = !0);
break;
default:
return !1
}
if (i) {
var a = VA(n);
if (void 0 !== a && a === VA(r))
return !0
}
return !1
}
function XA(e) {
null !== VA && "function" == typeof WeakSet && (null === WA
&& (WA = new WeakSet),
WA.add(e))
}
var JA = function(e, t) {
if (null !== VA) {
var n = t.staleFamilies
, r = t.updatedFamilies;
EA(),
sA((function() {
tw(e.current, r, n)
}
))
}
}
, ew = function(e, t) {
e.context === ud && (EA(),
sA((function() {
Cw(t, e, null, null)
}
)))
};
function tw(e, t, n) {
var r = e.alternate
, i = e.child
, o = e.sibling
, a = e.tag
, l = e.type
, c = null;
switch (a) {
case s:
case _:
case u:
c = l;
break;
case b:
c = l.render
}
if (null === VA)
throw new Error("Expected resolveFamily to be set during
hot reload.");
var d = !1
, f = !1;
if (null !== c) {
var h = VA(c);
void 0 !== h && (n.has(h) ? f = !0 : t.has(h) && (a === u ? f
= !0 : d = !0))
}
if (null !== WA && (WA.has(e) || null !== r && WA.has(r)) && (f =
!0),
f && (e._debugNeedsRemount = !0),
f || d) {
var p = eh(e, go);
null !== p && Jy(p, e, go, Xo)
}
null === i || f || tw(i, t, n),
null !== o && tw(o, t, n)
}
var nw, rw = function(e, t) {
var n = new Set
, r = new Set(t.map((function(e) {
return e.current
}
)));
return iw(e.current, r, n),
n
};
function iw(e, t, n) {
var r = e.child
, i = e.sibling
, o = e.tag
, a = e.type
, l = null;
switch (o) {
case s:
case _:
case u:
l = a;
break;
case b:
l = a.render
}
var h = !1;
null !== l && t.has(l) && (h = !0),
h ? function(e, t) {
var n = function(e, t) {
for (var n = e, r = !1; ; ) {
if (n.tag === f)
r = !0,
t.add(n.stateNode);
else if (null !== n.child) {
n.child.return = n,
n = n.child;
continue
}
if (n === e)
return r;
for (; null === n.sibling; ) {
if (null === n.return || n.return === e)
return r;
n = n.return
}
n.sibling.return = n.return,
n = n.sibling
}
return !1
}(e, t);
if (!n)
for (var r = e; ; ) {
switch (r.tag) {
case f:
return void t.add(r.stateNode);
case d:
case c:
return void t.add(r.stateNode.containerInfo)
}
if (null === r.return)
throw new Error("Expected to reach root first.");
r = r.return
}
}(e, n) : null !== r && iw(r, t, n),
null !== i && iw(i, t, n)
}
nw = !1;
try {
var ow = Object.preventExtensions({});
new Map([[ow, null]]),
new Set([ow])
} catch (e) {
nw = !0
}
function aw(e, t, n, r) {
this.tag = e,
this.key = n,
this.elementType = null,
this.type = null,
this.stateNode = null,
this.return = null,
this.child = null,
this.sibling = null,
this.index = 0,
this.ref = null,
this.pendingProps = t,
this.memoizedProps = null,
this.updateQueue = null,
this.memoizedState = null,
this.dependencies = null,
this.mode = r,
this.flags = zr,
this.subtreeFlags = zr,
this.deletions = null,
this.lanes = po,
this.childLanes = po,
this.alternate = null,
this.actualDuration = Number.NaN,
this.actualStartTime = Number.NaN,
this.selfBaseDuration = Number.NaN,
this.treeBaseDuration = Number.NaN,
this.actualDuration = 0,
this.actualStartTime = -1,
this.selfBaseDuration = 0,
this.treeBaseDuration = 0,
this._debugSource = null,
this._debugOwner = null,
this._debugNeedsRemount = !1,
this._debugHookTypes = null,
nw || "function" != typeof Object.preventExtensions ||
Object.preventExtensions(this)
}
var sw = function(e, t, n, r) {
return new aw(e,t,n,r)
};
function uw(e) {
var t = e.prototype;
return !(!t || !t.isReactComponent)
}
function lw(e, t) {
var n = e.alternate;
null === n ? ((n = sw(e.tag, t, e.key, e.mode)).elementType =
e.elementType,
n.type = e.type,
n.stateNode = e.stateNode,
n._debugSource = e._debugSource,
n._debugOwner = e._debugOwner,
n._debugHookTypes = e._debugHookTypes,
n.alternate = e,
e.alternate = n) : (n.pendingProps = t,
n.type = e.type,
n.flags = zr,
n.subtreeFlags = zr,
n.deletions = null,
n.actualDuration = 0,
n.actualStartTime = -1),
n.flags = e.flags & mi,
n.childLanes = e.childLanes,
n.lanes = e.lanes,
n.child = e.child,
n.memoizedProps = e.memoizedProps,
n.memoizedState = e.memoizedState,
n.updateQueue = e.updateQueue;
var r = e.dependencies;
switch (n.dependencies = null === r ? null : {
lanes: r.lanes,
firstContext: r.firstContext
},
n.sibling = e.sibling,
n.index = e.index,
n.ref = e.ref,
n.selfBaseDuration = e.selfBaseDuration,
n.treeBaseDuration = e.treeBaseDuration,
n._debugNeedsRemount = e._debugNeedsRemount,
n.tag) {
case l:
case s:
case _:
n.type = YA(e.type);
break;
case u:
n.type = QA(e.type);
break;
case b:
n.type = ZA(e.type)
}
return n
}
function cw(e, t) {
e.flags &= mi | Ur;
var n = e.alternate;
if (null === n)
e.childLanes = po,
e.lanes = t,
e.child = null,
e.subtreeFlags = zr,
e.memoizedProps = null,
e.memoizedState = null,
e.updateQueue = null,
e.dependencies = null,
e.stateNode = null,
e.selfBaseDuration = 0,
e.treeBaseDuration = 0;
else {
e.childLanes = n.childLanes,
e.lanes = n.lanes,
e.child = n.child,
e.subtreeFlags = zr,
e.deletions = null,
e.memoizedProps = n.memoizedProps,
e.memoizedState = n.memoizedState,
e.updateQueue = n.updateQueue,
e.type = n.type;
var r = n.dependencies;
e.dependencies = null === r ? null : {
lanes: r.lanes,
firstContext: r.firstContext
},
e.selfBaseDuration = n.selfBaseDuration,
e.treeBaseDuration = n.treeBaseDuration
}
return e
}
function dw(e, t, n, r, i, a) {
var s = l
, c = e;
if ("function" == typeof e)
uw(e) ? (s = u,
c = QA(c)) : c = YA(c);
else if ("string" == typeof e)
s = f;
else
e: switch (e) {
case xe:
return hw(n.children, i, a, t);
case Re:
s = m,
((i |= so) & oo) !== io && (i |= uo);
break;
case Te:
return function(e, t, n, r) {
"string" != typeof e.id && o('Profiler must specify an
"id" of type `string` as a prop. Received the type `%s` instead.', typeof e.id);
var i = sw(y, e, r, t | ao);
return i.elementType = Te,
i.lanes = n,
i.stateNode = {
effectDuration: 0,
passiveEffectDuration: 0
},
i
}(n, i, a, t);
case Oe:
return function(e, t, n, r) {
var i = sw(A, e, r, t);
return i.elementType = Oe,
i.lanes = n,
i
}(n, i, a, t);
case Ne:
return function(e, t, n, r) {
var i = sw(M, e, r, t);
return i.elementType = Ne,
i.lanes = n,
i
}(n, i, a, t);
case je:
return pw(n, i, a, t);
default:
if ("object" == typeof e && null !== e)
switch (e.$$typeof) {
case Ie:
s = v;
break e;
case Pe:
s = g;
break e;
case Le:
s = b,
c = ZA(c);
break e;
case De:
s = w;
break e;
case Be:
s = E,
c = null;
break e
}
var d = "";
(void 0 === e || "object" == typeof e && null !== e && 0
=== Object.keys(e).length) && (d += " You likely forgot to export your component from
the file it's defined in, or you might have mixed up default and named imports.");
var h = r ? ft(r) : null;
throw h && (d += "\n\nCheck the render method of `" +
h + "`."),
new Error("Element type is invalid: expected a string
(for built-in components) or a class/function (for composite components) but got: " +
(null == e ? e : typeof e) + "." + d)
}
var p = sw(s, n, t, i);
return p.elementType = e,
p.type = c,
p.lanes = a,
p._debugOwner = r,
p
}
function fw(e, t, n) {
var r;
r = e._owner;
var i = dw(e.type, e.key, e.props, r, t, n);
return i._debugSource = e._source,
i._debugOwner = e._owner,
i
}
function hw(e, t, n, r) {
var i = sw(p, e, r, t);
return i.lanes = n,
i
}
function pw(e, t, n, r) {
var i = sw(x, e, r, t);
return i.elementType = je,
i.lanes = n,
i.stateNode = {
isHidden: !1
},
i
}
function mw(e, t, n) {
var r = sw(h, e, null, t);
return r.lanes = n,
r
}
function gw(e, t, n) {
var r = null !== e.children ? e.children : []
, i = sw(d, r, e.key, t);
return i.lanes = n,
i.stateNode = {
containerInfo: e.containerInfo,
pendingChildren: null,
implementation: e.implementation
},
i
}
function vw(e, t) {
return null === e && (e = sw(l, null, null, io)),
e.tag = t.tag,
e.key = t.key,
e.elementType = t.elementType,
e.type = t.type,
e.stateNode = t.stateNode,
e.return = t.return,
e.child = t.child,
e.sibling = t.sibling,
e.index = t.index,
e.ref = t.ref,
e.pendingProps = t.pendingProps,
e.memoizedProps = t.memoizedProps,
e.updateQueue = t.updateQueue,
e.memoizedState = t.memoizedState,
e.dependencies = t.dependencies,
e.mode = t.mode,
e.flags = t.flags,
e.subtreeFlags = t.subtreeFlags,
e.deletions = t.deletions,
e.lanes = t.lanes,
e.childLanes = t.childLanes,
e.alternate = t.alternate,
e.actualDuration = t.actualDuration,
e.actualStartTime = t.actualStartTime,
e.selfBaseDuration = t.selfBaseDuration,
e.treeBaseDuration = t.treeBaseDuration,
e._debugSource = t._debugSource,
e._debugOwner = t._debugOwner,
e._debugNeedsRemount = t._debugNeedsRemount,
e._debugHookTypes = t._debugHookTypes,
e
}
function bw(e, t, n, r, i) {
this.tag = t,
this.containerInfo = e,
this.pendingChildren = null,
this.current = null,
this.pingCache = null,
this.finishedWork = null,
this.timeoutHandle = Ac,
this.context = null,
this.pendingContext = null,
this.callbackNode = null,
this.callbackPriority = mo,
this.eventTimes = ya(po),
this.expirationTimes = ya(Xo),
this.pendingLanes = po,
this.suspendedLanes = po,
this.pingedLanes = po,
this.expiredLanes = po,
this.mutableReadLanes = po,
this.finishedLanes = po,
this.entangledLanes = po,
this.entanglements = ya(po),
this.identifierPrefix = r,
this.onRecoverableError = i,
this.mutableSourceEagerHydrationData = null,
this.effectDuration = 0,
this.passiveEffectDuration = 0,
this.memoizedUpdaters = new Set;
for (var o = this.pendingUpdatersLaneMap = [], a = 0; a < ho; a+
+)
o.push(new Set);
switch (t) {
case kd:
this._debugRootType = n ? "hydrateRoot()" : "createRoot()";
break;
case Sd:
this._debugRootType = n ? "hydrate()" : "render()"
}
}
function yw(e, t, n, r, i, o, a, s, u, l) {
var d = new bw(e,t,n,s,u)
, f = function(e, t, n) {
var r;
return e === kd ? (r = oo,
!0 === t && (r |= so,
r |= uo)) : r = io,
qi && (r |= ao),
sw(c, null, null, r)
}(t, o);
d.current = f,
f.stateNode = d;
var h = {
element: r,
isDehydrated: n,
cache: null,
transitions: null,
pendingSuspenseBoundaries: null
};
return f.memoizedState = h,
ch(f),
d
}
var Aw, ww, _w = "18.2.0";
function Ew(e, t, n) {
var r = arguments.length > 3 && void 0 !== arguments[3] ?
arguments[3] : null;
return function(e) {
G(e) && (o("The provided key is an unsupported type %s.
This value must be coerced to a string before before using it here.", Z(e)),
X(e))
}(r),
{
$$typeof: Ce,
key: null == r ? null : "" + r,
children: e,
containerInfo: t,
implementation: n
}
}
function Sw(e) {
if (!e)
return ud;
var t = jr(e)
, n = Ed(t);
if (t.tag === u) {
var r = t.type;
if (gd(r))
return Ad(t, r, n)
}
return n
}
function kw(e, t, n, r, i, o, a, s) {
return yw(e, t, !1, null, 0, r, 0, o, a)
}
function Mw(e, t, n, r, i, o, a, s, u, l) {
var c = yw(n, r, !0, e, 0, o, 0, s, u);
c.context = Sw(null);
var d = c.current
, f = Zy()
, h = Gy(d)
, p = fh(f, h);
return p.callback = null != t ? t : null,
hh(d, p, h),
function(e, t, n) {
e.current.lanes = t,
Aa(e, t, n),
eA(e, n)
}(c, h, f),
c
}
function Cw(e, t, n, r) {
!function(e, t) {
if (Fi && "function" == typeof Fi.onScheduleFiberRoot)
try {
Fi.onScheduleFiberRoot(zi, e, t)
} catch (e) {
Ki || (Ki = !0,
o("React instrumentation encountered an error:
%s", e))
}
}(t, e);
var i = t.current
, a = Zy()
, s = Gy(i);
!function(e) {
null !== Ui && "function" == typeof
Ui.markRenderScheduled && Ui.markRenderScheduled(e)
}(s);
var u = Sw(n);
null === t.context ? t.context = u : t.pendingContext = u,
mt && null !== pt && !Aw && (Aw = !0,
o("Render methods should be a pure function of props and
state; triggering nested component updates from render is not allowed. If necessary,
trigger nested updates in componentDidUpdate.\n\nCheck the render method of %s.",
ft(pt) || "Unknown"));
var l = fh(a, s);
l.payload = {
element: e
},
null !== (r = void 0 === r ? null : r) && ("function" != typeof r &&
o("render(...): Expected the last optional `callback` argument to be a function. Instead
received: %s.", r),
l.callback = r);
var c = hh(i, l, s);
return null !== c && (Jy(c, i, s, a),
ph(c, i, s)),
s
}
function xw(e) {
var t = e.current;
return t.child ? (t.child.tag,
t.child.stateNode) : null
}
function Rw(e, t) {
var n = e.memoizedState;
null !== n && null !== n.dehydrated && (n.retryLane =
function(e, t) {
return e !== mo && e < t ? e : t
}(n.retryLane, t))
}
function Tw(e, t) {
Rw(e, t);
var n = e.alternate;
n && Rw(n, t)
}
function Iw(e) {
var t = Si(e);
return null === t ? null : t.stateNode
}
Aw = !1,
ww = {};
var Pw, Lw, Ow, Nw, Dw, Bw, jw, zw, Fw, Uw = function(e) {
return null
}, Kw = function(e) {
return !1
}, qw = function(e, t, n) {
var r = t[n]
, i = Yt(e) ? e.slice() : Qe({}, e);
return n + 1 === t.length ? (Yt(i) ? i.splice(r, 1) : delete i[r],
i) : (i[r] = qw(e[r], t, n + 1),
i)
}, Hw = function(e, t) {
return qw(e, t, 0)
}, Vw = function(e, t, n, r) {
var i = t[r]
, o = Yt(e) ? e.slice() : Qe({}, e);
return r + 1 === t.length ? (o[n[r]] = o[i],
Yt(o) ? o.splice(i, 1) : delete o[i]) : o[i] = Vw(e[i], t, n, r + 1),
o
}, Ww = function(e, t, n) {
if (t.length === n.length) {
for (var r = 0; r < n.length - 1; r++)
if (t[r] !== n[r])
return void i("copyWithRename() expects paths to
be the same except for the deepest key");
return Vw(e, t, n, 0)
}
i("copyWithRename() expects paths of the same length")
}, $w = function(e, t, n, r) {
if (n >= t.length)
return r;
var i = t[n]
, o = Yt(e) ? e.slice() : Qe({}, e);
return o[i] = $w(e[i], t, n + 1, r),
o
}, Yw = function(e, t, n) {
return $w(e, t, 0, n)
}, Qw = function(e, t) {
for (var n = e.memoizedState; null !== n && t > 0; )
n = n.next,
t--;
return n
};
function Zw(e) {
var t = _i(e);
return null === t ? null : t.stateNode
}
function Gw(e) {
return null
}
function Xw() {
return pt
}
Pw = function(e, t, n, r) {
var i = Qw(e, t);
if (null !== i) {
var o = Yw(i.memoizedState, n, r);
i.memoizedState = o,
i.baseState = o,
e.memoizedProps = Qe({}, e.memoizedProps);
var a = eh(e, go);
null !== a && Jy(a, e, go, Xo)
}
}
,
Lw = function(e, t, n) {
var r = Qw(e, t);
if (null !== r) {
var i = Hw(r.memoizedState, n);
r.memoizedState = i,
r.baseState = i,
e.memoizedProps = Qe({}, e.memoizedProps);
var o = eh(e, go);
null !== o && Jy(o, e, go, Xo)
}
}
,
Ow = function(e, t, n, r) {
var i = Qw(e, t);
if (null !== i) {
var o = Ww(i.memoizedState, n, r);
i.memoizedState = o,
i.baseState = o,
e.memoizedProps = Qe({}, e.memoizedProps);
var a = eh(e, go);
null !== a && Jy(a, e, go, Xo)
}
}
,
Nw = function(e, t, n) {
e.pendingProps = Yw(e.memoizedProps, t, n),
e.alternate && (e.alternate.pendingProps = e.pendingProps);
var r = eh(e, go);
null !== r && Jy(r, e, go, Xo)
}
,
Dw = function(e, t) {
e.pendingProps = Hw(e.memoizedProps, t),
e.alternate && (e.alternate.pendingProps = e.pendingProps);
var n = eh(e, go);
null !== n && Jy(n, e, go, Xo)
}
,
Bw = function(e, t, n) {
e.pendingProps = Ww(e.memoizedProps, t, n),
e.alternate && (e.alternate.pendingProps = e.pendingProps);
var r = eh(e, go);
null !== r && Jy(r, e, go, Xo)
}
,
jw = function(e) {
var t = eh(e, go);
null !== t && Jy(t, e, go, Xo)
}
,
zw = function(e) {
Uw = e
}
,
Fw = function(e) {
Kw = e
}
;
var Jw = "function" == typeof reportError ? reportError : function(e) {
console.error(e)
}
;
function e_(e) {
this._internalRoot = e
}
function t_(e) {
this._internalRoot = e
}
function n_(e) {
return !(!e || e.nodeType !== pn && e.nodeType !== vn &&
e.nodeType !== bn && B)
}
function r_(e) {
return !(!e || e.nodeType !== pn && e.nodeType !== vn &&
e.nodeType !== bn && (e.nodeType !== gn || " react-mount-point-unstable " !==
e.nodeValue))
}
function i_(e) {
e.nodeType === pn && e.tagName && "BODY" ===
e.tagName.toUpperCase() && o("createRoot(): Creating roots directly with
document.body is discouraged, since its children are often manipulated by third-party
scripts and browser extensions. This may lead to subtle reconciliation issues. Try using
a container element created for your app."),
Vc(e) && (e._reactRootContainer ? o("You are calling
ReactDOMClient.createRoot() on a container that was previously passed to
ReactDOM.render(). This is not supported.") : o("You are calling
ReactDOMClient.createRoot() on a container that has already been passed to
createRoot() before. Instead, call root.render() on the existing root instead if you want to
update it."))
}
t_.prototype.render = e_.prototype.render = function(e) {
var t = this._internalRoot;
if (null === t)
throw new Error("Cannot update an unmounted root.");
"function" == typeof arguments[1] ? o("render(...): does not
support the second callback argument. To execute a side effect after rendering, declare
it in a component body with useEffect().") : n_(arguments[1]) ? o("You passed a
container to the second argument of root.render(...). You don't need to pass it again
since you already passed it to create the root.") : void 0 !== arguments[1] && o("You
passed a second argument to root.render(...) but it only accepts one argument.");
var n = t.containerInfo;
if (n.nodeType !== gn) {
var r = Iw(t.current);
r && r.parentNode !== n && o("render(...): It looks like the
React-rendered content of the root container was removed without using React. This is
not supported and will cause errors. Instead, call root.unmount() to empty a root's
container.")
}
Cw(e, t, null, null)
}
,
t_.prototype.unmount = e_.prototype.unmount = function() {
"function" == typeof arguments[0] && o("unmount(...): does not
support a callback argument. To execute a side effect after rendering, declare it in a
component body with useEffect().");
var e = this._internalRoot;
if (null !== e) {
this._internalRoot = null;
var t = e.containerInfo;
uA() && o("Attempted to synchronously unmount a root
while React was already rendering. React cannot finish unmounting the root until the
current render has completed, which may lead to a race condition."),
sA((function() {
Cw(null, e, null, null)
}
)),
Hc(t)
}
}
,
t_.prototype.unstable_scheduleHydration = function(e) {
e && function(e) {
for (var t = xa(), n = {
blockedOn: null,
target: e,
priority: t
}, r = 0; r < Ya.length && Ba(t, Ya[r].priority); r++)
;
Ya.splice(r, 0, n),
0 === r && Xa(n)
}(e)
}
;
var o_, a_, s_, u_ = n.ReactCurrentOwner;
function l_(e) {
return e ? e.nodeType === vn ? e.documentElement :
e.firstChild : null
}
function c_() {}
function d_(e, t, n, r, i) {
o_(n),
function(e, t) {
null !== e && "function" != typeof e && o("%s(...): Expected
the last optional `callback` argument to be a function. Instead received: %s.", "render",
e)
}(void 0 === i ? null : i);
var a, s = n._reactRootContainer;
if (s) {
if ("function" == typeof i) {
var u = i;
i = function() {
var e = xw(a);
u.call(e)
}
}
Cw(t, a = s, e, i)
} else
a = function(e, t, n, r, i) {
if (i) {
if ("function" == typeof r) {
var o = r;
r = function() {
var e = xw(a);
o.call(e)
}
}
var a = Mw(t, r, e, Sd, 0, !1, 0, "", c_);
return e._reactRootContainer = a,
qc(a.current, e),
ml(e.nodeType === gn ? e.parentNode : e),
sA(),
a
}
for (var s; s = e.lastChild; )
e.removeChild(s);
if ("function" == typeof r) {
var u = r;
r = function() {
var e = xw(l);
u.call(e)
}
}
var l = kw(e, Sd, 0, !1, 0, "", c_);
return e._reactRootContainer = l,
qc(l.current, e),
ml(e.nodeType === gn ? e.parentNode : e),
sA((function() {
Cw(t, l, n, r)
}
)),
l
}(n, t, e, i, r);
return xw(a)
}
o_ = function(e) {
if (e._reactRootContainer && e.nodeType !== gn) {
var t = Iw(e._reactRootContainer.current);
t && t.parentNode !== e && o("render(...): It looks like the
React-rendered content of this container was removed without using React. This is not
supported and will cause errors. Instead, call ReactDOM.unmountComponentAtNode to
empty a container.")
}
var n = !!e._reactRootContainer
, r = l_(e);
!(!r || !$c(r)) && !n && o("render(...): Replacing React-rendered
children with a new root component. If you intended to update the children of this node,
you should instead have the existing children update their state and render the new
components instead of calling ReactDOM.render."),
e.nodeType === pn && e.tagName && "BODY" ===
e.tagName.toUpperCase() && o("render(): Rendering components directly into
document.body is discouraged, since its children are often manipulated by third-party
scripts and browser extensions. This may lead to subtle reconciliation issues. Try
rendering into a container element created for your app.")
}
,
a_ = function(e) {
switch (e.tag) {
case c:
var t = e.stateNode;
if (za(t)) {
var n = function(e) {
return ta(e.pendingLanes)
}(t);
!function(e, t) {
t !== po && (_a(e, ga(t, go)),
eA(e, Ti()),
(cy & (ty | ny)) === Jb && (xy(),
Id()))
}(t, n)
}
break;
case A:
sA((function() {
var t = eh(e, go);
if (null !== t) {
var n = Zy();
Jy(t, e, go, n)
}
}
)),
Tw(e, go)
}
}
,
ka = a_,
function(e) {
Ma = e
}((function(e) {
if (e.tag === A) {
var t = Wo
, n = eh(e, t);
null !== n && Jy(n, e, t, Zy()),
Tw(e, t)
}
}
)),
function(e) {
Ca = e
}((function(e) {
if (e.tag === A) {
var t = Gy(e)
, n = eh(e, t);
null !== n && Jy(n, e, t, Zy()),
Tw(e, t)
}
}
)),
function(e) {
xa = e
}(Na),
function(e) {
Ra = e
}((function(e, t) {
var n = Oa;
try {
return Oa = e,
t()
} finally {
Oa = n
}
}
)),
"function" == typeof Map && null != Map.prototype && "function" ==
typeof Map.prototype.forEach && "function" == typeof Set && null != Set.prototype &&
"function" == typeof Set.prototype.clear && "function" == typeof Set.prototype.forEach ||
o("React depends on Map and Set built-in types. Make sure that you load a polyfill in
older browsers. https://reactjs.org/link/react-polyfills"),
s_ = function(e, t, n) {
switch (t) {
case "input":
return void Ft(e, n);
case "textarea":
return void function(e, t) {
rn(e, t)
}(e, n);
case "select":
return void function(e, t) {
var n = e
, r = t.value;
null != r && Gt(n, !!t.multiple, r, !1)
}(e, n)
}
}
,
hr = s_,
yr = aA,
Ar = sA;
var f_ = {
usingClientEntryPoint: !1,
Events: [$c, Yc, Qc, vr, br, aA]
}
, h_ = function(e) {
var t = e.findFiberByHostInstance
, r = n.ReactCurrentDispatcher;
return function(e) {
if ("undefined" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__)
return !1;
var t = __REACT_DEVTOOLS_GLOBAL_HOOK__;
if (t.isDisabled)
return !0;
if (!t.supportsFiber)
return o("The installed version of React DevTools is too
old and will not work with the current version of React. Please update React DevTools.
https://reactjs.org/link/react-devtools"),
!0;
try {
F && (e = Qe({}, e, {
getLaneLabelMap: Wi,
injectProfilingHooks: Vi
})),
zi = t.inject(e),
Fi = t
} catch (e) {
o("React instrumentation encountered an error: %s.", e)
}
return !!t.checkDCE
}({
bundleType: e.bundleType,
version: e.version,
rendererPackageName: e.rendererPackageName,
rendererConfig: e.rendererConfig,
overrideHookState: Pw,
overrideHookStateDeletePath: Lw,
overrideHookStateRenamePath: Ow,
overrideProps: Nw,
overridePropsDeletePath: Dw,
overridePropsRenamePath: Bw,
setErrorHandler: zw,
setSuspenseHandler: Fw,
scheduleUpdate: jw,
currentDispatcherRef: r,
findHostInstanceByFiber: Zw,
findFiberByHostInstance: t || Gw,
findHostInstancesForRefresh: rw,
scheduleRefresh: JA,
scheduleRoot: ew,
setRefreshHandler: $A,
getCurrentFiber: Xw,
reconcilerVersion: _w
})
}({
findFiberByHostInstance: Wc,
bundleType: 1,
version: _w,
rendererPackageName: "react-dom"
});
if (!h_ && Y && window.top === window.self &&
(navigator.userAgent.indexOf("Chrome") > -1 && -1 ===
navigator.userAgent.indexOf("Edge") || navigator.userAgent.indexOf("Firefox") > -1)) {
var p_ = window.location.protocol;
/^(https?|file):$/.test(p_) && console.info("%cDownload the
React DevTools for a better development experience: https://reactjs.org/link/react-
devtools" + ("file:" === p_ ? "\nYou might need to use a local HTTP server (instead of
file://): https://reactjs.org/link/react-devtools-faq" : ""), "font-weight:bold")
}
lT.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = f_,
lT.createPortal = function(e, t) {
var n = arguments.length > 2 && void 0 !== arguments[2] ?
arguments[2] : null;
if (!n_(t))
throw new Error("Target container is not a DOM element.");
return Ew(e, t, null, n)
}
,
lT.createRoot = function(e, t) {
return f_.usingClientEntryPoint || o('You are importing
createRoot from "react-dom" which is not supported. You should instead import it from
"react-dom/client".'),
function(e, t) {
if (!n_(e))
throw new Error("createRoot(...): Target container is not
a DOM element.");
i_(e);
var n = !1
, r = ""
, a = Jw;
null != t && (t.hydrate ? i("hydrate through createRoot is
deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.") : "object"
== typeof t && null !== t && t.$$typeof === Me && o("You passed a JSX element to
createRoot. You probably meant to call root.render instead. Example usage:\n\n let
root = createRoot(domContainer);\n root.render(<App />);"),
!0 === t.unstable_strictMode && (n = !0),
void 0 !== t.identifierPrefix && (r = t.identifierPrefix),
void 0 !== t.onRecoverableError && (a =
t.onRecoverableError),
void 0 !== t.transitionCallbacks && t.transitionCallbacks);
var s = kw(e, kd, 0, n, 0, r, a);
return qc(s.current, e),
ml(e.nodeType === gn ? e.parentNode : e),
new e_(s)
}(e, t)
}
,
lT.findDOMNode = function(e) {
var t = u_.current;
return null !== t && null !== t.stateNode &&
(t.stateNode._warnedAboutRefsInRender || o("%s is accessing findDOMNode inside its
render(). render() should be a pure function of props and state. It should never access
something that requires stale data from the previous render, such as refs. Move this
logic to componentDidMount and componentDidUpdate instead.", ct(t.type) || "A
component"),
t.stateNode._warnedAboutRefsInRender = !0),
null == e ? null : e.nodeType === pn ? e : function(e, t) {
var n = jr(e);
if (void 0 === n) {
if ("function" == typeof e.render)
throw new Error("Unable to find node on an
unmounted component.");
var r = Object.keys(e).join(",");
throw new Error("Argument appears to not be a
ReactComponent. Keys: " + r)
}
var i = _i(n);
if (null === i)
return null;
if (i.mode & so) {
var a = ft(n) || "Component";
if (!ww[a]) {
ww[a] = !0;
var s = pt;
try {
yt(i),
n.mode & so ? o("%s is deprecated in
StrictMode. %s was passed an instance of %s which is inside StrictMode. Instead, add
a ref directly to the element you want to reference. Learn more about using refs safely
here: https://reactjs.org/link/strict-mode-find-node", t, t, a) : o("%s is deprecated in
StrictMode. %s was passed an instance of %s which renders StrictMode children.
Instead, add a ref directly to the element you want to reference. Learn more about using
refs safely here: https://reactjs.org/link/strict-mode-find-node", t, t, a)
} finally {
s ? yt(s) : bt()
}
}
}
return i.stateNode
}(e, "findDOMNode")
}
,
lT.flushSync = function(e) {
return uA() && o("flushSync was called from inside a lifecycle
method. React cannot flush when React is already rendering. Consider moving this call
to a scheduler task or micro task."),
sA(e)
}
,
lT.hydrate = function(e, t, n) {
if (o("ReactDOM.hydrate is no longer supported in React 18.
Use hydrateRoot instead. Until you switch to the new API, your app will behave as if it's
running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),
!r_(t))
throw new Error("Target container is not a DOM element.");
return Vc(t) && void 0 === t._reactRootContainer && o("You are
calling ReactDOM.hydrate() on a container that was previously passed to
ReactDOMClient.createRoot(). This is not supported. Did you mean to call
hydrateRoot(container, element)?"),
d_(null, e, t, !0, n)
}
,
lT.hydrateRoot = function(e, t, n) {
return f_.usingClientEntryPoint || o('You are importing
hydrateRoot from "react-dom" which is not supported. You should instead import it from
"react-dom/client".'),
function(e, t, n) {
if (!n_(e))
throw new Error("hydrateRoot(...): Target container is
not a DOM element.");
i_(e),
void 0 === t && o("Must provide initial children as second
argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");
var r = null != n && n.hydratedSources || null
, i = !1
, a = ""
, s = Jw;
null != n && (!0 === n.unstable_strictMode && (i = !0),
void 0 !== n.identifierPrefix && (a = n.identifierPrefix),
void 0 !== n.onRecoverableError && (s =
n.onRecoverableError));
var u = Mw(t, null, e, kd, 0, i, 0, a, s);
if (qc(u.current, e),
ml(e),
r)
for (var l = 0; l < r.length; l++)
Ip(u, r[l]);
return new t_(u)
}(e, t, n)
}
,
lT.render = function(e, t, n) {
if (o("ReactDOM.render is no longer supported in React 18. Use
createRoot instead. Until you switch to the new API, your app will behave as if it's
running React 17. Learn more: https://reactjs.org/link/switch-to-createroot"),
!r_(t))
throw new Error("Target container is not a DOM element.");
return Vc(t) && void 0 === t._reactRootContainer && o("You are
calling ReactDOM.render() on a container that was previously passed to
ReactDOMClient.createRoot(). This is not supported. Did you mean to call
root.render(element)?"),
d_(null, e, t, !1, n)
}
,
lT.unmountComponentAtNode = function(e) {
if (!r_(e))
throw new Error("unmountComponentAtNode(...): Target
container is not a DOM element.");
if (Vc(e) && void 0 === e._reactRootContainer && o("You are
calling ReactDOM.unmountComponentAtNode() on a container that was previously
passed to ReactDOMClient.createRoot(). This is not supported. Did you mean to call
root.unmount()?"),
e._reactRootContainer) {
var t = l_(e);
return t && !$c(t) && o("unmountComponentAtNode(): The
node you're attempting to unmount was rendered by another copy of React."),
sA((function() {
d_(null, null, e, !1, (function() {
e._reactRootContainer = null,
Hc(e)
}
))
}
)),
!0
}
var n = l_(e)
, r = !(!n || !$c(n))
, i = e.nodeType === pn && r_(e.parentNode) && !!
e.parentNode._reactRootContainer;
return r && o("unmountComponentAtNode(): The node you're
attempting to unmount was rendered by React and is not a top-level container. %s", i ?
"You may have accidentally passed in a React root node instead of its container." :
"Instead, have the parent component update its state and rerender in order to remove
this component."),
!1
}
,
lT.unstable_batchedUpdates = aA,
lT.unstable_renderSubtreeIntoContainer = function(e, t, n, r) {
return function(e, t, n, r) {
if (o("ReactDOM.unstable_renderSubtreeIntoContainer() is
no longer supported in React 18. Consider using a portal instead. Until you switch to the
createRoot API, your app will behave as if it's running React 17. Learn more:
https://reactjs.org/link/switch-to-createroot"),
!r_(n))
throw new Error("Target container is not a DOM
element.");
if (null == e || !function(e) {
return void 0 !== e._reactInternals
}(e))
throw new Error("parentComponent must be a valid
React Component");
return d_(e, t, n, !1, r)
}(e, t, n, r)
}
,
lT.version = _w,
"undefined" != typeof __REACT_DEVTOOLS_GLOBAL_HOOK__
&& "function" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&
__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)
}()),
lT
}
function dT() {
if (uT)
return GR;
uT = 1;
var e = (sT || (sT = 1,
"production" === je.env.NODE_ENV ? (function e() {
if ("undefined" != typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__ && "function" == typeof
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE) {
if ("production" !== je.env.NODE_ENV)
throw new Error("^_^");
try {
__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)
} catch (e) {
console.error(e)
}
}
}(),
XR.exports = oT()) : XR.exports = cT()),
XR.exports);
if ("production" === je.env.NODE_ENV)
GR.createRoot = e.createRoot,
GR.hydrateRoot = e.hydrateRoot;
else {
var t =
e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
GR.createRoot = function(n, r) {
t.usingClientEntryPoint = !0;
try {
return e.createRoot(n, r)
} finally {
t.usingClientEntryPoint = !1
}
}
,
GR.hydrateRoot = function(n, r, i) {
t.usingClientEntryPoint = !0;
try {
return e.hydrateRoot(n, r, i)
} finally {
t.usingClientEntryPoint = !1
}
}
}
return GR
}
var fT, hT = {
exports: {}
};
function pT() {
return fT || (fT = 1,
function(e, t) {
self,
e.exports = ( () => {
var e = {
192: (e, t) => {
var n, r, i = function() {
var e = function(e, t) {
var n = e
, r = a[t]
, i = null
,o=0
, u = null
, g = []
, v = {}
, y = function(e, t) {
i = function(e) {
for (var t = new Array(e), n = 0; n < e; n
+= 1) {
t[n] = new Array(e);
for (var r = 0; r < e; r += 1)
t[n][r] = null
}
return t
}(o = 4 * n + 17),
A(0, 0),
A(o - 7, 0),
A(0, o - 7),
_(),
w(),
S(e, t),
n >= 7 && E(e),
null == u && (u = M(n, r, g)),
k(u, t)
}
, A = function(e, t) {
for (var n = -1; n <= 7; n += 1)
if (!(e + n <= -1 || o <= e + n))
for (var r = -1; r <= 7; r += 1)
t + r <= -1 || o <= t + r || (i[e + n]
[t + r] = 0 <= n && n <= 6 && (0 == r || 6 == r) || 0 <= r && r <= 6 && (0 == n || 6 == n) || 2
<= n && n <= 4 && 2 <= r && r <= 4)
}
, w = function() {
for (var e = 8; e < o - 8; e += 1)
null == i[e][6] && (i[e][6] = e % 2 == 0);
for (var t = 8; t < o - 8; t += 1)
null == i[6][t] && (i[6][t] = t % 2 == 0)
}
, _ = function() {
for (var e = s.getPatternPosition(n), t = 0; t
< e.length; t += 1)
for (var r = 0; r < e.length; r += 1) {
var o = e[t]
, a = e[r];
if (null == i[o][a])
for (var u = -2; u <= 2; u += 1)
for (var l = -2; l <= 2; l += 1)
i[o + u][a + l] = -2 == u
|| 2 == u || -2 == l || 2 == l || 0 == u && 0 == l
}
}
, E = function(e) {
for (var t = s.getBCHTypeNumber(n), r = 0;
r < 18; r += 1) {
var a = !e && 1 == (t >> r & 1);
i[Math.floor(r / 3)][r % 3 + o - 8 - 3] = a
}
for (r = 0; r < 18; r += 1)
a = !e && 1 == (t >> r & 1),
i[r % 3 + o - 8 - 3][Math.floor(r / 3)] = a
}
, S = function(e, t) {
for (var n = r << 3 | t, a =
s.getBCHTypeInfo(n), u = 0; u < 15; u += 1) {
var l = !e && 1 == (a >> u & 1);
u < 6 ? i[u][8] = l : u < 8 ? i[u + 1][8] = l :
i[o - 15 + u][8] = l
}
for (u = 0; u < 15; u += 1)
l = !e && 1 == (a >> u & 1),
u < 8 ? i[8][o - u - 1] = l : u < 9 ? i[8][15 -
u - 1 + 1] = l : i[8][15 - u - 1] = l;
i[o - 8][8] = !e
}
, k = function(e, t) {
for (var n = -1, r = o - 1, a = 7, u = 0, l =
s.getMaskFunction(t), c = o - 1; c > 0; c -= 2)
for (6 == c && (c -= 1); ; ) {
for (var d = 0; d < 2; d += 1)
if (null == i[r][c - d]) {
var f = !1;
u < e.length && (f = 1 ==
(e[u] >>> a & 1)),
l(r, c - d) && (f = !f),
i[r][c - d] = f,
-1 == (a -= 1) && (u += 1,
a = 7)
}
if ((r += n) < 0 || o <= r) {
r -= n,
n = -n;
break
}
}
}
, M = function(e, t, n) {
for (var r = c.getRSBlocks(e, t), i = d(), o =
0; o < n.length; o += 1) {
var a = n[o];
i.put(a.getMode(), 4),
i.put(a.getLength(),
s.getLengthInBits(a.getMode(), e)),
a.write(i)
}
var u = 0;
for (o = 0; o < r.length; o += 1)
u += r[o].dataCount;
if (i.getLengthInBits() > 8 * u)
throw "code length overflow. (" +
i.getLengthInBits() + ">" + 8 * u + ")";
for (i.getLengthInBits() + 4 <= 8 * u &&
i.put(0, 4); i.getLengthInBits() % 8 != 0; )
i.putBit(!1);
for (; !(i.getLengthInBits() >= 8 * u ||
(i.put(236, 8),
i.getLengthInBits() >= 8 * u)); )
i.put(17, 8);
return function(e, t) {
for (var n = 0, r = 0, i = 0, o = new
Array(t.length), a = new Array(t.length), u = 0; u < t.length; u += 1) {
var c = t[u].dataCount
, d = t[u].totalCount - c;
r = Math.max(r, c),
i = Math.max(i, d),
o[u] = new Array(c);
for (var f = 0; f < o[u].length; f += 1)
o[u][f] = 255 & e.getBuffer()[f +
n];
n += c;
var h =
s.getErrorCorrectPolynomial(d)
, p = l(o[u], h.getLength() -
1).mod(h);
for (a[u] = new Array(h.getLength()
- 1),
f = 0; f < a[u].length; f += 1) {
var m = f + p.getLength() -
a[u].length;
a[u][f] = m >= 0 ? p.getAt(m) : 0
}
}
var g = 0;
for (f = 0; f < t.length; f += 1)
g += t[f].totalCount;
var v = new Array(g)
, b = 0;
for (f = 0; f < r; f += 1)
for (u = 0; u < t.length; u += 1)
f < o[u].length && (v[b] = o[u][f],
b += 1);
for (f = 0; f < i; f += 1)
for (u = 0; u < t.length; u += 1)
f < a[u].length && (v[b] = a[u][f],
b += 1);
return v
}(i, r)
};
v.addData = function(e, t) {
var n = null;
switch (t = t || "Byte") {
case "Numeric":
n = f(e);
break;
case "Alphanumeric":
n = h(e);
break;
case "Byte":
n = p(e);
break;
case "Kanji":
n = m(e);
break;
default:
throw "mode:" + t
}
g.push(n),
u = null
}
,
v.isDark = function(e, t) {
if (e < 0 || o <= e || t < 0 || o <= t)
throw e + "," + t;
return i[e][t]
}
,
v.getModuleCount = function() {
return o
}
,
v.make = function() {
if (n < 1) {
for (var e = 1; e < 40; e++) {
for (var t = c.getRSBlocks(e, r), i =
d(), o = 0; o < g.length; o++) {
var a = g[o];
i.put(a.getMode(), 4),
i.put(a.getLength(),
s.getLengthInBits(a.getMode(), e)),
a.write(i)
}
var u = 0;
for (o = 0; o < t.length; o++)
u += t[o].dataCount;
if (i.getLengthInBits() <= 8 * u)
break
}
n=e
}
y(!1, function() {
for (var e = 0, t = 0, n = 0; n < 8; n += 1)
{
y(!0, n);
var r = s.getLostPoint(v);
(0 == n || e > r) && (e = r,
t = n)
}
return t
}())
}
,
v.createTableTag = function(e, t) {
e = e || 2;
var n = "";
n += '<table style="',
n += " border-width: 0px; border-style:
none;",
n += " border-collapse: collapse;",
n += " padding: 0px; margin: " + (t = void 0
=== t ? 4 * e : t) + "px;",
n += '">',
n += "<tbody>";
for (var r = 0; r < v.getModuleCount(); r +=
1) {
n += "<tr>";
for (var i = 0; i < v.getModuleCount(); i
+= 1)
n += '<td style="',
n += " border-width: 0px; border-
style: none;",
n += " border-collapse: collapse;",
n += " padding: 0px; margin: 0px;",
n += " width: " + e + "px;",
n += " height: " + e + "px;",
n += " background-color: ",
n += v.isDark(r, i) ? "#000000" :
"#ffffff",
n += ";",
n += '"/>';
n += "</tr>"
}
return (n += "</tbody>") + "</table>"
}
,
v.createSvgTag = function(e, t, n, r) {
var i = {};
"object" == typeof arguments[0] && (e = (i =
arguments[0]).cellSize,
t = i.margin,
n = i.alt,
r = i.title),
e = e || 2,
t = void 0 === t ? 4 * e : t,
(n = "string" == typeof n ? {
text: n
} : n || {}).text = n.text || null,
n.id = n.text ? n.id || "qrcode-description" :
null,
(r = "string" == typeof r ? {
text: r
} : r || {}).text = r.text || null,
r.id = r.text ? r.id || "qrcode-title" : null;
var o, a, s, u, l = v.getModuleCount() * e + 2
* t, c = "";
for (u = "l" + e + ",0 0," + e + " -" + e + ",0
0,-" + e + "z ",
c += '<svg version="1.1"
xmlns="http://www.w3.org/2000/svg"',
c += i.scalable ? "" : ' width="' + l + 'px"
height="' + l + 'px"',
c += ' viewBox="0 0 ' + l + " " + l + '" ',
c += ' preserveAspectRatio="xMinYMin
meet"',
c += r.text || n.text ? ' role="img" aria-
labelledby="' + C([r.id, n.id].join(" ").trim()) + '"' : "",
c += ">",
c += r.text ? '<title id="' + C(r.id) + '">' +
C(r.text) + "</title>" : "",
c += n.text ? '<description id="' + C(n.id) +
'">' + C(n.text) + "</description>" : "",
c += '<rect width="100%" height="100%"
fill="white" cx="0" cy="0"/>',
c += '<path d="',
a = 0; a < v.getModuleCount(); a += 1)
for (s = a * e + t,
o = 0; o < v.getModuleCount(); o += 1)
v.isDark(a, o) && (c += "M" + (o * e
+ t) + "," + s + u);
return (c += '" stroke="transparent"
fill="black"/>') + "</svg>"
}
,
v.createDataURL = function(e, t) {
e = e || 2,
t = void 0 === t ? 4 * e : t;
var n = v.getModuleCount() * e + 2 * t
,r=t
, i = n - t;
return b(n, n, (function(t, n) {
if (r <= t && t < i && r <= n && n < i) {
var o = Math.floor((t - r) / e)
, a = Math.floor((n - r) / e);
return v.isDark(a, o) ? 0 : 1
}
return 1
}
))
}
,
v.createImgTag = function(e, t, n) {
e = e || 2,
t = void 0 === t ? 4 * e : t;
var r = v.getModuleCount() * e + 2 * t
, i = "";
return i += "<img",
i += ' src="',
i += v.createDataURL(e, t),
i += '"',
i += ' width="',
i += r,
i += '"',
i += ' height="',
i += r,
i += '"',
n && (i += ' alt="',
i += C(n),
i += '"'),
i + "/>"
}
;
var C = function(e) {
for (var t = "", n = 0; n < e.length; n += 1) {
var r = e.charAt(n);
switch (r) {
case "<":
t += "<";
break;
case ">":
t += ">";
break;
case "&":
t += "&";
break;
case '"':
t += """;
break;
default:
t += r
}
}
return t
};
return v.createASCII = function(e, t) {
if ((e = e || 1) < 2)
return function(e) {
e = void 0 === e ? 2 : e;
var t, n, r, i, o, a = 1 *
v.getModuleCount() + 2 * e, s = e, u = a - e, l = {
"\u2588\u2588": "\u2588",
"\u2588 ": "\u2580",
" \u2588": "\u2584",
" ": " "
}, c = {
"\u2588\u2588": "\u2580",
"\u2588 ": "\u2580",
" \u2588": " ",
" ": " "
}, d = "";
for (t = 0; t < a; t += 2) {
for (r = Math.floor((t - s) / 1),
i = Math.floor((t + 1 - s) / 1),
n = 0; n < a; n += 1)
o = "\u2588",
s <= n && n < u && s <= t
&& t < u && v.isDark(r, Math.floor((n - s) / 1)) && (o = " "),
s <= n && n < u && s <= t +
1 && t + 1 < u && v.isDark(i, Math.floor((n - s) / 1)) ? o += " " : o += "\u2588",
d += e < 1 && t + 1 >= u ?
c[o] : l[o];
d += "\n"
}
return a % 2 && e > 0 ?
d.substring(0, d.length - a - 1) + Array(a + 1).join("\u2580") : d.substring(0, d.length - 1)
}(t);
e -= 1,
t = void 0 === t ? 2 * e : t;
var n, r, i, o, a = v.getModuleCount() * e + 2
* t, s = t, u = a - t, l = Array(e + 1).join("\u2588\u2588"), c = Array(e + 1).join(" "), d = "",
f = "";
for (n = 0; n < a; n += 1) {
for (i = Math.floor((n - s) / e),
f = "",
r = 0; r < a; r += 1)
o = 1,
s <= r && r < u && s <= n && n < u
&& v.isDark(i, Math.floor((r - s) / e)) && (o = 0),
f += o ? l : c;
for (i = 0; i < e; i += 1)
d += f + "\n"
}
return d.substring(0, d.length - 1)
}
,
v.renderTo2dContext = function(e, t) {
t = t || 2;
for (var n = v.getModuleCount(), r = 0; r < n;
r++)
for (var i = 0; i < n; i++)
e.fillStyle = v.isDark(r, i) ? "black" :
"white",
e.fillRect(r * t, i * t, t, t)
}
,
v
};
e.stringToBytes = (e.stringToBytesFuncs = {
default: function(e) {
for (var t = [], n = 0; n < e.length; n += 1) {
var r = e.charCodeAt(n);
t.push(255 & r)
}
return t
}
}).default,
e.createStringToBytes = function(e, t) {
var n = function() {
for (var n = v(e), r = function() {
var e = n.read();
if (-1 == e)
throw "eof";
return e
}, i = 0, o = {}; ; ) {
var a = n.read();
if (-1 == a)
break;
var s = r()
, u = r() << 8 | r();
o[String.fromCharCode(a << 8 | s)] = u,
i += 1
}
if (i != t)
throw i + " != " + t;
return o
}()
, r = "?".charCodeAt(0);
return function(e) {
for (var t = [], i = 0; i < e.length; i += 1) {
var o = e.charCodeAt(i);
if (o < 128)
t.push(o);
else {
var a = n[e.charAt(i)];
"number" == typeof a ? (255 & a)
== a ? t.push(a) : (t.push(a >>> 8),
t.push(255 & a)) : t.push(r)
}
}
return t
}
}
;
var t, n, r, i, o, a = {
L: 1,
M: 0,
Q: 3,
H: 2
}, s = (t = [[], [6, 18], [6, 22], [6, 26], [6, 30], [6, 34],
[6, 22, 38], [6, 24, 42], [6, 26, 46], [6, 28, 50], [6, 30, 54], [6, 32, 58], [6, 34, 62], [6, 26,
46, 66], [6, 26, 48, 70], [6, 26, 50, 74], [6, 30, 54, 78], [6, 30, 56, 82], [6, 30, 58, 86], [6,
34, 62, 90], [6, 28, 50, 72, 94], [6, 26, 50, 74, 98], [6, 30, 54, 78, 102], [6, 28, 54, 80,
106], [6, 32, 58, 84, 110], [6, 30, 58, 86, 114], [6, 34, 62, 90, 118], [6, 26, 50, 74, 98,
122], [6, 30, 54, 78, 102, 126], [6, 26, 52, 78, 104, 130], [6, 30, 56, 82, 108, 134], [6, 34,
60, 86, 112, 138], [6, 30, 58, 86, 114, 142], [6, 34, 62, 90, 118, 146], [6, 30, 54, 78, 102,
126, 150], [6, 24, 50, 76, 102, 128, 154], [6, 28, 54, 80, 106, 132, 158], [6, 32, 58, 84,
110, 136, 162], [6, 26, 54, 82, 110, 138, 166], [6, 30, 58, 86, 114, 142, 170]],
n = 1335,
r = 7973,
o = function(e) {
for (var t = 0; 0 != e; )
t += 1,
e >>>= 1;
return t
}
,
(i = {}).getBCHTypeInfo = function(e) {
for (var t = e << 10; o(t) - o(n) >= 0; )
t ^= n << o(t) - o(n);
return 21522 ^ (e << 10 | t)
}
,
i.getBCHTypeNumber = function(e) {
for (var t = e << 12; o(t) - o(r) >= 0; )
t ^= r << o(t) - o(r);
return e << 12 | t
}
,
i.getPatternPosition = function(e) {
return t[e - 1]
}
,
i.getMaskFunction = function(e) {
switch (e) {
case 0:
return function(e, t) {
return (e + t) % 2 == 0
}
;
case 1:
return function(e, t) {
return e % 2 == 0
}
;
case 2:
return function(e, t) {
return t % 3 == 0
}
;
case 3:
return function(e, t) {
return (e + t) % 3 == 0
}
;
case 4:
return function(e, t) {
return (Math.floor(e / 2) + Math.floor(t /
3)) % 2 == 0
}
;
case 5:
return function(e, t) {
return e * t % 2 + e * t % 3 == 0
}
;
case 6:
return function(e, t) {
return (e * t % 2 + e * t % 3) % 2 == 0
}
;
case 7:
return function(e, t) {
return (e * t % 3 + (e + t) % 2) % 2 == 0
}
;
default:
throw "bad maskPattern:" + e
}
}
,
i.getErrorCorrectPolynomial = function(e) {
for (var t = l([1], 0), n = 0; n < e; n += 1)
t = t.multiply(l([1, u.gexp(n)], 0));
return t
}
,
i.getLengthInBits = function(e, t) {
if (1 <= t && t < 10)
switch (e) {
case 1:
return 10;
case 2:
return 9;
case 4:
case 8:
return 8;
default:
throw "mode:" + e
}
else if (t < 27)
switch (e) {
case 1:
return 12;
case 2:
return 11;
case 4:
return 16;
case 8:
return 10;
default:
throw "mode:" + e
}
else {
if (!(t < 41))
throw "type:" + t;
switch (e) {
case 1:
return 14;
case 2:
return 13;
case 4:
return 16;
case 8:
return 12;
default:
throw "mode:" + e
}
}
}
,
i.getLostPoint = function(e) {
for (var t = e.getModuleCount(), n = 0, r = 0; r <
t; r += 1)
for (var i = 0; i < t; i += 1) {
for (var o = 0, a = e.isDark(r, i), s = -1; s
<= 1; s += 1)
if (!(r + s < 0 || t <= r + s))
for (var u = -1; u <= 1; u += 1)
i + u < 0 || t <= i + u || 0 ==
s && 0 == u || a == e.isDark(r + s, i + u) && (o += 1);
o > 5 && (n += 3 + o - 5)
}
for (r = 0; r < t - 1; r += 1)
for (i = 0; i < t - 1; i += 1) {
var l = 0;
e.isDark(r, i) && (l += 1),
e.isDark(r + 1, i) && (l += 1),
e.isDark(r, i + 1) && (l += 1),
e.isDark(r + 1, i + 1) && (l += 1),
0 != l && 4 != l || (n += 3)
}
for (r = 0; r < t; r += 1)
for (i = 0; i < t - 6; i += 1)
e.isDark(r, i) && !e.isDark(r, i + 1) &&
e.isDark(r, i + 2) && e.isDark(r, i + 3) && e.isDark(r, i + 4) && !e.isDark(r, i + 5) &&
e.isDark(r, i + 6) && (n += 40);
for (i = 0; i < t; i += 1)
for (r = 0; r < t - 6; r += 1)
e.isDark(r, i) && !e.isDark(r + 1, i) &&
e.isDark(r + 2, i) && e.isDark(r + 3, i) && e.isDark(r + 4, i) && !e.isDark(r + 5, i) &&
e.isDark(r + 6, i) && (n += 40);
var c = 0;
for (i = 0; i < t; i += 1)
for (r = 0; r < t; r += 1)
e.isDark(r, i) && (c += 1);
return n + Math.abs(100 * c / t / t - 50) / 5 * 10
}
,
i), u = function() {
for (var e = new Array(256), t = new Array(256),
n = 0; n < 8; n += 1)
e[n] = 1 << n;
for (n = 8; n < 256; n += 1)
e[n] = e[n - 4] ^ e[n - 5] ^ e[n - 6] ^ e[n - 8];
for (n = 0; n < 255; n += 1)
t[e[n]] = n;
return {
glog: function(e) {
if (e < 1)
throw "glog(" + e + ")";
return t[e]
},
gexp: function(t) {
for (; t < 0; )
t += 255;
for (; t >= 256; )
t -= 255;
return e[t]
}
}
}();
function l(e, t) {
if (void 0 === e.length)
throw e.length + "/" + t;
var n = function() {
for (var n = 0; n < e.length && 0 == e[n]; )
n += 1;
for (var r = new Array(e.length - n + t), i = 0;
i < e.length - n; i += 1)
r[i] = e[i + n];
return r
}()
,r={
getAt: function(e) {
return n[e]
},
getLength: function() {
return n.length
},
multiply: function(e) {
for (var t = new Array(r.getLength() +
e.getLength() - 1), n = 0; n < r.getLength(); n += 1)
for (var i = 0; i < e.getLength(); i +=
1)
t[n + i] ^=
u.gexp(u.glog(r.getAt(n)) + u.glog(e.getAt(i)));
return l(t, 0)
},
mod: function(e) {
if (r.getLength() - e.getLength() < 0)
return r;
for (var t = u.glog(r.getAt(0)) -
u.glog(e.getAt(0)), n = new Array(r.getLength()), i = 0; i < r.getLength(); i += 1)
n[i] = r.getAt(i);
for (i = 0; i < e.getLength(); i += 1)
n[i] ^= u.gexp(u.glog(e.getAt(i)) + t);
return l(n, 0).mod(e)
}
};
return r
}
var c = function() {
var e = [[1, 26, 19], [1, 26, 16], [1, 26, 13], [1,
26, 9], [1, 44, 34], [1, 44, 28], [1, 44, 22], [1, 44, 16], [1, 70, 55], [1, 70, 44], [2, 35, 17],
[2, 35, 13], [1, 100, 80], [2, 50, 32], [2, 50, 24], [4, 25, 9], [1, 134, 108], [2, 67, 43], [2, 33,
15, 2, 34, 16], [2, 33, 11, 2, 34, 12], [2, 86, 68], [4, 43, 27], [4, 43, 19], [4, 43, 15], [2, 98,
78], [4, 49, 31], [2, 32, 14, 4, 33, 15], [4, 39, 13, 1, 40, 14], [2, 121, 97], [2, 60, 38, 2, 61,
39], [4, 40, 18, 2, 41, 19], [4, 40, 14, 2, 41, 15], [2, 146, 116], [3, 58, 36, 2, 59, 37], [4,
36, 16, 4, 37, 17], [4, 36, 12, 4, 37, 13], [2, 86, 68, 2, 87, 69], [4, 69, 43, 1, 70, 44], [6,
43, 19, 2, 44, 20], [6, 43, 15, 2, 44, 16], [4, 101, 81], [1, 80, 50, 4, 81, 51], [4, 50, 22, 4,
51, 23], [3, 36, 12, 8, 37, 13], [2, 116, 92, 2, 117, 93], [6, 58, 36, 2, 59, 37], [4, 46, 20, 6,
47, 21], [7, 42, 14, 4, 43, 15], [4, 133, 107], [8, 59, 37, 1, 60, 38], [8, 44, 20, 4, 45, 21],
[12, 33, 11, 4, 34, 12], [3, 145, 115, 1, 146, 116], [4, 64, 40, 5, 65, 41], [11, 36, 16, 5, 37,
17], [11, 36, 12, 5, 37, 13], [5, 109, 87, 1, 110, 88], [5, 65, 41, 5, 66, 42], [5, 54, 24, 7,
55, 25], [11, 36, 12, 7, 37, 13], [5, 122, 98, 1, 123, 99], [7, 73, 45, 3, 74, 46], [15, 43, 19,
2, 44, 20], [3, 45, 15, 13, 46, 16], [1, 135, 107, 5, 136, 108], [10, 74, 46, 1, 75, 47], [1,
50, 22, 15, 51, 23], [2, 42, 14, 17, 43, 15], [5, 150, 120, 1, 151, 121], [9, 69, 43, 4, 70,
44], [17, 50, 22, 1, 51, 23], [2, 42, 14, 19, 43, 15], [3, 141, 113, 4, 142, 114], [3, 70, 44,
11, 71, 45], [17, 47, 21, 4, 48, 22], [9, 39, 13, 16, 40, 14], [3, 135, 107, 5, 136, 108], [3,
67, 41, 13, 68, 42], [15, 54, 24, 5, 55, 25], [15, 43, 15, 10, 44, 16], [4, 144, 116, 4, 145,
117], [17, 68, 42], [17, 50, 22, 6, 51, 23], [19, 46, 16, 6, 47, 17], [2, 139, 111, 7, 140,
112], [17, 74, 46], [7, 54, 24, 16, 55, 25], [34, 37, 13], [4, 151, 121, 5, 152, 122], [4, 75,
47, 14, 76, 48], [11, 54, 24, 14, 55, 25], [16, 45, 15, 14, 46, 16], [6, 147, 117, 4, 148,
118], [6, 73, 45, 14, 74, 46], [11, 54, 24, 16, 55, 25], [30, 46, 16, 2, 47, 17], [8, 132, 106,
4, 133, 107], [8, 75, 47, 13, 76, 48], [7, 54, 24, 22, 55, 25], [22, 45, 15, 13, 46, 16], [10,
142, 114, 2, 143, 115], [19, 74, 46, 4, 75, 47], [28, 50, 22, 6, 51, 23], [33, 46, 16, 4, 47,
17], [8, 152, 122, 4, 153, 123], [22, 73, 45, 3, 74, 46], [8, 53, 23, 26, 54, 24], [12, 45, 15,
28, 46, 16], [3, 147, 117, 10, 148, 118], [3, 73, 45, 23, 74, 46], [4, 54, 24, 31, 55, 25], [11,
45, 15, 31, 46, 16], [7, 146, 116, 7, 147, 117], [21, 73, 45, 7, 74, 46], [1, 53, 23, 37, 54,
24], [19, 45, 15, 26, 46, 16], [5, 145, 115, 10, 146, 116], [19, 75, 47, 10, 76, 48], [15, 54,
24, 25, 55, 25], [23, 45, 15, 25, 46, 16], [13, 145, 115, 3, 146, 116], [2, 74, 46, 29, 75,
47], [42, 54, 24, 1, 55, 25], [23, 45, 15, 28, 46, 16], [17, 145, 115], [10, 74, 46, 23, 75,
47], [10, 54, 24, 35, 55, 25], [19, 45, 15, 35, 46, 16], [17, 145, 115, 1, 146, 116], [14, 74,
46, 21, 75, 47], [29, 54, 24, 19, 55, 25], [11, 45, 15, 46, 46, 16], [13, 145, 115, 6, 146,
116], [14, 74, 46, 23, 75, 47], [44, 54, 24, 7, 55, 25], [59, 46, 16, 1, 47, 17], [12, 151,
121, 7, 152, 122], [12, 75, 47, 26, 76, 48], [39, 54, 24, 14, 55, 25], [22, 45, 15, 41, 46,
16], [6, 151, 121, 14, 152, 122], [6, 75, 47, 34, 76, 48], [46, 54, 24, 10, 55, 25], [2, 45,
15, 64, 46, 16], [17, 152, 122, 4, 153, 123], [29, 74, 46, 14, 75, 47], [49, 54, 24, 10, 55,
25], [24, 45, 15, 46, 46, 16], [4, 152, 122, 18, 153, 123], [13, 74, 46, 32, 75, 47], [48, 54,
24, 14, 55, 25], [42, 45, 15, 32, 46, 16], [20, 147, 117, 4, 148, 118], [40, 75, 47, 7, 76,
48], [43, 54, 24, 22, 55, 25], [10, 45, 15, 67, 46, 16], [19, 148, 118, 6, 149, 119], [18, 75,
47, 31, 76, 48], [34, 54, 24, 34, 55, 25], [20, 45, 15, 61, 46, 16]]
, t = function(e, t) {
var n = {};
return n.totalCount = e,
n.dataCount = t,
n
}
,n={
getRSBlocks: function(n, r) {
var i = function(t, n) {
switch (n) {
case a.L:
return e[4 * (t - 1) + 0];
case a.M:
return e[4 * (t - 1) + 1];
case a.Q:
return e[4 * (t - 1) + 2];
case a.H:
return e[4 * (t - 1) + 3];
default:
return
}
}(n, r);
if (void 0 === i)
throw "bad rs block @
typeNumber:" + n + "/errorCorrectionLevel:" + r;
for (var o = i.length / 3, s = [], u = 0; u <
o; u += 1)
for (var l = i[3 * u + 0], c = i[3 * u +
1], d = i[3 * u + 2], f = 0; f < l; f += 1)
s.push(t(c, d));
return s
}
};
return n
}()
, d = function() {
var e = []
,t=0
,n={
getBuffer: function() {
return e
},
getAt: function(t) {
var n = Math.floor(t / 8);
return 1 == (e[n] >>> 7 - t % 8 & 1)
},
put: function(e, t) {
for (var r = 0; r < t; r += 1)
n.putBit(1 == (e >>> t - r - 1 & 1))
},
getLengthInBits: function() {
return t
},
putBit: function(n) {
var r = Math.floor(t / 8);
e.length <= r && e.push(0),
n && (e[r] |= 128 >>> t % 8),
t += 1
}
};
return n
}
, f = function(e) {
var t = e
,n={
getMode: function() {
return 1
},
getLength: function(e) {
return t.length
},
write: function(e) {
for (var n = t, i = 0; i + 2 < n.length; )
e.put(r(n.substring(i, i + 3)), 10),
i += 3;
i < n.length && (n.length - i == 1 ?
e.put(r(n.substring(i, i + 1)), 4) : n.length - i == 2 && e.put(r(n.substring(i, i + 2)), 7))
}
}
, r = function(e) {
for (var t = 0, n = 0; n < e.length; n += 1)
t = 10 * t + i(e.charAt(n));
return t
}
, i = function(e) {
if ("0" <= e && e <= "9")
return e.charCodeAt(0) -
"0".charCodeAt(0);
throw "illegal char :" + e
};
return n
}
, h = function(e) {
var t = e
,n={
getMode: function() {
return 2
},
getLength: function(e) {
return t.length
},
write: function(e) {
for (var n = t, i = 0; i + 1 < n.length; )
e.put(45 * r(n.charAt(i)) +
r(n.charAt(i + 1)), 11),
i += 2;
i < n.length && e.put(r(n.charAt(i)), 6)
}
}
, r = function(e) {
if ("0" <= e && e <= "9")
return e.charCodeAt(0) -
"0".charCodeAt(0);
if ("A" <= e && e <= "Z")
return e.charCodeAt(0) -
"A".charCodeAt(0) + 10;
switch (e) {
case " ":
return 36;
case "$":
return 37;
case "%":
return 38;
case "*":
return 39;
case "+":
return 40;
case "-":
return 41;
case ".":
return 42;
case "/":
return 43;
case ":":
return 44;
default:
throw "illegal char :" + e
}
};
return n
}
, p = function(t) {
var n = e.stringToBytes(t);
return {
getMode: function() {
return 4
},
getLength: function(e) {
return n.length
},
write: function(e) {
for (var t = 0; t < n.length; t += 1)
e.put(n[t], 8)
}
}
}
, m = function(t) {
var n = e.stringToBytesFuncs.SJIS;
if (!n)
throw "sjis not supported.";
!function(e, t) {
var r = n("\u53cb");
if (2 != r.length || 38726 != (r[0] << 8 | r[1]))
throw "sjis not supported."
}();
var r = n(t);
return {
getMode: function() {
return 8
},
getLength: function(e) {
return ~~(r.length / 2)
},
write: function(e) {
for (var t = r, n = 0; n + 1 < t.length; ) {
var i = (255 & t[n]) << 8 | 255 & t[n
+ 1];
if (33088 <= i && i <= 40956)
i -= 33088;
else {
if (!(57408 <= i && i <= 60351))
throw "illegal char at " + (n
+ 1) + "/" + i;
i -= 49472
}
i = 192 * (i >>> 8 & 255) + (255 & i),
e.put(i, 13),
n += 2
}
if (n < t.length)
throw "illegal char at " + (n + 1)
}
}
}
, g = function() {
var e = []
,t={
writeByte: function(t) {
e.push(255 & t)
},
writeShort: function(e) {
t.writeByte(e),
t.writeByte(e >>> 8)
},
writeBytes: function(e, n, r) {
n = n || 0,
r = r || e.length;
for (var i = 0; i < r; i += 1)
t.writeByte(e[i + n])
},
writeString: function(e) {
for (var n = 0; n < e.length; n += 1)
t.writeByte(e.charCodeAt(n))
},
toByteArray: function() {
return e
},
toString: function() {
var t = "";
t += "[";
for (var n = 0; n < e.length; n += 1)
n > 0 && (t += ","),
t += e[n];
return t + "]"
}
};
return t
}
, v = function(e) {
var t = e
,n=0
,r=0
,i=0
,o={
read: function() {
for (; i < 8; ) {
if (n >= t.length) {
if (0 == i)
return -1;
throw "unexpected end of file./"
+i
}
var e = t.charAt(n);
if (n += 1,
"=" == e)
return i = 0,
-1;
e.match(/^\s$/) || (r = r << 6 |
a(e.charCodeAt(0)),
i += 6)
}
var o = r >>> i - 8 & 255;
return i -= 8,
o
}
}
, a = function(e) {
if (65 <= e && e <= 90)
return e - 65;
if (97 <= e && e <= 122)
return e - 97 + 26;
if (48 <= e && e <= 57)
return e - 48 + 52;
if (43 == e)
return 62;
if (47 == e)
return 63;
throw "c:" + e
};
return o
}
, b = function(e, t, n) {
for (var r = function(e, t) {
var n = e
,r=t
, i = new Array(e * t)
,o={
setPixel: function(e, t, r) {
i[t * n + e] = r
},
write: function(e) {
e.writeString("GIF87a"),
e.writeShort(n),
e.writeShort(r),
e.writeByte(128),
e.writeByte(0),
e.writeByte(0),
e.writeByte(0),
e.writeByte(0),
e.writeByte(0),
e.writeByte(255),
e.writeByte(255),
e.writeByte(255),
e.writeString(","),
e.writeShort(0),
e.writeShort(0),
e.writeShort(n),
e.writeShort(r),
e.writeByte(0);
var t = a(2);
e.writeByte(2);
for (var i = 0; t.length - i > 255; )
e.writeByte(255),
e.writeBytes(t, i, 255),
i += 255;
e.writeByte(t.length - i),
e.writeBytes(t, i, t.length - i),
e.writeByte(0),
e.writeString(";")
}
}
, a = function(e) {
for (var t = 1 << e, n = 1 + (1 << e), r =
e + 1, o = s(), a = 0; a < t; a += 1)
o.add(String.fromCharCode(a));
o.add(String.fromCharCode(t)),
o.add(String.fromCharCode(n));
var u, l, c, d = g(), f = (u = d,
l = 0,
c = 0,
{
write: function(e, t) {
if (e >>> t != 0)
throw "length over";
for (; l + t >= 8; )
u.writeByte(255 & (e << l |
c)),
t -= 8 - l,
e >>>= 8 - l,
c = 0,
l = 0;
c |= e << l,
l += t
},
flush: function() {
l > 0 && u.writeByte(c)
}
});
f.write(t, r);
var h = 0
, p = String.fromCharCode(i[h]);
for (h += 1; h < i.length; ) {
var m = String.fromCharCode(i[h]);
h += 1,
o.contains(p + m) ? p += m :
(f.write(o.indexOf(p), r),
o.size() < 4095 && (o.size() == 1 <<
r && (r += 1),
o.add(p + m)),
p = m)
}
return f.write(o.indexOf(p), r),
f.write(n, r),
f.flush(),
d.toByteArray()
}
, s = function() {
var e = {}
,t=0
,n={
add: function(r) {
if (n.contains(r))
throw "dup key:" + r;
e[r] = t,
t += 1
},
size: function() {
return t
},
indexOf: function(t) {
return e[t]
},
contains: function(t) {
return void 0 !== e[t]
}
};
return n
};
return o
}(e, t), i = 0; i < t; i += 1)
for (var o = 0; o < e; o += 1)
r.setPixel(o, i, n(o, i));
var a = g();
r.write(a);
for (var s = function() {
var e = 0
,t=0
,n=0
, r = ""
, i = {}
, o = function(e) {
r += String.fromCharCode(a(63 & e))
}
, a = function(e) {
if (e < 0)
;
else {
if (e < 26)
return 65 + e;
if (e < 52)
return e - 26 + 97;
if (e < 62)
return e - 52 + 48;
if (62 == e)
return 43;
if (63 == e)
return 47
}
throw "n:" + e
};
return i.writeByte = function(r) {
for (e = e << 8 | 255 & r,
t += 8,
n += 1; t >= 6; )
o(e >>> t - 6),
t -= 6
}
,
i.flush = function() {
if (t > 0 && (o(e << 6 - t),
e = 0,
t = 0),
n % 3 != 0)
for (var i = 3 - n % 3, a = 0; a < i; a
+= 1)
r += "="
}
,
i.toString = function() {
return r
}
,
i
}(), u = a.toByteArray(), l = 0; l < u.length; l +=
1)
s.writeByte(u[l]);
return s.flush(),
"data:image/gif;base64," + s
};
return e
}();
i.stringToBytesFuncs["UTF-8"] = function(e) {
return function(e) {
for (var t = [], n = 0; n < e.length; n++) {
var r = e.charCodeAt(n);
r < 128 ? t.push(r) : r < 2048 ? t.push(192 |
r >> 6, 128 | 63 & r) : r < 55296 || r >= 57344 ? t.push(224 | r >> 12, 128 | r >> 6 & 63,
128 | 63 & r) : (n++,
r = 65536 + ((1023 & r) << 10 | 1023 &
e.charCodeAt(n)),
t.push(240 | r >> 18, 128 | r >> 12 & 63,
128 | r >> 6 & 63, 128 | 63 & r))
}
return t
}(e)
}
,
void 0 === (r = "function" == typeof (n = function() {
return i
}
) ? n.apply(t, []) : n) || (e.exports = r)
}
,
676: (e, t, n) => {
n.d(t, {
default: () => L
});
var r = function() {
return (r = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n+
+)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t,
i) && (e[i] = t[i]);
return e
}
).apply(this, arguments)
}
, i = function() {
for (var e = 0, t = 0, n = arguments.length; t < n; t+
+)
e += arguments[t].length;
var r = Array(e)
, i = 0;
for (t = 0; t < n; t++)
for (var o = arguments[t], a = 0, s = o.length; a
< s; a++,
i++)
r[i] = o[a];
return r
}
, o = function(e) {
return !!e && "object" == typeof e && !
Array.isArray(e)
};
function a(e) {
for (var t = [], n = 1; n < arguments.length; n++)
t[n - 1] = arguments[n];
if (!t.length)
return e;
var s = t.shift();
return void 0 !== s && o(e) && o(s) ? (e = r({}, e),
Object.keys(s).forEach((function(t) {
var n = e[t]
, r = s[t];
Array.isArray(n) && Array.isArray(r) ? e[t] = r :
o(n) && o(r) ? e[t] = a(Object.assign({}, n), r) : e[t] = r
}
)),
a.apply(void 0, i([e], t))) : e
}
function s(e, t) {
var n = document.createElement("a");
n.download = t,
n.href = e,
document.body.appendChild(n),
n.click(),
document.body.removeChild(n)
}
function u(e) {
return t = this,
n = void 0,
i = function() {
return function(e, t) {
var n, r, i, o, a = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: s(0),
throw: s(1),
return: s(2)
},
"function" == typeof Symbol &&
(o[Symbol.iterator] = function() {
return this
}
),
o;
function s(o) {
return function(s) {
return function(o) {
if (n)
throw new
TypeError("Generator is already executing.");
for (; a; )
try {
if (n = 1,
r && (i = 2 & o[0] ?
r.return : o[0] ? r.throw || ((i = r.return) && i.call(r),
0) : r.next) && !(i =
i.call(r, o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0],
i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return a.label++,
{
value: o[1],
done: !1
};
case 5:
a.label++,
r = o[1],
o = [0];
continue;
case 7:
o = a.ops.pop(),
a.trys.pop();
continue;
default:
if (!((i = (i =
a.trys).length > 0 && i[i.length - 1]) || 6 !== o[0] && 2 !== o[0])) {
a = 0;
continue
}
if (3 === o[0] && (!i
|| o[1] > i[0] && o[1] < i[3])) {
a.label = o[1];
break
}
if (6 === o[0] &&
a.label < i[1]) {
a.label = i[1],
i = o;
break
}
if (i && a.label <
i[2]) {
a.label = i[2],
a.ops.push(o);
break
}
i[2] && a.ops.pop(),
a.trys.pop();
continue
}
o = t.call(e, a)
} catch (e) {
o = [6, e],
r=0
} finally {
n=i=0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, s])
}
}
}(this, (function(t) {
return [2, new Promise((function(t) {
var n = new XMLHttpRequest;
n.onload = function() {
var e = new FileReader;
e.onloadend = function() {
t(e.result)
}
,
e.readAsDataURL(n.response)
}
,
n.open("GET", e),
n.responseType = "blob",
n.send()
}
))]
}
))
}
,
new ((r = void 0) || (r = Promise))((function(e, o) {
function a(e) {
try {
u(i.next(e))
} catch (e) {
o(e)
}
}
function s(e) {
try {
u(i.throw(e))
} catch (e) {
o(e)
}
}
function u(t) {
var n;
t.done ? e(t.value) : (n = t.value,
n instanceof r ? n : new r((function(e) {
e(n)
}
))).then(a, s)
}
u((i = i.apply(t, n || [])).next())
}
));
var t, n, r, i
}
const l = {
L: .07,
M: .15,
Q: .25,
H: .3
};
var c = function() {
return (c = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n+
+)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t,
i) && (e[i] = t[i]);
return e
}
).apply(this, arguments)
};
const d = function() {
function e(e) {
var t = e.svg
, n = e.type;
this._svg = t,
this._type = n
}
return e.prototype.draw = function(e, t, n, r) {
var i;
switch (this._type) {
case "dots":
i = this._drawDot;
break;
case "classy":
i = this._drawClassy;
break;
case "classy-rounded":
i = this._drawClassyRounded;
break;
case "rounded":
i = this._drawRounded;
break;
case "extra-rounded":
i = this._drawExtraRounded;
break;
default:
i = this._drawSquare
}
i.call(this, {
x: e,
y: t,
size: n,
getNeighbor: r
})
}
,
e.prototype._rotateFigure = function(e) {
var t, n = e.x, r = e.y, i = e.size, o = e.rotation, a
= void 0 === o ? 0 : o, s = n + i / 2, u = r + i / 2;
(0,
e.draw)(),
null === (t = this._element) || void 0 === t ||
t.setAttribute("transform", "rotate(" + 180 * a / Math.PI + "," + s + "," + u + ")")
}
,
e.prototype._basicDot = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(c(c({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "circle"),
t._element.setAttribute("cx", String(r + n
/ 2)),
t._element.setAttribute("cy", String(i + n
/ 2)),
t._element.setAttribute("r", String(n / 2))
}
}))
}
,
e.prototype._basicSquare = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(c(c({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "rect"),
t._element.setAttribute("x", String(r)),
t._element.setAttribute("y", String(i)),
t._element.setAttribute("width",
String(n)),
t._element.setAttribute("height",
String(n))
}
}))
}
,
e.prototype._basicSideRounded = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(c(c({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "path"),
t._element.setAttribute("d", "M " + r + " "
+ i + "v " + n + "h " + n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, 0 " + -n)
}
}))
}
,
e.prototype._basicCornerRounded = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(c(c({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "path"),
t._element.setAttribute("d", "M " + r + " "
+ i + "v " + n + "h " + n + "v " + -n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, " + -n / 2 + " " +
-n / 2)
}
}))
}
,
e.prototype._basicCornerExtraRounded =
function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(c(c({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "path"),
t._element.setAttribute("d", "M " + r + " "
+ i + "v " + n + "h " + n + "a " + n + " " + n + ", 0, 0, 0, " + -n + " " + -n)
}
}))
}
,
e.prototype._basicCornersRounded = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(c(c({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "path"),
t._element.setAttribute("d", "M " + r + " "
+ i + "v " + n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, " + n / 2 + " " + n / 2 + "h " + n / 2 +
"v " + -n / 2 + "a " + n / 2 + " " + n / 2 + ", 0, 0, 0, " + -n / 2 + " " + -n / 2)
}
}))
}
,
e.prototype._drawDot = function(e) {
var t = e.x
, n = e.y
, r = e.size;
this._basicDot({
x: t,
y: n,
size: r,
rotation: 0
})
}
,
e.prototype._drawSquare = function(e) {
var t = e.x
, n = e.y
, r = e.size;
this._basicSquare({
x: t,
y: n,
size: r,
rotation: 0
})
}
,
e.prototype._drawRounded = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.getNeighbor
, o = i ? +i(-1, 0) : 0
, a = i ? +i(1, 0) : 0
, s = i ? +i(0, -1) : 0
, u = i ? +i(0, 1) : 0
, l = o + a + s + u;
if (0 !== l)
if (l > 2 || o && a || s && u)
this._basicSquare({
x: t,
y: n,
size: r,
rotation: 0
});
else {
if (2 === l) {
var c = 0;
return o && s ? c = Math.PI / 2 : s
&& a ? c = Math.PI : a && u && (c = -Math.PI / 2),
void this._basicCornerRounded({
x: t,
y: n,
size: r,
rotation: c
})
}
if (1 === l)
return c = 0,
s ? c = Math.PI / 2 : a ? c = Math.PI
: u && (c = -Math.PI / 2),
void this._basicSideRounded({
x: t,
y: n,
size: r,
rotation: c
})
}
else
this._basicDot({
x: t,
y: n,
size: r,
rotation: 0
})
}
,
e.prototype._drawExtraRounded = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.getNeighbor
, o = i ? +i(-1, 0) : 0
, a = i ? +i(1, 0) : 0
, s = i ? +i(0, -1) : 0
, u = i ? +i(0, 1) : 0
, l = o + a + s + u;
if (0 !== l)
if (l > 2 || o && a || s && u)
this._basicSquare({
x: t,
y: n,
size: r,
rotation: 0
});
else {
if (2 === l) {
var c = 0;
return o && s ? c = Math.PI / 2 : s
&& a ? c = Math.PI : a && u && (c = -Math.PI / 2),
void
this._basicCornerExtraRounded({
x: t,
y: n,
size: r,
rotation: c
})
}
if (1 === l)
return c = 0,
s ? c = Math.PI / 2 : a ? c = Math.PI
: u && (c = -Math.PI / 2),
void this._basicSideRounded({
x: t,
y: n,
size: r,
rotation: c
})
}
else
this._basicDot({
x: t,
y: n,
size: r,
rotation: 0
})
}
,
e.prototype._drawClassy = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.getNeighbor
, o = i ? +i(-1, 0) : 0
, a = i ? +i(1, 0) : 0
, s = i ? +i(0, -1) : 0
, u = i ? +i(0, 1) : 0;
0 !== o + a + s + u ? o || s ? a || u ?
this._basicSquare({
x: t,
y: n,
size: r,
rotation: 0
}) : this._basicCornerRounded({
x: t,
y: n,
size: r,
rotation: Math.PI / 2
}) : this._basicCornerRounded({
x: t,
y: n,
size: r,
rotation: -Math.PI / 2
}) : this._basicCornersRounded({
x: t,
y: n,
size: r,
rotation: Math.PI / 2
})
}
,
e.prototype._drawClassyRounded = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.getNeighbor
, o = i ? +i(-1, 0) : 0
, a = i ? +i(1, 0) : 0
, s = i ? +i(0, -1) : 0
, u = i ? +i(0, 1) : 0;
0 !== o + a + s + u ? o || s ? a || u ?
this._basicSquare({
x: t,
y: n,
size: r,
rotation: 0
}) : this._basicCornerExtraRounded({
x: t,
y: n,
size: r,
rotation: Math.PI / 2
}) : this._basicCornerExtraRounded({
x: t,
y: n,
size: r,
rotation: -Math.PI / 2
}) : this._basicCornersRounded({
x: t,
y: n,
size: r,
rotation: Math.PI / 2
})
}
,
e
}();
var f = function() {
return (f = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n+
+)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t,
i) && (e[i] = t[i]);
return e
}
).apply(this, arguments)
};
const h = function() {
function e(e) {
var t = e.svg
, n = e.type;
this._svg = t,
this._type = n
}
return e.prototype.draw = function(e, t, n, r) {
var i;
switch (this._type) {
case "square":
i = this._drawSquare;
break;
case "extra-rounded":
i = this._drawExtraRounded;
break;
default:
i = this._drawDot
}
i.call(this, {
x: e,
y: t,
size: n,
rotation: r
})
}
,
e.prototype._rotateFigure = function(e) {
var t, n = e.x, r = e.y, i = e.size, o = e.rotation, a
= void 0 === o ? 0 : o, s = n + i / 2, u = r + i / 2;
(0,
e.draw)(),
null === (t = this._element) || void 0 === t ||
t.setAttribute("transform", "rotate(" + 180 * a / Math.PI + "," + s + "," + u + ")")
}
,
e.prototype._basicDot = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y
, o = n / 7;
this._rotateFigure(f(f({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "path"),
t._element.setAttribute("clip-rule",
"evenodd"),
t._element.setAttribute("d", "M " + (r + n
/ 2) + " " + i + "a " + n / 2 + " " + n / 2 + " 0 1 0 0.1 0zm 0 " + o + "a " + (n / 2 - o) + " " + (n
/ 2 - o) + " 0 1 1 -0.1 0Z")
}
}))
}
,
e.prototype._basicSquare = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y
, o = n / 7;
this._rotateFigure(f(f({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "path"),
t._element.setAttribute("clip-rule",
"evenodd"),
t._element.setAttribute("d", "M " + r + " "
+ i + "v " + n + "h " + n + "v " + -n + "zM " + (r + o) + " " + (i + o) + "h " + (n - 2 * o) + "v "
+ (n - 2 * o) + "h " + (2 * o - n) + "z")
}
}))
}
,
e.prototype._basicExtraRounded = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y
, o = n / 7;
this._rotateFigure(f(f({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "path"),
t._element.setAttribute("clip-rule",
"evenodd"),
t._element.setAttribute("d", "M " + r + " "
+ (i + 2.5 * o) + "v " + 2 * o + "a " + 2.5 * o + " " + 2.5 * o + ", 0, 0, 0, " + 2.5 * o + " " + 2.5
* o + "h " + 2 * o + "a " + 2.5 * o + " " + 2.5 * o + ", 0, 0, 0, " + 2.5 * o + " " + 2.5 * -o + "v "
+ -2 * o + "a " + 2.5 * o + " " + 2.5 * o + ", 0, 0, 0, " + 2.5 * -o + " " + 2.5 * -o + "h " + -2 * o
+ "a " + 2.5 * o + " " + 2.5 * o + ", 0, 0, 0, " + 2.5 * -o + " " + 2.5 * o + "M " + (r + 2.5 * o) +
" " + (i + o) + "h " + 2 * o + "a " + 1.5 * o + " " + 1.5 * o + ", 0, 0, 1, " + 1.5 * o + " " + 1.5 *
o + "v " + 2 * o + "a " + 1.5 * o + " " + 1.5 * o + ", 0, 0, 1, " + 1.5 * -o + " " + 1.5 * o + "h "
+ -2 * o + "a " + 1.5 * o + " " + 1.5 * o + ", 0, 0, 1, " + 1.5 * -o + " " + 1.5 * -o + "v " + -2 * o
+ "a " + 1.5 * o + " " + 1.5 * o + ", 0, 0, 1, " + 1.5 * o + " " + 1.5 * -o)
}
}))
}
,
e.prototype._drawDot = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.rotation;
this._basicDot({
x: t,
y: n,
size: r,
rotation: i
})
}
,
e.prototype._drawSquare = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.rotation;
this._basicSquare({
x: t,
y: n,
size: r,
rotation: i
})
}
,
e.prototype._drawExtraRounded = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.rotation;
this._basicExtraRounded({
x: t,
y: n,
size: r,
rotation: i
})
}
,
e
}();
var p = function() {
return (p = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n+
+)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t,
i) && (e[i] = t[i]);
return e
}
).apply(this, arguments)
};
const m = function() {
function e(e) {
var t = e.svg
, n = e.type;
this._svg = t,
this._type = n
}
return e.prototype.draw = function(e, t, n, r) {
("square" === this._type ? this._drawSquare :
this._drawDot).call(this, {
x: e,
y: t,
size: n,
rotation: r
})
}
,
e.prototype._rotateFigure = function(e) {
var t, n = e.x, r = e.y, i = e.size, o = e.rotation, a
= void 0 === o ? 0 : o, s = n + i / 2, u = r + i / 2;
(0,
e.draw)(),
null === (t = this._element) || void 0 === t ||
t.setAttribute("transform", "rotate(" + 180 * a / Math.PI + "," + s + "," + u + ")")
}
,
e.prototype._basicDot = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(p(p({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "circle"),
t._element.setAttribute("cx", String(r + n
/ 2)),
t._element.setAttribute("cy", String(i + n
/ 2)),
t._element.setAttribute("r", String(n / 2))
}
}))
}
,
e.prototype._basicSquare = function(e) {
var t = this
, n = e.size
, r = e.x
, i = e.y;
this._rotateFigure(p(p({}, e), {
draw: function() {
t._element =
document.createElementNS("http://www.w3.org/2000/svg", "rect"),
t._element.setAttribute("x", String(r)),
t._element.setAttribute("y", String(i)),
t._element.setAttribute("width",
String(n)),
t._element.setAttribute("height",
String(n))
}
}))
}
,
e.prototype._drawDot = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.rotation;
this._basicDot({
x: t,
y: n,
size: r,
rotation: i
})
}
,
e.prototype._drawSquare = function(e) {
var t = e.x
, n = e.y
, r = e.size
, i = e.rotation;
this._basicSquare({
x: t,
y: n,
size: r,
rotation: i
})
}
,
e
}()
, g = "circle";
var v = function(e, t, n, r) {
return new (n || (n = Promise))((function(i, o) {
function a(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function s(e) {
try {
u(r.throw(e))
} catch (e) {
o(e)
}
}
function u(e) {
var t;
e.done ? i(e.value) : (t = e.value,
t instanceof n ? t : new n((function(e) {
e(t)
}
))).then(a, s)
}
u((r = r.apply(e, t || [])).next())
}
))
}
, b = function(e, t) {
var n, r, i, o, a = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: s(0),
throw: s(1),
return: s(2)
},
"function" == typeof Symbol && (o[Symbol.iterator]
= function() {
return this
}
),
o;
function s(o) {
return function(s) {
return function(o) {
if (n)
throw new TypeError("Generator is
already executing.");
for (; a; )
try {
if (n = 1,
r && (i = 2 & o[0] ? r.return :
o[0] ? r.throw || ((i = r.return) && i.call(r),
0) : r.next) && !(i = i.call(r,
o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0], i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return a.label++,
{
value: o[1],
done: !1
};
case 5:
a.label++,
r = o[1],
o = [0];
continue;
case 7:
o = a.ops.pop(),
a.trys.pop();
continue;
default:
if (!((i = (i = a.trys).length >
0 && i[i.length - 1]) || 6 !== o[0] && 2 !== o[0])) {
a = 0;
continue
}
if (3 === o[0] && (!i || o[1] >
i[0] && o[1] < i[3])) {
a.label = o[1];
break
}
if (6 === o[0] && a.label <
i[1]) {
a.label = i[1],
i = o;
break
}
if (i && a.label < i[2]) {
a.label = i[2],
a.ops.push(o);
break
}
i[2] && a.ops.pop(),
a.trys.pop();
continue
}
o = t.call(e, a)
} catch (e) {
o = [6, e],
r=0
} finally {
n=i=0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, s])
}
}
}
, y = [[1, 1, 1, 1, 1, 1, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0,
0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 0, 0, 0, 0, 0, 1], [1, 1, 1, 1, 1, 1, 1]]
, A = [[0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 1, 1,
1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 1, 1, 1, 0, 0], [0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0]];
const w = function() {
function e(e) {
this._element =
document.createElementNS("http://www.w3.org/2000/svg", "svg"),
this._element.setAttribute("width",
String(e.width)),
this._element.setAttribute("height",
String(e.height)),
this._defs =
document.createElementNS("http://www.w3.org/2000/svg", "defs"),
this._element.appendChild(this._defs),
this._options = e
}
return Object.defineProperty(e.prototype, "width", {
get: function() {
return this._options.width
},
enumerable: !1,
configurable: !0
}),
Object.defineProperty(e.prototype, "height", {
get: function() {
return this._options.height
},
enumerable: !1,
configurable: !0
}),
e.prototype.getElement = function() {
return this._element
}
,
e.prototype.drawQR = function(e) {
return v(this, void 0, void 0, (function() {
var t, n, r, i, o, a, s, u, c, d, f = this;
return b(this, (function(h) {
switch (h.label) {
case 0:
return t = e.getModuleCount(),
n = Math.min(this._options.width,
this._options.height) - 2 * this._options.margin,
r = this._options.shape === g ? n /
Math.sqrt(2) : n,
i = Math.floor(r / t),
o={
hideXDots: 0,
hideYDots: 0,
width: 0,
height: 0
},
this._qr = e,
this._options.image ? [4,
this.loadImage()] : [3, 2];
case 1:
if (h.sent(),
!this._image)
return [2];
a = this._options,
s = a.imageOptions,
u = a.qrOptions,
c = s.imageSize *
l[u.errorCorrectionLevel],
d = Math.floor(c * t * t),
o = function(e) {
var t = e.originalHeight
, n = e.originalWidth
, r = e.maxHiddenDots
, i = e.maxHiddenAxisDots
, o = e.dotSize
,a={
x: 0,
y: 0
}
,s={
x: 0,
y: 0
};
if (t <= 0 || n <= 0 || r <= 0 || o
<= 0)
return {
height: 0,
width: 0,
hideYDots: 0,
hideXDots: 0
};
var u = t / n;
return a.x =
Math.floor(Math.sqrt(r / u)),
a.x <= 0 && (a.x = 1),
i && i < a.x && (a.x = i),
a.x % 2 == 0 && a.x--,
s.x = a.x * o,
a.y = 1 + 2 * Math.ceil((a.x * u -
1) / 2),
s.y = Math.round(s.x * u),
(a.y * a.x > r || i && i < a.y) && (i
&& i < a.y ? (a.y = i,
a.y % 2 == 0 && a.x--) : a.y -=
2,
s.y = a.y * o,
a.x = 1 + 2 * Math.ceil((a.y / u -
1) / 2),
s.x = Math.round(s.y / u)),
{
height: s.y,
width: s.x,
hideYDots: a.y,
hideXDots: a.x
}
}({
originalWidth:
this._image.width,
originalHeight:
this._image.height,
maxHiddenDots: d,
maxHiddenAxisDots: t - 14,
dotSize: i
}),
h.label = 2;
case 2:
return this.drawBackground(),
this.drawDots((function(e, n) {
var r, i, a, s, u, l;
return !
(f._options.imageOptions.hideBackgroundDots && e >= (t - o.hideXDots) / 2 && e < (t +
o.hideXDots) / 2 && n >= (t - o.hideYDots) / 2 && n < (t + o.hideYDots) / 2 || (null === (r
= y[e]) || void 0 === r ? void 0 : r[n]) || (null === (i = y[e - t + 7]) || void 0 === i ? void 0 :
i[n]) || (null === (a = y[e]) || void 0 === a ? void 0 : a[n - t + 7]) || (null === (s = A[e]) ||
void 0 === s ? void 0 : s[n]) || (null === (u = A[e - t + 7]) || void 0 === u ? void 0 : u[n]) ||
(null === (l = A[e]) || void 0 === l ? void 0 : l[n - t + 7]))
}
)),
this.drawCorners(),
this._options.image ? [4,
this.drawImage({
width: o.width,
height: o.height,
count: t,
dotSize: i
})] : [3, 4];
case 3:
h.sent(),
h.label = 4;
case 4:
return [2]
}
}
))
}
))
}
,
e.prototype.drawBackground = function() {
var e, t, n, r = this._element, i = this._options;
if (r) {
var o = null === (e = i.backgroundOptions)
|| void 0 === e ? void 0 : e.gradient
, a = null === (t = i.backgroundOptions) ||
void 0 === t ? void 0 : t.color;
if ((o || a) && this._createColor({
options: o,
color: a,
additionalRotation: 0,
x: 0,
y: 0,
height: i.height,
width: i.width,
name: "background-color"
}),
null === (n = i.backgroundOptions) || void 0
=== n ? void 0 : n.round) {
var s = Math.min(i.width, i.height)
,u=
document.createElementNS("http://www.w3.org/2000/svg", "rect");
this._backgroundClipPath =
document.createElementNS("http://www.w3.org/2000/svg", "clipPath"),
this._backgroundClipPath.setAttribute("id", "clip-path-background-color"),
this._defs.appendChild(this._backgroundClipPath),
u.setAttribute("x", String((i.width - s) /
2)),
u.setAttribute("y", String((i.height - s) /
2)),
u.setAttribute("width", String(s)),
u.setAttribute("height", String(s)),
u.setAttribute("rx", String(s / 2 *
i.backgroundOptions.round)),
this._backgroundClipPath.appendChild(u)
}
}
}
,
e.prototype.drawDots = function(e) {
var t, n, r = this;
if (!this._qr)
throw "QR code is not defined";
var i = this._options
, o = this._qr.getModuleCount();
if (o > i.width || o > i.height)
throw "The canvas is too small.";
var a = Math.min(i.width, i.height) - 2 * i.margin
, s = i.shape === g ? a / Math.sqrt(2) : a
, u = Math.floor(s / o)
, l = Math.floor((i.width - o * u) / 2)
, c = Math.floor((i.height - o * u) / 2)
, f = new d({
svg: this._element,
type: i.dotsOptions.type
});
this._dotsClipPath =
document.createElementNS("http://www.w3.org/2000/svg", "clipPath"),
this._dotsClipPath.setAttribute("id", "clip-path-
dot-color"),
this._defs.appendChild(this._dotsClipPath),
this._createColor({
options: null === (t = i.dotsOptions) || void 0
=== t ? void 0 : t.gradient,
color: i.dotsOptions.color,
additionalRotation: 0,
x: 0,
y: 0,
height: i.height,
width: i.width,
name: "dot-color"
});
for (var h = function(t) {
for (var i = function(i) {
return e && !e(t, i) ? "continue" : (null
=== (n = p._qr) || void 0 === n ? void 0 : n.isDark(t, i)) ? (f.draw(l + t * u, c + i * u, u,
(function(n, a) {
return !(t + n < 0 || i + a < 0 || t + n
>= o || i + a >= o) && !(e && !e(t + n, i + a)) && !!r._qr && r._qr.isDark(t + n, i + a)
}
)),
void (f._element && p._dotsClipPath
&& p._dotsClipPath.appendChild(f._element))) : "continue"
}, a = 0; a < o; a++)
i(a)
}, p = this, m = 0; m < o; m++)
h(m);
if (i.shape === g) {
var v = Math.floor((a / u - o) / 2)
,b=o+2*v
,y=l-v*u
,A=c-v*u
, w = []
, _ = Math.floor(b / 2);
for (m = 0; m < b; m++) {
w[m] = [];
for (var E = 0; E < b; E++)
m >= v - 1 && m <= b - v && E >= v
- 1 && E <= b - v || Math.sqrt((m - _) * (m - _) + (E - _) * (E - _)) > _ ? w[m][E] = 0 : w[m]
[E] = this._qr.isDark(E - 2 * v < 0 ? E : E >= o ? E - 2 * v : E - v, m - 2 * v < 0 ? m : m >=
o ? m - 2 * v : m - v) ? 1 : 0
}
var S = function(e) {
for (var t = function(t) {
if (!w[e][t])
return "continue";
f.draw(y + e * u, A + t * u, u,
(function(n, r) {
var i;
return !!(null === (i = w[e + n]) ||
void 0 === i ? void 0 : i[t + r])
}
)),
f._element && k._dotsClipPath &&
k._dotsClipPath.appendChild(f._element)
}, n = 0; n < b; n++)
t(n)
}
, k = this;
for (m = 0; m < b; m++)
S(m)
}
}
,
e.prototype.drawCorners = function() {
var e = this;
if (!this._qr)
throw "QR code is not defined";
var t = this._element
, n = this._options;
if (!t)
throw "Element code is not defined";
var r = this._qr.getModuleCount()
, i = Math.min(n.width, n.height) - 2 * n.margin
, o = n.shape === g ? i / Math.sqrt(2) : i
, a = Math.floor(o / r)
,s=7*a
,u=3*a
, l = Math.floor((n.width - r * a) / 2)
, c = Math.floor((n.height - r * a) / 2);
[[0, 0, 0], [1, 0, Math.PI / 2], [0, 1, -Math.PI /
2]].forEach((function(t) {
var i, o, f, p, g, v, b, w, _, E, S, k, M = t[0], C
= t[1], x = t[2], R = l + M * a * (r - 7), T = c + C * a * (r - 7), I = e._dotsClipPath, P =
e._dotsClipPath;
if (((null === (i = n.cornersSquareOptions) ||
void 0 === i ? void 0 : i.gradient) || (null === (o = n.cornersSquareOptions) || void 0 ===
o ? void 0 : o.color)) && ((I = document.createElementNS("http://www.w3.org/2000/svg",
"clipPath")).setAttribute("id", "clip-path-corners-square-color-" + M + "-" + C),
e._defs.appendChild(I),
e._cornersSquareClipPath =
e._cornersDotClipPath = P = I,
e._createColor({
options: null === (f =
n.cornersSquareOptions) || void 0 === f ? void 0 : f.gradient,
color: null === (p =
n.cornersSquareOptions) || void 0 === p ? void 0 : p.color,
additionalRotation: x,
x: R,
y: T,
height: s,
width: s,
name: "corners-square-color-" + M + "-"
+C
})),
null === (g = n.cornersSquareOptions) ||
void 0 === g ? void 0 : g.type) {
var L = new h({
svg: e._element,
type: n.cornersSquareOptions.type
});
L.draw(R, T, s, x),
L._element && I &&
I.appendChild(L._element)
} else
for (var O = new d({
svg: e._element,
type: n.dotsOptions.type
}), N = function(e) {
for (var t = function(t) {
if (!(null === (v = y[e]) || void 0
=== v ? void 0 : v[t]))
return "continue";
O.draw(R + e * a, T + t * a, a,
(function(n, r) {
var i;
return !!(null === (i = y[e +
n]) || void 0 === i ? void 0 : i[t + r])
}
)),
O._element && I &&
I.appendChild(O._element)
}, n = 0; n < y[e].length; n++)
t(n)
}, D = 0; D < y.length; D++)
N(D);
if (((null === (b = n.cornersDotOptions) ||
void 0 === b ? void 0 : b.gradient) || (null === (w = n.cornersDotOptions) || void 0 ===
w ? void 0 : w.color)) && ((P =
document.createElementNS("http://www.w3.org/2000/svg", "clipPath")).setAttribute("id",
"clip-path-corners-dot-color-" + M + "-" + C),
e._defs.appendChild(P),
e._cornersDotClipPath = P,
e._createColor({
options: null === (_ =
n.cornersDotOptions) || void 0 === _ ? void 0 : _.gradient,
color: null === (E =
n.cornersDotOptions) || void 0 === E ? void 0 : E.color,
additionalRotation: x,
x: R + 2 * a,
y: T + 2 * a,
height: u,
width: u,
name: "corners-dot-color-" + M + "-" +
C
})),
null === (S = n.cornersDotOptions) || void 0
=== S ? void 0 : S.type) {
var B = new m({
svg: e._element,
type: n.cornersDotOptions.type
});
B.draw(R + 2 * a, T + 2 * a, u, x),
B._element && P &&
P.appendChild(B._element)
} else {
O = new d({
svg: e._element,
type: n.dotsOptions.type
});
var j = function(e) {
for (var t = function(t) {
if (!(null === (k = A[e]) || void 0
=== k ? void 0 : k[t]))
return "continue";
O.draw(R + e * a, T + t * a, a,
(function(n, r) {
var i;
return !!(null === (i = A[e +
n]) || void 0 === i ? void 0 : i[t + r])
}
)),
O._element && P &&
P.appendChild(O._element)
}, n = 0; n < A[e].length; n++)
t(n)
};
for (D = 0; D < A.length; D++)
j(D)
}
}
))
}
,
e.prototype.loadImage = function() {
var e = this;
return new Promise((function(t, n) {
var r = e._options
, i = new Image;
if (!r.image)
return n("Image is not defined");
"string" == typeof
r.imageOptions.crossOrigin && (i.crossOrigin = r.imageOptions.crossOrigin),
e._image = i,
i.onload = function() {
t()
}
,
i.src = r.image
}
))
}
,
e.prototype.drawImage = function(e) {
var t = e.width
, n = e.height
, r = e.count
, i = e.dotSize;
return v(this, void 0, void 0, (function() {
var e, o, a, s, l, c, d, f, h;
return b(this, (function(p) {
switch (p.label) {
case 0:
return e = this._options,
o = Math.floor((e.width - r * i) / 2),
a = Math.floor((e.height - r * i) / 2),
s = o + e.imageOptions.margin + (r
* i - t) / 2,
l = a + e.imageOptions.margin + (r *
i - n) / 2,
c = t - 2 * e.imageOptions.margin,
d = n - 2 * e.imageOptions.margin,
(f =
document.createElementNS("http://www.w3.org/2000/svg", "image")).setAttribute("x",
String(s)),
f.setAttribute("y", String(l)),
f.setAttribute("width", c + "px"),
f.setAttribute("height", d + "px"),
[4, u(e.image || "")];
case 1:
return h = p.sent(),
f.setAttribute("href", h || ""),
this._element.appendChild(f),
[2]
}
}
))
}
))
}
,
e.prototype._createColor = function(e) {
var t = e.options
, n = e.color
, r = e.additionalRotation
, i = e.x
, o = e.y
, a = e.height
, s = e.width
, u = e.name
,l=s>a?s:a
,c=
document.createElementNS("http://www.w3.org/2000/svg", "rect");
if (c.setAttribute("x", String(i)),
c.setAttribute("y", String(o)),
c.setAttribute("height", String(a)),
c.setAttribute("width", String(s)),
c.setAttribute("clip-path", "url('#clip-path-" + u +
"')"),
t) {
var d;
if ("radial" === t.type)
(d =
document.createElementNS("http://www.w3.org/2000/svg",
"radialGradient")).setAttribute("id", u),
d.setAttribute("gradientUnits",
"userSpaceOnUse"),
d.setAttribute("fx", String(i + s / 2)),
d.setAttribute("fy", String(o + a / 2)),
d.setAttribute("cx", String(i + s / 2)),
d.setAttribute("cy", String(o + a / 2)),
d.setAttribute("r", String(l / 2));
else {
var f = ((t.rotation || 0) + r) % (2 *
Math.PI)
, h = (f + 2 * Math.PI) % (2 * Math.PI)
,p=i+s/2
,m=o+a/2
,g=i+s/2
, v = o + a / 2;
h >= 0 && h <= .25 * Math.PI || h > 1.75
* Math.PI && h <= 2 * Math.PI ? (p -= s / 2,
m -= a / 2 * Math.tan(f),
g += s / 2,
v += a / 2 * Math.tan(f)) : h > .25 *
Math.PI && h <= .75 * Math.PI ? (m -= a / 2,
p -= s / 2 / Math.tan(f),
v += a / 2,
g += s / 2 / Math.tan(f)) : h > .75 *
Math.PI && h <= 1.25 * Math.PI ? (p += s / 2,
m += a / 2 * Math.tan(f),
g -= s / 2,
v -= a / 2 * Math.tan(f)) : h > 1.25 *
Math.PI && h <= 1.75 * Math.PI && (m += a / 2,
p += s / 2 / Math.tan(f),
v -= a / 2,
g -= s / 2 / Math.tan(f)),
(d =
document.createElementNS("http://www.w3.org/2000/svg",
"linearGradient")).setAttribute("id", u),
d.setAttribute("gradientUnits",
"userSpaceOnUse"),
d.setAttribute("x1",
String(Math.round(p))),
d.setAttribute("y1",
String(Math.round(m))),
d.setAttribute("x2",
String(Math.round(g))),
d.setAttribute("y2",
String(Math.round(v)))
}
t.colorStops.forEach((function(e) {
var t = e.offset
, n = e.color
,r=
document.createElementNS("http://www.w3.org/2000/svg", "stop");
r.setAttribute("offset", 100 * t + "%"),
r.setAttribute("stop-color", n),
d.appendChild(r)
}
)),
c.setAttribute("fill", "url('#" + u + "')"),
this._defs.appendChild(d)
} else
n && c.setAttribute("fill", n);
this._element.appendChild(c)
}
,
e
}()
, _ = "canvas";
for (var E = {}, S = 0; S <= 40; S++)
E[S] = S;
const k = {
type: _,
shape: "square",
width: 300,
height: 300,
data: "",
margin: 0,
qrOptions: {
typeNumber: E[0],
mode: void 0,
errorCorrectionLevel: "Q"
},
imageOptions: {
hideBackgroundDots: !0,
imageSize: .4,
crossOrigin: void 0,
margin: 0
},
dotsOptions: {
type: "square",
color: "#000"
},
backgroundOptions: {
round: 0,
color: "#fff"
}
};
var M = function() {
return (M = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n+
+)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t,
i) && (e[i] = t[i]);
return e
}
).apply(this, arguments)
};
function C(e) {
var t = M({}, e);
if (!t.colorStops || !t.colorStops.length)
throw "Field 'colorStops' is required in gradient";
return t.rotation ? t.rotation = Number(t.rotation) :
t.rotation = 0,
t.colorStops = t.colorStops.map((function(e) {
return M(M({}, e), {
offset: Number(e.offset)
})
}
)),
t
}
function x(e) {
var t = M({}, e);
return t.width = Number(t.width),
t.height = Number(t.height),
t.margin = Number(t.margin),
t.imageOptions = M(M({}, t.imageOptions), {
hideBackgroundDots:
Boolean(t.imageOptions.hideBackgroundDots),
imageSize:
Number(t.imageOptions.imageSize),
margin: Number(t.imageOptions.margin)
}),
t.margin > Math.min(t.width, t.height) && (t.margin =
Math.min(t.width, t.height)),
t.dotsOptions = M({}, t.dotsOptions),
t.dotsOptions.gradient && (t.dotsOptions.gradient =
C(t.dotsOptions.gradient)),
t.cornersSquareOptions &&
(t.cornersSquareOptions = M({}, t.cornersSquareOptions),
t.cornersSquareOptions.gradient &&
(t.cornersSquareOptions.gradient = C(t.cornersSquareOptions.gradient))),
t.cornersDotOptions && (t.cornersDotOptions =
M({}, t.cornersDotOptions),
t.cornersDotOptions.gradient &&
(t.cornersDotOptions.gradient = C(t.cornersDotOptions.gradient))),
t.backgroundOptions && (t.backgroundOptions =
M({}, t.backgroundOptions),
t.backgroundOptions.gradient &&
(t.backgroundOptions.gradient = C(t.backgroundOptions.gradient))),
t
}
var R = n(192)
, T = n.n(R)
, I = function(e, t, n, r) {
return new (n || (n = Promise))((function(i, o) {
function a(e) {
try {
u(r.next(e))
} catch (e) {
o(e)
}
}
function s(e) {
try {
u(r.throw(e))
} catch (e) {
o(e)
}
}
function u(e) {
var t;
e.done ? i(e.value) : (t = e.value,
t instanceof n ? t : new n((function(e) {
e(t)
}
))).then(a, s)
}
u((r = r.apply(e, t || [])).next())
}
))
}
, P = function(e, t) {
var n, r, i, o, a = {
label: 0,
sent: function() {
if (1 & i[0])
throw i[1];
return i[1]
},
trys: [],
ops: []
};
return o = {
next: s(0),
throw: s(1),
return: s(2)
},
"function" == typeof Symbol && (o[Symbol.iterator]
= function() {
return this
}
),
o;
function s(o) {
return function(s) {
return function(o) {
if (n)
throw new TypeError("Generator is
already executing.");
for (; a; )
try {
if (n = 1,
r && (i = 2 & o[0] ? r.return :
o[0] ? r.throw || ((i = r.return) && i.call(r),
0) : r.next) && !(i = i.call(r,
o[1])).done)
return i;
switch (r = 0,
i && (o = [2 & o[0], i.value]),
o[0]) {
case 0:
case 1:
i = o;
break;
case 4:
return a.label++,
{
value: o[1],
done: !1
};
case 5:
a.label++,
r = o[1],
o = [0];
continue;
case 7:
o = a.ops.pop(),
a.trys.pop();
continue;
default:
if (!((i = (i = a.trys).length >
0 && i[i.length - 1]) || 6 !== o[0] && 2 !== o[0])) {
a = 0;
continue
}
if (3 === o[0] && (!i || o[1] >
i[0] && o[1] < i[3])) {
a.label = o[1];
break
}
if (6 === o[0] && a.label <
i[1]) {
a.label = i[1],
i = o;
break
}
if (i && a.label < i[2]) {
a.label = i[2],
a.ops.push(o);
break
}
i[2] && a.ops.pop(),
a.trys.pop();
continue
}
o = t.call(e, a)
} catch (e) {
o = [6, e],
r=0
} finally {
n=i=0
}
if (5 & o[0])
throw o[1];
return {
value: o[0] ? o[1] : void 0,
done: !0
}
}([o, s])
}
}
};
const L = function() {
function e(e) {
this._options = e ? x(a(k, e)) : k,
this.update()
}
return e._clearContainer = function(e) {
e && (e.innerHTML = "")
}
,
e.prototype._setupSvg = function() {
var e = this;
if (this._qr) {
var t = new w(this._options);
this._svg = t.getElement(),
this._svgDrawingPromise =
t.drawQR(this._qr).then((function() {
var n;
e._svg && (null === (n = e._extension)
|| void 0 === n || n.call(e, t.getElement(), e._options))
}
))
}
}
,
e.prototype._setupCanvas = function() {
var e, t = this;
this._qr && (this._canvas =
document.createElement("canvas"),
this._canvas.width = this._options.width,
this._canvas.height = this._options.height,
this._setupSvg(),
this._canvasDrawingPromise = null === (e =
this._svgDrawingPromise) || void 0 === e ? void 0 : e.then((function() {
if (t._svg) {
var e = t._svg
, n = (new
XMLSerializer).serializeToString(e)
, r = "data:image/svg+xml;base64," +
btoa(n)
, i = new Image;
return new Promise((function(e) {
i.onload = function() {
var n, r;
null === (r = null === (n =
t._canvas) || void 0 === n ? void 0 : n.getContext("2d")) || void 0 === r || r.drawImage(i,
0, 0),
e()
}
,
i.src = r
}
))
}
}
)))
}
,
e.prototype._getElement = function(e) {
return void 0 === e && (e = "png"),
I(this, void 0, void 0, (function() {
return P(this, (function(t) {
switch (t.label) {
case 0:
if (!this._qr)
throw "QR code is empty";
return "svg" !== e.toLowerCase() ?
[3, 2] : (this._svg && this._svgDrawingPromise || this._setupSvg(),
[4, this._svgDrawingPromise]);
case 1:
return t.sent(),
[2, this._svg];
case 2:
return this._canvas &&
this._canvasDrawingPromise || this._setupCanvas(),
[4, this._canvasDrawingPromise];
case 3:
return t.sent(),
[2, this._canvas]
}
}
))
}
))
}
,
e.prototype.update = function(t) {
e._clearContainer(this._container),
this._options = t ? x(a(this._options, t)) :
this._options,
this._options.data && (this._qr = T()
(this._options.qrOptions.typeNumber, this._options.qrOptions.errorCorrectionLevel),
this._qr.addData(this._options.data,
this._options.qrOptions.mode || function(e) {
switch (!0) {
case /^[0-9]*$/.test(e):
return "Numeric";
case /^[0-9A-Z $%*+\-./:]*$/.test(e):
return "Alphanumeric";
default:
return "Byte"
}
}(this._options.data)),
this._qr.make(),
this._options.type === _ ? this._setupCanvas() :
this._setupSvg(),
this.append(this._container))
}
,
e.prototype.append = function(e) {
if (e) {
if ("function" != typeof e.appendChild)
throw "Container should be a single
DOM node";
this._options.type === _ ? this._canvas &&
e.appendChild(this._canvas) : this._svg && e.appendChild(this._svg),
this._container = e
}
}
,
e.prototype.applyExtension = function(e) {
if (!e)
throw "Extension function should be
defined.";
this._extension = e,
this.update()
}
,
e.prototype.deleteExtension = function() {
this._extension = void 0,
this.update()
}
,
e.prototype.getRawData = function(e) {
return void 0 === e && (e = "png"),
I(this, void 0, void 0, (function() {
var t, n, r;
return P(this, (function(i) {
switch (i.label) {
case 0:
if (!this._qr)
throw "QR code is empty";
return [4, this._getElement(e)];
case 1:
return (t = i.sent()) ? "svg" ===
e.toLowerCase() ? (n = new XMLSerializer,
r = n.serializeToString(t),
[2, new Blob(['<?xml version="1.0"
standalone="no"?>\r\n' + r],{
type: "image/svg+xml"
})]) : [2, new Promise((function(n) {
return t.toBlob(n, "image/" + e,
1)
}
))] : [2, null]
}
}
))
}
))
}
,
e.prototype.download = function(e) {
return I(this, void 0, void 0, (function() {
var t, n, r, i, o;
return P(this, (function(a) {
switch (a.label) {
case 0:
if (!this._qr)
throw "QR code is empty";
return t = "png",
n = "qr",
"string" == typeof e ? (t = e,
console.warn("Extension is
deprecated as argument for 'download' method, please pass object { name: '...',
extension: '...' } as argument")) : "object" == typeof e && null !== e && (e.name && (n =
e.name),
e.extension && (t = e.extension)),
[4, this._getElement(t)];
case 1:
return (r = a.sent()) ? ("svg" ===
t.toLowerCase() ? (i = new XMLSerializer,
o = '<?xml version="1.0"
standalone="no"?>\r\n' + (o = i.serializeToString(r)),
s("data:image/svg+xml;charset=utf-
8," + encodeURIComponent(o), n + ".svg")) : s(r.toDataURL("image/" + t), n + "." + t),
[2]) : [2]
}
}
))
}
))
}
,
e
}()
}
}
, t = {};
function n(r) {
if (t[r])
return t[r].exports;
var i = t[r] = {
exports: {}
};
return e[r](i, i.exports, n),
i.exports
}
return n.n = e => {
var t = e && e.__esModule ? () => e.default : () => e;
return n.d(t, {
a: t
}),
t
}
,
n.d = (e, t) => {
for (var r in t)
n.o(t, r) && !n.o(e, r) && Object.defineProperty(e, r, {
enumerable: !0,
get: t[r]
})
}
,
n.o = (e, t) => Object.prototype.hasOwnProperty.call(e, t),
n(676)
}
)().default
}(hT)),
hT.exports
}
!function(e, t) {
!function(e, t, n) {
var r =
"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADwAAAA2CAYAAACbZ/o
UAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAAC
xjwv8YQUAAAb1SURBVHgB3Vrdcds4EN4FJVo/
fnAqOKWCOBVEqcBKBbbeLvLNWFeBnQpiz+SUe4tTwckVWK4gTgVRB9ZD9BNaBG
4XJGiIon4oUYrtb0YiCIIEFvuD3QUQLPxslI8cUG98wJvdVv8SnihUc29v5HknVKyAKz8U
z0dd8wxNYfhnoaKE+GG916WHHRDya/HTqAOPHJrI8WgflHOqlKqaekTsFP/
pv43uTYG5K0B9CasvENSB4hkK0JVKXTg7qm3P1mPA8K9CVUmnpkAdEjF7XMdEEt
E9Ktb0vStfmnEL86KDcGgal1r9Jkj5Vin4Gj6uCMSPyhM/
hsfla54cnlH4TeC+h43S6eC49E1JcU01JyGxPVDqb+boL9etR+1/
Yc2UNYdtcUbAetHS32GjcETzcmpxO/
gIfZxmq70tkWci+96o5qBzaItsBMTvUnlHu637W1PFzOG2tlhrgm1xttkfvUgTIlGcYSgFCa
D2eIWuf561yCeJ7DTwQktl4rssAQDE8Rcvznu9gMNmJgAui61BfVbng+NiExSewsyOA5
XwSRVc8G591+nBqvDEoQRo4ry+eKKFrM+SsDuSih3P+6HHS6Je+jw8R1ucSWfflT8P
2jAH3B4c50uiWG0VeFF082dIXJvXiqT3XLCOh2KN/
felGonqfzxbxN2XsCT6jdIZvXMKW8YirsYRF2uRR+zyDenId0iBcmtwhlK+1APYGvCi4Lq
v0xjJoK3qUrHHOizcVp+tGokF/
gEpUfx3pKWCLPYH2CB4UlHIt2yYFolwHFoFASsk0tp663U4vNm/
W3Ft3TC322m5aoNWl319VeqGr5pgsqpanN1fXhVWxAa43XMEvCu1Bu/
ScjUG7XQIITv6GtT5mt3E6SqsiSy4zRaV/IHXO5/
mrxhLQcArvoxyhQeRdiQFCRrqADIAc3tEYijJyEA6RK5hFg4M6y8qYJG+fRFKiTADDC1
Z5S4jH5k72GUjQ8ZmKW6Ta8hcZecAMoIvnKr+NBFs6qLgQSnUSp337muQIdjYKKvD
ObjO2i3FyDkKaGNEBFM4qAfFCQDICCxS7LZCaDjmQqkmR0CQIcih0rQ45OaaugeCn
YBg4kYVMsDPRn6fXNbrNC4o9X3GEzRs8tq5HrxGmXW3Qr+ea0VQEcGhFWPFrqzb4
ahRPBGQ/waxkHIZ8ARR3H3t0YTBGvBAGyvjY0SICNahU/
jQDpjTIAzMv5B1XtfwVMY0YeuIOAUMmgYV+hgP9RaMA0KEv4KU0Prqed9ILI8gI7CID
47LH1dcObT+ksR07MrcZBt2QAR3xLNTX/
RFkzjjAF3ODdDXABkzimlrP98XL1wcd2x9nAXW3zEoPRaxIyfao30TBsx3XM7B/
eukj3O45fu47whxQP7p/kaInANOLTmUTR1ThsVx/
U7SUjZ4T4kKysElhbwTHGY9HjSKXY4uxipXBbi/
ZQPmk047JOaUgagpCXsCtahMztaWwBPM42AdJeMGg0ZJp5OlgKtSzu2w343EDB5fU
sg7NWZKCFyGuatuWFWBpwQ2vCR5uhymdezHIt5eOPIyLFbgqRHLMMQSkPLo8cdT
BDtyjcTb40IvSb+nCDYL9jPAHhvYeOU0h2fnnp8ceLmM100QrFO2vz39miXUFPMmPa0
wfnxGmBLrCYKzEmfec9KBP/
3SvKcdBcodI8h6VglBKUU11kcA28taA20acN1OupltnGVeXnYjLyW6JcvbijicSaaDkvojG
E26mugvlcUM3MAHYsPRdRWsjYot1rmHb6v1CSZHn9y9JkU45O3ADQq/
DWPeGlniVVo3ORgZjL2qkHBg3FjIAKFYd7isRTojcX60sPeH9dyvk4B/
CmAbYrI4RtgyzVQ+RkhPHPE13FvKLlP5WEErQJAQ4D8J4gqeOUwyPthqYWv63EHZ
Eb5EjgdlDthKbzVdsy3YVjpahykjcoWbjZR64S8JFdgglJSRyj4QjLKDIDZDMG2UFfP56q
x9XvscxiaQo2ynKUc+0L1b2Jge0zrYnrepbZ3DyBzssiZutYQ7Dx3YACi/
2V3cClMdqkmBjn0z4eWacxBZg1aB7qI2ZEM2kkuTZJvs+4m8NJ+DIF1Ks5+j96N4omjm
DmeFcSjFSb9Rqs77EIZbI4nPSPJ0H4hv0mZkvB23Q2uQ3c8kFi5PSAs4bZ5zJFSgHUe
jm2EAwuc1M3ZTJ89R6ogq8P1rtCHwZl6sHD8rHQw/
BnNUz6riA5ltH+RNmQzbohM1GZ7Q41M89UUHW/
Q5LAFVBYLPp1TBYlY8oRDUJXxACadJi1dXkjnfXWLzKnkQtBm+4vqqjWfer69yBIKXO
JPW4RNFU9+GDWIFbvMpng9ZHmyJY+P7YdqpUOIjrU1z3VbkM58rcjUN/geU/
3c0eMPNdAAAAABJRU5ErkJggg=="
, i = function() {
return i = Object.assign || function(e) {
for (var t, n = 1, r = arguments.length; n < r; n++)
for (var i in t = arguments[n])
Object.prototype.hasOwnProperty.call(t, i) && (e[i] =
t[i]);
return e
}
,
i.apply(this, arguments)
};
"function" == typeof SuppressedError && SuppressedError;
var o = {
fontFamily: "Roboto, sans-serif"
}
, a = function(e) {
var n = e.children
, r = e.className;
return t.createElement("div", {
style: o,
className: r
}, n)
}
,s={
flexContainer: {
display: "flex",
justifyContent: "center",
alignItems: "center",
flexDirection: "row"
},
flexItem: {
flex: 1,
justifyContent: "center",
alignItems: "center"
},
flexItem11: {
flex: 11,
justifyContent: "center",
alignItems: "center"
},
flexItem1: {
flex: 1,
justifyContent: "center",
alignItems: "center"
},
tab: {
padding: 8,
cursor: "pointer",
backgroundColor: "#F2F4F6",
fontSize: 12,
textAlign: "center",
color: "#24292E"
},
tabcontainer: {
padding: "4px",
backgroundColor: "#F2F4F6",
borderRadius: "8px",
marginBottom: 30,
marginTop: 30
},
tabactive: {
backgroundColor: "white",
WebkitTransition: "background-color 300ms linear",
msTransition: "background-color 300ms linear",
transition: "background-color 300ms linear",
borderRadius: "8px"
},
item: {
fontSize: "12px",
marginBottom: 16,
borderRadius: "8px",
padding: "10px",
border: "2px #F2F4F6 solid",
color: "#24292E"
},
extensionLabel: {
fontsStyle: "normal",
fontWeight: "bold",
fontSize: 14,
textAlign: "center",
color: "#24272A"
},
notice: {
fontSize: 12,
marginLeft: 10,
marginRight: 10,
color: "grey"
},
button: {
marginTop: "41.5px",
marginBottom: "20px",
width: "100%",
display: "flex",
flexDirection: "row",
justifyContent: "center",
alignItems: "center",
padding: "12px 20px",
background: "#037DD6",
borderRadius: "32px",
color: "white",
border: "0",
fontSize: "14px",
cursor: "pointer"
},
backdrop: {
visibility: "visible",
position: "fixed",
top: "0",
left: "0",
right: "0",
bottom: "0",
width: "100%",
zIndex: 99998,
background: "rgba(0, 0, 0, 0.87)",
opacity: .3
},
modal: {
visibility: "visible",
position: "fixed",
left: "50%",
transform: "translate(-50%, -50%)",
zIndex: 99999,
background: "#fff",
padding: "20px",
borderRadius: "8px",
top: "50%",
maxWidth: "100%",
width: 460,
minWidth: 300,
boxShadow: "rgba(0, 0, 0, 0.2) 0px 11px 15px -7px, rgba(0,
0, 0, 0.14) 0px 24px 38px 3px, rgba(0, 0, 0, 0.12) 0px 9px 46px 8px",
WebkitFontSmoothing: "antialiased"
},
closeButton: {
color: "#BBC0C5",
cursor: "pointer"
},
closeButtonContainer: {},
logoContainer: {
marginHorizontal: 24,
marginTop: 24,
display: "flex",
alignItems: "center",
justifyContent: "center"
},
connectMobileText: {
fontSize: 14,
color: "black",
marginTop: 28,
marginBottom: 28,
lineHeight: 2
},
blue: {
color: "#037DD6",
fontWeight: 700
},
installExtensionText: {
marginLeft: 10
},
center: {
display: "flex",
alignItems: "center",
justifyContent: "center"
},
right: {
display: "flex",
alignItems: "center",
justifyContent: "right"
}
}
, u = function(e) {
var n = e.Icon
, r = e.text;
return t.createElement("div", {
style: i(i({
padding: 6
}, s.flexContainer), {
flexDirection: "row"
})
}, t.createElement("div", {
style: s.flexItem1
}, t.createElement(n, null)), t.createElement("div", {
style: s.flexItem11
}, t.createElement("span", {
style: {
lineHeight: "2",
color: "black"
}
}, r)))
}
, l = function() {
return t.createElement("svg", {
width: "14",
height: "14",
viewBox: "0 0 16 16",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("rect", {
width: "16",
height: "16",
fill: "white"
}), t.createElement("path", {
fillRule: "evenodd",
clipRule: "evenodd",
d: "M2.40554 2.40554C2.94627 1.86482 3.82296 1.86482
4.36369 2.40554L8 6.04186L11.6363 2.40554C12.177 1.86482 13.0537 1.86482
13.5945 2.40554C14.1352 2.94627 14.1352 3.82296 13.5945 4.36369L9.95814
8L13.5945 11.6363C14.1352 12.177 14.1352 13.0537 13.5945 13.5945C13.0537
14.1352 12.177 14.1352 11.6363 13.5945L8 9.95814L4.36369 13.5945C3.82296
14.1352 2.94627 14.1352 2.40554 13.5945C1.86482 13.0537 1.86482 12.177 2.40554
11.6363L6.04186 8L2.40554 4.36369C1.86482 3.82296 1.86482 2.94627 2.40554
2.40554Z",
fill: "#BBC0C5"
}))
}
, c = function() {
return t.createElement("svg", {
width: "20",
height: "18",
viewBox: "0 0 20 18",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("path", {
d: "M14.44 0.0999756C12.63 0.0999756 11.01 0.979976
10 2.32998C8.99 0.979976 7.37 0.0999756 5.56 0.0999756C2.49 0.0999756 0 2.59998
0 5.68998C0 6.87998 0.19 7.97998 0.52 8.99998C2.1 14 6.97 16.99 9.38 17.81C9.72
17.93 10.28 17.93 10.62 17.81C13.03 16.99 17.9 14 19.48 8.99998C19.81 7.97998 20
6.87998 20 5.68998C20 2.59998 17.51 0.0999756 14.44 0.0999756Z",
fill: "#037DD6"
}))
}
, d = function() {
return t.createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 24 24",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("path", {
d: "M16.4405 8.8999C20.0405 9.2099 21.5105 11.0599
21.5105 15.1099V15.2399C21.5105 19.7099 19.7205 21.4999 15.2505
21.4999H8.74047C4.27047 21.4999 2.48047 19.7099 2.48047
15.2399V15.1099C2.48047 11.0899 3.93047 9.2399 7.47047 8.9099",
stroke: "white",
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M12 2V14.88",
stroke: "white",
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M15.3504 12.6499L12.0004 15.9999L8.65039
12.6499",
stroke: "white",
strokeWidth: "1.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}))
}
, f = function() {
return t.createElement("svg", {
width: "20",
height: "20",
viewBox: "0 0 20 20",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("path", {
d: "M16.28 7.53V6.28C16.28 3.58 15.63 0 10 0C4.37 0
3.72 3.58 3.72 6.28V7.53C0.92 7.88 0 9.3 0 12.79V14.65C0 18.75 1.25 20 5.35
20H14.65C18.75 20 20 18.75 20 14.65V12.79C20 9.3 19.08 7.88 16.28 7.53ZM10
16.74C8.33 16.74 6.98 15.38 6.98 13.72C6.98 12.05 8.34 10.7 10 10.7C11.66 10.7
13.02 12.06 13.02 13.72C13.02 15.39 11.67 16.74 10 16.74ZM5.35 7.44C5.27 7.44 5.2
7.44 5.12 7.44V6.28C5.12 3.35 5.95 1.4 10 1.4C14.05 1.4 14.88 3.35 14.88
6.28V7.45C14.8 7.45 14.73 7.45 14.65 7.45H5.35V7.44Z",
fill: "#037DD6"
}))
}
, h = function() {
return t.createElement("svg", {
width: "273",
height: "51",
viewBox: "0 0 273 51",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("path", {
d: "M240.882 25.9263C239.472 24.997 237.916 24.3361
236.443 23.5101C235.489 22.9731 234.473 22.4982 233.643 21.8167C232.233
20.6602 232.524 18.3885 233.996 17.3973C236.112 15.993 239.617 16.7777 239.99
19.6483C239.99 19.7102 240.052 19.7515 240.114 19.7515H243.308C243.391
19.7515 243.454 19.6896 243.433 19.607C243.267 17.6244 242.5 15.9723 241.089
14.9191C239.741 13.9072 238.206 13.3702 236.568 13.3702C228.127 13.3702
227.359 22.271 231.901 25.0796C232.42 25.41 236.879 27.6404 238.455
28.611C240.032 29.5816 240.529 31.3576 239.845 32.7619C239.223 34.0423 237.605
34.9303 235.987 34.8271C234.224 34.7238 232.855 33.7738 232.378
32.2869C232.295 32.0185 232.254 31.5022 232.254 31.275C232.254 31.2131 232.192
31.1511 232.129 31.1511H228.666C228.604 31.1511 228.541 31.2131 228.541
31.275C228.541 33.7738 229.164 35.1575 230.864 36.4172C232.461 37.615 234.203
38.1106 236.008 38.1106C240.737 38.1106 243.184 35.4466 243.682
32.6793C244.117 29.974 243.308 27.5371 240.882 25.9263Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M90.4943 13.8246H88.9595H87.2795C87.2173
13.8246 87.1758 13.8659 87.1551 13.9072L84.3137 23.2416C84.2722 23.3655
84.1063 23.3655 84.0648 23.2416L81.2234 13.9072C81.2026 13.8452 81.1612
13.8246 81.0989 13.8246H79.419H77.8842H75.8102C75.748 13.8246 75.6857
13.8865 75.6857 13.9485V37.7802C75.6857 37.8422 75.748 37.9041 75.8102
37.9041H79.2738C79.336 37.9041 79.3982 37.8422 79.3982
37.7802V19.6689C79.3982 19.5244 79.6056 19.5037 79.6471 19.6276L82.5093
29.024L82.7167 29.6849C82.7374 29.7468 82.7789 29.7675 82.8411
29.7675H85.4959C85.5581 29.7675 85.5996 29.7262 85.6203 29.6849L85.8277
29.024L88.6899 19.6276C88.7313 19.4831 88.9387 19.5244 88.9387
19.6689V37.7802C88.9387 37.8422 89.001 37.9041 89.0632
37.9041H92.5268C92.589 37.9041 92.6513 37.8422 92.6513
37.7802V13.9485C92.6513 13.8865 92.589 13.8246 92.5268 13.8246H90.4943Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M187.849 13.8246C187.787 13.8246 187.745 13.8659
187.725 13.9072L184.883 23.2416C184.842 23.3655 184.676 23.3655 184.634
23.2416L181.793 13.9072C181.772 13.8452 181.731 13.8246 181.668
13.8246H176.4C176.338 13.8246 176.276 13.8865 176.276
13.9485V37.7802C176.276 37.8422 176.338 37.9041 176.4
37.9041H179.864C179.926 37.9041 179.988 37.8422 179.988
37.7802V19.6689C179.988 19.5244 180.196 19.5037 180.237 19.6276L183.099
29.024L183.307 29.6849C183.328 29.7468 183.369 29.7675 183.431
29.7675H186.086C186.148 29.7675 186.19 29.7262 186.211 29.6849L186.418
29.024L189.28 19.6276C189.322 19.4831 189.529 19.5244 189.529
19.6689V37.7802C189.529 37.8422 189.591 37.9041 189.653
37.9041H193.117C193.179 37.9041 193.241 37.8422 193.241
37.7802V13.9485C193.241 13.8865 193.179 13.8246 193.117 13.8246H187.849Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M143.174
13.8246H136.724H133.261H126.81C126.748 13.8246 126.686 13.8865 126.686
13.9485V16.9223C126.686 16.9843 126.748 17.0462 126.81
17.0462H133.136V37.7802C133.136 37.8422 133.198 37.9041 133.261
37.9041H136.724C136.786 37.9041 136.849 37.8422 136.849
37.7802V17.0462H143.174C143.237 17.0462 143.299 16.9843 143.299
16.9223V13.9485C143.299 13.8865 143.257 13.8246 143.174 13.8246Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M163.604 37.9041H166.756C166.839 37.9041 166.901
37.8215 166.881 37.7389L160.368 13.8245C160.347 13.7626 160.306 13.7419
160.244 13.7419H159.041H156.925H155.722C155.66 13.7419 155.619 13.7832
155.598 13.8245L149.085 37.7389C149.065 37.8215 149.127 37.9041 149.21
37.9041H152.362C152.425 37.9041 152.466 37.8628 152.487 37.8215L154.374
30.862C154.395 30.8 154.436 30.7794 154.499 30.7794H161.467C161.53 30.7794
161.571 30.8207 161.592 30.862L163.479 37.8215C163.5 37.8628 163.562 37.9041
163.604 37.9041ZM155.328 27.3719L157.859 18.0581C157.9 17.9342 158.066
17.9342 158.107 18.0581L160.638 27.3719C160.659 27.4545 160.596 27.5371
160.513 27.5371H155.453C155.37 27.5371 155.308 27.4545 155.328 27.3719Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M217.362 37.9041H220.515C220.598 37.9041 220.66
37.8215 220.639 37.7389L214.127 13.8245C214.106 13.7626 214.065 13.7419
214.002 13.7419H212.8H210.684H209.481C209.419 13.7419 209.377 13.7832
209.357 13.8245L202.844 37.7389C202.823 37.8215 202.886 37.9041 202.969
37.9041H206.121C206.183 37.9041 206.225 37.8628 206.246 37.8215L208.133
30.862C208.154 30.8 208.195 30.7794 208.257 30.7794H215.226C215.288 30.7794
215.33 30.8207 215.351 30.862L217.238 37.8215C217.259 37.8628 217.3 37.9041
217.362 37.9041ZM209.087 27.3719L211.617 18.0581C211.659 17.9342 211.825
17.9342 211.866 18.0581L214.397 27.3719C214.417 27.4545 214.355 27.5371
214.272 27.5371H209.211C209.129 27.5371 209.066 27.4545 209.087 27.3719Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M106.713 34.3727V26.9795C106.713 26.9176 106.775
26.8556 106.837 26.8556H116.067C116.129 26.8556 116.191 26.7936 116.191
26.7317V23.7579C116.191 23.6959 116.129 23.634 116.067
23.634H106.837C106.775 23.634 106.713 23.572 106.713 23.5101V17.1907C106.713
17.1288 106.775 17.0668 106.837 17.0668H117.332C117.394 17.0668 117.457
17.0049 117.457 16.9429V13.9691C117.457 13.9072 117.394 13.8452 117.332
13.8452H106.713H103.125C103.063 13.8452 103.001 13.9072 103.001
13.9691V17.0668V23.6546V26.8763V34.5173V37.7802C103.001 37.8422 103.063
37.9041 103.125 37.9041H106.713H117.768C117.83 37.9041 117.892 37.8422
117.892 37.7802V34.6412C117.892 34.5792 117.83 34.5173 117.768
34.5173H106.817C106.755 34.4966 106.713 34.4553 106.713 34.3727Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M272.532 37.6976L260.544 25.3687C260.502 25.3274
260.502 25.2448 260.544 25.2035L271.329 14.0517C271.412 13.9691 271.349
13.8452 271.246 13.8452H266.828C266.787 13.8452 266.766 13.8659 266.745
13.8865L257.599 23.3449C257.516 23.4275 257.391 23.3655 257.391
23.2623V13.9691C257.391 13.9072 257.329 13.8452 257.267
13.8452H253.803C253.741 13.8452 253.679 13.9072 253.679
13.9691V37.8009C253.679 37.8628 253.741 37.9248 253.803
37.9248H257.267C257.329 37.9248 257.391 37.8628 257.391
37.8009V27.3099C257.391 27.2067 257.536 27.1447 257.599 27.2273L267.969
37.8835C267.989 37.9041 268.031 37.9248 268.052 37.9248H272.469C272.552
37.9041 272.615 37.7596 272.532 37.6976Z",
fill: "#24292E"
}), t.createElement("path", {
d: "M52.021 1L31.0526 16.4886L34.9517 7.36063L52.021
1Z",
fill: "#E17726",
stroke: "#E17726",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M3.65491 1L24.4366 16.6331L20.7241
7.36063L3.65491 1Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M44.4716 36.9127L38.8925 45.4211L50.8389
48.7047L54.261 37.0986L44.4716 36.9127Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M1.43555 37.0986L4.83695 48.7047L16.7626
45.4211L11.2042 36.9127L1.43555 37.0986Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M16.1197 22.5395L12.8013 27.5371L24.6232
28.074L24.2292 15.3734L16.1197 22.5395Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M39.5561 22.5394L31.3222 15.2288L31.0526
28.0739L42.8746 27.537L39.5561 22.5394Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M16.7626 45.4212L23.918 41.9724L17.7582
37.1813L16.7626 45.4212Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M31.7578 41.9724L38.8925 45.4212L37.9177
37.1813L31.7578 41.9724Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M38.8923 45.4212L31.7577 41.9724L32.3384
46.5983L32.2762 48.5602L38.8923 45.4212Z",
fill: "#D5BFB2",
stroke: "#D5BFB2",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M16.7625 45.4212L23.3994 48.5602L23.3579
46.5983L23.9179 41.9724L16.7625 45.4212Z",
fill: "#D5BFB2",
stroke: "#D5BFB2",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M23.5239 34.1249L17.5922 32.3902L21.7818
30.4696L23.5239 34.1249Z",
fill: "#233447",
stroke: "#233447",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M32.1517 34.1249L33.8939 30.4696L38.1042
32.3902L32.1517 34.1249Z",
fill: "#233447",
stroke: "#233447",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M16.7626 45.4212L17.7996 36.9128L11.2042
37.0987L16.7626 45.4212Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M37.8761 36.9128L38.8924 45.4212L44.4715
37.0987L37.8761 36.9128Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M42.8745 27.5371L31.0526 28.074L32.1518
34.1249L33.894 30.4696L38.1042 32.3902L42.8745 27.5371Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M17.5922 32.3902L21.7817 30.4696L23.5239
34.1249L24.6232 28.074L12.8012 27.5371L17.5922 32.3902Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M12.8013 27.5371L17.7582 37.1813L17.5923
32.3902L12.8013 27.5371Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M38.1044 32.3902L37.9177 37.1813L42.8746
27.5371L38.1044 32.3902Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M24.6232 28.0741L23.524 34.125L24.9136
41.2703L25.2247 31.8533L24.6232 28.0741Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M31.0526 28.0741L30.4719 31.8327L30.7623
41.2703L32.1519 34.125L31.0526 28.0741Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M32.1519 34.1249L30.7623 41.2702L31.7578
41.9724L37.9177 37.1813L38.1043 32.3901L32.1519 34.1249Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M17.5922 32.3901L17.7581 37.1813L23.918
41.9724L24.9135 41.2702L23.5239 34.1249L17.5922 32.3901Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M32.2763 48.5602L32.3385 46.5983L31.7993
46.1439H23.8765L23.358 46.5983L23.3995 48.5602L16.7626 45.4211L19.0855
47.3211L23.7935 50.5633H31.8615L36.5903 47.3211L38.8924 45.4211L32.2763
48.5602Z",
fill: "#C0AC9D",
stroke: "#C0AC9D",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M31.7578 41.9724L30.7622 41.2703H24.9135L23.918
41.9724L23.358 46.5983L23.8765 46.144H31.7993L32.3385 46.5983L31.7578
41.9724Z",
fill: "#24292E",
stroke: "#24292E",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M52.9128 17.5005L54.6757 8.95079L52.021 1L31.7578
15.9723L39.5561 22.5394L50.5692 25.7404L52.9958 22.9111L51.938 22.147L53.618
20.6188L52.3321 19.6276L54.0121 18.3472L52.9128 17.5005Z",
fill: "#763E1A",
stroke: "#763E1A",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M1 8.95079L2.78366 17.5005L1.64295
18.3472L3.34365 19.6276L2.05775 20.6188L3.73771 22.147L2.67996
22.9111L5.10657 25.7404L16.1196 22.5394L23.918 15.9723L3.65475 1L1 8.95079Z",
fill: "#763E1A",
stroke: "#763E1A",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M50.5692 25.7404L39.5561 22.5394L42.8746
27.5371L37.9177 37.1813L44.4716 37.0987H54.261L50.5692 25.7404Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M16.1196 22.5394L5.10651 25.7404L1.43549
37.0987H11.2041L17.7581 37.1813L12.8011 27.5371L16.1196 22.5394Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M31.0526 28.0741L31.7578 15.9724L34.9518
7.36072H20.7239L23.9179 15.9724L24.6231 28.0741L24.8927 31.8739L24.9135
41.2703H30.7622L30.783 31.8739L31.0526 28.0741Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.5",
strokeLinecap: "round",
strokeLinejoin: "round"
}))
}
, p = function() {
return t.createElement("svg", {
width: "20",
height: "18",
viewBox: "0 0 20 18",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("path", {
d: "M20.0002 7.9702V10.0302C20.0002 10.5802 19.5602
11.0302 19.0002 11.0502H17.0402C15.9602 11.0502 14.9702 10.2602 14.8802
9.1802C14.8202 8.5502 15.0602 7.9602 15.4802 7.5502C15.8502 7.1702 16.3602
6.9502 16.9202 6.9502H19.0002C19.5602 6.9702 20.0002 7.4202 20.0002 7.9702Z",
fill: "#037DD6"
}), t.createElement("path", {
d: "M18.47 12.55H17.04C15.14 12.55 13.54 11.12 13.38
9.3C13.29 8.26 13.67 7.22 14.43 6.48C15.07 5.82 15.96 5.45 16.92 5.45H18.47C18.76
5.45 19 5.21 18.97 4.92C18.75 2.49 17.14 0.83 14.75 0.55C14.51 0.51 14.26 0.5 14
0.5H5C4.72 0.5 4.45 0.52 4.19 0.56C1.64 0.88 0 2.78 0 5.5V12.5C0 15.26 2.24 17.5 5
17.5H14C16.8 17.5 18.73 15.75 18.97 13.08C19 12.79 18.76 12.55 18.47 12.55ZM11
6.75H5C4.59 6.75 4.25 6.41 4.25 6C4.25 5.59 4.59 5.25 5 5.25H11C11.41 5.25 11.75
5.59 11.75 6C11.75 6.41 11.41 6.75 11 6.75Z",
fill: "#037DD6"
}))
};
function m(e) {
var n = e.version;
return t.createElement("div", {
style: {
textAlign: "center",
color: "#BBC0C5",
fontSize: 12
}
}, "SDK Version ", n ? "v".concat(n) : "unknown")
}
var g = function(e) {
var n = t.useState(e.preferDesktop ? 1 : 2)
, o = n[0]
, g = n[1]
, v = t.useRef(null)
, b = e.sdkVersion
, y = e.i18nInstance.t;
return t.useEffect((function() {
v.current && new (pT())({
width: 270,
height: 270,
type: "svg",
data: e.link,
image: r,
dotsOptions: {
color: "black",
type: "rounded"
},
imageOptions: {
margin: 5
},
cornersDotOptions: {
color: "#f66a07"
},
qrOptions: {
errorCorrectionLevel: "M"
}
}).append(v.current)
}
), [v]),
t.createElement(a, {
className: "install-model"
}, t.createElement("div", {
style: s.backdrop,
onClick: e.onClose
}), t.createElement("div", {
style: s.modal
}, t.createElement("div", {
style: s.closeButtonContainer
}, t.createElement("div", {
style: s.right
}, t.createElement("span", {
style: s.closeButton,
onClick: e.onClose
}, t.createElement(l, null)))), t.createElement("div", {
style: s.logoContainer
}, t.createElement(h, null)), t.createElement("div", null,
t.createElement("div", {
style: s.tabcontainer
}, t.createElement("div", {
style: s.flexContainer
}, t.createElement("div", {
onClick: function() {
return g(1)
},
style: i(i(i({}, s.tab), 1 === o ? s.tabactive : {}), s.flexItem)
}, y("DESKTOP")), t.createElement("div", {
onClick: function() {
return g(2)
},
style: i(i(i({}, s.tab), 2 === o ? s.tabactive : {}), s.flexItem)
}, y("MOBILE")))), t.createElement("div", {
style: {
display: 1 === o ? "none" : "block"
}
}, t.createElement("div", {
style: s.flexContainer
}, t.createElement("div", {
style: i({
textAlign: "center",
marginTop: 4
}, s.flexItem)
}, t.createElement("div", {
ref: v,
style: s.center
}), t.createElement("div", {
style: s.connectMobileText
}, y("SCAN_TO_CONNECT"), " ", t.createElement("br", null),
t.createElement("span", {
style: s.blue
}, t.createElement("b", null,
y("META_MASK_MOBILE_APP"))))))), t.createElement("div", {
style: {
display: 2 === o ? "none" : "block"
}
}, t.createElement("div", {
style: s.item
}, t.createElement(u, {
Icon: c,
text: y("INSTALL_MODAL.TRUSTED_BY_USERS")
})), t.createElement("div", {
style: s.item
}, t.createElement(u, {
Icon: f,
text: y("INSTALL_MODAL.LEADING_CRYPTO_WALLET")
})), t.createElement("div", {
style: s.item
}, t.createElement(u, {
Icon: p,
text:
y("INSTALL_MODAL.CONTROL_DIGITAL_INTERACTIONS")
})), t.createElement("button", {
style: s.button,
onClick: e.metaMaskInstaller.startDesktopOnboarding
}, t.createElement(d, null), t.createElement("span", {
style: s.installExtensionText
},
y("INSTALL_MODAL.INSTALL_META_MASK_EXTENSION"))))), t.createElement(m, {
version: b
})))
}
, v = function(e) {
var n, r = null === (n = e.displayOTP) || void 0 === n || n, o =
e.sdkVersion, u = e.i18nInstance.t;
return t.createElement(a, {
className: "pending-modal"
}, t.createElement("div", {
style: s.backdrop,
onClick: e.onClose
}), t.createElement("div", {
style: s.modal
}, t.createElement("div", {
style: s.closeButtonContainer
}, t.createElement("div", {
style: s.right
}, t.createElement("span", {
style: s.closeButton,
onClick: e.onClose
}, t.createElement(l, null)))), t.createElement("div", {
style: s.logoContainer
}, t.createElement(h, null)), t.createElement("div", null,
t.createElement("div", {
style: i(i({}, s.flexContainer), {
flexDirection: "column",
color: "black"
})
}, t.createElement("div", {
style: i(i({
textAlign: "center",
marginTop: "30px",
marginBottom: "30px"
}, s.flexItem), {
fontSize: 16
})
}, u(r ?
"PENDING_MODAL.OPEN_META_MASK_SELECT_CODE" :
"PENDING_MODAL.OPEN_META_MASK_CONTINUE")), t.createElement("div", {
id: "sdk-mm-otp-value",
style: {
padding: 10,
fontSize: 32,
display: "none"
}
}), r && t.createElement("div", {
style: i({}, s.notice)
}, "* ",
u("PENDING_MODAL.NUMBER_AFTER_OPEN_NOTICE"))), t.createElement("div", {
style: {
marginTop: "20px"
}
}, t.createElement("button", {
style: i(i(i({}, s.button), s.blue), {
marginTop: "5px",
color: "#0376C9",
borderColor: "#0376C9",
borderWidth: "1px",
borderStyle: "solid",
backgroundColor: "white"
}),
onClick: e.onDisconnect
}, u("PENDING_MODAL.DISCONNECT")))),
t.createElement(m, {
version: o
})))
}
, b = function() {
return t.createElement("svg", {
width: "21",
height: "15",
viewBox: "0 0 21 15",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("path", {
d: "M14.1364 14.9851C13.5909 14.9851 13.2273 14.5851
13.2273 13.9851C13.2273 13.3851 13.5909 12.9851 14.1364 12.9851C16.6818
12.9851 18.6818 10.7851 18.6818 7.98508C18.6818 5.18508 16.6818 2.98508
14.1364 2.98508C11.5909 2.98508 9.59091 5.18508 9.59091 7.98508C9.59091
8.58508 9.22727 8.98508 8.68182 8.98508C8.13636 8.98508 7.77273 8.58508
7.77273 7.98508C7.77273 4.08508 10.5909 0.985077 14.1364 0.985077C17.6818
0.985077 20.5 4.08508 20.5 7.98508C20.5 11.8851 17.6818 14.9851 14.1364
14.9851ZM6.68182 14.7851C3.22727 14.7851 0.5 11.6851 0.5 7.98508C0.5 4.28508
3.22727 1.18508 6.68182 1.18508C7.22727 1.18508 7.59091 1.58508 7.59091
2.18508C7.59091 2.78508 7.22727 3.18508 6.68182 3.18508C4.22727 3.18508
2.31818 5.38508 2.31818 7.98508C2.31818 10.5851 4.22727 12.7851 6.68182
12.7851C9.13636 12.7851 11.0455 10.6851 11.0455 7.98508C11.0455 7.38508
11.4091 6.98508 11.9545 6.98508C12.5 6.98508 12.8636 7.38508 12.8636
7.98508C12.7727 11.6851 10.0455 14.7851 6.68182 14.7851Z",
fill: "white"
}))
}
, y = function() {
return t.createElement("svg", {
width: "400",
height: "300",
viewBox: "0 0 467 300",
fill: "none",
xmlns: "http://www.w3.org/2000/svg"
}, t.createElement("path", {
d: "M312.387 280.629C312.549 280.583 312.247 280.735
312.387 280.629L339.678 260.425C340.088 260.118 340.132 259.156 340.07
258.647C340.008 258.138 339.573 258.257 339.106 258.084L311.712
247.455C311.292 247.301 311.308 247.402 310.939 247.673C310.569 247.944
310.356 248.21 310.356 248.672L310.459 279.504C310.461 280.025 311.163 280.619
311.614 280.847C311.913 280.996 312.072 280.718 312.387 280.629ZM336.204
259.736L312.979 276.292L313.439 251.139L336.204 259.736Z",
fill: "url(#paint0_linear_1356_14057)"
}), t.createElement("path", {
d: "M324.639 260.342C324.358 259.547 323.485 258.91
322.707 259.215C319.6 260.432 318.17 262.313 317.287 264.066C316.482 265.665
316.197 267.482 314.188 268.269C312.178 269.055 310.763 268.663 309.162
268.007C307.406 267.287 305.504 266.182 302.397 267.399C299.289 268.616
297.859 270.497 296.976 272.25C296.171 273.849 295.697 274.886 293.685
275.673C291.675 276.459 290.261 276.067 288.659 275.411C286.903 274.691
284.999 273.587 281.894 274.803C278.789 276.019 277.549 278.681 276.666
280.434C275.861 282.034 275.386 283.07 273.374 283.857C272.596 284.161 271.931
285.055 272.211 285.849C272.492 286.644 273.365 287.281 274.143 286.977C277.25
285.76 278.68 283.879 279.563 282.125C280.368 280.526 280.65 278.71 282.662
277.923C284.672 277.136 286.087 277.528 287.688 278.184C289.444 278.904
291.348 280.009 294.453 278.793C297.561 277.576 298.991 275.695 299.874
273.941C300.679 272.342 301.153 271.306 303.165 270.519C305.175 269.732
306.589 270.124 308.191 270.78C309.947 271.5 311.849 272.605 314.956
271.388C318.063 270.172 319.301 267.511 320.184 265.757C320.989 264.158
321.466 263.121 323.476 262.335C324.254 262.032 324.919 261.137 324.639
260.342Z",
fill: "url(#paint1_linear_1356_14057)"
}), t.createElement("path", {
d: "M389.034 111.124C388.968 112.406 387.342 113.113
386.324 113.549C384.297 114.419 382.089 114.493 379.942 114.5C376.607 114.509
373.215 114.163 369.89 113.976C366.712 113.798 363.156 113.311 360.03
114.232C357.705 114.919 355.667 116.762 353.452 117.739C351.129 118.765
348.957 119.198 346.489 119.687C335.569 121.85 323.587 120.825 312.656
119.977C311.92 119.92 312.539 118.997 313.237 118.981C313.207 118.815 313.001
118.394 313.045 118.201C313.086 118.029 312.781 117.586 312.853 117.421C312.67
117.198 313.316 117.427 313.626 117.204C315.912 115.557 318.721 114.79 321.363
115.041C324.677 115.355 327.293 116.04 330.641 115.781C334.392 115.491 338.125
114.787 341.857 114.312C345.142 113.892 349.09 113.941 352.106 112.28C352.916
111.834 353.137 111.262 353.269 110.287C353.331 109.828 353.672 108.969 353.658
108.511C353.629 107.529 354.191 107.886 355.013 107.298C356.857 105.981
358.274 105.516 360.428 105.784C362.841 106.083 365.264 107.273 367.578
107.953C370.761 108.888 374.328 108.646 377.631 108.477C380.517 108.329
383.141 107.901 385.944 108.653C387.013 108.941 389.104 109.745 389.034
111.124Z",
fill: "url(#paint2_linear_1356_14057)"
}), t.createElement("path", {
d: "M278.118 85.4414C280.313 83.8186 283.302 83.9
285.853 83.2728C290.501 82.127 295.644 78.4476 300.549 79.1524C301.299 79.2595
300.904 81.0355 300.159 80.9295C300.131 80.9256 300.187 80.9333 300.159
80.9295C300.089 81.0185 299.516 81.1051 299.385 81.1463C294.999 82.515 292.895
87.5083 289.126 89.8598C287.799 90.688 286.771 90.8351 285.258 90.9441C283.515
91.0691 280.964 90.5775 279.269 90.1219C277.15 89.5532 275.965 87.034 278.118
85.4414Z",
fill: "url(#paint3_linear_1356_14057)"
}), t.createElement("path", {
d: "M122.567 166.093C113.597 172.832 104.535 179.836
99.517 190.092C98.5342 192.099 97.519 195.019 97.9533 197.204C98.9699 202.316
105.76 203.049 110.691 201.96C113.468 201.347 116.325 199.231 115.921
196.319C115.576 193.81 113.158 192.986 112.072 190.73C110.779 188.04 112.35
184.97 114.218 182.62C128.134 165.099 150.074 157.394 171.093 151.607C175.385
150.425 180.897 147.69 180.581 143.099C180.372 140.072 177.118 137.683 174.221
137.383C171.324 137.082 168.481 138.773 165.715 139.776C158.416 142.419 151.17
143.799 143.489 143.526C136.865 143.29 130.976 143.316 129.562 150.781C128.138
158.276 129.53 160.863 122.567 166.093Z",
fill: "url(#paint4_linear_1356_14057)"
}), t.createElement("path", {
d: "M79.1056 153.531C60.3932 164.378 43.7478 178.354
32.8214 197.415C30.3313 201.76 27.9216 206.554 27.1821 211.512C26.4448 216.47
27.7591 222.525 30.8133 226.337C34.908 231.446 41.6938 232.915 48.1811
233.125C50.7248 233.208 53.0035 233.066 55.3316 231.947C57.6602 230.83 59.7548
228.359 59.5978 225.742C59.3303 221.315 54.5491 219.665 50.9271 217.34C42.6566
212.037 40.4958 199.493 44.2381 190.032C47.9803 180.57 55.8228 173.173 63.2316
166.338C67.229 162.651 71.5194 158.372 76.777 157.522C79.9167 157.015 83.4706
157.589 86.6295 157.252C93.9004 156.479 99.64 151.404 105.588 146.912C115.048
139.765 126.045 134.283 137.501 132.093C141.913 131.248 146.293 130.493
149.682 127.831C151.37 126.507 150.803 123.567 148.726 123.93C138.542 125.713
128.652 131.135 119.142 134.758C105.627 139.914 91.7133 146.223 79.1056
153.531Z",
fill: "url(#paint5_linear_1356_14057)"
}), t.createElement("path", {
d: "M96.3677 117.321C96.0315 116.64 95.2914 116.612
94.6293 116.975C91.9858 118.417 91.5452 120.509 90.9466 122.178C90.4004
123.702 89.3647 124.67 87.6542 125.604C85.9437 126.538 85.0983 126.316 83.5956
125.91C81.9481 125.465 79.8603 125.424 77.2168 126.866C74.5734 128.309 74.1348
130.401 73.5341 132.07C72.9879 133.593 71.9522 134.562 70.2417 135.496C68.5313
136.43 67.6859 136.208 66.1832 135.801C64.5357 135.357 62.2569 134.538 59.6128
135.978C56.9694 137.42 56.5308 139.512 55.9301 141.181C55.3839 142.705 54.5398
144.454 52.8293 145.388C52.1667 145.748 52.1006 146.485 52.439 147.165C52.7752
147.845 53.5153 147.874 54.1773 147.511C56.8208 146.069 57.2594 143.977 57.86
142.307C58.4062 140.784 59.4419 139.815 61.1524 138.881C62.8629 137.948
63.7083 138.17 65.211 138.576C66.8585 139.021 68.9458 139.059 71.5898
137.619C74.2333 136.177 74.6718 134.085 75.2725 132.416C75.8187 130.892
76.8544 129.924 78.5649 128.99C80.2754 128.056 81.1207 128.278 82.6235
128.684C84.2709 129.129 86.5503 129.95 89.1938 128.507C91.8373 127.065 92.2779
124.973 92.8765 123.304C93.4227 121.78 94.2663 120.03 95.9773 119.098C96.6378
118.738 96.7039 118.001 96.3677 117.321Z",
fill: "#FBC49D"
}), t.createElement("path", {
d: "M391.827 164.699C392.04 164.639 392.39 164.573
392.6 164.481C393.87 163.921 395.363 162.429 395.893 161.051C396.421 159.673
396.237 158.321 395.712 156.931C394.629 154.061 391.777 152.62 389.155
153.775C386.531 154.931 384.962 158.455 386.042 161.325C387.038 163.963
389.369 165.392 391.827 164.699ZM394.166 157.367C394.529 158.332 394.52
159.751 394.156 160.706C393.792 161.662 393.1 162.534 392.218 162.921C390.398
163.723 388.338 162.878 387.589 160.889C387.226 159.925 387.234 158.506
387.599 157.55C387.963 156.594 388.654 155.723 389.536 155.336C391.356 154.534
393.416 155.376 394.166 157.367Z",
fill: "#86E29B"
}), t.createElement("path", {
d: "M62.7198 108.691C64.4912 108.191 66.6152 106.609
67.5596 104.824C68.4273 103.187 68.465 101.455 67.9609 99.7066C67.4547 97.9586
66.0792 96.5141 64.4963 95.6786C62.9135 94.843 61.2077 94.8578 59.4756
95.4255C57.7435 95.9933 56.2768 97.4364 55.409 99.074C53.6185 102.456 55.2032
106.494 58.4723 108.22C60.0142 109.035 61.1315 109.138 62.7198
108.691ZM60.6304 96.7682C61.819 96.4332 63.0232 96.8871 64.1048
97.4571C65.2463 98.0603 66.0495 98.8796 66.4145 100.142C66.7791 101.403
66.4488 103.299 65.8224 104.48C64.5299 106.919 61.2212 107.686 58.8638
106.441C56.5063 105.197 55.8538 101.858 57.1462 99.4185C57.7726 98.2375
58.6059 97.3957 59.8573 96.9862C59.9214 96.9635 60.5631 96.7872 60.6304
96.7682Z",
fill: "#FFB0EB"
}), t.createElement("path", {
d: "M77.0217 242.979C75.9542 243.28 75.1664 242.151
74.9029 241.074C74.6394 239.996 75 239.378 76.0676 239.077C77.1351 238.776
78.5053 238.907 78.7688 239.984C79.0323 241.061 78.0893 242.678 77.0217
242.979Z",
fill: "url(#paint6_linear_1356_14057)"
}), t.createElement("path", {
d: "M380.506 184.577C379.439 184.878 378.651 183.749
378.387 182.672C378.124 181.594 378.484 180.976 379.552 180.675C380.619
180.374 381.99 180.505 382.253 181.582C382.517 182.659 381.574 184.276 380.506
184.577Z",
fill: "url(#paint7_linear_1356_14057)"
}), t.createElement("path", {
d: "M348.82 246.969C347.752 247.27 346.382 247.14
346.119 246.063C345.855 244.985 346.798 243.369 347.866 243.068C348.933
242.767 349.721 243.896 349.985 244.973C350.248 246.05 349.888 246.669 348.82
246.969Z",
fill: "url(#paint8_linear_1356_14057)"
}), t.createElement("path", {
d: "M140.419 282.412C139.351 282.713 138.754 282.365
138.491 281.288C138.227 280.21 138.397 278.812 139.464 278.511C140.532 278.21
142.093 279.121 142.357 280.198C142.62 281.275 141.486 282.111 140.419
282.412Z",
fill: "url(#paint9_linear_1356_14057)"
}), t.createElement("path", {
d: "M121.462 101.679C120.395 101.979 119.798 101.631
119.534 100.554C119.271 99.4764 119.44 98.0779 120.508 97.777C121.575 97.4761
123.136 98.3868 123.4 99.4642C123.663 100.542 122.53 101.378 121.462 101.679Z",
fill: "url(#paint10_linear_1356_14057)"
}), t.createElement("path", {
d: "M370.749 159.005C369.682 159.306 368.311 159.175
368.048 158.098C367.784 157.021 368.727 155.404 369.795 155.103C370.863
154.802 371.65 155.931 371.914 157.008C372.177 158.086 371.817 158.704 370.749
159.005Z",
fill: "url(#paint11_linear_1356_14057)"
}), t.createElement("path", {
d: "M384.211 245.345C383.143 245.646 381.773 245.515
381.51 244.438C381.246 243.361 382.189 241.744 383.257 241.443C384.324 241.142
385.112 242.271 385.376 243.348C385.639 244.426 385.278 245.044 384.211
245.345Z",
fill: "url(#paint12_linear_1356_14057)"
}), t.createElement("path", {
d: "M364.771 41.3873C363.063 41.8687 361.337 40.8616
360.915 39.1378C360.493 37.414 361.536 35.6263 363.244 35.1449C364.953 34.6634
366.679 35.6706 367.101 37.3944C367.522 39.1182 366.479 40.9059 364.771
41.3873Z",
fill: "url(#paint13_linear_1356_14057)"
}), t.createElement("path", {
d: "M404.311 77.905C404.602 77.8231 404.875 77.9236
405.084 77.6871C405.437 77.2908 404.814 76.6385 404.703 76.1265L401.277
58.7418C401.149 58.163 400.687 57.5371 400.123 57.3991C399.558 57.2611 398.969
57.3812 398.576 57.835L385.784 73.1179C385.395 73.564 385.199 74.3453 385.393
74.8964C385.585 75.4481 385.978 76.1646 386.548 76.2391L403.538
78.123C403.744 78.1479 404.114 77.9607 404.311 77.905ZM398.948
62.7348L401.811 74.4394L389.841 72.8085L398.948 62.7348Z",
fill: "#FFB0EB"
}), t.createElement("path", {
d: "M97.5393 295.311C97.7108 295.263 97.4284 295.461
97.5393 295.311L108.785 280.464C108.975 280.211 108.718 279.972 108.594
279.684C108.47 279.396 108.124 279.917 107.821 279.902L88.5106
278.672C88.2101 278.659 87.895 278.62 87.7374 278.89C87.5798 279.159 87.7755
279.402 87.9283 279.67L96.5753 294.749C96.7102 294.99 97.2696 295.297 97.5393
295.311C97.6283 295.319 97.4556 295.335 97.5393 295.311ZM106.465
281.118L96.9667 292.97L90.6295 280.577L106.465 281.118Z",
fill: "#86E29B"
}), t.createElement("path", {
d: "M393.699 108.848C389.518 104.446 414.629 114.366
413.945 120.659C413.259 126.952 401.355 129.102 403.894 123.491C406.042
118.747 400.376 115.876 393.699 108.848Z",
fill: "#FBC49D"
}), t.createElement("path", {
d: "M139.414 115.959C139.434 115.953 139.392 115.965
139.414 115.959C141.963 115.2 143.436 111.976 142.717 109.189C142.37 107.839
141.526 107.199 140.408 106.504C139.289 105.808 138.171 105.449 136.933
105.815C135.698 106.182 134.85 107.033 134.222 108.247C133.595 109.461 133.282
111.234 133.63 112.585C133.978 113.935 134.821 114.574 135.94 115.27C137.04
115.952 138.199 116.301 139.414 115.959ZM137.315 107.375C138.222 107.12
139.005 106.994 139.825 107.502C140.661 108.02 140.912 108.618 141.171
109.625C141.708 111.704 140.935 113.834 139.032 114.398C138.11 114.675 137.356
114.791 136.522 114.272C135.686 113.753 135.436 113.155 135.176
112.149C134.917 111.142 134.718 109.714 135.186 108.81C135.654 107.905 136.394
107.649 137.315 107.375C137.329 107.371 137.299 107.38 137.315 107.375Z",
fill: "#75C4FD"
}), t.createElement("path", {
d: "M308.981 78.7519C310.052 78.4043 311.158 78.7096
312.265 78.6613C313.655 78.6006 314.936 78.517 316.323 78.3531C319.497 77.9795
322.798 77.4906 325.984 77.3012C329.309 77.1025 332.514 76.8551 335.836
77.0295C338.809 77.1842 342.163 77.3405 345.105 77.7558C352.129 78.7468
359.331 79.0578 366.347 80.1158C372.252 81.008 377.93 82.1319 383.722
83.5644C385.925 84.0054 388.267 85.0754 389.126 85.3792C389.421 85.4833 389.37
85.8347 389.317 86.1595C389.306 86.2271 389.353 86.1146 389.317
86.1595C388.269 87.414 386.564 86.8124 385.259 86.4677C384.406 86.241 381.488
85.9494 381.011 85.9957C380.14 86.0815 379.277 86.014 379.656 87.2114C380.122
88.6824 382.391 89.7375 383.704 90.2419C385.883 91.0803 388.771 91.2561
390.845 92.4015C392.968 92.821 395.425 93.5002 397.022 93.9986C402.83 95.8103
407.806 98.8678 413.033 102.002C415.503 103.482 417.829 104.764 419.973
106.72C421.647 108.248 423.771 109.882 424.595 112.091C425.113 113.482 424.451
115.471 422.848 115.085C420.353 114.488 419.638 111.665 418.227
109.714C415.003 105.251 410.067 102.067 405.118 100.06C402.64 99.0556 399.803
98.729 397.204 98.1176C394.411 97.4613 391.597 97.0442 388.707 97.1736C385.646
97.3097 382.846 97.5534 379.819 98.0078C377.027 98.4264 374.252 98.4441
371.514 97.8441C368.766 97.2421 366.276 96.7553 363.6 95.9021C361.662 95.2848
359.013 94.5583 357.232 93.5247C355.699 92.6339 355.631 91.2381 357.241
90.186C359.87 88.4656 362.778 89.8021 365.546 90.3497C365.561 90.3527 365.532
90.3468 365.546 90.3497C367.858 90.804 369.649 90.098 371.923 89.3884C372.489
89.2128 373.255 89.0482 373.47 88.953C374.383 88.5432 375.895 87.8227 375.407
86.7394C374.868 85.5457 372.659 84.8846 371.55 84.4891C369.74 83.8428 368.053
82.9215 366.147 82.6743C365.654 82.6095 365.109 83.1606 364.6 83.1097C363.36
83.1121 361.769 83.348 360.543 83.418C357.43 83.5916 354.583 83.6228 351.464
83.4719C348.714 83.3377 346.432 82.8542 343.741 82.3102C340.773 81.7101 337.52
81.5879 334.471 81.5839C331.393 81.5811 328.6 81.7214 325.583 82.4181C322.758
83.0702 319.757 83.6198 316.887 84.0326C314.698 84.3481 312.467 84.6054
310.319 84.2137C309.079 83.9871 306.994 83.3394 306.461 81.9635C305.846
80.3659 307.736 79.1556 308.981 78.7519Z",
fill: "url(#paint14_linear_1356_14057)"
}), t.createElement("path", {
d: "M242.269 242.95C242.295 242.947 242.244 242.955
242.269 242.95C244.934 242.606 247.53 241.858 250.2 241.574C253.133 241.264
256.006 240.56 258.906 239.982C263.26 239.117 268.026 238.52 272.254
237.097C274.429 236.365 276.067 235.298 278.251 234.592C280.361 233.909
283.058 233.12 285.216 232.652C289.317 231.764 293.049 231.66 297.016
230.198C301.109 228.69 305.088 226.673 308.819 224.409C312.645 222.086 316.282
219.769 320.622 218.62C322.381 218.154 323.919 218.219 325.65 218.886C327.016
219.413 327.739 220.337 327.196 221.79C326.557 223.504 324.659 224.7 323.131
225.423C320.854 226.5 319.53 227.184 317.134 227.927C314.619 228.707 311.888
229.24 309.395 230.083C308.226 230.947 307.17 232.522 306.105 233.501C303.996
235.441 301.666 237.03 298.945 237.996C292.934 240.129 286.354 238.602 280.183
239.056C279.661 239.095 279.162 239.442 278.635 239.487C275.592 240.135 272.2
240.63 269.156 241.294C264.546 242.299 260.456 243.409 255.808 244.179C251.971
244.814 243.815 245.854 243.815 245.854L242.074 245.505C240.575 245.281
240.751 243.152 242.269 242.95Z",
fill: "url(#paint15_linear_1356_14057)"
}), t.createElement("path", {
d: "M432.985 171.626C438.212 165.465 445.109 153.64
442.906 144.649C442.162 137.999 433.671 132.912 424.963 135.518C420.16 136.957
416.435 142.146 419.724 144.498C420.656 145.164 422.187 145.591 423.391
145.969C434.204 149.375 434.925 162.538 425.069 169.683C421.087 172.569
416.347 174.292 411.914 176.719C400.151 183.162 399.887 196.847 387.7
202.712C382.326 205.298 375.761 206.838 370.297 209.275C359.98 213.88 352.555
221.733 342.241 226.341C337.225 228.584 330.266 231.632 323.483 234.12C321.475
234.855 321.999 237.058 324.056 236.46C324.098 236.449 324.017 236.474 324.056
236.46C329.079 234.971 334.437 233.161 339.331 231.33C352.278 226.48 365.28
220.971 377.43 214.775C401.78 202.367 416.881 190.609 432.985 171.626Z",
fill: "url(#paint16_linear_1356_14057)"
}), t.createElement("path", {
d: "M343.644 241.104C348.002 234.144 357.126 232.455
364.343 231.134C368.176 230.431 372.406 229.878 376.137 228.662C380.691
227.175 384.558 224.095 388.327 221.077C389.452 220.177 391.204 218.466
392.393 217.436C393.185 216.748 393.644 216.026 394.33 215.225C396 213.275
399.599 209.812 401.687 208.16C403.263 206.914 407.779 204.758 408.259
207.986C408.611 210.359 406.379 213.087 404.961 214.747C402.224 217.953
398.998 221.079 395.475 223.243C391.749 225.531 387.701 227.439 383.674
229.051C381.672 229.853 379.519 230.073 377.486 230.785C376.001 231.307
374.486 232.236 373.037 232.866C371.034 233.738 368.99 234.28 367.041
235.38C364.436 236.849 361.782 238.783 359.108 240.105C356.331 241.477 353.823
242.691 350.791 243.27C348.6 243.687 345.501 243.641 343.836 241.884C343.526
241.554 343.389 241.51 343.644 241.104Z",
fill: "url(#paint17_linear_1356_14057)"
}), t.createElement("path", {
d: "M190.163 273.219C222.905 268.849 232.64 262.943
213.962 259.057C195.285 255.172 187.5 262.08 188.434 266.2C189.366 270.32
180.381 271.326 169.286 272.39C158.193 273.454 157.141 276.354 190.163
273.219Z",
fill: "url(#paint18_linear_1356_14057)"
}), t.createElement("path", {
d: "M295.952 95.4242L241.395 135.226L251.54
111.77L295.952 95.4242Z",
fill: "#E17726",
stroke: "#E17726",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M170.111 95.4242L224.181 135.598L214.522
111.77L170.111 95.4242Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M276.309 187.712L261.793 209.576L292.876
218.014L301.78 188.189L276.309 187.712Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M164.336 188.189L173.186 218.014L204.215
209.576L189.753 187.712L164.336 188.189Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M202.542 150.776L193.908 163.618L224.667
164.998L223.642 132.36L202.542 150.776Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M263.52 150.775L242.097 131.989L241.395
164.998L272.154 163.618L263.52 150.775Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M204.215 209.576L222.832 200.714L206.805
188.402L204.215 209.576Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M243.23 200.714L261.793 209.576L259.257
188.402L243.23 200.714Z",
fill: "#E27625",
stroke: "#E27625",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M261.793 209.576L243.23 200.714L244.741
212.601L244.579 217.643L261.793 209.576Z",
fill: "#D5BFB2",
stroke: "#D5BFB2",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M204.215 209.576L221.483 217.643L221.375
212.601L222.832 200.714L204.215 209.576Z",
fill: "#D5BFB2",
stroke: "#D5BFB2",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M221.807 180.547L206.373 176.09L217.274
171.154L221.807 180.547Z",
fill: "#233447",
stroke: "#233447",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M244.255 180.547L248.788 171.154L259.742
176.09L244.255 180.547Z",
fill: "#233447",
stroke: "#233447",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M204.215 209.576L206.913 187.712L189.753
188.189L204.215 209.576Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M259.149 187.712L261.793 209.576L276.309
188.189L259.149 187.712Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M272.154 163.618L241.395 164.998L244.255
180.547L248.788 171.154L259.742 176.09L272.154 163.618Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M206.373 176.09L217.274 171.154L221.807
180.547L224.667 164.998L193.908 163.618L206.373 176.09Z",
fill: "#CC6228",
stroke: "#CC6228",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M193.908 163.618L206.805 188.402L206.373
176.09L193.908 163.618Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M259.743 176.09L259.257 188.402L272.154
163.618L259.743 176.09Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M224.667 164.998L221.807 180.548L225.422
198.909L226.232 174.71L224.667 164.998Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M241.395 164.998L239.884 174.657L240.64
198.909L244.255 180.548L241.395 164.998Z",
fill: "#E27525",
stroke: "#E27525",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M244.255 180.547L240.64 198.909L243.23
200.714L259.257 188.402L259.743 176.09L244.255 180.547Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M206.373 176.09L206.805 188.402L222.832
200.714L225.422 198.909L221.807 180.547L206.373 176.09Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M244.579 217.643L244.741 212.601L243.338
211.434H222.724L221.375 212.601L221.483 217.643L204.215 209.576L210.259
214.459L222.508 222.791H243.5L255.803 214.459L261.793 209.576L244.579
217.643Z",
fill: "#C0AC9D",
stroke: "#C0AC9D",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M243.23 200.714L240.64 198.909H225.422L222.832
200.714L221.375 212.601L222.724 211.434H243.338L244.741 212.601L243.23
200.714Z",
fill: "#161616",
stroke: "#161616",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M298.272 137.827L302.859 115.856L295.952
95.4242L243.23 133.899L263.52 150.775L292.174 159.001L298.488 151.731L295.736
149.767L300.107 145.84L296.761 143.293L301.132 140.002L298.272 137.827Z",
fill: "#763E1A",
stroke: "#763E1A",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M163.203 115.856L167.844 137.827L164.876
140.002L169.301 143.293L165.955 145.84L170.326 149.767L167.574
151.731L173.888 159.001L202.542 150.775L222.832 133.899L170.11
95.4242L163.203 115.856Z",
fill: "#763E1A",
stroke: "#763E1A",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M292.175 159.001L263.52 150.775L272.154
163.618L259.257 188.402L276.309 188.189H301.78L292.175 159.001Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M202.542 150.775L173.888 159.001L164.336
188.189H189.753L206.805 188.402L193.908 163.618L202.542 150.775Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("path", {
d: "M241.395 164.998L243.23 133.9L251.54
111.77H214.522L222.832 133.9L224.667 164.998L225.368 174.763L225.422
198.909H240.64L240.694 174.763L241.395 164.998Z",
fill: "#F5841F",
stroke: "#F5841F",
strokeWidth: "0.94513",
strokeLinecap: "round",
strokeLinejoin: "round"
}), t.createElement("defs", null,
t.createElement("linearGradient", {
id: "paint0_linear_1356_14057",
x1: "335.991",
y1: "250.487",
x2: "303.873",
y2: "266.801",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#FFE466"
}), t.createElement("stop", {
offset: "1",
stopColor: "#FFAFEA"
})), t.createElement("linearGradient", {
id: "paint1_linear_1356_14057",
x1: "276.993",
y1: "303.722",
x2: "205.254",
y2: "401.574",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "0.0929",
stopColor: "#81C2F6"
}), t.createElement("stop", {
offset: "1",
stopColor: "#F0B8BD"
})), t.createElement("linearGradient", {
id: "paint2_linear_1356_14057",
x1: "271.074",
y1: "119.924",
x2: "553.077",
y2: "104.53",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#FFE466"
}), t.createElement("stop", {
offset: "1",
stopColor: "#FFAFEA"
})), t.createElement("linearGradient", {
id: "paint3_linear_1356_14057",
x1: "264.209",
y1: "91.0943",
x2: "357.834",
y2: "72.8792",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#FFE466"
}), t.createElement("stop", {
offset: "1",
stopColor: "#FFAFEA"
})), t.createElement("linearGradient", {
id: "paint4_linear_1356_14057",
x1: "212.46",
y1: "121.997",
x2: "92.6119",
y2: "183.406",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#FFE466"
}), t.createElement("stop", {
offset: "1",
stopColor: "#FFAFEA"
})), t.createElement("linearGradient", {
id: "paint5_linear_1356_14057",
x1: "23.0498",
y1: "204.411",
x2: "161.86",
y2: "163.003",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "0.0929",
stopColor: "#81C2F6"
}), t.createElement("stop", {
offset: "1",
stopColor: "#F0B8BD"
})), t.createElement("linearGradient", {
id: "paint6_linear_1356_14057",
x1: "78.8647",
y1: "240.375",
x2: "74.9655",
y2: "241.328",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint7_linear_1356_14057",
x1: "382.349",
y1: "181.971",
x2: "378.45",
y2: "182.925",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint8_linear_1356_14057",
x1: "349.889",
y1: "244.583",
x2: "345.99",
y2: "245.537",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint9_linear_1356_14057",
x1: "142.262",
y1: "279.808",
x2: "138.362",
y2: "280.762",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint10_linear_1356_14057",
x1: "123.305",
y1: "99.0746",
x2: "119.406",
y2: "100.028",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint11_linear_1356_14057",
x1: "371.818",
y1: "156.617",
x2: "367.919",
y2: "157.571",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint12_linear_1356_14057",
x1: "385.281",
y1: "242.958",
x2: "381.382",
y2: "243.911",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint13_linear_1356_14057",
x1: "367.125",
y1: "37.5052",
x2: "360.843",
y2: "38.8076",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "1",
stopColor: "#75C3FC"
})), t.createElement("linearGradient", {
id: "paint14_linear_1356_14057",
x1: "300.182",
y1: "91.321",
x2: "479.464",
y2: "104.041",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#FFE466"
}), t.createElement("stop", {
offset: "1",
stopColor: "#FFAFEA"
})), t.createElement("linearGradient", {
id: "paint15_linear_1356_14057",
x1: "363.434",
y1: "201.232",
x2: "102.977",
y2: "302.269",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#FFE466"
}), t.createElement("stop", {
offset: "1",
stopColor: "#FFAFEA"
})), t.createElement("linearGradient", {
id: "paint16_linear_1356_14057",
x1: "447.962",
y1: "165.159",
x2: "313.049",
y2: "197.95",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "0.0929",
stopColor: "#81C2F6"
}), t.createElement("stop", {
offset: "1",
stopColor: "#F0B8BD"
})), t.createElement("linearGradient", {
id: "paint17_linear_1356_14057",
x1: "410.211",
y1: "215.859",
x2: "341.378",
y2: "232.788",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#75C3FC"
}), t.createElement("stop", {
offset: "0.0929",
stopColor: "#81C2F6"
}), t.createElement("stop", {
offset: "1",
stopColor: "#F0B8BD"
})), t.createElement("linearGradient", {
id: "paint18_linear_1356_14057",
x1: "222.282",
y1: "258.986",
x2: "162.257",
y2: "273.774",
gradientUnits: "userSpaceOnUse"
}, t.createElement("stop", {
stopColor: "#FFE466"
}), t.createElement("stop", {
offset: "1",
stopColor: "#FFAFEA"
}))))
}
, A = function(e) {
var n = t.useState(2)
, r = n[0]
, o = n[1]
, u = e.sdkVersion
, c = e.i18nInstance.t;
return t.createElement(a, {
className: "select-modal"
}, t.createElement("div", {
style: s.backdrop,
onClick: function() {
return e.onClose(!0)
}
}), t.createElement("div", {
style: s.modal
}, t.createElement("div", {
style: s.closeButtonContainer
}, t.createElement("div", {
style: s.right
}, t.createElement("span", {
style: s.closeButton,
onClick: function() {
return e.onClose(!0)
}
}, t.createElement(l, null)))), t.createElement("div", {
style: s.logoContainer
}, t.createElement(h, null)), t.createElement("div", null,
t.createElement("div", {
style: s.tabcontainer
}, t.createElement("div", {
style: s.flexContainer
}, t.createElement("div", {
onClick: function() {
return o(1)
},
style: i(i(i({}, s.tab), 1 === r ? s.tabactive : {}), s.flexItem)
}, c("DESKTOP")), t.createElement("div", {
onClick: function() {
return o(2)
},
style: i(i(i({}, s.tab), 2 === r ? s.tabactive : {}), s.flexItem)
}, c("MOBILE")))), t.createElement("div", {
style: {
display: 1 === r ? "none" : "block"
}
}, t.createElement("div", {
style: s.flexContainer
}, t.createElement("div", {
style: i({
textAlign: "center",
marginTop: 4
}, s.flexItem)
}, t.createElement("div", {
id: "sdk-qrcode-container",
style: s.center
}), t.createElement("div", {
style: s.connectMobileText
}, c("SCAN_TO_CONNECT"), t.createElement("br", null),
t.createElement("span", {
style: s.blue
}, t.createElement("b", null,
c("META_MASK_MOBILE_APP"))))))), t.createElement("div", {
style: {
display: 2 === r ? "none" : "block"
}
}, t.createElement("div", {
style: {
display: "flex",
justifyContent: "center",
height: 300,
marginTop: -20
}
}, t.createElement(y, null)), t.createElement("div", {
style: s.extensionLabel
}, c("SELECT_MODAL.CRYPTO_TAKE_CONTROL_TEXT")),
t.createElement("button", {
style: s.button,
onClick: e.connectWithExtension
}, t.createElement(b, null), t.createElement("span", {
style: s.installExtensionText
}, c("CONNECT_WITH_EXTENSION"))))), t.createElement(m, {
version: u
})))
}
, w = function() {
function e(e) {
var t = e.debug
, n = e.sdkVersion
, i = this;
this.debug = !1,
this.updateOTPValue = function(e) {
i.debug && console.debug("ModalLoader:
updateOTPValue", e),
setTimeout((function() {
var t;
i.debug && console.debug("ModalLoader:
updateOTPValue: delayed otp update"),
t = document.getElementById("sdk-mm-otp-value"),
i.debug && console.debug("ModalLoader:
updateOTPValue: otpNode", t),
t && (t.textContent = e,
t.style.display = "block")
}
), 800)
}
,
this.updateQRCode = function(e) {
i.debug && console.debug("ModalLoader:
updateQRCode", e);
var t = document.getElementById("sdk-qrcode-
container");
t && (t.innerHTML = "",
new (pT())({
width: 270,
height: 270,
type: "svg",
data: e,
image: r,
dotsOptions: {
color: "black",
type: "rounded"
},
imageOptions: {
margin: 5
},
cornersDotOptions: {
color: "#f66a07"
},
qrOptions: {
errorCorrectionLevel: "M"
}
}).append(t))
}
,
this.debug = null != t && t,
this.sdkVersion = n
}
return e.prototype.renderInstallModal = function(e) {
this.debug && console.debug("ModalLoader:
renderInstallModal", e),
this.installContainer = e.parentElement,
n.createRoot(e.parentElement).render(t.createElement(g, {
link: e.link,
preferDesktop: e.preferDesktop,
onClose: e.onClose,
sdkVersion: this.sdkVersion,
metaMaskInstaller: e.metaMaskInstaller,
i18nInstance: e.i18nInstance
}))
}
,
e.prototype.renderSelectModal = function(e) {
var r = this;
this.debug && console.debug("ModalLoader:
renderSelectModal", e),
this.selectContainer = e.parentElement,
n.createRoot(e.parentElement).render(t.createElement(A, {
link: e.link,
sdkVersion: this.sdkVersion,
onClose: e.onClose,
connectWithExtension: e.connectWithExtension,
i18nInstance: e.i18nInstance
})),
setTimeout((function() {
r.updateQRCode(e.link)
}
), 100)
}
,
e.prototype.renderPendingModal = function(e) {
this.debug && console.debug("ModalLoader:
renderPendingModal", e),
this.pendingContainer = e.parentElement,
n.createRoot(e.parentElement).render(t.createElement(v, {
onClose: e.onClose,
onDisconnect: e.onDisconnect,
sdkVersion: this.sdkVersion,
updateOTPValue: e.updateOTPValue,
displayOTP: e.displayOTP,
i18nInstance: e.i18nInstance
}))
}
,
e.prototype.unmount = function() {
var e, t, n, r, i, o;
null === (t = null === (e = this.pendingContainer) || void 0
=== e ? void 0 : e.parentNode) || void 0 === t || t.removeChild(this.pendingContainer),
this.pendingContainer = void 0,
null === (r = null === (n = this.installContainer) || void 0 ===
n ? void 0 : n.parentNode) || void 0 === r || r.removeChild(this.installContainer),
this.installContainer = void 0,
null === (o = null === (i = this.selectContainer) || void 0 ===
i ? void 0 : i.parentNode) || void 0 === o || o.removeChild(this.selectContainer),
this.selectContainer = void 0
}
,
e
}();
e.ModalLoader = w
}(t, WR(), dT())
}(0, jR.exports);
var mT = jR.exports;
const gT = e => {
let {link: t, debug: n, installer: r, terminate: i, connectWithExtension: o,
preferDesktop: a, i18nInstance: s} = e
, u = null
, l = null;
EC("[UI: InstallModal-web: sdkWebInstallModal()]
################## Installing Modal #################"),
EC(`[UI: InstallModal-web: sdkWebInstallModal()] link=${t}`),
EC(`[UI: InstallModal-web: sdkWebInstallModal()] npx uri-scheme open
"${t}" --ios`),
EC(`[UI: InstallModal-web: sdkWebInstallModal()] npx uri-scheme open
"${t}" --android`),
EC(`[UI: InstallModal-web: sdkWebInstallModal()] adb shell am start -a
android.intent.action.VIEW -d "${t}"`);
const c = e => {
var t;
EC("[UI: InstallModal-web: sdkWebInstallModal()] installModal-web
unmounting install modal -- shouldTerminate:", e, l),
(null == l ? void 0 : l.parentNode) && (null === (t = l.parentNode) ||
void 0 === t || t.removeChild(l)),
l = null,
u = null,
!0 === e && (null == i || i())
}
;
return {
mount: e => {
if (EC("[UI: InstallModal-web: sdkWebInstallModal()]
installModal-web mounting install modal", l),
l)
return l.style.display = "block",
void (null == u || u.updateQRCode(e));
u = new mT.ModalLoader({
debug: n,
sdkVersion: Fx
}),
l = document.createElement("div"),
document.body.appendChild(l),
window.extension ? u.renderSelectModal({
i18nInstance: s,
parentElement: l,
connectWithExtension: () => {
c(),
null == o || o()
}
,
onClose: c,
link: t
}) : u.renderInstallModal({
i18nInstance: s,
parentElement: l,
preferDesktop: null != a && a,
link: t,
metaMaskInstaller: r,
onClose: c
})
}
,
unmount: c
}
}
, vT = e => {
let {onDisconnect: t, i18nInstance: n, debug: r} = e
, i = null
, o = null;
const a = () => {
EC("[UI: pendingModal-web: sdkWebPendingModal()]
pendingModal-web unmount", i),
(null == i ? void 0 : i.parentNode) && i.parentNode.removeChild(i),
i = null,
o = null
}
, s = e => {
EC("[UI: pendingModal-web: sdkWebPendingModal()]
pendingModal-web updateOTPValue", e),
o && o.updateOTPValue(e)
}
, u = function() {
let {displayOTP: e} = arguments.length > 0 && void 0 !==
arguments[0] ? arguments[0] : {
displayOTP: !0
};
EC("[UI: pendingModal-web: sdkWebPendingModal()]
pendingModal-web mount", i),
i ? i.style.display = "block" : (o = new mT.ModalLoader({
debug: r,
sdkVersion: Fx
}),
i = document.createElement("div"),
document.body.appendChild(i),
o.renderPendingModal({
i18nInstance: n,
parentElement: i,
onClose: a,
onDisconnect: t,
updateOTPValue: s,
displayOTP: e
}))
};
return u(),
{
mount: u,
unmount: a,
updateOTPValue: s
}
}
;
function bT(t, n, r) {
return AS(this, void 0, void 0, (function*() {
return new Promise(( (i, o) => {
if (!t.connector)
return void o(new Error("No connector available"));
EC("[RemoteConnection: connectWithModalInstaller()]", {
state: t,
options: n,
linkParams: r
});
const a = `${t.useDeeplink ? qx : Kx}?${r}`;
!function(e, t, n) {
var r, i, o, a;
e.installModal = null === (i = (r = t.modals).install) || void 0
=== i ? void 0 : i.call(r, {
i18nInstance: t.sdk.i18nInstance,
link: n,
preferDesktop: e.preferDesktop,
installer: t.getMetaMaskInstaller(),
terminate: () => {
EC("[RemoteConnection: showInstallModal() =>
terminate()] terminate connection"),
t.sdk.terminate().catch((e => {
console.warn("[MMSDK] failed to terminate
connection", e)
}
))
}
,
debug: e.developerMode,
connectWithExtension: () => {
var e;
return null === (e =
t.connectWithExtensionProvider) || void 0 === e || e.call(t),
!1
}
}),
null === (a = null === (o = e.installModal) || void 0 === o ?
void 0 : o.mount) || void 0 === a || a.call(o, n)
}(t, n, a),
n.sdk.once(e.EventType.PROVIDER_UPDATE, (t => AS(this,
void 0, void 0, (function*() {
EC("[RemoteConnection: connectWithModalInstaller()]
once provider_update -- resolving startConnection promise"),
t !== e.PROVIDER_UPDATE_TYPE.TERMINATE ? o(t) :
o({
code: 4001,
message: "User rejected the request."
})
}
)))),
t.connector.once(e.EventType.CLIENTS_READY, ( () =>
AS(this, void 0, void 0, (function*() {
EC("[RemoteConnection: connectWithModalInstaller()]
once clients_ready -- resolving startConnection promise"),
i()
}
))))
}
))
}
))
}
function yT(e, t) {
var n, r, i, o;
null === (r = (n = e.modals).onPendingModalDisconnect) || void 0 === r
|| r.call(n),
null === (o = null === (i = t.pendingModal) || void 0 === i ? void 0 :
i.unmount) || void 0 === o || o.call(i)
}
function AT(e, t, n) {
var r, i, o, a, s, u, l, c, d, f, h, p, m, g;
return AS(this, void 0, void 0, (function*() {
const v = Zx.getProvider()
, b = Date.now();
if (void 0 !== n.lastActive && b - n.lastActive < Wx)
return v._setConnected(),
e.pendingModal = null === (i = (r = t.modals).otp) || void 0 ===
i ? void 0 : i.call(r, {
i18nInstance: t.i18nInstance,
debug: e.developerMode,
onDisconnect: () => yT(t, e)
}),
null === (a = null === (o = e.installModal) || void 0 === o ? void
0 : o.unmount) || void 0 === a || a.call(o, !1),
null === (u = null === (s = e.pendingModal) || void 0 === s ?
void 0 : s.unmount) || void 0 === u || u.call(s),
null === (c = null === (l = e.pendingModal) || void 0 === l ? void
0 : l.mount) || void 0 === c || c.call(l, {
displayOTP: !1
}),
e.authorized = !0,
void (e.developerMode && console.debug("RCPMS::on
'authorized' provider.state", v.getState()));
e.pendingModal ? null === (f = null === (d = e.pendingModal) || void
0 === d ? void 0 : d.mount) || void 0 === f || f.call(d) : e.pendingModal = null === (p = (h
= t.modals).otp) || void 0 === p ? void 0 : p.call(h, {
i18nInstance: t.i18nInstance,
debug: e.developerMode,
onDisconnect: () => yT(t, e)
});
const y = yield function(e) {
return AS(this, void 0, void 0, (function*() {
for (; void 0 === e.otpAnswer; )
yield new Promise((e => setTimeout(( () => e()), 1e3)));
return e.otpAnswer
}
))
}(e);
e.otpAnswer !== y && (e.otpAnswer = y,
null === (g = null === (m = e.pendingModal) || void 0 === m ? void
0 : m.updateOTPValue) || void 0 === g || g.call(m, y))
}
))
}
function wT(e, t) {
let {initialCheck: n} = arguments.length > 2 && void 0 !==
arguments[2] ? arguments[2] : {};
var r, i, o, a, s, u, l, c, d, f, h, p, m, g;
return AS(this, void 0, void 0, (function*() {
if (!e.connector)
throw new Error("no connector defined");
const v = Zx.getProvider();
e.authorized = !1,
v.emit("connecting");
const b = yield null === (r = e.connector) || void 0 === r ? void 0 :
r.originatorSessionConnect();
EC(`[RemoteConnection: startConnection()] after
originatorSessionConnect initialCheck=${n}`, b);
let y = null !== (i = null == b ? void 0 : b.channelId) && void 0 !== i ?
i : ""
, A = null !== (a = null === (o = e.connector.getKeyInfo()) || void 0
=== o ? void 0 : o.ecies.public) && void 0 !== a ? a : "";
if (n && !b)
return Promise.resolve();
if (n && !(null == b ? void 0 : b.relayPersistence))
return Promise.resolve();
if (!b && !n) {
const t = yield e.connector.generateChannelIdConnect();
y = null !== (s = t.channelId) && void 0 !== s ? s : "",
A = null !== (l = null === (u = e.connector.getKeyInfo()) || void 0
=== u ? void 0 : u.ecies.public) && void 0 !== l ? l : ""
}
if (n && (null == b ? void 0 : b.channelId))
return (null === (c = e.connector) || void 0 === c ? void 0 :
c.isConnected()) || (EC(`[RemoteConnection: startConnection()] reconnecting to
channel initialCheck=${n}`, b),
null === (d = e.connector) || void 0 === d ||
d.connectToChannel({
channelId: y
})),
Promise.resolve();
b && !(null === (f = e.connector) || void 0 === f ? void 0 :
f.isConnected()) && (EC("[RemoteConnection: startConnection()] reconnecting to
channel", b),
null === (h = e.connector) || void 0 === h || h.connectToChannel({
channelId: y
}));
const w = (null === (p = e.platformManager) || void 0 === p ? void 0
: p.isSecure()) ? "" : "&t=q"
, _ = encodeURI(`channelId=${y}&v=2&comm=${null !== (m =
e.communicationLayerPreference) && void 0 !== m ? m : ""}&pubkey=${A}${w}`)
, E = `${e.useDeeplink ? qx : Kx}?${_}`;
return e.qrcodeLink = E,
e.developerMode && EC(`[RemoteConnection: startConnection()]
qrcodeLink=${E}`),
v.emit("display_uri", E),
(null === (g = e.platformManager) || void 0 === g ? void 0 :
g.isSecure()) ? function(e, t) {
var n, r;
return AS(this, void 0, void 0, (function*() {
const i = `${Kx}?${t}`
, o = `${qx}?${t}`;
null === (r = null === (n = e.platformManager) || void 0 ===
n ? void 0 : n.openDeeplink) || void 0 === r || r.call(n, i, o, "_self")
}
))
}(e, _) : (null == b ? void 0 : b.lastActive) ? AT(e, t, b) : bT(e, t, _)
}
))
}
class _T {
constructor(t) {
var n, r, i;
this.state = {
connector: void 0,
qrcodeLink: void 0,
analytics: void 0,
developerMode: !1,
authorized: !1,
reconnection: !1,
preferDesktop: !1,
communicationLayerPreference: void 0,
platformManager: void 0,
pendingModal: void 0,
installModal: void 0,
otpAnswer: void 0
},
this.options = t;
const o = !0 === (null === (n = t.logging) || void 0 === n ? void 0 :
n.developerMode) || !0 === (null === (r = t.logging) || void 0 === r ? void 0 : r.sdk);
this.state.developerMode = o,
this.state.analytics = t.analytics,
this.state.preferDesktop = null !== (i = t.preferDesktop) && void 0 !
== i && i,
this.state.useDeeplink = t.sdk.options.useDeeplink,
this.state.communicationLayerPreference =
t.communicationLayerPreference,
this.state.platformManager = t.platformManager,
t.modals.install || (t.modals.install = gT),
t.modals.otp || (t.modals.otp = vT),
function(e, t) {
var n, r, i, o;
EC("[RemoteConnection: initializeConnector()] initialize
connector"),
e.connector = new yS({
platformType: t.platformManager.getPlatformType(),
communicationLayerPreference:
t.communicationLayerPreference,
transports: t.transports,
dappMetadata: Object.assign(Object.assign({},
t.dappMetadata), {
source: t._source
}),
analytics: t.enableAnalytics,
communicationServerUrl: t.communicationServerUrl,
sdkVersion: Fx,
context: "dapp",
ecies: t.ecies,
storage: t.storage,
logging: t.logging
}),
t.timer && (EC("[RemoteConnection: initializeConnector()] reset
background timer", t.timer),
null === (r = null === (n = t.timer) || void 0 === n ? void 0 :
n.stopBackgroundTimer) || void 0 === r || r.call(n),
null === (o = null === (i = t.timer) || void 0 === i ? void 0 :
i.runBackgroundTimer) || void 0 === o || o.call(i, ( () => !1), 1e4))
}(this.state, this.options),
function(t, n) {
var r;
t.connector && ((null === (r = t.platformManager) || void 0 ===
r ? void 0 : r.isSecure()) || t.connector.on(e.EventType.OTP, (e => {
var r, i, o, a, s, u;
if (t.otpAnswer !== e) {
if (EC("[RemoteConnection: setupListeners() =>
EventType.OTP] 'OTP' ", e),
t.otpAnswer = e,
!t.pendingModal) {
EC("[RemoteConnection: setupListeners() =>
EventType.OTP] 'OTP' init pending modal");
const e = () => {
var e, r, i, o, a, s;
null === (r = (e =
n.modals).onPendingModalDisconnect) || void 0 === r || r.call(e),
null === (o = null === (i = t.pendingModal) ||
void 0 === i ? void 0 : i.unmount) || void 0 === o || o.call(i),
null === (s = null === (a = t.pendingModal) ||
void 0 === a ? void 0 : a.updateOTPValue) || void 0 === s || s.call(a, "")
}
;
t.pendingModal = null === (i = (r = n.modals).otp) ||
void 0 === i ? void 0 : i.call(r, {
i18nInstance: n.i18nInstance,
onDisconnect: e
})
}
null === (a = null === (o = t.pendingModal) || void 0 ===
o ? void 0 : o.mount) || void 0 === a || a.call(o),
null === (u = null === (s = t.pendingModal) || void 0 ===
s ? void 0 : s.updateOTPValue) || void 0 === u || u.call(s, e)
}
}
)),
t.connector.on(e.EventType.SDK_RPC_CALL, (e => AS(this,
void 0, void 0, (function*() {
var n, r;
EC("[RemoteConnection: setupListeners() =>
EventType.SDK_RPC_CALL] 'sdk_rpc_call' requestParam", e);
const i = Zx.getProvider()
, o = yield i.request(e);
EC("[RemoteConnection: setupListeners() =>
EventType.SDK_RPC_CALL] 'sdk_rpc_call' result", o),
null === (r = null === (n = t.pendingModal) || void 0 === n ?
void 0 : n.unmount) || void 0 === r || r.call(n)
}
)))),
t.connector.on(e.EventType.AUTHORIZED, ( () => AS(this, void
0, void 0, (function*() {
var e, r, i, o, a;
try {
EC("[RemoteConnection: setupListeners() =>
EventType.AUTHORIZED] 'authorized' closing modals", t.pendingModal, t.installModal),
n.enableAnalytics && (null === (e = t.analytics) || void 0
=== e || e.send({
event: JE.AUTHORIZED
}));
const s = Zx.getProvider();
s._setConnected(),
null === (i = null === (r = t.pendingModal) || void 0 ===
r ? void 0 : r.unmount) || void 0 === i || i.call(r),
null === (a = null === (o = t.installModal) || void 0 === o
? void 0 : o.unmount) || void 0 === a || a.call(o, !1),
t.otpAnswer = void 0,
t.authorized = !0,
EC("[RemoteConnection: setupListeners() =>
EventType.AUTHORIZED] 'authorized' provider.state", s.getState()),
yield s.forceInitializeState()
} catch (e) {
console.log("\ud83d\udfe0 ~ file: setupListeners.ts:107
~ state.connector.on ~ err:", e)
}
}
)))),
t.connector.on(e.EventType.CLIENTS_DISCONNECTED, ( ()
=> {
var n, r, i;
EC(`[RemoteConnection: setupListeners() =>
EventType.CLIENTS_DISCONNECTED] received '$
{e.EventType.CLIENTS_DISCONNECTED}'`),
(null === (n = t.platformManager) || void 0 === n ? void 0 :
n.isSecure()) || (Zx.getProvider().handleDisconnect({
terminate: !1
}),
null === (i = null === (r = t.pendingModal) || void 0 === r ?
void 0 : r.updateOTPValue) || void 0 === i || i.call(r, ""))
}
)),
t.connector.on(e.EventType.TERMINATE, ( () => {
var e, r, i, o, a, s, u, l;
(null === (e = t.connector) || void 0 === e ? void 0 :
e.isAuthorized()) || n.enableAnalytics && (null === (r = t.analytics) || void 0 === r ||
r.send({
event: JE.REJECTED
})),
(null === (i = t.platformManager) || void 0 === i ? void 0 :
i.isBrowser()) ? alert("SDK Connection has been terminated from MetaMask.") :
console.info("SDK Connection has been terminated"),
null === (a = null === (o = t.pendingModal) || void 0 === o ?
void 0 : o.unmount) || void 0 === a || a.call(o),
null === (u = null === (s = t.installModal) || void 0 === s ?
void 0 : s.unmount) || void 0 === u || u.call(s, !0),
t.pendingModal = void 0,
t.installModal = void 0,
t.otpAnswer = void 0,
null === (l = t.connector) || void 0 === l || l.disconnect({
terminate: !0
}),
t.authorized = !1,
Zx.getProvider().handleDisconnect({
terminate: !0
})
}
)))
}(this.state, this.options)
}
startConnection(e) {
return AS(this, void 0, void 0, (function*() {
return wT(this.state, this.options, e)
}
))
}
showActiveModal() {
return function(e) {
var t, n, r, i;
e.authorized ? EC("[RemoteConnection: showActiveModal()]
already authorized") : e.pendingModal ? null === (n = (t = e.pendingModal).mount) ||
void 0 === n || n.call(t) : e.installModal && (null === (i = (r = e.installModal).mount) ||
void 0 === i || i.call(r, e.qrcodeLink || ""))
}(this.state)
}
getUniversalLink() {
if (!this.state.qrcodeLink)
throw new Error("connection not started. run startConnection()
first.");
return this.state.qrcodeLink
}
getChannelConfig() {
var e;
return null === (e = this.state.connector) || void 0 === e ? void 0 :
e.getChannelConfig()
}
getKeyInfo() {
var e;
return null === (e = this.state.connector) || void 0 === e ? void 0 :
e.getKeyInfo()
}
getConnector() {
if (!this.state.connector)
throw new Error("invalid remote connector");
return this.state.connector
}
getPlatformManager() {
if (!this.state.platformManager)
throw new Error("platformManager is not initialized");
return this.state.platformManager
}
isConnected() {
var e;
return (null === (e = this.state.connector) || void 0 === e ? void 0 :
e.isReady()) || !1
}
isAuthorized() {
var e;
return (null === (e = this.state.connector) || void 0 === e ? void 0 :
e.isAuthorized()) || !1
}
isPaused() {
var e;
return null === (e = this.state.connector) || void 0 === e ? void 0 :
e.isPaused()
}
disconnect(e) {
var t, n, r;
EC("[RemoteConnection: disconnect()]", e),
(null == e ? void 0 : e.terminate) &&
(Zx.getProvider().handleDisconnect({
terminate: !0
}),
null === (n = null === (t = this.state.pendingModal) || void 0 === t ?
void 0 : t.unmount) || void 0 === n || n.call(t),
this.state.otpAnswer = void 0),
null === (r = this.state.connector) || void 0 === r || r.disconnect(e)
}
}
const ET = e => AS(void 0, void 0, void 0, (function*() {
const {options: t} = e
, {infuraAPIKey: n} = t;
if (!n)
return;
const r = {
"0x1": `https://mainnet.infura.io/v3/${n}`,
"0x5": `https://goerli.infura.io/v3/${n}`,
"0x2a": `https://sepolia.infura.io/v3/${n}`,
"0xe708": `https://linea-mainnet.infura.io/v3/${n}`,
"0xe704": `https://linea-goerli.infura.io/v3/${n}`,
"0x89": `https://polygon-mainnet.infura.io/v3/${n}`,
"0x13881": `https://polygon-mumbai.infura.io/v3/${n}`,
"0x45": `https://optimism-mainnet.infura.io/v3/${n}`,
"0x1a4": `https://optimism-goerli.infura.io/v3/${n}`,
"0xa4b1": `https://arbitrum-mainnet.infura.io/v3/${n}`,
"0x66eed": `https://arbitrum-goerli.infura.io/v3/${n}`,
"0x2a15c308d": `https://palm-mainnet.infura.io/v3/${n}`,
"0x2a15c3083": `https://palm-testnet.infura.io/v3/${n}`,
"0xa86a": `https://avalanche-mainnet.infura.io/v3/${n}`,
"0xa869": `https://avalanche-fuji.infura.io/v3/${n}`,
"0x4e454152": `https://aurora-mainnet.infura.io/v3/${n}`,
"0x4e454153": `https://aurora-testnet.infura.io/v3/${n}`,
"0x534e5f4d41494e": `https://starknet-mainnet.infura.io/v3/${n}`,
"0x534e5f474f45524c49": `https://starknet-goerli.infura.io/v3/${n}`,
"0x534e5f474f45524c4932": `https://starknet-goerli2.infura.io/v3/$
{n}`,
"0xa4ec": `https://celo-mainnet.infura.io/v3/${n}`,
"0xaef3": `https://celo-alfajores.infura.io/v3/${n}`
};
e.options.readonlyRPCMap ? e.options.readonlyRPCMap =
Object.assign(Object.assign({}, e.options.readonlyRPCMap), r) :
e.options.readonlyRPCMap = r
}
))
, ST = e => AS(void 0, void 0, void 0, (function*() {
const {options: t} = e
, {readonlyRPCMap: n} = t;
if (n)
try {
EC("[MetaMaskSDK: setupReadOnlyRPCProviders()] Setting
up Readonly RPC Providers", n),
e.setReadOnlyRPCCalls(!0)
} catch (e) {
throw new Error("Invalid Infura Settings")
}
}
));
function kT(e) {
return kT = "function" == typeof Symbol && "symbol" == typeof
Symbol.iterator ? function(e) {
return typeof e
}
: function(e) {
return e && "function" == typeof Symbol && e.constructor ===
Symbol && e !== Symbol.prototype ? "symbol" : typeof e
}
,
kT(e)
}
function MT(e) {
var t = function(e, t) {
if ("object" !== kT(e) || null === e)
return e;
var n = e[Symbol.toPrimitive];
if (void 0 !== n) {
var r = n.call(e, t || "default");
if ("object" !== kT(r))
return r;
throw new TypeError("@@toPrimitive must return a primitive
value.")
}
return ("string" === t ? String : Number)(e)
}(e, "string");
return "symbol" === kT(t) ? t : String(t)
}
function CT(e, t) {
for (var n = 0; n < t.length; n++) {
var r = t[n];
r.enumerable = r.enumerable || !1,
r.configurable = !0,
"value"in r && (r.writable = !0),
Object.defineProperty(e, MT(r.key), r)
}
}
var xT = []
, RT = xT.forEach
, TT = xT.slice
, IT = /^[\u0009\u0020-\u007e\u0080-\u00ff]+$/
, PT = function(e, t, n, r) {
var i = arguments.length > 4 && void 0 !== arguments[4] ? arguments[4]
:{
path: "/",
sameSite: "strict"
};
n && (i.expires = new Date,
i.expires.setTime(i.expires.getTime() + 60 * n * 1e3)),
r && (i.domain = r),
document.cookie = function(e, t, n) {
var r = n || {};
r.path = r.path || "/";
var i = encodeURIComponent(t)
, o = "".concat(e, "=").concat(i);
if (r.maxAge > 0) {
var a = r.maxAge - 0;
if (Number.isNaN(a))
throw new Error("maxAge should be a Number");
o += "; Max-Age=".concat(Math.floor(a))
}
if (r.domain) {
if (!IT.test(r.domain))
throw new TypeError("option domain is invalid");
o += "; Domain=".concat(r.domain)
}
if (r.path) {
if (!IT.test(r.path))
throw new TypeError("option path is invalid");
o += "; Path=".concat(r.path)
}
if (r.expires) {
if ("function" != typeof r.expires.toUTCString)
throw new TypeError("option expires is invalid");
o += "; Expires=".concat(r.expires.toUTCString())
}
if (r.httpOnly && (o += "; HttpOnly"),
r.secure && (o += "; Secure"),
r.sameSite)
switch ("string" == typeof r.sameSite ?
r.sameSite.toLowerCase() : r.sameSite) {
case !0:
o += "; SameSite=Strict";
break;
case "lax":
o += "; SameSite=Lax";
break;
case "strict":
o += "; SameSite=Strict";
break;
case "none":
o += "; SameSite=None";
break;
default:
throw new TypeError("option sameSite is invalid")
}
return o
}(e, encodeURIComponent(t), i)
}
, LT = function(e) {
for (var t = "".concat(e, "="), n = document.cookie.split(";"), r = 0; r <
n.length; r++) {
for (var i = n[r]; " " === i.charAt(0); )
i = i.substring(1, i.length);
if (0 === i.indexOf(t))
return i.substring(t.length, i.length)
}
return null
}
, OT = {
name: "cookie",
lookup: function(e) {
var t;
if (e.lookupCookie && "undefined" != typeof document) {
var n = LT(e.lookupCookie);
n && (t = n)
}
return t
},
cacheUserLanguage: function(e, t) {
t.lookupCookie && "undefined" != typeof document &&
PT(t.lookupCookie, e, t.cookieMinutes, t.cookieDomain, t.cookieOptions)
}
}
, NT = {
name: "querystring",
lookup: function(e) {
var t;
if ("undefined" != typeof window) {
var n = window.location.search;
!window.location.search && window.location.hash &&
window.location.hash.indexOf("?") > -1 && (n =
window.location.hash.substring(window.location.hash.indexOf("?")));
for (var r = n.substring(1).split("&"), i = 0; i < r.length; i++) {
var o = r[i].indexOf("=");
o > 0 && r[i].substring(0, o) === e.lookupQuerystring && (t =
r[i].substring(o + 1))
}
}
return t
}
}
, DT = null
, BT = function() {
if (null !== DT)
return DT;
try {
DT = "undefined" !== window && null !== window.localStorage;
var e = "i18next.translate.boo";
window.localStorage.setItem(e, "foo"),
window.localStorage.removeItem(e)
} catch (e) {
DT = !1
}
return DT
}
, jT = {
name: "localStorage",
lookup: function(e) {
var t;
if (e.lookupLocalStorage && BT()) {
var n = window.localStorage.getItem(e.lookupLocalStorage);
n && (t = n)
}
return t
},
cacheUserLanguage: function(e, t) {
t.lookupLocalStorage && BT() &&
window.localStorage.setItem(t.lookupLocalStorage, e)
}
}
, zT = null
, FT = function() {
if (null !== zT)
return zT;
try {
zT = "undefined" !== window && null !== window.sessionStorage;
var e = "i18next.translate.boo";
window.sessionStorage.setItem(e, "foo"),
window.sessionStorage.removeItem(e)
} catch (e) {
zT = !1
}
return zT
}
, UT = {
name: "sessionStorage",
lookup: function(e) {
var t;
if (e.lookupSessionStorage && FT()) {
var n =
window.sessionStorage.getItem(e.lookupSessionStorage);
n && (t = n)
}
return t
},
cacheUserLanguage: function(e, t) {
t.lookupSessionStorage && FT() &&
window.sessionStorage.setItem(t.lookupSessionStorage, e)
}
}
, KT = {
name: "navigator",
lookup: function(e) {
var t = [];
if ("undefined" != typeof navigator) {
if (navigator.languages)
for (var n = 0; n < navigator.languages.length; n++)
t.push(navigator.languages[n]);
navigator.userLanguage && t.push(navigator.userLanguage),
navigator.language && t.push(navigator.language)
}
return t.length > 0 ? t : void 0
}
}
, qT = {
name: "htmlTag",
lookup: function(e) {
var t, n = e.htmlTag || ("undefined" != typeof document ?
document.documentElement : null);
return n && "function" == typeof n.getAttribute && (t =
n.getAttribute("lang")),
t
}
}
, HT = {
name: "path",
lookup: function(e) {
var t;
if ("undefined" != typeof window) {
var n = window.location.pathname.match(/\/([a-zA-Z-]*)/g);
if (n instanceof Array)
if ("number" == typeof e.lookupFromPathIndex) {
if ("string" != typeof n[e.lookupFromPathIndex])
return;
t = n[e.lookupFromPathIndex].replace("/", "")
} else
t = n[0].replace("/", "")
}
return t
}
}
, VT = {
name: "subdomain",
lookup: function(e) {
var t = "number" == typeof e.lookupFromSubdomainIndex ?
e.lookupFromSubdomainIndex + 1 : 1
, n = "undefined" != typeof window && window.location &&
window.location.hostname && window.location.hostname.match(/^(\w{2,5})\.(([a-z0-9-]
{1,63}\.[a-z]{2,6})|localhost)/i);
if (n)
return n[t]
}
}
, WT = function() {
function e(t) {
var n = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : {};
!function(e, t) {
if (!(e instanceof t))
throw new TypeError("Cannot call a class as a function")
}(this, e),
this.type = "languageDetector",
this.detectors = {},
this.init(t, n)
}
var t, n, r;
return t = e,
n = [{
key: "init",
value: function(e) {
var t = arguments.length > 1 && void 0 !== arguments[1] ?
arguments[1] : {}
, n = arguments.length > 2 && void 0 !== arguments[2] ?
arguments[2] : {};
this.services = e || {
languageUtils: {}
},
this.options = function(e) {
return RT.call(TT.call(arguments, 1), (function(t) {
if (t)
for (var n in t)
void 0 === e[n] && (e[n] = t[n])
}
)),
e
}(t, this.options || {}, {
order: ["querystring", "cookie", "localStorage",
"sessionStorage", "navigator", "htmlTag"],
lookupQuerystring: "lng",
lookupCookie: "i18next",
lookupLocalStorage: "i18nextLng",
lookupSessionStorage: "i18nextLng",
caches: ["localStorage"],
excludeCacheFor: ["cimode"],
convertDetectedLanguage: function(e) {
return e
}
}),
"string" == typeof this.options.convertDetectedLanguage &&
this.options.convertDetectedLanguage.indexOf("15897") > -1 &&
(this.options.convertDetectedLanguage = function(e) {
return e.replace("-", "_")
}
),
this.options.lookupFromUrlIndex &&
(this.options.lookupFromPathIndex = this.options.lookupFromUrlIndex),
this.i18nOptions = n,
this.addDetector(OT),
this.addDetector(NT),
this.addDetector(jT),
this.addDetector(UT),
this.addDetector(KT),
this.addDetector(qT),
this.addDetector(HT),
this.addDetector(VT)
}
}, {
key: "addDetector",
value: function(e) {
this.detectors[e.name] = e
}
}, {
key: "detect",
value: function(e) {
var t = this;
e || (e = this.options.order);
var n = [];
return e.forEach((function(e) {
if (t.detectors[e]) {
var r = t.detectors[e].lookup(t.options);
r && "string" == typeof r && (r = [r]),
r && (n = n.concat(r))
}
}
)),
n = n.map((function(e) {
return t.options.convertDetectedLanguage(e)
}
)),
this.services.languageUtils.getBestMatchFromCodes ? n :
n.length > 0 ? n[0] : null
}
}, {
key: "cacheUserLanguage",
value: function(e, t) {
var n = this;
t || (t = this.options.caches),
t && (this.options.excludeCacheFor &&
this.options.excludeCacheFor.indexOf(e) > -1 || t.forEach((function(t) {
n.detectors[t] && n.detectors[t].cacheUserLanguage(e,
n.options)
}
)))
}
}],
n && CT(t.prototype, n),
r && CT(t, r),
Object.defineProperty(t, "prototype", {
writable: !1
}),
e
}();
WT.type = "languageDetector";
var $T = {
DESKTOP: "Desktop",
MOBILE: "Mobile",
META_MASK_MOBILE_APP: "MetaMask mobile app",
SCAN_TO_CONNECT: "Scan to connect and sign with",
CONNECT_WITH_EXTENSION: "Connect With MetaMask Extension",
INSTALL_MODAL: {
TRUSTED_BY_USERS: "Trusted by over 30 million users to buy,
store, send and swap crypto securely",
LEADING_CRYPTO_WALLET: "The leading crypto wallet &
gateway to blockchain apps built on Ethereum Mainnet, Polygon, Optimism, and many
other networks",
CONTROL_DIGITAL_INTERACTIONS: "Puts you in control of your
digital interactions by making power of cryptography more accessible",
INSTALL_META_MASK_EXTENSION: "Install MetaMask
Extension"
},
PENDING_MODAL: {
OPEN_META_MASK_SELECT_CODE: "Please open the
MetaMask wallet app and select the code on the screen OR disconnect",
OPEN_META_MASK_CONTINUE: "Open the MetaMask app to
continue with your session.",
NUMBER_AFTER_OPEN_NOTICE: "If a number doesn't appear
after opening MetaMask, please click disconnect and re-scan the QRCode.",
DISCONNECT: "Disconnect"
},
SELECT_MODAL: {
CRYPTO_TAKE_CONTROL_TEXT: "Take control of your crypto
and explore the blockchain with the wallet trusted by over 30 million people worldwide"
},
META_MASK_MODAL: {
ADDRESS_COPIED: "Address copied to clipboard!",
DISCONNECT: "Disconnect",
ACTIVE_NETWORK: "Active Network"
}
}
, YT = {
DESKTOP: "Escritorio",
MOBILE: "M\xf3vil",
META_MASK_MOBILE_APP: "Aplicaci\xf3n m\xf3vil de MetaMask",
SCAN_TO_CONNECT: "Escanear para conectar y firmar con",
CONNECT_WITH_EXTENSION: "Conectar con la Extensi\xf3n de
MetaMask",
INSTALL_MODAL: {
TRUSTED_BY_USERS: "Confiado por m\xe1s de 30 millones de
usuarios para comprar, almacenar, enviar e intercambiar cripto de manera segura",
LEADING_CRYPTO_WALLET: "La principal billetera de
criptomonedas y pasarela hacia aplicaciones blockchain construidas en Ethereum
Mainnet, Polygon, Optimism y muchas otras redes",
CONTROL_DIGITAL_INTERACTIONS: "Te da el control de tus
interacciones digitales al hacer que el poder de la criptograf\xeda sea m\xe1s
accesible",
INSTALL_META_MASK_EXTENSION: "Instalar la Extensi\xf3n de
MetaMask"
},
PENDING_MODAL: {
OPEN_META_MASK_SELECT_CODE: "Por favor, abre la aplicaci\
xf3n de billetera MetaMask y selecciona el c\xf3digo en la pantalla O desconecta",
OPEN_META_MASK_CONTINUE: "Abre la aplicaci\xf3n de
MetaMask para continuar con tu sesi\xf3n.",
NUMBER_AFTER_OPEN_NOTICE: "Si no aparece un n\xfamero
despu\xe9s de abrir MetaMask, por favor haz clic en desconectar y vuelve a escanear
el c\xf3digo QR.",
DISCONNECT: "Desconectar"
},
SELECT_MODAL: {
CRYPTO_TAKE_CONTROL_TEXT: "Toma el control de tu cripto y
explora la blockchain con la billetera en la que conf\xedan m\xe1s de 30 millones de
personas en todo el mundo"
},
META_MASK_MODAL: {
ADDRESS_COPIED: "\xa1Direcci\xf3n copiada al portapapeles!",
DISCONNECT: "Desconectar",
ACTIVE_NETWORK: "Red activa"
}
}
, QT = {
DESKTOP: "Bureau",
MOBILE: "Mobile",
META_MASK_MOBILE_APP: "Application mobile MetaMask",
SCAN_TO_CONNECT: "Scannez pour vous connecter et signer avec",
CONNECT_WITH_EXTENSION: "Connectez-vous avec l'extension
MetaMask",
INSTALL_MODAL: {
TRUSTED_BY_USERS: "Fait confiance \xe0 plus de 30 millions
d'utilisateurs pour acheter, stocker, envoyer et \xe9changer des crypto en toute s\
xe9curit\xe9",
LEADING_CRYPTO_WALLET: "Le portefeuille crypto leader et la
passerelle vers des applications blockchain bas\xe9es sur Ethereum Mainnet, Polygon,
Optimism, et de nombreux autres r\xe9seaux",
CONTROL_DIGITAL_INTERACTIONS: "Vous donne le contr\xf4le
de vos interactions num\xe9riques en rendant la puissance de la cryptographie plus
accessible",
INSTALL_META_MASK_EXTENSION: "Installez l'extension
MetaMask"
},
PENDING_MODAL: {
OPEN_META_MASK_SELECT_CODE: "Veuillez ouvrir l'application
MetaMask et s\xe9lectionnez le code \xe0 l'\xe9cran OU d\xe9connectez-vous",
OPEN_META_MASK_CONTINUE: "Ouvrez l'application MetaMask
pour continuer votre session.",
NUMBER_AFTER_OPEN_NOTICE: "Si un num\xe9ro n'appara\
xeet pas apr\xe8s avoir ouvert MetaMask, veuillez cliquer sur d\xe9connecter et
rescanner le QRCode.",
DISCONNECT: "D\xe9connecter"
},
SELECT_MODAL: {
CRYPTO_TAKE_CONTROL_TEXT: "Prenez le contr\xf4le de votre
crypto et explorez la blockchain avec le portefeuille fait confiance par plus de 30 millions
de personnes \xe0 travers le monde"
},
META_MASK_MODAL: {
ADDRESS_COPIED: "Adresse copi\xe9e dans le presse-papiers!",
DISCONNECT: "D\xe9connecter",
ACTIVE_NETWORK: "R\xe9seau actif"
}
}
, ZT = {
DESKTOP: "\u05e9\u05d5\u05dc\u05d7\u05df \u05e2\u05d1\u05d5\
u05d3\u05d4",
MOBILE: "\u05e0\u05d9\u05d9\u05d3",
META_MASK_MOBILE_APP: "\u05d0\u05e4\u05dc\u05d9\u05e7\
u05e6\u05d9\u05d9\u05ea \u05de\u05d8\u05d0 \u05de\u05d0\u05e1\u05e7 \u05dc\
u05e0\u05d9\u05d9\u05d3",
SCAN_TO_CONNECT: "\u05e1\u05e8\u05d5\u05e7 \u05db\u05d3\
u05d9 \u05dc\u05d4\u05ea\u05d7\u05d1\u05e8 \u05d5\u05dc\u05d7\u05ea\u05d5\
u05dd \u05e2\u05dd",
CONNECT_WITH_EXTENSION: "\u05d4\u05ea\u05d7\u05d1\u05e8 \
u05e2\u05dd \u05d4\u05ea\u05d5\u05e1\u05e3 \u05e9\u05dc \u05de\u05d8\u05d0 \
u05de\u05d0\u05e1\u05e7",
INSTALL_MODAL: {
TRUSTED_BY_USERS: "\u05de\u05d4\u05d9\u05de\u05e0\
u05d9\u05dd \u05e2\u05dc \u05d9\u05d3\u05d9 \u05dc\u05de\u05e2\u05dc\u05d4 \
u05de-30 \u05de\u05d9\u05dc\u05d9\u05d5\u05df \u05de\u05e9\u05ea\u05de\u05e9\
u05d9\u05dd \u05dc\u05e7\u05e0\u05d5\u05ea, \u05dc\u05d0\u05d7\u05e1\u05df, \
u05dc\u05e9\u05dc\u05d5\u05d7 \u05d5\u05dc\u05d4\u05d7\u05dc\u05d9\u05e3 \
u05de\u05d8\u05d1\u05e2 \u05e7\u05e8\u05d9\u05e4\u05d8\u05d5\u05d2\u05e8\
u05e4\u05d9 \u05d1\u05d1\u05d8\u05d7\u05d4",
LEADING_CRYPTO_WALLET: "\u05d0\u05e8\u05e0\u05e7 \
u05d4\u05e7\u05e8\u05d9\u05e4\u05d8\u05d5 \u05d4\u05de\u05d5\u05d1\u05d9\
u05dc \u05d5\u05d4\u05e9\u05e2\u05e8 \u05dc\u05d9\u05d9\u05e9\u05d5\u05de\
u05d9 \u05d1\u05dc\u05d5\u05e7\u05e6'\u05d9\u05d9\u05df \u05d4\u05de\u05ea\
u05d5\u05db\u05e0\u05ea\u05d9\u05dd \u05e2\u05dc \u05d0\u05ea\u05e8\u05d9\
u05d5\u05dd, \u05e4\u05d5\u05dc\u05d9\u05d2\u05d5\u05df, \u05d5\u05e8\u05e9\
u05ea\u05d5\u05ea \u05e8\u05d1\u05d5\u05ea \u05e0\u05d5\u05e1\u05e4\u05d5\
u05ea",
CONTROL_DIGITAL_INTERACTIONS: "\u05de\u05db\u05e0\
u05d9\u05e1 \u05d0\u05d5\u05ea\u05da \u05dc\u05e9\u05dc\u05d9\u05d8\u05d4 \
u05e2\u05dc \u05d4\u05d0\u05d9\u05e0\u05d8\u05e8\u05d0\u05e7\u05e6\u05d9\
u05d5\u05ea \u05d4\u05d3\u05d9\u05d2\u05d9\u05d8\u05dc\u05d9\u05d5\u05ea \
u05e9\u05dc\u05da \u05e2\u05dc \u05d9\u05d3\u05d9 \u05d4\u05e4\u05d9\u05db\
u05ea \u05db\u05d5\u05d7 \u05d4\u05e7\u05e8\u05d9\u05e4\u05d8\u05d5\u05d2\
u05e8\u05e4\u05d9\u05d4 \u05dc\u05e0\u05d2\u05d9\u05e9 \u05d9\u05d5\u05ea\
u05e8",
INSTALL_META_MASK_EXTENSION: "\u05d4\u05ea\u05e7\u05df
\u05d0\u05ea \u05d4\u05d4\u05e8\u05d7\u05d1\u05d4 \u05e9\u05dc \u05de\u05d8\
u05d0 \u05de\u05d0\u05e1\u05e7"
},
PENDING_MODAL: {
OPEN_META_MASK_SELECT_CODE: "\u05d0\u05e0\u05d0 \
u05e4\u05ea\u05d7 \u05d0\u05ea \u05d0\u05e4\u05dc\u05d9\u05e7\u05e6\u05d9\
u05d9\u05ea \u05d0\u05e8\u05e0\u05e7 \u05de\u05d8\u05d0 \u05de\u05d0\u05e1\
u05e7 \u05d5\u05d1\u05d7\u05e8 \u05d0\u05ea \u05d4\u05e7\u05d5\u05d3 \u05e9\
u05de\u05d5\u05e4\u05d9\u05e2 \u05e2\u05dc \u05d4\u05de\u05e1\u05da \u05d0\
u05d5 \u05d4\u05ea\u05e0\u05ea\u05e7",
OPEN_META_MASK_CONTINUE: "\u05e4\u05ea\u05d7 \u05d0\
u05ea \u05d4\u05d0\u05e4\u05dc\u05d9\u05e7\u05e6\u05d9\u05d4 \u05e9\u05dc \
u05de\u05d8\u05d0 \u05de\u05d0\u05e1\u05e7 \u05db\u05d3\u05d9 \u05dc\u05d4\
u05de\u05e9\u05d9\u05da \u05d1\u05e4\u05e2\u05d5\u05dc\u05d4 \u05e9\u05dc\
u05da.",
NUMBER_AFTER_OPEN_NOTICE: "\u05d0\u05dd \u05de\u05e1\
u05e4\u05e8 \u05d0\u05d9\u05e0\u05d5 \u05de\u05d5\u05e4\u05d9\u05e2 \u05dc\
u05d0\u05d7\u05e8 \u05e4\u05ea\u05d9\u05d7\u05ea \u05de\u05d8\u05d0 \u05de\
u05d0\u05e1\u05e7, \u05d0\u05e0\u05d0 \u05dc\u05d7\u05e5 \u05e2\u05dc \u05d4\
u05ea\u05e0\u05ea\u05e7\u05d5\u05ea \u05d5\u05e1\u05e8\u05d5\u05e7 \u05de\
u05d7\u05d3\u05e9 \u05d0\u05ea \u05d4-QRCode.",
DISCONNECT: "\u05d4\u05ea\u05e0\u05ea\u05e7"
},
SELECT_MODAL: {
CRYPTO_TAKE_CONTROL_TEXT: "\u05e7\u05d7 \u05e9\u05dc\
u05d9\u05d8\u05d4 \u05e2\u05dc \u05d4\u05e7\u05e8\u05d9\u05e4\u05d8\u05d5 \
u05e9\u05dc\u05da \u05d5\u05d7\u05e7\u05d5\u05e8 \u05d0\u05ea \u05d4\u05d1\
u05dc\u05d5\u05e7\u05e6'\u05d9\u05d9\u05df \u05e2\u05dd \u05d4\u05d0\u05e8\
u05e0\u05e7 \u05d4\u05d0\u05de\u05d9\u05df \u05e9\u05d1\u05e9\u05d9\u05de\
u05d5\u05e9 \u05e2\u05dc \u05d9\u05d3\u05d9 \u05dc\u05de\u05e2\u05dc\u05d4 \
u05de-30 \u05de\u05d9\u05dc\u05d9\u05d5\u05df \u05d0\u05e0\u05e9\u05d9\u05dd \
u05d1\u05e8\u05d7\u05d1\u05d9 \u05d4\u05e2\u05d5\u05dc\u05dd"
},
META_MASK_MODAL: {
ADDRESS_COPIED: "\u05d4\u05db\u05ea\u05d5\u05d1\u05ea \
u05d4\u05d5\u05e2\u05ea\u05e7\u05d4 \u05dc\u05dc\u05d5\u05d7!",
DISCONNECT: "\u05d4\u05ea\u05e0\u05ea\u05e7",
ACTIVE_NETWORK: "\u05e8\u05e9\u05ea \u05e4\u05e2\u05d9\
u05dc\u05d4"
}
}
, GT = {
DESKTOP: "Desktop",
MOBILE: "Mobile",
META_MASK_MOBILE_APP: "App mobile MetaMask",
SCAN_TO_CONNECT: "Scansiona per connetterti e firmare con",
CONNECT_WITH_EXTENSION: "Connettiti con l'estensione
MetaMask",
INSTALL_MODAL: {
TRUSTED_BY_USERS: "Ritenuto affidabile da oltre 30 milioni di
utenti per acquistare, conservare, inviare e scambiare cripto in modo sicuro",
LEADING_CRYPTO_WALLET: "Il principale portafoglio cripto e
gateway per applicazioni blockchain funzionanti su Ethereum Mainnet, Polygon,
Optimism e molte altre reti",
CONTROL_DIGITAL_INTERACTIONS: "Ti da il controllo delle tue
interazioni digitali rendendo piu' accessibile il potere della crittografia",
INSTALL_META_MASK_EXTENSION: "Installa l'estensione
MetaMask"
},
PENDING_MODAL: {
OPEN_META_MASK_SELECT_CODE: "Si prega di aprire l'app
mobile MetaMask Wallet e selezionare il codice sullo schermo OPPURE scollegarsi",
OPEN_META_MASK_CONTINUE: "Apri l'app mobile MetaMask
per continuare con la tua sessione.",
NUMBER_AFTER_OPEN_NOTICE: "Se, dopo aver aperto
MetaMask, non appare alcun numero, si prega di fare clic su disconnetti e ris
canzionare il QRCode.",
DISCONNECT: "Disconnetti"
},
SELECT_MODAL: {
CRYPTO_TAKE_CONTROL_TEXT: "Prendi il controllo delle tue
cripto e esplora la blockchain con il portafoglio ritenuto affidabile da oltre 30 milioni di
persone in tutto il mondo"
},
META_MASK_MODAL: {
ADDRESS_COPIED: "Indirizzo copiato negli appunti!",
DISCONNECT: "Disconnetti",
ACTIVE_NETWORK: "Rete attiva"
}
}
, XT = {
DESKTOP: "Desktop",
MOBILE: "M\xf3vel",
META_MASK_MOBILE_APP: "Aplicativo m\xf3vel MetaMask",
SCAN_TO_CONNECT: "Escanear para conectar e assinar com",
CONNECT_WITH_EXTENSION: "Conectar com a extens\xe3o
MetaMask",
INSTALL_MODAL: {
TRUSTED_BY_USERS: "Confiado por mais de 30 milh\xf5es de
usu\xe1rios para comprar, armazenar, enviar e trocar cripto com seguran\xe7a",
LEADING_CRYPTO_WALLET: "A principal carteira de cripto &
portal para aplicativos blockchain constru\xeddos em Ethereum Mainnet, Polygon,
Optimism, e muitas outras redes",
CONTROL_DIGITAL_INTERACTIONS: "Coloca voc\xea no
controle de suas intera\xe7\xf5es digitais, tornando o poder da criptografia mais acess\
xedvel",
INSTALL_META_MASK_EXTENSION: "Instalar a extens\xe3o
MetaMask"
},
PENDING_MODAL: {
OPEN_META_MASK_SELECT_CODE: "Por favor, abra o
aplicativo MetaMask e selecione o c\xf3digo na tela OU desconecte",
OPEN_META_MASK_CONTINUE: "Abra o aplicativo MetaMask
para continuar sua sess\xe3o.",
NUMBER_AFTER_OPEN_NOTICE: "Se um n\xfamero n\xe3o
aparecer ap\xf3s abrir o MetaMask, por favor clique em desconectar e re-escaneie o
QRCode.",
DISCONNECT: "Desconectar"
},
SELECT_MODAL: {
CRYPTO_TAKE_CONTROL_TEXT: "Assuma o controle de sua
cripto e explore a blockchain com a carteira confiada por mais de 30 milh\xf5es de
pessoas em todo o mundo"
},
META_MASK_MODAL: {
ADDRESS_COPIED: "Endere\xe7o copiado para a \xe1rea de
transfer\xeancia!",
DISCONNECT: "Desconectar",
ACTIVE_NETWORK: "Rede ativa"
}
}
, JT = {
DESKTOP: "Masa\xfcst\xfc",
MOBILE: "Mobil",
META_MASK_MOBILE_APP: "MetaMask mobil uygulama",
SCAN_TO_CONNECT: "Ba\u011flanmak ve imzalamak i\xe7in taray\
u0131n",
CONNECT_WITH_EXTENSION: "MetaMask Eklentisi ile Ba\u011flan",
INSTALL_MODAL: {
TRUSTED_BY_USERS: "Kriptoyu g\xfcvenle sat\u0131n almak,
saklamak, g\xf6ndermek ve de\u011fi\u015ftirmek i\xe7in 30 milyondan fazla kullan\
u0131c\u0131 taraf\u0131ndan g\xfcvenilir",
LEADING_CRYPTO_WALLET: "Ethereum Ana A\u011f\u0131,
Polygon, Optimism ve bir\xe7ok di\u011fer a\u011fda kurulu blockchain uygulamalar\
u0131na eri\u015fim sa\u011flayan \xf6nc\xfc kripto c\xfczdan\u0131",
CONTROL_DIGITAL_INTERACTIONS: "Kriptografinin g\xfcc\xfcn\
xfc daha eri\u015filebilir k\u0131larak dijital etkile\u015fimlerinizin kontrol\xfcn\xfc size
verir",
INSTALL_META_MASK_EXTENSION: "MetaMask Eklentisini Y\
xfckleyin"
},
PENDING_MODAL: {
OPEN_META_MASK_SELECT_CODE: "L\xfctfen MetaMask c\
xfczdan uygulamas\u0131n\u0131 a\xe7\u0131n ve ekrandaki kodu se\xe7in YA DA ba\
u011flant\u0131y\u0131 kesin",
OPEN_META_MASK_CONTINUE: "Oturumunuzla devam etmek i\
xe7in MetaMask uygulamas\u0131n\u0131 a\xe7\u0131n.",
NUMBER_AFTER_OPEN_NOTICE: "MetaMask'\u0131 a\xe7t\
u0131ktan sonra bir numara g\xf6r\xfcnmezse, l\xfctfen ba\u011flant\u0131y\u0131
kesin ve QR Kodunu tekrar taray\u0131n.",
DISCONNECT: "Ba\u011flant\u0131y\u0131 Kes"
},
SELECT_MODAL: {
CRYPTO_TAKE_CONTROL_TEXT: "Kriptonuzu kontrol edin ve d\
xfcnya genelinde 30 milyondan fazla ki\u015fi taraf\u0131ndan g\xfcvenilen c\xfczdanla
blockchain'i ke\u015ffedin"
},
META_MASK_MODAL: {
ADDRESS_COPIED: "Adres panoya kopyaland\u0131!",
DISCONNECT: "Ba\u011flant\u0131y\u0131 Kes",
ACTIVE_NETWORK: "Aktif A\u011f"
}
};
function eI(t) {
var n, r, i, o, a, s, u, l, c, d, f;
return AS(this, void 0, void 0, (function*() {
const {options: h} = t;
h.logging = null !== (n = h.logging) && void 0 !== n ? n : {},
h.communicationLayerPreference = null !== (r =
h.communicationLayerPreference) && void 0 !== r ? r :
e.CommunicationLayerPreference.SOCKET,
void 0 !== h.enableDebug && (Pk.enable("MM_SDK"),
console.warn("enableDebug is removed. Please use
enableAnalytics instead.")),
h.enableAnalytics = null === (i = h.enableAnalytics) || void 0 === i ||
i,
h.injectProvider = null === (o = h.injectProvider) || void 0 === o || o,
h.shouldShimWeb3 = null === (a = h.shouldShimWeb3) || void 0
=== a || a,
h.extensionOnly = null === (s = h.extensionOnly) || void 0 === s || s,
h.useDeeplink = null !== (u = h.useDeeplink) && void 0 !== u && u,
h.storage = null !== (l = h.storage) && void 0 !== l ? l : {
enabled: !0
};
const p = !0 === (null === (c = h.logging) || void 0 === c ? void 0 :
c.developerMode);
t.debug = (null === (d = h.logging) || void 0 === d ? void 0 : d.sdk) ||
p,
EC("[MetaMaskSDK: performSDKInitialization()] options", t.options);
const m = Object.assign({}, h.logging);
p && (m.sdk = !0,
m.eciesLayer = !0,
m.keyExchangeLayer = !0,
m.remoteLayer = !0,
m.serviceLayer = !0,
m.plaintext = !0),
yield function(e) {
var t, n, r;
return AS(this, void 0, void 0, (function*() {
const i = null !== (t = e.options.i18nOptions) && void 0 !==
t ? t : {}
, o = i.enabled;
yield e.i18nInstance.use(WT).init({
debug: null !== (n = i.debug) && void 0 !== n && n,
compatibilityJSON: "v3",
fallbackLng: "en",
interpolation: {
escapeValue: !1
},
resources: o ? {
en: {
translation: $T
},
es: {
translation: YT
},
it: {
translation: GT
},
fr: {
translation: QT
},
pt: {
translation: XT
},
tr: {
translation: JT
},
he: {
translation: ZT
}
}:{
en: {
translation: $T
}
},
detection: {
order: ["localStorage", "navigator"],
lookupLocalStorage: "MetaMaskSDKLng",
caches: ["localStorage"]
}
}),
e.availableLanguages = Object.keys(null !== (r =
e.i18nInstance.services.resourceStore.data) && void 0 !== r ? r : {})
}
))
}(t),
yield function(e) {
var t;
return AS(this, void 0, void 0, (function*() {
const {options: n} = e;
e.platformManager = new ER({
useDeepLink: null !== (t = n.useDeeplink) && void 0 !==
t && t,
preferredOpenLink: n.openDeeplink,
wakeLockStatus: n.wakeLockType,
debug: e.debug
})
}
))
}(t),
yield function(e) {
var t, n, r, i, o, a, s, u, l;
return AS(this, void 0, void 0, (function*() {
const {options: c} = e
, d = null === (t = e.platformManager) || void 0 === t ?
void 0 : t.getPlatformType();
e.analytics = new lR({
serverUrl: null !== (n = c.communicationServerUrl) &&
void 0 !== n ? n : KE,
enabled: c.enableAnalytics,
originatorInfo: {
url: null !== (r = c.dappMetadata.url) && void 0 !== r
? r : "",
title: null !== (i = c.dappMetadata.name) && void 0 !
== i ? i : "",
dappId: "undefined" == typeof window || void 0 ===
window.location ? null !== (u = null !== (a = null === (o = c.dappMetadata) || void 0 ===
o ? void 0 : o.name) && void 0 !== a ? a : null === (s = c.dappMetadata) || void 0 ===
s ? void 0 : s.url) && void 0 !== u ? u : "unkown" : window.location.hostname,
platform: null != d ? d : "",
source: null !== (l = c._source) && void 0 !== l ? l :
""
}
})
}
))
}(t),
yield function(e) {
var t;
return AS(this, void 0, void 0, (function*() {
const {options: n} = e;
!0 !== (null === (t = n.storage) || void 0 === t ? void 0 :
t.enabled) || n.storage.storageManager || (n.storage.storageManager = YC(n.storage))
}
))
}(t),
yield function(e) {
return AS(this, void 0, void 0, (function*() {
const {options: t} = e
, n = /^(http|https):\/\/[^\s]*$/;
if (t.dappMetadata) {
t.dappMetadata.iconUrl && !
n.test(t.dappMetadata.iconUrl) && (console.warn("Invalid dappMetadata.iconUrl: URL
must start with http:// or https://"),
t.dappMetadata.iconUrl = void 0),
t.dappMetadata.base64Icon &&
t.dappMetadata.base64Icon.length > dR && (console.warn("Invalid
dappMetadata.base64Icon: Base64-encoded icon string length must be less than
163400 characters"),
t.dappMetadata.base64Icon = void 0),
t.dappMetadata.url && !n.test(t.dappMetadata.url) &&
console.warn("Invalid dappMetadata.url: URL must start with http:// or https://");
const e = cR();
if (e && !t.dappMetadata.iconUrl && !
t.dappMetadata.base64Icon) {
const n = `${window.location.protocol}//$
{window.location.host}${e}`;
t.dappMetadata.iconUrl = n
}
}
e.dappMetadata = t.dappMetadata
}
))
}(t),
yield ET(t),
yield ST(t);
const {metamaskBrowserExtension: g, preferExtension: v,
shouldReturn: b} = yield function(e) {
var t, n, r, i;
return AS(this, void 0, void 0, (function*() {
const {options: o} = e;
let a, s = !1, u = !1;
if ("undefined" != typeof window && window.ethereum && !
(null === (t = e.platformManager) || void 0 === t ? void 0 :
t.isMetaMaskMobileWebView())) {
s = "extension" === localStorage.getItem(qC);
try {
a = yield pR({
mustBeMetaMask: !0,
sdkInstance: e
}),
window.extension = a,
a.on(WC.CHAIN_CHANGED, (t => {
EC(`[MetaMaskSDK:
setupExtensionPreferences()] PROPAGATE chainChanged chainId=${t}`),
Boolean(e.sdkProvider) &&
e.getMobileProvider().emit(WC.CHAIN_CHANGED, t)
}
)),
a.on(WC.ACCOUNTS_CHANGED, (t => {
EC(`[MetaMaskSDK:
setupExtensionPreferences()] PROPAGATE accountsChanged accounts=${t}`);
const n = Boolean(e.sdkProvider)
, r = Boolean(e.extensionActive);
n &&
e.getMobileProvider().emit(WC.ACCOUNTS_CHANGED, t),
r && 0 === (null == t ? void 0 : t.length) &&
e.terminate().catch((e => {
EC("[MetaMaskSDK:
setupExtensionPreferences()] Error terminating", e)
}
))
}
)),
a.on(WC.DISCONNECT, (t => {
EC(`[MetaMaskSDK:
setupExtensionPreferences()] PROPAGATE disconnect error=${t}`),
Boolean(e.sdkProvider) &&
e.getMobileProvider().emit(WC.DISCONNECT, t)
}
)),
a.on(WC.CONNECT, (t => {
EC(`[MetaMaskSDK:
setupExtensionPreferences()] PROPAGATE connect args=${t}`),
Boolean(e.sdkProvider) &&
e.getMobileProvider().emit(WC.CONNECT, t)
}
)),
a.on(WC.CONNECTED, (t => {
EC("[MetaMaskSDK:
setupExtensionPreferences()] PROPAGATE connected", t),
Boolean(e.sdkProvider) &&
e.getMobileProvider().emit(WC.CONNECTED, t)
}
))
} catch (e) {
window.extension = void 0
}
Zx.destroy()
} else
(null === (n = e.platformManager) || void 0 === n ? void
0 : n.isMetaMaskMobileWebView()) && (null === (r = e.analytics) || void 0 === r ||
r.send({
event: JE.SDK_USE_INAPP_BROWSER
}),
e.activeProvider = fR({
provider: window.ethereum,
sdkInstance: e
}),
e._initialized = !0,
u = !0);
return a && o.extensionOnly && (EC("[MetaMaskSDK:
setupExtensionPreferences()] EXTENSION ONLY --- prevent sdk initialization"),
null === (i = e.analytics) || void 0 === i || i.send({
event: JE.SDK_USE_EXTENSION
}),
e.activeProvider = a,
e.extensionActive = !0,
e.extension = a,
e._initialized = !0,
u = !0),
{
preferExtension: s,
shouldReturn: u,
metamaskBrowserExtension: a
}
}
))
}(t);
if (b)
EC("[MetaMaskSDK: performSDKInitialization()]
shouldReturn=true --- prevent sdk initialization");
else {
yield function(t, n) {
var r, i, o, a, s;
return AS(this, void 0, void 0, (function*() {
const {options: u} = t
, l = Object.assign({}, u.logging);
t.remoteConnection = new _T({
i18nInstance: t.i18nInstance,
preferDesktop: null !== (r = u.preferDesktop) &&
void 0 !== r && r,
communicationLayerPreference: null !== (i =
u.communicationLayerPreference) && void 0 !== i ? i :
e.CommunicationLayerPreference.SOCKET,
analytics: t.analytics,
dappMetadata: u.dappMetadata,
_source: u._source,
enableAnalytics: null === (o = u.enableAnalytics) ||
void 0 === o || o,
timer: u.timer,
sdk: t,
platformManager: t.platformManager,
transports: u.transports,
communicationServerUrl:
u.communicationServerUrl,
storage: null !== (a = u.storage) && void 0 !== a ? a
:{
enabled: !0
},
getMetaMaskInstaller: () => {
if (!t.installer)
throw new Error("Invalid SDK status --
installer not initialized");
return t.installer
}
,
logging: l,
connectWithExtensionProvider: void 0 === n ? void
0 : () => Qx(t),
modals: Object.assign(Object.assign({}, u.modals),
{
onPendingModalDisconnect: t.terminate.bind(t)
})
}),
t.installer = new DR({
remote: t.remoteConnection,
preferDesktop: null !== (s = u.preferDesktop) &&
void 0 !== s && s,
platformManager: t.platformManager,
debug: t.debug
})
}
))
}(t, g),
yield iR(t),
yield function(e, t) {
var n, r;
return AS(this, void 0, void 0, (function*() {
const {options: i} = e;
t ? (EC("[MetaMaskSDK:
handleAutoAndExtensionConnections()] preferExtension is detected -- connect with it."),
null === (n = e.analytics) || void 0 === n || n.send({
event: JE.SDK_EXTENSION_UTILIZED
}),
Qx(e).catch((e => {
console.warn("Can't connect with MetaMask
extension...", e),
localStorage.removeItem(qC)
}
))) : i.checkInstallationImmediately && ((null === (r =
e.platformManager) || void 0 === r ? void 0 : r.isDesktopWeb()) ? (EC("[MetaMaskSDK:
handleAutoAndExtensionConnections()] checkInstallationImmediately"),
e.connect().catch((e => {
EC(`[MetaMaskSDK:
handleAutoAndExtensionConnections()] checkInstallationImmediately --- IGNORED ---
error on autoconnect _err=${e}`)
}
))) :
console.warn("[handleAutoAndExtensionConnections()] checkInstallationImmediately ---
IGNORED --- only for web desktop")),
e._initialized = !0
}
))
}(t, v);
try {
yield null === (f = t.remoteConnection) || void 0 === f ? void
0 : f.startConnection({
initialCheck: !0
})
} catch (e) {
console.error("[MetaMaskSDK:
setupRemoteConnectionAndInstaller()] Error while checking installation", e)
}
t.emit(e.EventType.PROVIDER_UPDATE,
e.PROVIDER_UPDATE_TYPE.INITIALIZED)
}
}
))
}
class tI extends GC {
constructor() {
let e = arguments.length > 0 && void 0 !== arguments[0] ?
arguments[0] : {
storage: {
enabled: !0
},
injectProvider: !0,
forceInjectProvider: !1,
enableAnalytics: !0,
shouldShimWeb3: !0,
useDeeplink: !1,
extensionOnly: !0,
dappMetadata: {
name: "",
url: ""
},
_source: Ux,
i18nOptions: {
enabled: !1
}
};
var t, n, r, i;
super(),
this.extensionActive = !1,
this._initialized = !1,
this.sdkInitPromise = void 0,
this.debug = !1,
this.readonlyRPCCalls = !1,
this.i18nInstance = jx(),
this.availableLanguages = ["en"],
Pk.disable();
const o = !0 === (null === (t = e.logging) || void 0 === t ? void 0 :
t.developerMode);
if (((null === (n = e.logging) || void 0 === n ? void 0 : n.sdk) || o) &&
Pk.enable("MM_SDK"),
EC("[MetaMaskSDK: constructor()]: begin."),
this.setMaxListeners(50),
!(null === (r = e.dappMetadata) || void 0 === r ? void 0 : r.name) &&
!(null === (i = e.dappMetadata) || void 0 === i ? void 0 : i.url)) {
if ("undefined" == typeof window || "undefined" == typeof
document)
throw new Error("You must provide dAppMetadata option
(name and/or url)");
e.dappMetadata = {
url: window.location.href,
name: document.title
}
}
this.options = e,
this.options._source || (e._source = Ux),
this.init().then(( () => {
EC("[MetaMaskSDK: constructor()]: initialized successfully."),
"undefined" != typeof window && (window.mmsdk = this)
}
)).catch((e => {
console.error("[MetaMaskSDK: constructor()] error during
initialization", e)
}
))
}
init() {
return AS(this, void 0, void 0, (function*() {
return function(e) {
var t;
return AS(this, void 0, void 0, (function*() {
if ("undefined" != typeof window && (null === (t =
window.mmsdk) || void 0 === t ? void 0 : t.isInitialized()))
return EC("[MetaMaskSDK:
initializeMetaMaskSDK()] already initialized"),
Promise.resolve(window.mmsdk);
if (e._initialized)
return EC("[MetaMaskSDK:
initializeMetaMaskSDK()] already initialized"),
e.sdkInitPromise;
if (e.sdkInitPromise)
return EC("[MetaMaskSDK:
initializeMetaMaskSDK()] already initializing"),
e.sdkInitPromise;
try {
e.sdkInitPromise = eI(e),
yield e.sdkInitPromise
} catch (e) {
throw console.error(e),
e
}
return e.sdkInitPromise
}
))
}(this)
}
))
}
isExtensionActive() {
return this.extensionActive
}
connect() {
return AS(this, void 0, void 0, (function*() {
return function(e) {
return AS(this, void 0, void 0, (function*() {
if (e._initialized || (EC("[MetaMaskSDK: connect()]
provider not ready -- wait for init()"),
yield e.init()),
EC(`[MetaMaskSDK: connect()] isExtensionActive=$
{e.isExtensionActive()} activeProvider`, e.activeProvider),
!e.activeProvider)
throw new Error("SDK state invalid -- undefined
provider");
return e.activeProvider.request({
method: jC.ETH_REQUESTACCOUNTS,
params: []
})
}
))
}(this)
}
))
}
connectAndSign(e) {
let {msg: t} = e;
return AS(this, void 0, void 0, (function*() {
return function(e) {
let {instance: t, msg: n} = e;
return AS(this, void 0, void 0, (function*() {
if (t._initialized || (EC("[MetaMaskSDK:
connectAndSign()] provider not ready -- wait for init()"),
yield t.init()),
EC(`[MetaMaskSDK: connectAndSign()]
activeProvider=${t.activeProvider}`),
!t.activeProvider)
throw new Error("SDK state invalid -- undefined
provider");
return t.activeProvider.request({
method: jC.METAMASK_CONNECTSIGN,
params: [n]
})
}
))
}({
instance: this,
msg: t
})
}
))
}
connectWith(e) {
return AS(this, void 0, void 0, (function*() {
return function(e) {
let {instance: t, rpc: n} = e;
return AS(this, void 0, void 0, (function*() {
if (t._initialized || (EC("[MetaMaskSDK: connectWith()]
provider not ready -- wait for init()"),
yield t.init()),
EC(`[MetaMaskSDK: connectWith()] method: $
{n.method} rpc=${n}`),
!t.activeProvider)
throw new Error("SDK state invalid -- undefined
provider");
return t.activeProvider.request({
method: jC.METAMASK_CONNECTWITH,
params: [n]
})
}
))
}({
instance: this,
rpc: e
})
}
))
}
resume() {
return function(e) {
var t, n, r;
return AS(this, void 0, void 0, (function*() {
if (!(null === (n = null === (t = e.remoteConnection) || void 0
=== t ? void 0 : t.getConnector()) || void 0 === n ? void 0 : n.isReady()))
return EC("[MetaMaskSDK: resume()] channel is not
ready -- starting connection"),
void (null === (r = e.remoteConnection) || void 0 === r ||
r.startConnection());
EC("[MetaMaskSDK: resume()] channel is ready")
}
))
}(this)
}
disconnect() {
return console.warn("MetaMaskSDK.disconnect() is deprecated,
use terminate()"),
this.terminate()
}
isAuthorized() {
var e;
null === (e = this.remoteConnection) || void 0 === e ||
e.isAuthorized()
}
terminate() {
return function(t) {
var n, r, i;
return AS(this, void 0, void 0, (function*() {
if (!(null === (n = t.platformManager) || void 0 === n ? void 0
: n.isMetaMaskMobileWebView())) {
if (Yx && (window.localStorage.removeItem(qC),
window.localStorage.removeItem(VC),
window.localStorage.removeItem(HC)),
t.extensionActive) {
try {
yield null === (r = t.activeProvider) || void 0 ===
r ? void 0 : r.request({
method:
jC.WALLET_REVOKEPERMISSIONS,
params: [{
eth_accounts: {}
}]
})
} catch (e) {
EC("[MetaMaskSDK: terminate()] error revoking
permissions", e)
}
return t.options.extensionOnly ? void
EC("[MetaMaskSDK: terminate()] extensionOnly --- prevent switching providers") :
(t.activeProvider = t.sdkProvider,
window.ethereum = t.activeProvider,
t.extensionActive = !1,
void t.emit(e.EventType.PROVIDER_UPDATE,
e.PROVIDER_UPDATE_TYPE.TERMINATE))
}
t.emit(e.EventType.PROVIDER_UPDATE,
e.PROVIDER_UPDATE_TYPE.TERMINATE),
EC(`[MetaMaskSDK: terminate()] remoteConnection=$
{t.remoteConnection}`),
null === (i = t.remoteConnection) || void 0 === i ||
i.disconnect({
terminate: !0,
sendMessage: !0
})
}
}
))
}(this)
}
isInitialized() {
return this._initialized
}
setReadOnlyRPCCalls(e) {
this.readonlyRPCCalls = e
}
hasReadOnlyRPCCalls() {
return this.readonlyRPCCalls
}
getProvider() {
if (this.activeProvider)
return this.activeProvider;
console.warn("MetaMaskSDK: No active provider found")
}
getMobileProvider() {
if (!this.sdkProvider)
throw new Error("SDK state invalid -- undefined mobile
provider");
return this.sdkProvider
}
getUniversalLink() {
var e;
const t = null === (e = this.remoteConnection) || void 0 === e ? void
0 : e.getUniversalLink();
if (!t)
throw new Error("No Universal Link available, please call
eth_requestAccounts first.");
return t
}
getChannelId() {
var e, t;
return null === (t = null === (e = this.remoteConnection) || void 0
=== e ? void 0 : e.getChannelConfig()) || void 0 === t ? void 0 : t.channelId
}
getRPCHistory() {
var e, t;
return null === (t = null === (e = this.remoteConnection) || void 0
=== e ? void 0 : e.getConnector()) || void 0 === t ? void 0 : t.getRPCMethodTracker()
}
getVersion() {
return Fx
}
getWalletStatus() {
var e, t;
return null === (t = null === (e = this.remoteConnection) || void 0
=== e ? void 0 : e.getConnector()) || void 0 === t ? void 0 : t.getConnectionStatus()
}
_getChannelConfig() {
var e;
return null === (e = this.remoteConnection) || void 0 === e ? void 0 :
e.getChannelConfig()
}
_ping() {
var e, t;
null === (t = null === (e = this.remoteConnection) || void 0 === e ?
void 0 : e.getConnector()) || void 0 === t || t.ping()
}
_keyCheck() {
var e, t;
null === (t = null === (e = this.remoteConnection) || void 0 === e ?
void 0 : e.getConnector()) || void 0 === t || t.keyCheck()
}
_getServiceStatus() {
var e, t;
return null === (t = null === (e = this.remoteConnection) || void 0
=== e ? void 0 : e.getConnector()) || void 0 === t ? void 0 : t.getServiceStatus()
}
_getRemoteConnection() {
return this.remoteConnection
}
_getDappMetadata() {
return this.dappMetadata
}
_getKeyInfo() {
var e;
return null === (e = this.remoteConnection) || void 0 === e ? void 0 :
e.getKeyInfo()
}
_resetKeys() {
var e, t;
null === (t = null === (e = this.remoteConnection) || void 0 === e ?
void 0 : e.getConnector()) || void 0 === t || t.resetKeys()
}
_getConnection() {
return this.remoteConnection
}
}
e.DEFAULT_SERVER_URL = KE,
e.MetaMaskSDK = tI,
e.SDKProvider = QC,
e.default = tI,
Object.defineProperty(e, "__esModule", {
value: !0
})
}(t)
}
}]);