UNPKG

factom-vote

Version:

JS implementation of the Factom voting specification

8 lines 444 kB
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports["factom-vote"]=t():e["factom-vote"]=t()}(window,function(){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=121)}([function(e,t,r){"use strict";(function(e){ /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org> * @license MIT */ var n=r(50),i=r(51),o=r(40);function a(){return u.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError("Invalid typed array length");return u.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=u.prototype:(null===e&&(e=new u(t)),e.length=t),e}function u(e,t,r){if(!(u.TYPED_ARRAY_SUPPORT||this instanceof u))return new u(e,t,r);if("number"==typeof e){if("string"==typeof t)throw new Error("If encoding is specified then the first argument must be a string");return l(this,e)}return c(this,e,t,r)}function c(e,t,r,n){if("number"==typeof t)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,r,n){if(t.byteLength,r<0||t.byteLength<r)throw new RangeError("'offset' is out of bounds");if(t.byteLength<r+(n||0))throw new RangeError("'length' is out of bounds");t=void 0===r&&void 0===n?new Uint8Array(t):void 0===n?new Uint8Array(t,r):new Uint8Array(t,r,n);u.TYPED_ARRAY_SUPPORT?(e=t).__proto__=u.prototype:e=f(e,t);return e}(e,t,r,n):"string"==typeof t?function(e,t,r){"string"==typeof r&&""!==r||(r="utf8");if(!u.isEncoding(r))throw new TypeError('"encoding" must be a valid string encoding');var n=0|p(t,r),i=(e=s(e,n)).write(t,r);i!==n&&(e=e.slice(0,i));return e}(e,t,r):function(e,t){if(u.isBuffer(t)){var r=0|d(t.length);return 0===(e=s(e,r)).length?e:(t.copy(e,0,0,r),e)}if(t){if("undefined"!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||"length"in t)return"number"!=typeof t.length||(n=t.length)!=n?s(e,0):f(e,t);if("Buffer"===t.type&&o(t.data))return f(e,t.data)}var n;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(e,t)}function h(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 l(e,t){if(h(t),e=s(e,t<0?0:0|d(t)),!u.TYPED_ARRAY_SUPPORT)for(var r=0;r<t;++r)e[r]=0;return e}function f(e,t){var r=t.length<0?0:0|d(t.length);e=s(e,r);for(var n=0;n<r;n+=1)e[n]=255&t[n];return e}function d(e){if(e>=a())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a().toString(16)+" bytes");return 0|e}function p(e,t){if(u.isBuffer(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 r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return M(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return $(e).length;default:if(n)return M(e).length;t=(""+t).toLowerCase(),n=!0}}function m(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function v(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:y(e,t,r,n,i);if("number"==typeof t)return t&=255,u.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):y(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function y(e,t,r,n,i){var o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var h=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===u)return h*a}else-1!==h&&(o-=o-h),h=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){for(var l=!0,f=0;f<u;f++)if(c(e,o+f)!==c(t,f)){l=!1;break}if(l)return o}return-1}function g(e,t,r,n){r=Number(r)||0;var i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;var o=t.length;if(o%2!=0)throw new TypeError("Invalid hex string");n>o/2&&(n=o/2);for(var a=0;a<n;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[r+a]=s}return a}function _(e,t,r,n){return V(M(t,e.length-r),e,r,n)}function b(e,t,r,n){return V(function(e){for(var t=[],r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function w(e,t,r,n){return b(e,t,r,n)}function E(e,t,r,n){return V($(t),e,r,n)}function x(e,t,r,n){return V(function(e,t){for(var r,n,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function P(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function S(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i<r;){var o,a,s,u,c=e[i],h=null,l=c>239?4:c>223?3:c>191?2:1;if(i+l<=r)switch(l){case 1:c<128&&(h=c);break;case 2:128==(192&(o=e[i+1]))&&(u=(31&c)<<6|63&o)>127&&(h=u);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(u=(15&c)<<12|(63&o)<<6|63&a)>2047&&(u<55296||u>57343)&&(h=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&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&u<1114112&&(h=u)}null===h?(h=65533,l=1):h>65535&&(h-=65536,n.push(h>>>10&1023|55296),h=56320|1023&h),n.push(h),i+=l}return function(e){var t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}t.Buffer=u,t.SlowBuffer=function(e){+e!=e&&(e=0);return u.alloc(+e)},t.INSPECT_MAX_BYTES=50,u.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&"function"==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),u.poolSize=8192,u._augment=function(e){return e.__proto__=u.prototype,e},u.from=function(e,t,r){return c(null,e,t,r)},u.TYPED_ARRAY_SUPPORT&&(u.prototype.__proto__=Uint8Array.prototype,u.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&u[Symbol.species]===u&&Object.defineProperty(u,Symbol.species,{value:null,configurable:!0})),u.alloc=function(e,t,r){return function(e,t,r,n){return h(t),t<=0?s(e,t):void 0!==r?"string"==typeof n?s(e,t).fill(r,n):s(e,t).fill(r):s(e,t)}(null,e,t,r)},u.allocUnsafe=function(e){return l(null,e)},u.allocUnsafeSlow=function(e){return l(null,e)},u.isBuffer=function(e){return!(null==e||!e._isBuffer)},u.compare=function(e,t){if(!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError("Arguments must be Buffers");if(e===t)return 0;for(var r=e.length,n=t.length,i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.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}},u.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);var r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;var n=u.allocUnsafe(t),i=0;for(r=0;r<e.length;++r){var a=e[r];if(!u.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(n,i),i+=a.length}return n},u.byteLength=p,u.prototype._isBuffer=!0,u.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)m(this,t,t+1);return this},u.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)m(this,t,t+3),m(this,t+1,t+2);return this},u.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)m(this,t,t+7),m(this,t+1,t+6),m(this,t+2,t+5),m(this,t+3,t+4);return this},u.prototype.toString=function(){var e=0|this.length;return 0===e?"":0===arguments.length?S(this,0,e):function(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,r);case"utf8":case"utf-8":return S(this,t,r);case"ascii":return C(this,t,r);case"latin1":case"binary":return R(this,t,r);case"base64":return P(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}.apply(this,arguments)},u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){var e="",r=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString("hex",0,r).match(/.{2}/g).join(" "),this.length>r&&(e+=" ... ")),"<Buffer "+e+">"},u.prototype.compare=function(e,t,r,n,i){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(n,i),h=e.slice(t,r),l=0;l<s;++l)if(c[l]!==h[l]){o=c[l],a=h[l];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return v(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return v(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t|=0,isFinite(r)?(r|=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}var i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var o=!1;;)switch(n){case"hex":return g(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":return b(this,e,t,r);case"latin1":case"binary":return w(this,e,t,r);case"base64":return E(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return x(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var k=4096;function C(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function R(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function A(e,t,r){var n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);for(var i="",o=t;o<r;++o)i+=U(e[o]);return i}function T(e,t,r){for(var n=e.slice(t,r),i="",o=0;o<n.length;o+=2)i+=String.fromCharCode(n[o]+256*n[o+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function O(e,t,r,n,i,o){if(!u.isBuffer(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(r+n>e.length)throw new RangeError("Index out of range")}function F(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-r,2);i<o;++i)e[r+i]=(t&255<<8*(n?i:1-i))>>>8*(n?i:1-i)}function j(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-r,4);i<o;++i)e[r+i]=t>>>8*(n?i:3-i)&255}function D(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function L(e,t,r,n,o){return o||D(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,o){return o||D(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t<e&&(t=e),u.TYPED_ARRAY_SUPPORT)(r=this.subarray(e,t)).__proto__=u.prototype;else{var i=t-e;r=new u(i,void 0);for(var o=0;o<i;++o)r[o]=this[o+e]}return r},u.prototype.readUIntLE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUIntBE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e+--t],i=1;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUInt8=function(e,t){return t||I(e,1,this.length),this[e]},u.prototype.readUInt16LE=function(e,t){return t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUInt16BE=function(e,t){return t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUInt32LE=function(e,t){return t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUInt32BE=function(e,t){return t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=this[e],i=1,o=0;++o<t&&(i*=256);)n+=this[e+o]*i;return n>=(i*=128)&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||I(e,t,this.length);for(var n=t,i=1,o=this[e+--n];n>0&&(i*=256);)o+=this[e+--n]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){t||I(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){t||I(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readFloatLE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUIntBE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||O(this,e,t,r,Math.pow(2,8*r)-1,0);var i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,255,0),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,65535,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):j(this,e,t,!0),t+4},u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,4294967295,0),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<r&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);O(this,e,t,r,i-1,-i)}var o=r-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+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,1,127,-128),u.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):F(this,e,t,!0),t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,2,32767,-32768),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):F(this,e,t,!1),t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),u.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):j(this,e,t,!0),t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||O(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),u.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):j(this,e,t,!1),t+4},u.prototype.writeFloatLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);var i,o=n-r;if(this===e&&r<t&&t<n)for(i=o-1;i>=0;--i)e[i+t]=this[i+r];else if(o<1e3||!u.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+r];else Uint8Array.prototype.set.call(e,this.subarray(r,r+o),t);return o},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n)}else"number"==typeof e&&(e&=255);if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;var o;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(o=t;o<r;++o)this[o]=e;else{var a=u.isBuffer(e)?e:M(new u(e,n).toString()),s=a.length;for(o=0;o<r-t;++o)this[o+t]=a[o%s]}return this};var N=/[^+\/0-9A-Za-z-_]/g;function U(e){return e<16?"0"+e.toString(16):e.toString(16)}function M(e,t){var r;t=t||1/0;for(var n=e.length,i=null,o=[],a=0;a<n;++a){if((r=e.charCodeAt(a))>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function $(e){return n.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(N,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){for(var i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}}).call(this,r(4))},function(e,t,r){"use strict";var n=r(11),i=r(15);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&(!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1)))}function a(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function s(e){return 1===e.length?"0"+e:e}function u(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}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];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)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var a=e.charCodeAt(i);a<128?r[n++]=a:a<2048?(r[n++]=a>>6|192,r[n++]=63&a|128):o(e,i)?(a=65536+((1023&a)<<10)+(1023&e.charCodeAt(++i)),r[n++]=a>>18|240,r[n++]=a>>12&63|128,r[n++]=a>>6&63|128,r[n++]=63&a|128):(r[n++]=a>>12|224,r[n++]=a>>6&63|128,r[n++]=63&a|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=s(e[r].toString(16));return t},t.htonl=a,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=a(i)),r+=u(i.toString(16))}return r},t.zero2=s,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var a=new Array(o/4),s=0,u=t;s<a.length;s++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],a[s]=c>>>0}return a},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,a=(o<n?1:0)+r+i;e[t]=a>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,a,s){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+a+(u+=(c=c+s>>>0)<s?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,a,s){return t+n+o+s>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,a,s,u,c){var h=0,l=t;return h+=(l=l+n>>>0)<t?1:0,h+=(l=l+o>>>0)<o?1:0,h+=(l=l+s>>>0)<s?1:0,e+r+i+a+u+(h+=(l=l+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,a,s,u,c){return t+n+o+s+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},function(e,t,r){!function(e){"use strict";var t=function(e){var t,r=new Float64Array(16);if(e)for(t=0;t<e.length;t++)r[t]=e[t];return r},n=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var a=t(),s=t([1]),u=t([56129,1]),c=t([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),h=t([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),l=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),f=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function p(e,t,r,n){e[t]=r>>24&255,e[t+1]=r>>16&255,e[t+2]=r>>8&255,e[t+3]=255&r,e[t+4]=n>>24&255,e[t+5]=n>>16&255,e[t+6]=n>>8&255,e[t+7]=255&n}function m(e,t,r,n,i){var o,a=0;for(o=0;o<i;o++)a|=e[t+o]^r[n+o];return(1&a-1>>>8)-1}function v(e,t,r,n){return m(e,t,r,n,16)}function y(e,t,r,n){return m(e,t,r,n,32)}function g(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,_=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=o,E=a,x=s,P=u,S=c,k=h,C=l,R=f,A=d,T=p,I=m,O=v,F=y,j=g,D=_,L=b,B=0;B<20;B+=2)w^=(i=(F^=(i=(A^=(i=(S^=(i=w+F|0)<<7|i>>>25)+w|0)<<9|i>>>23)+S|0)<<13|i>>>19)+A|0)<<18|i>>>14,k^=(i=(E^=(i=(j^=(i=(T^=(i=k+E|0)<<7|i>>>25)+k|0)<<9|i>>>23)+T|0)<<13|i>>>19)+j|0)<<18|i>>>14,I^=(i=(C^=(i=(x^=(i=(D^=(i=I+C|0)<<7|i>>>25)+I|0)<<9|i>>>23)+D|0)<<13|i>>>19)+x|0)<<18|i>>>14,L^=(i=(O^=(i=(R^=(i=(P^=(i=L+O|0)<<7|i>>>25)+L|0)<<9|i>>>23)+P|0)<<13|i>>>19)+R|0)<<18|i>>>14,w^=(i=(P^=(i=(x^=(i=(E^=(i=w+P|0)<<7|i>>>25)+w|0)<<9|i>>>23)+E|0)<<13|i>>>19)+x|0)<<18|i>>>14,k^=(i=(S^=(i=(R^=(i=(C^=(i=k+S|0)<<7|i>>>25)+k|0)<<9|i>>>23)+C|0)<<13|i>>>19)+R|0)<<18|i>>>14,I^=(i=(T^=(i=(A^=(i=(O^=(i=I+T|0)<<7|i>>>25)+I|0)<<9|i>>>23)+O|0)<<13|i>>>19)+A|0)<<18|i>>>14,L^=(i=(D^=(i=(j^=(i=(F^=(i=L+D|0)<<7|i>>>25)+L|0)<<9|i>>>23)+F|0)<<13|i>>>19)+j|0)<<18|i>>>14;w=w+o|0,E=E+a|0,x=x+s|0,P=P+u|0,S=S+c|0,k=k+h|0,C=C+l|0,R=R+f|0,A=A+d|0,T=T+p|0,I=I+m|0,O=O+v|0,F=F+y|0,j=j+g|0,D=D+_|0,L=L+b|0,e[0]=w>>>0&255,e[1]=w>>>8&255,e[2]=w>>>16&255,e[3]=w>>>24&255,e[4]=E>>>0&255,e[5]=E>>>8&255,e[6]=E>>>16&255,e[7]=E>>>24&255,e[8]=x>>>0&255,e[9]=x>>>8&255,e[10]=x>>>16&255,e[11]=x>>>24&255,e[12]=P>>>0&255,e[13]=P>>>8&255,e[14]=P>>>16&255,e[15]=P>>>24&255,e[16]=S>>>0&255,e[17]=S>>>8&255,e[18]=S>>>16&255,e[19]=S>>>24&255,e[20]=k>>>0&255,e[21]=k>>>8&255,e[22]=k>>>16&255,e[23]=k>>>24&255,e[24]=C>>>0&255,e[25]=C>>>8&255,e[26]=C>>>16&255,e[27]=C>>>24&255,e[28]=R>>>0&255,e[29]=R>>>8&255,e[30]=R>>>16&255,e[31]=R>>>24&255,e[32]=A>>>0&255,e[33]=A>>>8&255,e[34]=A>>>16&255,e[35]=A>>>24&255,e[36]=T>>>0&255,e[37]=T>>>8&255,e[38]=T>>>16&255,e[39]=T>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=O>>>0&255,e[45]=O>>>8&255,e[46]=O>>>16&255,e[47]=O>>>24&255,e[48]=F>>>0&255,e[49]=F>>>8&255,e[50]=F>>>16&255,e[51]=F>>>24&255,e[52]=j>>>0&255,e[53]=j>>>8&255,e[54]=j>>>16&255,e[55]=j>>>24&255,e[56]=D>>>0&255,e[57]=D>>>8&255,e[58]=D>>>16&255,e[59]=D>>>24&255,e[60]=L>>>0&255,e[61]=L>>>8&255,e[62]=L>>>16&255,e[63]=L>>>24&255}(e,t,r,n)}function _(e,t,r,n){!function(e,t,r,n){for(var i,o=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,a=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,u=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,c=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,h=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,l=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,f=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,p=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,m=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,v=255&r[16]|(255&r[17])<<8|(255&r[18])<<16|(255&r[19])<<24,y=255&r[20]|(255&r[21])<<8|(255&r[22])<<16|(255&r[23])<<24,g=255&r[24]|(255&r[25])<<8|(255&r[26])<<16|(255&r[27])<<24,_=255&r[28]|(255&r[29])<<8|(255&r[30])<<16|(255&r[31])<<24,b=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,w=0;w<20;w+=2)o^=(i=(y^=(i=(d^=(i=(c^=(i=o+y|0)<<7|i>>>25)+o|0)<<9|i>>>23)+c|0)<<13|i>>>19)+d|0)<<18|i>>>14,h^=(i=(a^=(i=(g^=(i=(p^=(i=h+a|0)<<7|i>>>25)+h|0)<<9|i>>>23)+p|0)<<13|i>>>19)+g|0)<<18|i>>>14,m^=(i=(l^=(i=(s^=(i=(_^=(i=m+l|0)<<7|i>>>25)+m|0)<<9|i>>>23)+_|0)<<13|i>>>19)+s|0)<<18|i>>>14,b^=(i=(v^=(i=(f^=(i=(u^=(i=b+v|0)<<7|i>>>25)+b|0)<<9|i>>>23)+u|0)<<13|i>>>19)+f|0)<<18|i>>>14,o^=(i=(u^=(i=(s^=(i=(a^=(i=o+u|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+s|0)<<18|i>>>14,h^=(i=(c^=(i=(f^=(i=(l^=(i=h+c|0)<<7|i>>>25)+h|0)<<9|i>>>23)+l|0)<<13|i>>>19)+f|0)<<18|i>>>14,m^=(i=(p^=(i=(d^=(i=(v^=(i=m+p|0)<<7|i>>>25)+m|0)<<9|i>>>23)+v|0)<<13|i>>>19)+d|0)<<18|i>>>14,b^=(i=(_^=(i=(g^=(i=(y^=(i=b+_|0)<<7|i>>>25)+b|0)<<9|i>>>23)+y|0)<<13|i>>>19)+g|0)<<18|i>>>14;e[0]=o>>>0&255,e[1]=o>>>8&255,e[2]=o>>>16&255,e[3]=o>>>24&255,e[4]=h>>>0&255,e[5]=h>>>8&255,e[6]=h>>>16&255,e[7]=h>>>24&255,e[8]=m>>>0&255,e[9]=m>>>8&255,e[10]=m>>>16&255,e[11]=m>>>24&255,e[12]=b>>>0&255,e[13]=b>>>8&255,e[14]=b>>>16&255,e[15]=b>>>24&255,e[16]=l>>>0&255,e[17]=l>>>8&255,e[18]=l>>>16&255,e[19]=l>>>24&255,e[20]=f>>>0&255,e[21]=f>>>8&255,e[22]=f>>>16&255,e[23]=f>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=p>>>0&255,e[29]=p>>>8&255,e[30]=p>>>16&255,e[31]=p>>>24&255}(e,t,r,n)}var b=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function w(e,t,r,n,i,o,a){var s,u,c=new Uint8Array(16),h=new Uint8Array(64);for(u=0;u<16;u++)c[u]=0;for(u=0;u<8;u++)c[u]=o[u];for(;i>=64;){for(g(h,c,a,b),u=0;u<64;u++)e[t+u]=r[n+u]^h[u];for(s=1,u=8;u<16;u++)s=s+(255&c[u])|0,c[u]=255&s,s>>>=8;i-=64,t+=64,n+=64}if(i>0)for(g(h,c,a,b),u=0;u<i;u++)e[t+u]=r[n+u]^h[u];return 0}function E(e,t,r,n,i){var o,a,s=new Uint8Array(16),u=new Uint8Array(64);for(a=0;a<16;a++)s[a]=0;for(a=0;a<8;a++)s[a]=n[a];for(;r>=64;){for(g(u,s,i,b),a=0;a<64;a++)e[t+a]=u[a];for(o=1,a=8;a<16;a++)o=o+(255&s[a])|0,s[a]=255&o,o>>>=8;r-=64,t+=64}if(r>0)for(g(u,s,i,b),a=0;a<r;a++)e[t+a]=u[a];return 0}function x(e,t,r,n,i){var o=new Uint8Array(32);_(o,n,i,b);for(var a=new Uint8Array(8),s=0;s<8;s++)a[s]=n[s+16];return E(e,t,r,a,o)}function P(e,t,r,n,i,o,a){var s=new Uint8Array(32);_(s,o,a,b);for(var u=new Uint8Array(8),c=0;c<8;c++)u[c]=o[c+16];return w(e,t,r,n,i,u,s)}var S=function(e){var t,r,n,i,o,a,s,u;this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.leftover=0,this.fin=0,t=255&e[0]|(255&e[1])<<8,this.r[0]=8191&t,r=255&e[2]|(255&e[3])<<8,this.r[1]=8191&(t>>>13|r<<3),n=255&e[4]|(255&e[5])<<8,this.r[2]=7939&(r>>>10|n<<6),i=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(n>>>7|i<<9),o=255&e[8]|(255&e[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,a=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(o>>>14|a<<2),s=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(a>>>11|s<<5),u=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(s>>>8|u<<8),this.r[9]=u>>>5&127,this.pad[0]=255&e[16]|(255&e[17])<<8,this.pad[1]=255&e[18]|(255&e[19])<<8,this.pad[2]=255&e[20]|(255&e[21])<<8,this.pad[3]=255&e[22]|(255&e[23])<<8,this.pad[4]=255&e[24]|(255&e[25])<<8,this.pad[5]=255&e[26]|(255&e[27])<<8,this.pad[6]=255&e[28]|(255&e[29])<<8,this.pad[7]=255&e[30]|(255&e[31])<<8};function k(e,t,r,n,i,o){var a=new S(o);return a.update(r,n,i),a.finish(e,t),0}function C(e,t,r,n,i,o){var a=new Uint8Array(16);return k(a,0,r,n,i,o),v(e,t,a,0)}function R(e,t,r,n,i){var o;if(r<32)return-1;for(P(e,0,t,0,r,n,i),k(e,16,e,32,r-32,e),o=0;o<16;o++)e[o]=0;return 0}function A(e,t,r,n,i){var o,a=new Uint8Array(32);if(r<32)return-1;if(x(a,0,32,n,i),0!==C(t,16,t,32,r-32,a))return-1;for(P(e,0,t,0,r,n,i),o=0;o<32;o++)e[o]=0;return 0}function T(e,t){var r;for(r=0;r<16;r++)e[r]=0|t[r]}function I(e){var t,r,n=1;for(t=0;t<16;t++)r=e[t]+n+65535,n=Math.floor(r/65536),e[t]=r-65536*n;e[0]+=n-1+37*(n-1)}function O(e,t,r){for(var n,i=~(r-1),o=0;o<16;o++)n=i&(e[o]^t[o]),e[o]^=n,t[o]^=n}function F(e,r){var n,i,o,a=t(),s=t();for(n=0;n<16;n++)s[n]=r[n];for(I(s),I(s),I(s),i=0;i<2;i++){for(a[0]=s[0]-65517,n=1;n<15;n++)a[n]=s[n]-65535-(a[n-1]>>16&1),a[n-1]&=65535;a[15]=s[15]-32767-(a[14]>>16&1),o=a[15]>>16&1,a[14]&=65535,O(s,a,1-o)}for(n=0;n<16;n++)e[2*n]=255&s[n],e[2*n+1]=s[n]>>8}function j(e,t){var r=new Uint8Array(32),n=new Uint8Array(32);return F(r,e),F(n,t),y(r,0,n,0)}function D(e){var t=new Uint8Array(32);return F(t,e),1&t[0]}function L(e,t){var r;for(r=0;r<16;r++)e[r]=t[2*r]+(t[2*r+1]<<8);e[15]&=32767}function B(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]+r[n]}function N(e,t,r){for(var n=0;n<16;n++)e[n]=t[n]-r[n]}function U(e,t,r){var n,i,o=0,a=0,s=0,u=0,c=0,h=0,l=0,f=0,d=0,p=0,m=0,v=0,y=0,g=0,_=0,b=0,w=0,E=0,x=0,P=0,S=0,k=0,C=0,R=0,A=0,T=0,I=0,O=0,F=0,j=0,D=0,L=r[0],B=r[1],N=r[2],U=r[3],M=r[4],$=r[5],V=r[6],H=r[7],q=r[8],z=r[9],K=r[10],Q=r[11],Y=r[12],W=r[13],X=r[14],G=r[15];o+=(n=t[0])*L,a+=n*B,s+=n*N,u+=n*U,c+=n*M,h+=n*$,l+=n*V,f+=n*H,d+=n*q,p+=n*z,m+=n*K,v+=n*Q,y+=n*Y,g+=n*W,_+=n*X,b+=n*G,a+=(n=t[1])*L,s+=n*B,u+=n*N,c+=n*U,h+=n*M,l+=n*$,f+=n*V,d+=n*H,p+=n*q,m+=n*z,v+=n*K,y+=n*Q,g+=n*Y,_+=n*W,b+=n*X,w+=n*G,s+=(n=t[2])*L,u+=n*B,c+=n*N,h+=n*U,l+=n*M,f+=n*$,d+=n*V,p+=n*H,m+=n*q,v+=n*z,y+=n*K,g+=n*Q,_+=n*Y,b+=n*W,w+=n*X,E+=n*G,u+=(n=t[3])*L,c+=n*B,h+=n*N,l+=n*U,f+=n*M,d+=n*$,p+=n*V,m+=n*H,v+=n*q,y+=n*z,g+=n*K,_+=n*Q,b+=n*Y,w+=n*W,E+=n*X,x+=n*G,c+=(n=t[4])*L,h+=n*B,l+=n*N,f+=n*U,d+=n*M,p+=n*$,m+=n*V,v+=n*H,y+=n*q,g+=n*z,_+=n*K,b+=n*Q,w+=n*Y,E+=n*W,x+=n*X,P+=n*G,h+=(n=t[5])*L,l+=n*B,f+=n*N,d+=n*U,p+=n*M,m+=n*$,v+=n*V,y+=n*H,g+=n*q,_+=n*z,b+=n*K,w+=n*Q,E+=n*Y,x+=n*W,P+=n*X,S+=n*G,l+=(n=t[6])*L,f+=n*B,d+=n*N,p+=n*U,m+=n*M,v+=n*$,y+=n*V,g+=n*H,_+=n*q,b+=n*z,w+=n*K,E+=n*Q,x+=n*Y,P+=n*W,S+=n*X,k+=n*G,f+=(n=t[7])*L,d+=n*B,p+=n*N,m+=n*U,v+=n*M,y+=n*$,g+=n*V,_+=n*H,b+=n*q,w+=n*z,E+=n*K,x+=n*Q,P+=n*Y,S+=n*W,k+=n*X,C+=n*G,d+=(n=t[8])*L,p+=n*B,m+=n*N,v+=n*U,y+=n*M,g+=n*$,_+=n*V,b+=n*H,w+=n*q,E+=n*z,x+=n*K,P+=n*Q,S+=n*Y,k+=n*W,C+=n*X,R+=n*G,p+=(n=t[9])*L,m+=n*B,v+=n*N,y+=n*U,g+=n*M,_+=n*$,b+=n*V,w+=n*H,E+=n*q,x+=n*z,P+=n*K,S+=n*Q,k+=n*Y,C+=n*W,R+=n*X,A+=n*G,m+=(n=t[10])*L,v+=n*B,y+=n*N,g+=n*U,_+=n*M,b+=n*$,w+=n*V,E+=n*H,x+=n*q,P+=n*z,S+=n*K,k+=n*Q,C+=n*Y,R+=n*W,A+=n*X,T+=n*G,v+=(n=t[11])*L,y+=n*B,g+=n*N,_+=n*U,b+=n*M,w+=n*$,E+=n*V,x+=n*H,P+=n*q,S+=n*z,k+=n*K,C+=n*Q,R+=n*Y,A+=n*W,T+=n*X,I+=n*G,y+=(n=t[12])*L,g+=n*B,_+=n*N,b+=n*U,w+=n*M,E+=n*$,x+=n*V,P+=n*H,S+=n*q,k+=n*z,C+=n*K,R+=n*Q,A+=n*Y,T+=n*W,I+=n*X,O+=n*G,g+=(n=t[13])*L,_+=n*B,b+=n*N,w+=n*U,E+=n*M,x+=n*$,P+=n*V,S+=n*H,k+=n*q,C+=n*z,R+=n*K,A+=n*Q,T+=n*Y,I+=n*W,O+=n*X,F+=n*G,_+=(n=t[14])*L,b+=n*B,w+=n*N,E+=n*U,x+=n*M,P+=n*$,S+=n*V,k+=n*H,C+=n*q,R+=n*z,A+=n*K,T+=n*Q,I+=n*Y,O+=n*W,F+=n*X,j+=n*G,b+=(n=t[15])*L,a+=38*(E+=n*N),s+=38*(x+=n*U),u+=38*(P+=n*M),c+=38*(S+=n*$),h+=38*(k+=n*V),l+=38*(C+=n*H),f+=38*(R+=n*q),d+=38*(A+=n*z),p+=38*(T+=n*K),m+=38*(I+=n*Q),v+=38*(O+=n*Y),y+=38*(F+=n*W),g+=38*(j+=n*X),_+=38*(D+=n*G),o=(n=(o+=38*(w+=n*B))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o=(n=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(n/65536)),a=(n=a+i+65535)-65536*(i=Math.floor(n/65536)),s=(n=s+i+65535)-65536*(i=Math.floor(n/65536)),u=(n=u+i+65535)-65536*(i=Math.floor(n/65536)),c=(n=c+i+65535)-65536*(i=Math.floor(n/65536)),h=(n=h+i+65535)-65536*(i=Math.floor(n/65536)),l=(n=l+i+65535)-65536*(i=Math.floor(n/65536)),f=(n=f+i+65535)-65536*(i=Math.floor(n/65536)),d=(n=d+i+65535)-65536*(i=Math.floor(n/65536)),p=(n=p+i+65535)-65536*(i=Math.floor(n/65536)),m=(n=m+i+65535)-65536*(i=Math.floor(n/65536)),v=(n=v+i+65535)-65536*(i=Math.floor(n/65536)),y=(n=y+i+65535)-65536*(i=Math.floor(n/65536)),g=(n=g+i+65535)-65536*(i=Math.floor(n/65536)),_=(n=_+i+65535)-65536*(i=Math.floor(n/65536)),b=(n=b+i+65535)-65536*(i=Math.floor(n/65536)),o+=i-1+37*(i-1),e[0]=o,e[1]=a,e[2]=s,e[3]=u,e[4]=c,e[5]=h,e[6]=l,e[7]=f,e[8]=d,e[9]=p,e[10]=m,e[11]=v,e[12]=y,e[13]=g,e[14]=_,e[15]=b}function M(e,t){U(e,t,t)}function $(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=253;n>=0;n--)M(i,i),2!==n&&4!==n&&U(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}function V(e,r,n){var i,o,a=new Uint8Array(32),s=new Float64Array(80),c=t(),h=t(),l=t(),f=t(),d=t(),p=t();for(o=0;o<31;o++)a[o]=r[o];for(a[31]=127&r[31]|64,a[0]&=248,L(s,n),o=0;o<16;o++)h[o]=s[o],f[o]=c[o]=l[o]=0;for(c[0]=f[0]=1,o=254;o>=0;--o)O(c,h,i=a[o>>>3]>>>(7&o)&1),O(l,f,i),B(d,c,l),N(c,c,l),B(l,h,f),N(h,h,f),M(f,d),M(p,c),U(c,l,c),U(l,h,d),B(d,c,l),N(c,c,l),M(h,c),N(l,f,p),U(c,l,u),B(c,c,f),U(l,l,c),U(c,f,p),U(f,h,s),M(h,d),O(c,h,i),O(l,f,i);for(o=0;o<16;o++)s[o+16]=c[o],s[o+32]=l[o],s[o+48]=h[o],s[o+64]=f[o];var m=s.subarray(32),v=s.subarray(16);return $(m,m),U(v,v,m),F(e,v),0}function H(e,t){return V(e,t,o)}function q(e,t){return n(t,32),H(e,t)}function z(e,t,r){var n=new Uint8Array(32);return V(n,r,t),_(e,i,n,b)}S.prototype.blocks=function(e,t,r){for(var n,i,o,a,s,u,c,h,l,f,d,p,m,v,y,g,_,b,w,E=this.fin?0:2048,x=this.h[0],P=this.h[1],S=this.h[2],k=this.h[3],C=this.h[4],R=this.h[5],A=this.h[6],T=this.h[7],I=this.h[8],O=this.h[9],F=this.r[0],j=this.r[1],D=this.r[2],L=this.r[3],B=this.r[4],N=this.r[5],U=this.r[6],M=this.r[7],$=this.r[8],V=this.r[9];r>=16;)f=l=0,f+=(x+=8191&(n=255&e[t+0]|(255&e[t+1])<<8))*F,f+=(P+=8191&(n>>>13|(i=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*V),f+=(S+=8191&(i>>>10|(o=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*$),f+=(k+=8191&(o>>>7|(a=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*M),l=(f+=(C+=8191&(a>>>4|(s=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*U))>>>13,f&=8191,f+=(R+=s>>>1&8191)*(5*N),f+=(A+=8191&(s>>>14|(u=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),f+=(T+=8191&(u>>>11|(c=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*L),f+=(I+=8191&(c>>>8|(h=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*D),d=l+=(f+=(O+=h>>>5|E)*(5*j))>>>13,d+=x*j,d+=P*F,d+=S*(5*V),d+=k*(5*$),l=(d+=C*(5*M))>>>13,d&=8191,d+=R*(5*U),d+=A*(5*N),d+=T*(5*B),d+=I*(5*L),l+=(d+=O*(5*D))>>>13,d&=8191,p=l,p+=x*D,p+=P*j,p+=S*F,p+=k*(5*V),l=(p+=C*(5*$))>>>13,p&=8191,p+=R*(5*M),p+=A*(5*U),p+=T*(5*N),p+=I*(5*B),m=l+=(p+=O*(5*L))>>>13,m+=x*L,m+=P*D,m+=S*j,m+=k*F,l=(m+=C*(5*V))>>>13,m&=8191,m+=R*(5*$),m+=A*(5*M),m+=T*(5*U),m+=I*(5*N),v=l+=(m+=O*(5*B))>>>13,v+=x*B,v+=P*L,v+=S*D,v+=k*j,l=(v+=C*F)>>>13,v&=8191,v+=R*(5*V),v+=A*(5*$),v+=T*(5*M),v+=I*(5*U),y=l+=(v+=O*(5*N))>>>13,y+=x*N,y+=P*B,y+=S*L,y+=k*D,l=(y+=C*j)>>>13,y&=8191,y+=R*F,y+=A*(5*V),y+=T*(5*$),y+=I*(5*M),g=l+=(y+=O*(5*U))>>>13,g+=x*U,g+=P*N,g+=S*B,g+=k*L,l=(g+=C*D)>>>13,g&=8191,g+=R*j,g+=A*F,g+=T*(5*V),g+=I*(5*$),_=l+=(g+=O*(5*M))>>>13,_+=x*M,_+=P*U,_+=S*N,_+=k*B,l=(_+=C*L)>>>13,_&=8191,_+=R*D,_+=A*j,_+=T*F,_+=I*(5*V),b=l+=(_+=O*(5*$))>>>13,b+=x*$,b+=P*M,b+=S*U,b+=k*N,l=(b+=C*B)>>>13,b&=8191,b+=R*L,b+=A*D,b+=T*j,b+=I*F,w=l+=(b+=O*(5*V))>>>13,w+=x*V,w+=P*$,w+=S*M,w+=k*U,l=(w+=C*N)>>>13,w&=8191,w+=R*B,w+=A*L,w+=T*D,w+=I*j,x=f=8191&(l=(l=((l+=(w+=O*F)>>>13)<<2)+l|0)+(f&=8191)|0),P=d+=l>>>=13,S=p&=8191,k=m&=8191,C=v&=8191,R=y&=8191,A=g&=8191,T=_&=8191,I=b&=8191,O=w&=8191,t+=16,r-=16;this.h[0]=x,this.h[1]=P,this.h[2]=S,this.h[3]=k,this.h[4]=C,this.h[5]=R,this.h[6]=A,this.h[7]=T,this.h[8]=I,this.h[9]=O},S.prototype.finish=function(e,t){var r,n,i,o,a=new Uint16Array(10);if(this.leftover){for(o=this.leftover,this.buffer[o++]=1;o<16;o++)this.buffer[o]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(r=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=r,r=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*r,r=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=r,r=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=r,a[0]=this.h[0]+5,r=a[0]>>>13,a[0]&=8191,o=1;o<10;o++)a[o]=this.h[o]+r,r=a[o]>>>13,a[o]&=8191;for(a[9]-=8192,n=(1^r)-1,o=0;o<10;o++)a[o]&=n;for(n=~n,o=0;o<10;o++)this.h[o]=this.h[o]&n|a[o];for(this.h[0]=65535&(this.h[0]|this.h[1]<<13),this.h[1]=65535&(this.h[1]>>>3|this.h[2]<<10),this.h[2]=65535&(this.h[2]>>>6|this.h[3]<<7),this.h[3]=65535&(this.h[3]>>>9|this.h[4]<<4),this.h[4]=65535&(this.h[4]>>>12|this.h[5]<<1|this.h[6]<<14),this.h[5]=65535&(this.h[6]>>>2|this.h[7]<<11),this.h[6]=65535&(this.h[7]>>>5|this.h[8]<<8),this.h[7]=65535&(this.h[8]>>>8|this.h[9]<<5),i=this.h[0]+this.pad[0],this.h[0]=65535&i,o=1;o<8;o++)i=(this.h[o]+this.pad[o]|0)+(i>>>16)|0,this.h[o]=65535&i;e[t+0]=this.h[0]>>>0&255,e[t+1]=this.h[0]>>>8&255,e[t+2]=this.h[1]>>>0&255,e[t+3]=this.h[1]>>>8&255,e[t+4]=this.h[2]>>>0&255,e[t+5]=this.h[2]>>>8&255,e[t+6]=this.h[3]>>>0&255,e[t+7]=this.h[3]>>>8&255,e[t+8]=this.h[4]>>>0&255,e[t+9]=this.h[4]>>>8&255,e[t+10]=this.h[5]>>>0&255,e[t+11]=this.h[5]>>>8&255,e[t+12]=this.h[6]>>>0&255,e[t+13]=this.h[6]>>>8&255,e[t+14]=this.h[7]>>>0&255,e[t+15]=this.h[7]>>>8&255},S.prototype.update=function(e,t,r){var n,i;if(this.leftover){for((i=16-this.leftover)>r&&(i=r),n=0;n<i;n++)this.buffer[this.leftover+n]=e[t+n];if(r-=i,t+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(r>=16&&(i=r-r%16,this.blocks(e,t,i),t+=i,r-=i),r){for(n=0;n<r;n++)this.buffer[this.leftover+n]=e[t+n];this.leftover+=r}};var K=R,Q=A;var Y=[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 W(e,t,r,n){for(var i,o,a,s,u,c,h,l,f,d,p,m,v,y,g,_,b,w,E,x,P,S,k,C,R,A,T=new Int32Array(16),I=new Int32Array(16),O=e[0],F=e[1],j=e[2],D=e[3],L=e[4],B=e[5],N=e[6],U=e[7],M=t[0],$=t[1],V=t[2],H=t[3],q=t[4],z=t[5],K=t[6],Q=t[7],W=0;n>=128;){for(E=0;E<16;E++)x=8*E+W,T[E]=r[x+0]<<24|r[x+1]<<16|r[x+2]<<8|r[x+3],I[E]=r[x+4]<<24|r[x+5]<<16|r[x+6]<<8|r[x+7];for(E=0;E<80;E++)if(i=O,o=F,a=j,s=D,u=L,c=B,h=N,U,f=M,d=$,p=V,m=H,v=q,y=z,g=K,Q,k=65535&(S=Q),C=S>>>16,R=65535&(P=U),A=P>>>16,k+=65535&(S=(q>>>14|L<<18)^(q>>>18|L<<14)^(L>>>9|q<<23)),C+=S>>>16,R+=65535&(P=(L>>>14|q<<18)^(L>>>18|q<<14)^(q>>>9|L<<23)),A+=P>>>16,k+=65535&(S=q&z^~q&K),C+=S>>>16,R+=65535&(P=L&B^~L&N),A+=P>>>16,P=Y[2*E],k+=65535&(S=Y[2*E+1]),C+=S>>>16,R+=65535&P,A+=P>>>16,P=T[E%16],C+=(S=I[E%16])>>>16,R+=65535&P,A+=P>>>16,R+=(C+=(k+=65535&S)>>>16)>>>16,k=65535&(S=w=65535&k|C<<16),C=S>>>16,R=65535&(P=b=65535&R|(A+=R>>>16)<<16),A=P>>>16,k+=65535&(S=(M>>>28|O<<4)^(O>>>2|M<<30)^(O>>>7|M<<25)),C+=S>>>16,R+=65535&(P=(O>>>28|M<<4)^(M>>>2|O<<30)^(M>>>7|O<<25)),A+=P>>>16,C+=(S=M&$^M&V^$&V)>>>16,R+=65535&(P=O&F^O&j^F&j),A+=P>>>16,l=65535&(R+=(C+=(k+=65535&S)>>>16)>>>16)|(A+=R>>>16)<<16,_=65535&k|C<<16,k=65535&(S=m),C=S>>>16,R=65535&(P=s),A=P>>>16,C+=(S=w)>>>16,R+=65535&(P=b),A+=P>>>16,F=i,j=o,D=a,L=s=65535&(R+=(C+=(k+=65535&S)>>>16)>>>16)|(A+=R>>>16)<<16,B=u,N=c,U=h,O=l,$=f,V=d,H=p,q=m=65535&k|C<<16,z=v,K=y,Q=g,M=_,E%16==15)for(x=0;x<16;x++)P=T[x],k=65535&(S=I[x]),C=S>>>16,R=65535&P,A=P>>>16,P=T[(x+9)%16],k+=65535&(S=I[(x+9)%16]),C+=S>>>16,R+=65535&P,A+=P>>>16,b=T[(x+1)%16],k+=65535&(S=((w=I[(x+1)%16])>>>1|b<<31)^(w>>>8|b<<24)^(w>>>7|b<<25)),C+=S>>>16,R+=65535&(P=(b>>>1|w<<31)^(b>>>8|w<<24)^b>>>7),A+=P>>>16,b=T[(x+14)%16],C+=(S=((w=I[(x+14)%16])>>>19|b<<13)^(b>>>29|w<<3)^(w>>>6|b<<26))>>>16,R+=65535&(P=(b>>>19|w<<13)^(w>>>29|b<<3)^b>>>6),A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,T[x]=65535&R|A<<16,I[x]=65535&k|C<<16;k=65535&(S=M),C=S>>>16,R=65535&(P=O),A=P>>>16,P=e[0],C+=(S=t[0])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[0]=O=65535&R|A<<16,t[0]=M=65535&k|C<<16,k=65535&(S=$),C=S>>>16,R=65535&(P=F),A=P>>>16,P=e[1],C+=(S=t[1])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[1]=F=65535&R|A<<16,t[1]=$=65535&k|C<<16,k=65535&(S=V),C=S>>>16,R=65535&(P=j),A=P>>>16,P=e[2],C+=(S=t[2])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[2]=j=65535&R|A<<16,t[2]=V=65535&k|C<<16,k=65535&(S=H),C=S>>>16,R=65535&(P=D),A=P>>>16,P=e[3],C+=(S=t[3])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[3]=D=65535&R|A<<16,t[3]=H=65535&k|C<<16,k=65535&(S=q),C=S>>>16,R=65535&(P=L),A=P>>>16,P=e[4],C+=(S=t[4])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[4]=L=65535&R|A<<16,t[4]=q=65535&k|C<<16,k=65535&(S=z),C=S>>>16,R=65535&(P=B),A=P>>>16,P=e[5],C+=(S=t[5])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[5]=B=65535&R|A<<16,t[5]=z=65535&k|C<<16,k=65535&(S=K),C=S>>>16,R=65535&(P=N),A=P>>>16,P=e[6],C+=(S=t[6])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[6]=N=65535&R|A<<16,t[6]=K=65535&k|C<<16,k=65535&(S=Q),C=S>>>16,R=65535&(P=U),A=P>>>16,P=e[7],C+=(S=t[7])>>>16,R+=65535&P,A+=P>>>16,A+=(R+=(C+=(k+=65535&S)>>>16)>>>16)>>>16,e[7]=U=65535&R|A<<16,t[7]=Q=65535&k|C<<16,W+=128,n-=128}return n}function X(e,t,r){var n,i=new Int32Array(8),o=new Int32Array(8),a=new Uint8Array(256),s=r;for(i[0]=1779033703,i[1]=3144134277,i[2]=1013904242,i[3]=2773480762,i[4]=1359893119,i[5]=2600822924,i[6]=528734635,i[7]=1541459225,o[0]=4089235720,o[1]=2227873595,o[2]=4271175723,o[3]=1595750129,o[4]=2917565137,o[5]=725511199,o[6]=4215389547,o[7]=327033209,W(i,o,t,r),r%=128,n=0;n<r;n++)a[n]=t[s-r+n];for(a[r]=128,a[(r=256-128*(r<112?1:0))-9]=0,p(a,r-8,s/536870912|0,s<<3),W(i,o,a,r),n=0;n<8;n++)p(e,8*n,i[n],o[n]);return 0}function G(e,r){var n=t(),i=t(),o=t(),a=t(),s=t(),u=t(),c=t(),l=t(),f=t();N(n,e[1],e[0]),N(f,r[1],r[0]),U(n,n,f),B(i,e[0],e[1]),B(f,r[0],r[1]),U(i,i,f),U(o,e[3],r[3]),U(o,o,h),U(a,e[2],r[2]),B(a,a,a),N(s,i,n),N(u,a,o),B(c,a,o),B(l,i,n),U(e[0],s,u),U(e[1],l,c),U(e[2],c,u),U(e[3],s,l)}function J(e,t,r){var n;for(n=0;n<4;n++)O(e[n],t[n],r)}function Z(e,r){var n=t(),i=t(),o=t();$(o,r[2]),U(n,r[0],o),U(i,r[1],o),F(e,i),e[31]^=D(n)<<7}function ee(e,t,r){var n,i;for(T(e[0],a),T(e[1],s),T(e[2],s),T(e[3],a),i=255;i>=0;--i)J(e,t,n=r[i/8|0]>>(7&i)&1),G(t,e),G(e,e),J(e,t,n)}function te(e,r){var n=[t(),t(),t(),t()];T(n[0],l),T(n[1],f),T(n[2],s),U(n[3],l,f),ee(e,n,r)}function re(e,r,i){var o,a=new Uint8Array(64),s=[t(),t(),t(),t()];for(i||n(r,32),X(a,r,32),a[0]&=248,a[31]&=127,a[31]|=64,te(s,a),Z(e,s),o=0;o<32;o++)r[o+32]=e[o];return 0}var ne=new Float64Array([237,211,245,92,26,99,18,88,214,156,247,162,222,249,222,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,16]);function ie(e,t){var r,n,i,o;for(n=63;n>=32;--n){for(r=0,i=n-32,o=n-12;i<o;++i)t[i]+=r-16*t[n]*ne[i-(n-32)],r=t[i]+128>>8,t[i]-=256*r;t[i]+=r,t[n]=0}for(r=0,i=0;i<32;i++)t[i]+=r-(t[31]>>4)*ne[i],r=t[i]>>8,t[i]&=255;for(i=0;i<32;i++)t[i]-=r*ne[i];for(n=0;n<32;n++)t[n+1]+=t[n]>>8,e[n]=255&t[n]}function oe(e){var t,r=new Float64Array(64);for(t=0;t<64;t++)r[t]=e[t];for(t=0;t<64;t++)e[t]=0;ie(e,r)}function ae(e,r,n,i){var o,a,s=new Uint8Array(64),u=new Uint8Array(64),c=new Uint8Array(64),h=new Float64Array(64),l=[t(),t(),t(),t()];X(s,i,32),s[0]&=248,s[31]&=127,s[31]|=64;var f=n+64;for(o=0;o<n;o++)e[64+o]=r[o];for(o=0;o<32;o++)e[32+o]=s[32+o];for(X(c,e.subarray(32),n+32),oe(c),te(l,c),Z(e,l),o=32;o<64;o++)e[o]=i[o];for(X(u,e,n+64),oe(u),o=0;o<64;o++)h[o]=0;for(o=0;o<32;o++)h[o]=c[o];for(o=0;o<32;o++)for(a=0;a<32;a++)h[o+a]+=u[o]*s[a];return ie(e.subarray(32),h),f}function se(e,r){var n=t(),i=t(),o=t(),u=t(),h=t(),l=t(),f=t();return T(e[2],s),L(e[1],r),M(o,e[1]),U(u,o,c),N(o,o,e[2]),B(u,e[2],u),M(h,u),M(l,h),U(f,l,h),U(n,f,o),U(n,n,u),function(e,r){var n,i=t();for(n=0;n<16;n++)i[n]=r[n];for(n=250;n>=0;n--)M(i,i),1!==n&&U(i,i,r);for(n=0;n<16;n++)e[n]=i[n]}(n,n),U(n,n,o),U(n,n,u),U(n,n,