factom
Version:
Library to build applications on the Factom blockchain
8 lines • 106 kB
JavaScript
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define([],r):"object"==typeof exports?exports["factom-struct"]=r():t["factom-struct"]=r()}(window,function(){return function(t){var r={};function n(e){if(r[e])return r[e].exports;var i=r[e]={i:e,l:!1,exports:{}};return t[e].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=r,n.d=function(t,r,e){n.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,r){if(1&r&&(t=n(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var i in t)n.d(e,i,function(r){return t[r]}.bind(null,i));return e},n.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(r,"a",r),r},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},n.p="",n(n.s=120)}([function(t,r,n){"use strict";(function(t){
/*!
* The buffer module from node.js, for the browser.
*
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
* @license MIT
*/
var e=n(37),i=n(38),o=n(26);function s(){return h.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function u(t,r){if(s()<r)throw new RangeError("Invalid typed array length");return h.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=h.prototype:(null===t&&(t=new h(r)),t.length=r),t}function h(t,r,n){if(!(h.TYPED_ARRAY_SUPPORT||this instanceof h))return new h(t,r,n);if("number"==typeof t){if("string"==typeof r)throw new Error("If encoding is specified then the first argument must be a string");return c(this,t)}return a(this,t,r,n)}function a(t,r,n,e){if("number"==typeof r)throw new TypeError('"value" argument must not be a number');return"undefined"!=typeof ArrayBuffer&&r instanceof ArrayBuffer?function(t,r,n,e){if(r.byteLength,n<0||r.byteLength<n)throw new RangeError("'offset' is out of bounds");if(r.byteLength<n+(e||0))throw new RangeError("'length' is out of bounds");r=void 0===n&&void 0===e?new Uint8Array(r):void 0===e?new Uint8Array(r,n):new Uint8Array(r,n,e);h.TYPED_ARRAY_SUPPORT?(t=r).__proto__=h.prototype:t=l(t,r);return t}(t,r,n,e):"string"==typeof r?function(t,r,n){"string"==typeof n&&""!==n||(n="utf8");if(!h.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var e=0|g(r,n),i=(t=u(t,e)).write(r,n);i!==e&&(t=t.slice(0,i));return t}(t,r,n):function(t,r){if(h.isBuffer(r)){var n=0|p(r.length);return 0===(t=u(t,n)).length?t:(r.copy(t,0,0,n),t)}if(r){if("undefined"!=typeof ArrayBuffer&&r.buffer instanceof ArrayBuffer||"length"in r)return"number"!=typeof r.length||(e=r.length)!=e?u(t,0):l(t,r);if("Buffer"===r.type&&o(r.data))return l(t,r.data)}var e;throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}(t,r)}function f(t){if("number"!=typeof t)throw new TypeError('"size" argument must be a number');if(t<0)throw new RangeError('"size" argument must not be negative')}function c(t,r){if(f(r),t=u(t,r<0?0:0|p(r)),!h.TYPED_ARRAY_SUPPORT)for(var n=0;n<r;++n)t[n]=0;return t}function l(t,r){var n=r.length<0?0:0|p(r.length);t=u(t,n);for(var e=0;e<n;e+=1)t[e]=255&r[e];return t}function p(t){if(t>=s())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s().toString(16)+" bytes");return 0|t}function g(t,r){if(h.isBuffer(t))return t.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(t)||t instanceof ArrayBuffer))return t.byteLength;"string"!=typeof t&&(t=""+t);var n=t.length;if(0===n)return 0;for(var e=!1;;)switch(r){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":case void 0:return F(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return j(t).length;default:if(e)return F(t).length;r=(""+r).toLowerCase(),e=!0}}function d(t,r,n){var e=t[r];t[r]=t[n],t[n]=e}function y(t,r,n,e,i){if(0===t.length)return-1;if("string"==typeof n?(e=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:t.length-1),n<0&&(n=t.length+n),n>=t.length){if(i)return-1;n=t.length-1}else if(n<0){if(!i)return-1;n=0}if("string"==typeof r&&(r=h.from(r,e)),h.isBuffer(r))return 0===r.length?-1:v(t,r,n,e,i);if("number"==typeof r)return r&=255,h.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(t,r,n):Uint8Array.prototype.lastIndexOf.call(t,r,n):v(t,[r],n,e,i);throw new TypeError("val must be string, number or Buffer")}function v(t,r,n,e,i){var o,s=1,u=t.length,h=r.length;if(void 0!==e&&("ucs2"===(e=String(e).toLowerCase())||"ucs-2"===e||"utf16le"===e||"utf-16le"===e)){if(t.length<2||r.length<2)return-1;s=2,u/=2,h/=2,n/=2}function a(t,r){return 1===s?t[r]:t.readUInt16BE(r*s)}if(i){var f=-1;for(o=n;o<u;o++)if(a(t,o)===a(r,-1===f?0:o-f)){if(-1===f&&(f=o),o-f+1===h)return f*s}else-1!==f&&(o-=o-f),f=-1}else for(n+h>u&&(n=u-h),o=n;o>=0;o--){for(var c=!0,l=0;l<h;l++)if(a(t,o+l)!==a(r,l)){c=!1;break}if(c)return o}return-1}function m(t,r,n,e){n=Number(n)||0;var i=t.length-n;e?(e=Number(e))>i&&(e=i):e=i;var o=r.length;if(o%2!=0)throw new TypeError("Invalid hex string");e>o/2&&(e=o/2);for(var s=0;s<e;++s){var u=parseInt(r.substr(2*s,2),16);if(isNaN(u))return s;t[n+s]=u}return s}function w(t,r,n,e){return z(F(r,t.length-n),t,n,e)}function E(t,r,n,e){return z(function(t){for(var r=[],n=0;n<t.length;++n)r.push(255&t.charCodeAt(n));return r}(r),t,n,e)}function _(t,r,n,e){return E(t,r,n,e)}function b(t,r,n,e){return z(j(r),t,n,e)}function A(t,r,n,e){return z(function(t,r){for(var n,e,i,o=[],s=0;s<t.length&&!((r-=2)<0);++s)n=t.charCodeAt(s),e=n>>8,i=n%256,o.push(i),o.push(e);return o}(r,t.length-n),t,n,e)}function S(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function x(t,r,n){n=Math.min(t.length,n);for(var e=[],i=r;i<n;){var o,s,u,h,a=t[i],f=null,c=a>239?4:a>223?3:a>191?2:1;if(i+c<=n)switch(c){case 1:a<128&&(f=a);break;case 2:128==(192&(o=t[i+1]))&&(h=(31&a)<<6|63&o)>127&&(f=h);break;case 3:o=t[i+1],s=t[i+2],128==(192&o)&&128==(192&s)&&(h=(15&a)<<12|(63&o)<<6|63&s)>2047&&(h<55296||h>57343)&&(f=h);break;case 4:o=t[i+1],s=t[i+2],u=t[i+3],128==(192&o)&&128==(192&s)&&128==(192&u)&&(h=(15&a)<<18|(63&o)<<12|(63&s)<<6|63&u)>65535&&h<1114112&&(f=h)}null===f?(f=65533,c=1):f>65535&&(f-=65536,e.push(f>>>10&1023|55296),f=56320|1023&f),e.push(f),i+=c}return function(t){var r=t.length;if(r<=I)return String.fromCharCode.apply(String,t);var n="",e=0;for(;e<r;)n+=String.fromCharCode.apply(String,t.slice(e,e+=I));return n}(e)}r.Buffer=h,r.SlowBuffer=function(t){+t!=t&&(t=0);return h.alloc(+t)},r.INSPECT_MAX_BYTES=50,h.TYPED_ARRAY_SUPPORT=void 0!==t.TYPED_ARRAY_SUPPORT?t.TYPED_ARRAY_SUPPORT:function(){try{var t=new Uint8Array(1);return t.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===t.foo()&&"function"==typeof t.subarray&&0===t.subarray(1,1).byteLength}catch(t){return!1}}(),r.kMaxLength=s(),h.poolSize=8192,h._augment=function(t){return t.__proto__=h.prototype,t},h.from=function(t,r,n){return a(null,t,r,n)},h.TYPED_ARRAY_SUPPORT&&(h.prototype.__proto__=Uint8Array.prototype,h.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&h[Symbol.species]===h&&Object.defineProperty(h,Symbol.species,{value:null,configurable:!0})),h.alloc=function(t,r,n){return function(t,r,n,e){return f(r),r<=0?u(t,r):void 0!==n?"string"==typeof e?u(t,r).fill(n,e):u(t,r).fill(n):u(t,r)}(null,t,r,n)},h.allocUnsafe=function(t){return c(null,t)},h.allocUnsafeSlow=function(t){return c(null,t)},h.isBuffer=function(t){return!(null==t||!t._isBuffer)},h.compare=function(t,r){if(!h.isBuffer(t)||!h.isBuffer(r))throw new TypeError("Arguments must be Buffers");if(t===r)return 0;for(var n=t.length,e=r.length,i=0,o=Math.min(n,e);i<o;++i)if(t[i]!==r[i]){n=t[i],e=r[i];break}return n<e?-1:e<n?1:0},h.isEncoding=function(t){switch(String(t).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}},h.concat=function(t,r){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return h.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var e=h.allocUnsafe(r),i=0;for(n=0;n<t.length;++n){var s=t[n];if(!h.isBuffer(s))throw new TypeError('"list" argument must be an Array of Buffers');s.copy(e,i),i+=s.length}return e},h.byteLength=g,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var t=this.length;if(t%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var r=0;r<t;r+=2)d(this,r,r+1);return this},h.prototype.swap32=function(){var t=this.length;if(t%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var r=0;r<t;r+=4)d(this,r,r+3),d(this,r+1,r+2);return this},h.prototype.swap64=function(){var t=this.length;if(t%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var r=0;r<t;r+=8)d(this,r,r+7),d(this,r+1,r+6),d(this,r+2,r+5),d(this,r+3,r+4);return this},h.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?x(this,0,t):function(t,r,n){var e=!1;if((void 0===r||r<0)&&(r=0),r>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(r>>>=0))return"";for(t||(t="utf8");;)switch(t){case"hex":return P(this,r,n);case"utf8":case"utf-8":return x(this,r,n);case"ascii":return R(this,r,n);case"latin1":case"binary":return T(this,r,n);case"base64":return S(this,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,r,n);default:if(e)throw new TypeError("Unknown encoding: "+t);t=(t+"").toLowerCase(),e=!0}}.apply(this,arguments)},h.prototype.equals=function(t){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===h.compare(this,t)},h.prototype.inspect=function(){var t="",n=r.INSPECT_MAX_BYTES;return this.length>0&&(t=this.toString("hex",0,n).match(/.{2}/g).join(" "),this.length>n&&(t+=" ... ")),"<Buffer "+t+">"},h.prototype.compare=function(t,r,n,e,i){if(!h.isBuffer(t))throw new TypeError("Argument must be a Buffer");if(void 0===r&&(r=0),void 0===n&&(n=t?t.length:0),void 0===e&&(e=0),void 0===i&&(i=this.length),r<0||n>t.length||e<0||i>this.length)throw new RangeError("out of range index");if(e>=i&&r>=n)return 0;if(e>=i)return-1;if(r>=n)return 1;if(this===t)return 0;for(var o=(i>>>=0)-(e>>>=0),s=(n>>>=0)-(r>>>=0),u=Math.min(o,s),a=this.slice(e,i),f=t.slice(r,n),c=0;c<u;++c)if(a[c]!==f[c]){o=a[c],s=f[c];break}return o<s?-1:s<o?1:0},h.prototype.includes=function(t,r,n){return-1!==this.indexOf(t,r,n)},h.prototype.indexOf=function(t,r,n){return y(this,t,r,n,!0)},h.prototype.lastIndexOf=function(t,r,n){return y(this,t,r,n,!1)},h.prototype.write=function(t,r,n,e){if(void 0===r)e="utf8",n=this.length,r=0;else if(void 0===n&&"string"==typeof r)e=r,n=this.length,r=0;else{if(!isFinite(r))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");r|=0,isFinite(n)?(n|=0,void 0===e&&(e="utf8")):(e=n,n=void 0)}var i=this.length-r;if((void 0===n||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");e||(e="utf8");for(var o=!1;;)switch(e){case"hex":return m(this,t,r,n);case"utf8":case"utf-8":return w(this,t,r,n);case"ascii":return E(this,t,r,n);case"latin1":case"binary":return _(this,t,r,n);case"base64":return b(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),o=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var I=4096;function R(t,r,n){var e="";n=Math.min(t.length,n);for(var i=r;i<n;++i)e+=String.fromCharCode(127&t[i]);return e}function T(t,r,n){var e="";n=Math.min(t.length,n);for(var i=r;i<n;++i)e+=String.fromCharCode(t[i]);return e}function P(t,r,n){var e=t.length;(!r||r<0)&&(r=0),(!n||n<0||n>e)&&(n=e);for(var i="",o=r;o<n;++o)i+=Y(t[o]);return i}function B(t,r,n){for(var e=t.slice(r,n),i="",o=0;o<e.length;o+=2)i+=String.fromCharCode(e[o]+256*e[o+1]);return i}function C(t,r,n){if(t%1!=0||t<0)throw new RangeError("offset is not uint");if(t+r>n)throw new RangeError("Trying to access beyond buffer length")}function U(t,r,n,e,i,o){if(!h.isBuffer(t))throw new TypeError('"buffer" argument must be a Buffer instance');if(r>i||r<o)throw new RangeError('"value" argument is out of bounds');if(n+e>t.length)throw new RangeError("Index out of range")}function O(t,r,n,e){r<0&&(r=65535+r+1);for(var i=0,o=Math.min(t.length-n,2);i<o;++i)t[n+i]=(r&255<<8*(e?i:1-i))>>>8*(e?i:1-i)}function L(t,r,n,e){r<0&&(r=4294967295+r+1);for(var i=0,o=Math.min(t.length-n,4);i<o;++i)t[n+i]=r>>>8*(e?i:3-i)&255}function k(t,r,n,e,i,o){if(n+e>t.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function D(t,r,n,e,o){return o||k(t,0,n,4),i.write(t,r,n,e,23,4),n+4}function N(t,r,n,e,o){return o||k(t,0,n,8),i.write(t,r,n,e,52,8),n+8}h.prototype.slice=function(t,r){var n,e=this.length;if((t=~~t)<0?(t+=e)<0&&(t=0):t>e&&(t=e),(r=void 0===r?e:~~r)<0?(r+=e)<0&&(r=0):r>e&&(r=e),r<t&&(r=t),h.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,r)).__proto__=h.prototype;else{var i=r-t;n=new h(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},h.prototype.readUIntLE=function(t,r,n){t|=0,r|=0,n||C(t,r,this.length);for(var e=this[t],i=1,o=0;++o<r&&(i*=256);)e+=this[t+o]*i;return e},h.prototype.readUIntBE=function(t,r,n){t|=0,r|=0,n||C(t,r,this.length);for(var e=this[t+--r],i=1;r>0&&(i*=256);)e+=this[t+--r]*i;return e},h.prototype.readUInt8=function(t,r){return r||C(t,1,this.length),this[t]},h.prototype.readUInt16LE=function(t,r){return r||C(t,2,this.length),this[t]|this[t+1]<<8},h.prototype.readUInt16BE=function(t,r){return r||C(t,2,this.length),this[t]<<8|this[t+1]},h.prototype.readUInt32LE=function(t,r){return r||C(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},h.prototype.readUInt32BE=function(t,r){return r||C(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},h.prototype.readIntLE=function(t,r,n){t|=0,r|=0,n||C(t,r,this.length);for(var e=this[t],i=1,o=0;++o<r&&(i*=256);)e+=this[t+o]*i;return e>=(i*=128)&&(e-=Math.pow(2,8*r)),e},h.prototype.readIntBE=function(t,r,n){t|=0,r|=0,n||C(t,r,this.length);for(var e=r,i=1,o=this[t+--e];e>0&&(i*=256);)o+=this[t+--e]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*r)),o},h.prototype.readInt8=function(t,r){return r||C(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},h.prototype.readInt16LE=function(t,r){r||C(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt16BE=function(t,r){r||C(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},h.prototype.readInt32LE=function(t,r){return r||C(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},h.prototype.readInt32BE=function(t,r){return r||C(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},h.prototype.readFloatLE=function(t,r){return r||C(t,4,this.length),i.read(this,t,!0,23,4)},h.prototype.readFloatBE=function(t,r){return r||C(t,4,this.length),i.read(this,t,!1,23,4)},h.prototype.readDoubleLE=function(t,r){return r||C(t,8,this.length),i.read(this,t,!0,52,8)},h.prototype.readDoubleBE=function(t,r){return r||C(t,8,this.length),i.read(this,t,!1,52,8)},h.prototype.writeUIntLE=function(t,r,n,e){(t=+t,r|=0,n|=0,e)||U(this,t,r,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[r]=255&t;++o<n&&(i*=256);)this[r+o]=t/i&255;return r+n},h.prototype.writeUIntBE=function(t,r,n,e){(t=+t,r|=0,n|=0,e)||U(this,t,r,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[r+i]=255&t;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+n},h.prototype.writeUInt8=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,1,255,0),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},h.prototype.writeUInt16LE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):O(this,t,r,!0),r+2},h.prototype.writeUInt16BE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,2,65535,0),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):O(this,t,r,!1),r+2},h.prototype.writeUInt32LE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):L(this,t,r,!0),r+4},h.prototype.writeUInt32BE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,4,4294967295,0),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):L(this,t,r,!1),r+4},h.prototype.writeIntLE=function(t,r,n,e){if(t=+t,r|=0,!e){var i=Math.pow(2,8*n-1);U(this,t,r,n,i-1,-i)}var o=0,s=1,u=0;for(this[r]=255&t;++o<n&&(s*=256);)t<0&&0===u&&0!==this[r+o-1]&&(u=1),this[r+o]=(t/s>>0)-u&255;return r+n},h.prototype.writeIntBE=function(t,r,n,e){if(t=+t,r|=0,!e){var i=Math.pow(2,8*n-1);U(this,t,r,n,i-1,-i)}var o=n-1,s=1,u=0;for(this[r+o]=255&t;--o>=0&&(s*=256);)t<0&&0===u&&0!==this[r+o+1]&&(u=1),this[r+o]=(t/s>>0)-u&255;return r+n},h.prototype.writeInt8=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,1,127,-128),h.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},h.prototype.writeInt16LE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):O(this,t,r,!0),r+2},h.prototype.writeInt16BE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,2,32767,-32768),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):O(this,t,r,!1),r+2},h.prototype.writeInt32LE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,4,2147483647,-2147483648),h.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):L(this,t,r,!0),r+4},h.prototype.writeInt32BE=function(t,r,n){return t=+t,r|=0,n||U(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),h.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):L(this,t,r,!1),r+4},h.prototype.writeFloatLE=function(t,r,n){return D(this,t,r,!0,n)},h.prototype.writeFloatBE=function(t,r,n){return D(this,t,r,!1,n)},h.prototype.writeDoubleLE=function(t,r,n){return N(this,t,r,!0,n)},h.prototype.writeDoubleBE=function(t,r,n){return N(this,t,r,!1,n)},h.prototype.copy=function(t,r,n,e){if(n||(n=0),e||0===e||(e=this.length),r>=t.length&&(r=t.length),r||(r=0),e>0&&e<n&&(e=n),e===n)return 0;if(0===t.length||0===this.length)return 0;if(r<0)throw new RangeError("targetStart out of bounds");if(n<0||n>=this.length)throw new RangeError("sourceStart out of bounds");if(e<0)throw new RangeError("sourceEnd out of bounds");e>this.length&&(e=this.length),t.length-r<e-n&&(e=t.length-r+n);var i,o=e-n;if(this===t&&n<r&&r<e)for(i=o-1;i>=0;--i)t[i+r]=this[i+n];else if(o<1e3||!h.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)t[i+r]=this[i+n];else Uint8Array.prototype.set.call(t,this.subarray(n,n+o),r);return o},h.prototype.fill=function(t,r,n,e){if("string"==typeof t){if("string"==typeof r?(e=r,r=0,n=this.length):"string"==typeof n&&(e=n,n=this.length),1===t.length){var i=t.charCodeAt(0);i<256&&(t=i)}if(void 0!==e&&"string"!=typeof e)throw new TypeError("encoding must be a string");if("string"==typeof e&&!h.isEncoding(e))throw new TypeError("Unknown encoding: "+e)}else"number"==typeof t&&(t&=255);if(r<0||this.length<r||this.length<n)throw new RangeError("Out of range index");if(n<=r)return this;var o;if(r>>>=0,n=void 0===n?this.length:n>>>0,t||(t=0),"number"==typeof t)for(o=r;o<n;++o)this[o]=t;else{var s=h.isBuffer(t)?t:F(new h(t,e).toString()),u=s.length;for(o=0;o<n-r;++o)this[o+r]=s[o%u]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function Y(t){return t<16?"0"+t.toString(16):t.toString(16)}function F(t,r){var n;r=r||1/0;for(var e=t.length,i=null,o=[],s=0;s<e;++s){if((n=t.charCodeAt(s))>55295&&n<57344){if(!i){if(n>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(s+1===e){(r-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(r-=3)>-1&&o.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(r-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((r-=1)<0)break;o.push(n)}else if(n<2048){if((r-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((r-=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((r-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function j(t){return e.toByteArray(function(t){if((t=function(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}(t).replace(M,"")).length<2)return"";for(;t.length%4!=0;)t+="=";return t}(t))}function z(t,r,n,e){for(var i=0;i<e&&!(i+n>=r.length||i>=t.length);++i)r[i+n]=t[i];return i}}).call(this,n(3))},function(t,r){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,r,n){"use strict";(function(r){var e=n(25),i=n(11),o=n(8),s=o.RCD_TYPE_1,u=o.secretToPublicKey,h=o.sha256d,a=n(9),f=a.FACTOID_PUBLIC_PREFIX,c=a.FACTOID_PRIVATE_PREFIX,l=a.ENTRYCREDIT_PUBLIC_PREFIX,p=a.ENTRYCREDIT_PRIVATE_PREFIX,g=a.VALID_PREFIXES,d=a.PUBLIC_ADDRESS_VALID_PREFIXES,y=a.PRIVATE_ADDRESS_VALID_PREFIXES,v=a.EC_ADDRESS_VALID_PREFIXES,m=a.FCT_ADDRESS_VALID_PREFIXES;function w(t){try{if(!g.has(t.slice(0,2)))return!1;var n=r.from(e.decode(t));return 38===n.length&&!!h(n.slice(0,34)).slice(0,4).equals(n.slice(34,38))}catch(t){return!1}}function E(t){return w(t)&&"FA"===t.substring(0,2)}function _(t){return x(t,f,!0)}function b(t){return x(t,c)}function A(t){return x(t,l)}function S(t){return x(t,p)}function x(t,n,i){var o=r.from(t,"hex");if(32!==o.length)throw new Error("Key ".concat(o," is not 32 bytes long."));var s=r.concat([n,i?I(o):o]),u=h(s).slice(0,4);return e.encode(r.concat([s,u]))}function I(t){return h(r.concat([s,t]))}t.exports={isValidAddress:w,addressToKey:function(t){if(!w(t))throw new Error("Invalid address ".concat(t,"."));if(t.startsWith("FA"))throw new Error("A public Factoid address does not hold a public key but a RCD hash. Use addressToRcdHash function instead.");return r.from(e.decode(t).slice(2,34))},addressToRcdHash:function(t){if(!E(t))throw new Error("Address ".concat(t," is not a valid public Factoid address"));return r.from(e.decode(t).slice(2,34))},isValidPublicAddress:function(t){return w(t)&&d.has(t.substring(0,2))},isValidPrivateAddress:function(t){return w(t)&&y.has(t.substring(0,2))},isValidEcAddress:function(t){return w(t)&&v.has(t.substring(0,2))},isValidPublicEcAddress:function(t){return w(t)&&"EC"===t.substring(0,2)},isValidPrivateEcAddress:function(t){return w(t)&&"Es"===t.substring(0,2)},isValidFctAddress:function(t){return w(t)&&m.has(t.substring(0,2))},isValidPublicFctAddress:E,isValidPrivateFctAddress:function(t){return w(t)&&"Fs"===t.substring(0,2)},getPublicAddress:function(t){if(!w(t))throw new Error("Invalid address ".concat(t,"."));if("s"!==t[1])return t;var r=e.decode(t).slice(2,34),n=u(r);return"F"===t[0]?_(n):A(n)},keyToPublicFctAddress:_,rcdHashToPublicFctAddress:function(t){return x(t,f)},seedToPrivateFctAddress:b,keyToPublicEcAddress:A,seedToPrivateEcAddress:S,generateRandomFctAddress:function(){var t=i.randomBytes(32);return{public:_(i.sign.keyPair.fromSeed(t).publicKey),private:b(t)}},generateRandomEcAddress:function(){var t=i.randomBytes(32);return{public:A(i.sign.keyPair.fromSeed(t).publicKey),private:S(t)}}}}).call(this,n(0).Buffer)},function(t,r){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,r,n){t.exports=n(31)},function(t,r){function n(t,r,n,e,i,o,s){try{var u=t[o](s),h=u.value}catch(t){return void n(t)}u.done?r(h):Promise.resolve(h).then(e,i)}t.exports=function(t){return function(){var r=this,e=arguments;return new Promise(function(i,o){var s=t.apply(r,e);function u(t){n(s,i,o,u,h,"next",t)}function h(t){n(s,i,o,u,h,"throw",t)}u(void 0)})}}},function(t,r){t.exports=function(t,r){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}},,function(t,r,n){"use strict";(function(r){var e=n(1)(n(17)),i=n(11).sign,o=n(44),s=n(45),u=n(47),h=r.from("01","hex"),a=o.fromString("8000000000000000",!0,16);t.exports={RCD_TYPE_1:h,sha256:function(t){return r.from(s().update(t).digest())},sha512:function(t){return r.from(u().update(t).digest())},sha256d:function(t){return r.from(s().update(s().update(t).digest()).digest())},toHex:function(t){return r.isBuffer(t)?t.toString("hex"):t},encodeVarInt:function(t){var n=[];0!==t&&"0"!==t||n.push(0);var e=o.fromValue(t,!0),i=!1;e.and(a).isZero()||(n.push(129),i=!0);for(var s=0;s<9;++s){var u=e.shiftRightUnsigned(56).toNumber();(u||i)&&(i=!0,8!==s?u|=128:u&=127,n.push(u)),e=e.shiftLeft(7)}return r.from(n)},isIterable:function(t){return null!=t&&"function"==typeof t[Symbol.iterator]},flatMap:function(t,r){var n;return(n=[]).concat.apply(n,(0,e.default)(t.map(r)))},secretToPublicKey:function(t){var n=i.keyPair.fromSeed(t);return r.from(n.publicKey)}}}).call(this,n(0).Buffer)},function(t,r,n){"use strict";(function(r){var n="000000000000000000000000000000000000000000000000000000000000000a",e=new Map([[1,"DIRECTORY_BLOCK_SIGNATURE"],[2,"REVEAL_MATRYOSHKA_HASH"],[3,"ADD_REPLACE_MATRYOSHKA_HASH"],[4,"INCREASE_SERVER_COUNT"],[5,"ADD_FEDERATED_SERVER"],[6,"ADD_AUDIT_SERVER"],[7,"REMOVE_FEDERATED_SERVER"],[8,"ADD_FEDERATED_SERVER_SIGNING_KEY"],[9,"ADD_FEDERATED_SERVER_BITCOIN_ANCHOR_KEY"],[10,"SERVER_FAULT_HANDOFF"],[11,"COINBASE_DESCRIPTOR"],[12,"COINBASE_DESCRIPTOR_CANCEL"],[13,"ADD_AUTHORITY_FACTOID_ADDRESS"],[14,"ADD_AUTHORITY_EFFICIENCY"]]);t.exports={MAX_TRANSACTION_SIZE:10240,MAX_ENTRY_PAYLOAD_SIZE:10240,MAX_ENTRY_SIZE:10275,CHAIN_CREATION_COST:10,NULL_HASH:"0000000000000000000000000000000000000000000000000000000000000000",ADMIN_BLOCKS_CHAIN_ID:n,ENTRY_CREDIT_BLOCKS_CHAIN_ID:"000000000000000000000000000000000000000000000000000000000000000c",FACTOID_BLOCKS_CHAIN_ID:"000000000000000000000000000000000000000000000000000000000000000f",RESERVED_CHAIN_IDS:new Set([n,"000000000000000000000000000000000000000000000000000000000000000c","000000000000000000000000000000000000000000000000000000000000000f"]),VALID_PREFIXES:new Set(["Fs","FA","EC","Es"]),PUBLIC_ADDRESS_VALID_PREFIXES:new Set(["FA","EC"]),PRIVATE_ADDRESS_VALID_PREFIXES:new Set(["Fs","Es"]),EC_ADDRESS_VALID_PREFIXES:new Set(["EC","Es"]),FCT_ADDRESS_VALID_PREFIXES:new Set(["FA","Fs"]),FACTOID_PUBLIC_PREFIX:r.from("5fb1","hex"),FACTOID_PRIVATE_PREFIX:r.from("6478","hex"),ENTRYCREDIT_PUBLIC_PREFIX:r.from("592a","hex"),ENTRYCREDIT_PRIVATE_PREFIX:r.from("5db6","hex"),ADMIN_ID_TO_CODE:e}}).call(this,n(0).Buffer)},function(t,r){function n(t,r){for(var n=0;n<r.length;n++){var e=r[n];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(t,e.key,e)}}t.exports=function(t,r,e){return r&&n(t.prototype,r),e&&n(t,e),t}},function(t,r,n){!function(t){"use strict";var r=function(t){var r,n=new Float64Array(16);if(t)for(r=0;r<t.length;r++)n[r]=t[r];return n},e=function(){throw new Error("no PRNG")},i=new Uint8Array(16),o=new Uint8Array(32);o[0]=9;var s=r(),u=r([1]),h=r([56129,1]),a=r([30883,4953,19914,30187,55467,16705,2637,112,59544,30585,16505,36039,65139,11119,27886,20995]),f=r([61785,9906,39828,60374,45398,33411,5274,224,53552,61171,33010,6542,64743,22239,55772,9222]),c=r([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),l=r([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),p=r([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function g(t,r,n,e){t[r]=n>>24&255,t[r+1]=n>>16&255,t[r+2]=n>>8&255,t[r+3]=255&n,t[r+4]=e>>24&255,t[r+5]=e>>16&255,t[r+6]=e>>8&255,t[r+7]=255&e}function d(t,r,n,e,i){var o,s=0;for(o=0;o<i;o++)s|=t[r+o]^n[e+o];return(1&s-1>>>8)-1}function y(t,r,n,e){return d(t,r,n,e,16)}function v(t,r,n,e){return d(t,r,n,e,32)}function m(t,r,n,e){!function(t,r,n,e){for(var i,o=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,a=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,m=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,E=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=o,b=s,A=u,S=h,x=a,I=f,R=c,T=l,P=p,B=g,C=d,U=y,O=v,L=m,k=w,D=E,N=0;N<20;N+=2)_^=(i=(O^=(i=(P^=(i=(x^=(i=_+O|0)<<7|i>>>25)+_|0)<<9|i>>>23)+x|0)<<13|i>>>19)+P|0)<<18|i>>>14,I^=(i=(b^=(i=(L^=(i=(B^=(i=I+b|0)<<7|i>>>25)+I|0)<<9|i>>>23)+B|0)<<13|i>>>19)+L|0)<<18|i>>>14,C^=(i=(R^=(i=(A^=(i=(k^=(i=C+R|0)<<7|i>>>25)+C|0)<<9|i>>>23)+k|0)<<13|i>>>19)+A|0)<<18|i>>>14,D^=(i=(U^=(i=(T^=(i=(S^=(i=D+U|0)<<7|i>>>25)+D|0)<<9|i>>>23)+S|0)<<13|i>>>19)+T|0)<<18|i>>>14,_^=(i=(S^=(i=(A^=(i=(b^=(i=_+S|0)<<7|i>>>25)+_|0)<<9|i>>>23)+b|0)<<13|i>>>19)+A|0)<<18|i>>>14,I^=(i=(x^=(i=(T^=(i=(R^=(i=I+x|0)<<7|i>>>25)+I|0)<<9|i>>>23)+R|0)<<13|i>>>19)+T|0)<<18|i>>>14,C^=(i=(B^=(i=(P^=(i=(U^=(i=C+B|0)<<7|i>>>25)+C|0)<<9|i>>>23)+U|0)<<13|i>>>19)+P|0)<<18|i>>>14,D^=(i=(k^=(i=(L^=(i=(O^=(i=D+k|0)<<7|i>>>25)+D|0)<<9|i>>>23)+O|0)<<13|i>>>19)+L|0)<<18|i>>>14;_=_+o|0,b=b+s|0,A=A+u|0,S=S+h|0,x=x+a|0,I=I+f|0,R=R+c|0,T=T+l|0,P=P+p|0,B=B+g|0,C=C+d|0,U=U+y|0,O=O+v|0,L=L+m|0,k=k+w|0,D=D+E|0,t[0]=_>>>0&255,t[1]=_>>>8&255,t[2]=_>>>16&255,t[3]=_>>>24&255,t[4]=b>>>0&255,t[5]=b>>>8&255,t[6]=b>>>16&255,t[7]=b>>>24&255,t[8]=A>>>0&255,t[9]=A>>>8&255,t[10]=A>>>16&255,t[11]=A>>>24&255,t[12]=S>>>0&255,t[13]=S>>>8&255,t[14]=S>>>16&255,t[15]=S>>>24&255,t[16]=x>>>0&255,t[17]=x>>>8&255,t[18]=x>>>16&255,t[19]=x>>>24&255,t[20]=I>>>0&255,t[21]=I>>>8&255,t[22]=I>>>16&255,t[23]=I>>>24&255,t[24]=R>>>0&255,t[25]=R>>>8&255,t[26]=R>>>16&255,t[27]=R>>>24&255,t[28]=T>>>0&255,t[29]=T>>>8&255,t[30]=T>>>16&255,t[31]=T>>>24&255,t[32]=P>>>0&255,t[33]=P>>>8&255,t[34]=P>>>16&255,t[35]=P>>>24&255,t[36]=B>>>0&255,t[37]=B>>>8&255,t[38]=B>>>16&255,t[39]=B>>>24&255,t[40]=C>>>0&255,t[41]=C>>>8&255,t[42]=C>>>16&255,t[43]=C>>>24&255,t[44]=U>>>0&255,t[45]=U>>>8&255,t[46]=U>>>16&255,t[47]=U>>>24&255,t[48]=O>>>0&255,t[49]=O>>>8&255,t[50]=O>>>16&255,t[51]=O>>>24&255,t[52]=L>>>0&255,t[53]=L>>>8&255,t[54]=L>>>16&255,t[55]=L>>>24&255,t[56]=k>>>0&255,t[57]=k>>>8&255,t[58]=k>>>16&255,t[59]=k>>>24&255,t[60]=D>>>0&255,t[61]=D>>>8&255,t[62]=D>>>16&255,t[63]=D>>>24&255}(t,r,n,e)}function w(t,r,n,e){!function(t,r,n,e){for(var i,o=255&e[0]|(255&e[1])<<8|(255&e[2])<<16|(255&e[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,u=255&n[4]|(255&n[5])<<8|(255&n[6])<<16|(255&n[7])<<24,h=255&n[8]|(255&n[9])<<8|(255&n[10])<<16|(255&n[11])<<24,a=255&n[12]|(255&n[13])<<8|(255&n[14])<<16|(255&n[15])<<24,f=255&e[4]|(255&e[5])<<8|(255&e[6])<<16|(255&e[7])<<24,c=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,l=255&r[4]|(255&r[5])<<8|(255&r[6])<<16|(255&r[7])<<24,p=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,g=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,d=255&e[8]|(255&e[9])<<8|(255&e[10])<<16|(255&e[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,v=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,m=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,E=255&e[12]|(255&e[13])<<8|(255&e[14])<<16|(255&e[15])<<24,_=0;_<20;_+=2)o^=(i=(v^=(i=(p^=(i=(a^=(i=o+v|0)<<7|i>>>25)+o|0)<<9|i>>>23)+a|0)<<13|i>>>19)+p|0)<<18|i>>>14,f^=(i=(s^=(i=(m^=(i=(g^=(i=f+s|0)<<7|i>>>25)+f|0)<<9|i>>>23)+g|0)<<13|i>>>19)+m|0)<<18|i>>>14,d^=(i=(c^=(i=(u^=(i=(w^=(i=d+c|0)<<7|i>>>25)+d|0)<<9|i>>>23)+w|0)<<13|i>>>19)+u|0)<<18|i>>>14,E^=(i=(y^=(i=(l^=(i=(h^=(i=E+y|0)<<7|i>>>25)+E|0)<<9|i>>>23)+h|0)<<13|i>>>19)+l|0)<<18|i>>>14,o^=(i=(h^=(i=(u^=(i=(s^=(i=o+h|0)<<7|i>>>25)+o|0)<<9|i>>>23)+s|0)<<13|i>>>19)+u|0)<<18|i>>>14,f^=(i=(a^=(i=(l^=(i=(c^=(i=f+a|0)<<7|i>>>25)+f|0)<<9|i>>>23)+c|0)<<13|i>>>19)+l|0)<<18|i>>>14,d^=(i=(g^=(i=(p^=(i=(y^=(i=d+g|0)<<7|i>>>25)+d|0)<<9|i>>>23)+y|0)<<13|i>>>19)+p|0)<<18|i>>>14,E^=(i=(w^=(i=(m^=(i=(v^=(i=E+w|0)<<7|i>>>25)+E|0)<<9|i>>>23)+v|0)<<13|i>>>19)+m|0)<<18|i>>>14;t[0]=o>>>0&255,t[1]=o>>>8&255,t[2]=o>>>16&255,t[3]=o>>>24&255,t[4]=f>>>0&255,t[5]=f>>>8&255,t[6]=f>>>16&255,t[7]=f>>>24&255,t[8]=d>>>0&255,t[9]=d>>>8&255,t[10]=d>>>16&255,t[11]=d>>>24&255,t[12]=E>>>0&255,t[13]=E>>>8&255,t[14]=E>>>16&255,t[15]=E>>>24&255,t[16]=c>>>0&255,t[17]=c>>>8&255,t[18]=c>>>16&255,t[19]=c>>>24&255,t[20]=l>>>0&255,t[21]=l>>>8&255,t[22]=l>>>16&255,t[23]=l>>>24&255,t[24]=p>>>0&255,t[25]=p>>>8&255,t[26]=p>>>16&255,t[27]=p>>>24&255,t[28]=g>>>0&255,t[29]=g>>>8&255,t[30]=g>>>16&255,t[31]=g>>>24&255}(t,r,n,e)}var E=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function _(t,r,n,e,i,o,s){var u,h,a=new Uint8Array(16),f=new Uint8Array(64);for(h=0;h<16;h++)a[h]=0;for(h=0;h<8;h++)a[h]=o[h];for(;i>=64;){for(m(f,a,s,E),h=0;h<64;h++)t[r+h]=n[e+h]^f[h];for(u=1,h=8;h<16;h++)u=u+(255&a[h])|0,a[h]=255&u,u>>>=8;i-=64,r+=64,e+=64}if(i>0)for(m(f,a,s,E),h=0;h<i;h++)t[r+h]=n[e+h]^f[h];return 0}function b(t,r,n,e,i){var o,s,u=new Uint8Array(16),h=new Uint8Array(64);for(s=0;s<16;s++)u[s]=0;for(s=0;s<8;s++)u[s]=e[s];for(;n>=64;){for(m(h,u,i,E),s=0;s<64;s++)t[r+s]=h[s];for(o=1,s=8;s<16;s++)o=o+(255&u[s])|0,u[s]=255&o,o>>>=8;n-=64,r+=64}if(n>0)for(m(h,u,i,E),s=0;s<n;s++)t[r+s]=h[s];return 0}function A(t,r,n,e,i){var o=new Uint8Array(32);w(o,e,i,E);for(var s=new Uint8Array(8),u=0;u<8;u++)s[u]=e[u+16];return b(t,r,n,s,o)}function S(t,r,n,e,i,o,s){var u=new Uint8Array(32);w(u,o,s,E);for(var h=new Uint8Array(8),a=0;a<8;a++)h[a]=o[a+16];return _(t,r,n,e,i,h,u)}var x=function(t){var r,n,e,i,o,s,u,h;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,r=255&t[0]|(255&t[1])<<8,this.r[0]=8191&r,n=255&t[2]|(255&t[3])<<8,this.r[1]=8191&(r>>>13|n<<3),e=255&t[4]|(255&t[5])<<8,this.r[2]=7939&(n>>>10|e<<6),i=255&t[6]|(255&t[7])<<8,this.r[3]=8191&(e>>>7|i<<9),o=255&t[8]|(255&t[9])<<8,this.r[4]=255&(i>>>4|o<<12),this.r[5]=o>>>1&8190,s=255&t[10]|(255&t[11])<<8,this.r[6]=8191&(o>>>14|s<<2),u=255&t[12]|(255&t[13])<<8,this.r[7]=8065&(s>>>11|u<<5),h=255&t[14]|(255&t[15])<<8,this.r[8]=8191&(u>>>8|h<<8),this.r[9]=h>>>5&127,this.pad[0]=255&t[16]|(255&t[17])<<8,this.pad[1]=255&t[18]|(255&t[19])<<8,this.pad[2]=255&t[20]|(255&t[21])<<8,this.pad[3]=255&t[22]|(255&t[23])<<8,this.pad[4]=255&t[24]|(255&t[25])<<8,this.pad[5]=255&t[26]|(255&t[27])<<8,this.pad[6]=255&t[28]|(255&t[29])<<8,this.pad[7]=255&t[30]|(255&t[31])<<8};function I(t,r,n,e,i,o){var s=new x(o);return s.update(n,e,i),s.finish(t,r),0}function R(t,r,n,e,i,o){var s=new Uint8Array(16);return I(s,0,n,e,i,o),y(t,r,s,0)}function T(t,r,n,e,i){var o;if(n<32)return-1;for(S(t,0,r,0,n,e,i),I(t,16,t,32,n-32,t),o=0;o<16;o++)t[o]=0;return 0}function P(t,r,n,e,i){var o,s=new Uint8Array(32);if(n<32)return-1;if(A(s,0,32,e,i),0!==R(r,16,r,32,n-32,s))return-1;for(S(t,0,r,0,n,e,i),o=0;o<32;o++)t[o]=0;return 0}function B(t,r){var n;for(n=0;n<16;n++)t[n]=0|r[n]}function C(t){var r,n,e=1;for(r=0;r<16;r++)n=t[r]+e+65535,e=Math.floor(n/65536),t[r]=n-65536*e;t[0]+=e-1+37*(e-1)}function U(t,r,n){for(var e,i=~(n-1),o=0;o<16;o++)e=i&(t[o]^r[o]),t[o]^=e,r[o]^=e}function O(t,n){var e,i,o,s=r(),u=r();for(e=0;e<16;e++)u[e]=n[e];for(C(u),C(u),C(u),i=0;i<2;i++){for(s[0]=u[0]-65517,e=1;e<15;e++)s[e]=u[e]-65535-(s[e-1]>>16&1),s[e-1]&=65535;s[15]=u[15]-32767-(s[14]>>16&1),o=s[15]>>16&1,s[14]&=65535,U(u,s,1-o)}for(e=0;e<16;e++)t[2*e]=255&u[e],t[2*e+1]=u[e]>>8}function L(t,r){var n=new Uint8Array(32),e=new Uint8Array(32);return O(n,t),O(e,r),v(n,0,e,0)}function k(t){var r=new Uint8Array(32);return O(r,t),1&r[0]}function D(t,r){var n;for(n=0;n<16;n++)t[n]=r[2*n]+(r[2*n+1]<<8);t[15]&=32767}function N(t,r,n){for(var e=0;e<16;e++)t[e]=r[e]+n[e]}function M(t,r,n){for(var e=0;e<16;e++)t[e]=r[e]-n[e]}function Y(t,r,n){var e,i,o=0,s=0,u=0,h=0,a=0,f=0,c=0,l=0,p=0,g=0,d=0,y=0,v=0,m=0,w=0,E=0,_=0,b=0,A=0,S=0,x=0,I=0,R=0,T=0,P=0,B=0,C=0,U=0,O=0,L=0,k=0,D=n[0],N=n[1],M=n[2],Y=n[3],F=n[4],j=n[5],z=n[6],V=n[7],K=n[8],H=n[9],q=n[10],X=n[11],Z=n[12],G=n[13],W=n[14],J=n[15];o+=(e=r[0])*D,s+=e*N,u+=e*M,h+=e*Y,a+=e*F,f+=e*j,c+=e*z,l+=e*V,p+=e*K,g+=e*H,d+=e*q,y+=e*X,v+=e*Z,m+=e*G,w+=e*W,E+=e*J,s+=(e=r[1])*D,u+=e*N,h+=e*M,a+=e*Y,f+=e*F,c+=e*j,l+=e*z,p+=e*V,g+=e*K,d+=e*H,y+=e*q,v+=e*X,m+=e*Z,w+=e*G,E+=e*W,_+=e*J,u+=(e=r[2])*D,h+=e*N,a+=e*M,f+=e*Y,c+=e*F,l+=e*j,p+=e*z,g+=e*V,d+=e*K,y+=e*H,v+=e*q,m+=e*X,w+=e*Z,E+=e*G,_+=e*W,b+=e*J,h+=(e=r[3])*D,a+=e*N,f+=e*M,c+=e*Y,l+=e*F,p+=e*j,g+=e*z,d+=e*V,y+=e*K,v+=e*H,m+=e*q,w+=e*X,E+=e*Z,_+=e*G,b+=e*W,A+=e*J,a+=(e=r[4])*D,f+=e*N,c+=e*M,l+=e*Y,p+=e*F,g+=e*j,d+=e*z,y+=e*V,v+=e*K,m+=e*H,w+=e*q,E+=e*X,_+=e*Z,b+=e*G,A+=e*W,S+=e*J,f+=(e=r[5])*D,c+=e*N,l+=e*M,p+=e*Y,g+=e*F,d+=e*j,y+=e*z,v+=e*V,m+=e*K,w+=e*H,E+=e*q,_+=e*X,b+=e*Z,A+=e*G,S+=e*W,x+=e*J,c+=(e=r[6])*D,l+=e*N,p+=e*M,g+=e*Y,d+=e*F,y+=e*j,v+=e*z,m+=e*V,w+=e*K,E+=e*H,_+=e*q,b+=e*X,A+=e*Z,S+=e*G,x+=e*W,I+=e*J,l+=(e=r[7])*D,p+=e*N,g+=e*M,d+=e*Y,y+=e*F,v+=e*j,m+=e*z,w+=e*V,E+=e*K,_+=e*H,b+=e*q,A+=e*X,S+=e*Z,x+=e*G,I+=e*W,R+=e*J,p+=(e=r[8])*D,g+=e*N,d+=e*M,y+=e*Y,v+=e*F,m+=e*j,w+=e*z,E+=e*V,_+=e*K,b+=e*H,A+=e*q,S+=e*X,x+=e*Z,I+=e*G,R+=e*W,T+=e*J,g+=(e=r[9])*D,d+=e*N,y+=e*M,v+=e*Y,m+=e*F,w+=e*j,E+=e*z,_+=e*V,b+=e*K,A+=e*H,S+=e*q,x+=e*X,I+=e*Z,R+=e*G,T+=e*W,P+=e*J,d+=(e=r[10])*D,y+=e*N,v+=e*M,m+=e*Y,w+=e*F,E+=e*j,_+=e*z,b+=e*V,A+=e*K,S+=e*H,x+=e*q,I+=e*X,R+=e*Z,T+=e*G,P+=e*W,B+=e*J,y+=(e=r[11])*D,v+=e*N,m+=e*M,w+=e*Y,E+=e*F,_+=e*j,b+=e*z,A+=e*V,S+=e*K,x+=e*H,I+=e*q,R+=e*X,T+=e*Z,P+=e*G,B+=e*W,C+=e*J,v+=(e=r[12])*D,m+=e*N,w+=e*M,E+=e*Y,_+=e*F,b+=e*j,A+=e*z,S+=e*V,x+=e*K,I+=e*H,R+=e*q,T+=e*X,P+=e*Z,B+=e*G,C+=e*W,U+=e*J,m+=(e=r[13])*D,w+=e*N,E+=e*M,_+=e*Y,b+=e*F,A+=e*j,S+=e*z,x+=e*V,I+=e*K,R+=e*H,T+=e*q,P+=e*X,B+=e*Z,C+=e*G,U+=e*W,O+=e*J,w+=(e=r[14])*D,E+=e*N,_+=e*M,b+=e*Y,A+=e*F,S+=e*j,x+=e*z,I+=e*V,R+=e*K,T+=e*H,P+=e*q,B+=e*X,C+=e*Z,U+=e*G,O+=e*W,L+=e*J,E+=(e=r[15])*D,s+=38*(b+=e*M),u+=38*(A+=e*Y),h+=38*(S+=e*F),a+=38*(x+=e*j),f+=38*(I+=e*z),c+=38*(R+=e*V),l+=38*(T+=e*K),p+=38*(P+=e*H),g+=38*(B+=e*q),d+=38*(C+=e*X),y+=38*(U+=e*Z),v+=38*(O+=e*G),m+=38*(L+=e*W),w+=38*(k+=e*J),o=(e=(o+=38*(_+=e*N))+(i=1)+65535)-65536*(i=Math.floor(e/65536)),s=(e=s+i+65535)-65536*(i=Math.floor(e/65536)),u=(e=u+i+65535)-65536*(i=Math.floor(e/65536)),h=(e=h+i+65535)-65536*(i=Math.floor(e/65536)),a=(e=a+i+65535)-65536*(i=Math.floor(e/65536)),f=(e=f+i+65535)-65536*(i=Math.floor(e/65536)),c=(e=c+i+65535)-65536*(i=Math.floor(e/65536)),l=(e=l+i+65535)-65536*(i=Math.floor(e/65536)),p=(e=p+i+65535)-65536*(i=Math.floor(e/65536)),g=(e=g+i+65535)-65536*(i=Math.floor(e/65536)),d=(e=d+i+65535)-65536*(i=Math.floor(e/65536)),y=(e=y+i+65535)-65536*(i=Math.floor(e/65536)),v=(e=v+i+65535)-65536*(i=Math.floor(e/65536)),m=(e=m+i+65535)-65536*(i=Math.floor(e/65536)),w=(e=w+i+65535)-65536*(i=Math.floor(e/65536)),E=(e=E+i+65535)-65536*(i=Math.floor(e/65536)),o=(e=(o+=i-1+37*(i-1))+(i=1)+65535)-65536*(i=Math.floor(e/65536)),s=(e=s+i+65535)-65536*(i=Math.floor(e/65536)),u=(e=u+i+65535)-65536*(i=Math.floor(e/65536)),h=(e=h+i+65535)-65536*(i=Math.floor(e/65536)),a=(e=a+i+65535)-65536*(i=Math.floor(e/65536)),f=(e=f+i+65535)-65536*(i=Math.floor(e/65536)),c=(e=c+i+65535)-65536*(i=Math.floor(e/65536)),l=(e=l+i+65535)-65536*(i=Math.floor(e/65536)),p=(e=p+i+65535)-65536*(i=Math.floor(e/65536)),g=(e=g+i+65535)-65536*(i=Math.floor(e/65536)),d=(e=d+i+65535)-65536*(i=Math.floor(e/65536)),y=(e=y+i+65535)-65536*(i=Math.floor(e/65536)),v=(e=v+i+65535)-65536*(i=Math.floor(e/65536)),m=(e=m+i+65535)-65536*(i=Math.floor(e/65536)),w=(e=w+i+65535)-65536*(i=Math.floor(e/65536)),E=(e=E+i+65535)-65536*(i=Math.floor(e/65536)),o+=i-1+37*(i-1),t[0]=o,t[1]=s,t[2]=u,t[3]=h,t[4]=a,t[5]=f,t[6]=c,t[7]=l,t[8]=p,t[9]=g,t[10]=d,t[11]=y,t[12]=v,t[13]=m,t[14]=w,t[15]=E}function F(t,r){Y(t,r,r)}function j(t,n){var e,i=r();for(e=0;e<16;e++)i[e]=n[e];for(e=253;e>=0;e--)F(i,i),2!==e&&4!==e&&Y(i,i,n);for(e=0;e<16;e++)t[e]=i[e]}function z(t,n,e){var i,o,s=new Uint8Array(32),u=new Float64Array(80),a=r(),f=r(),c=r(),l=r(),p=r(),g=r();for(o=0;o<31;o++)s[o]=n[o];for(s[31]=127&n[31]|64,s[0]&=248,D(u,e),o=0;o<16;o++)f[o]=u[o],l[o]=a[o]=c[o]=0;for(a[0]=l[0]=1,o=254;o>=0;--o)U(a,f,i=s[o>>>3]>>>(7&o)&1),U(c,l,i),N(p,a,c),M(a,a,c),N(c,f,l),M(f,f,l),F(l,p),F(g,a),Y(a,c,a),Y(c,f,p),N(p,a,c),M(a,a,c),F(f,a),M(c,l,g),Y(a,c,h),N(a,a,l),Y(c,c,a),Y(a,l,g),Y(l,f,u),F(f,p),U(a,f,i),U(c,l,i);for(o=0;o<16;o++)u[o+16]=a[o],u[o+32]=c[o],u[o+48]=f[o],u[o+64]=l[o];var d=u.subarray(32),y=u.subarray(16);return j(d,d),Y(y,y,d),O(t,y),0}function V(t,r){return z(t,r,o)}function K(t,r){return e(r,32),V(t,r)}function H(t,r,n){var e=new Uint8Array(32);return z(e,n,r),w(t,i,e,E)}x.prototype.blocks=function(t,r,n){for(var e,i,o,s,u,h,a,f,c,l,p,g,d,y,v,m,w,E,_,b=this.fin?0:2048,A=this.h[0],S=this.h[1],x=this.h[2],I=this.h[3],R=this.h[4],T=this.h[5],P=this.h[6],B=this.h[7],C=this.h[8],U=this.h[9],O=this.r[0],L=this.r[1],k=this.r[2],D=this.r[3],N=this.r[4],M=this.r[5],Y=this.r[6],F=this.r[7],j=this.r[8],z=this.r[9];n>=16;)l=c=0,l+=(A+=8191&(e=255&t[r+0]|(255&t[r+1])<<8))*O,l+=(S+=8191&(e>>>13|(i=255&t[r+2]|(255&t[r+3])<<8)<<3))*(5*z),l+=(x+=8191&(i>>>10|(o=255&t[r+4]|(255&t[r+5])<<8)<<6))*(5*j),l+=(I+=8191&(o>>>7|(s=255&t[r+6]|(255&t[r+7])<<8)<<9))*(5*F),c=(l+=(R+=8191&(s>>>4|(u=255&t[r+8]|(255&t[r+9])<<8)<<12))*(5*Y))>>>13,l&=8191,l+=(T+=u>>>1&8191)*(5*M),l+=(P+=8191&(u>>>14|(h=255&t[r+10]|(255&t[r+11])<<8)<<2))*(5*N),l+=(B+=8191&(h>>>11|(a=255&t[r+12]|(255&t[r+13])<<8)<<5))*(5*D),l+=(C+=8191&(a>>>8|(f=255&t[r+14]|(255&t[r+15])<<8)<<8))*(5*k),p=c+=(l+=(U+=f>>>5|b)*(5*L))>>>13,p+=A*L,p+=S*O,p+=x*(5*z),p+=I*(5*j),c=(p+=R*(5*F))>>>13,p&=8191,p+=T*(5*Y),p+=P*(5*M),p+=B*(5*N),p+=C*(5*D),c+=(p+=U*(5*k))>>>13,p&=8191,g=c,g+=A*k,g+=S*L,g+=x*O,g+=I*(5*z),c=(g+=R*(5*j))>>>13,g&=8191,g+=T*(5*F),g+=P*(5*Y),g+=B*(5*M),g+=C*(5*N),d=c+=(g+=U*(5*D))>>>13,d+=A*D,d+=S*k,d+=x*L,d+=I*O,c=(d+=R*(5*z))>>>13,d&=8191,d+=T*(5*j),d+=P*(5*F),d+=B*(5*Y),d+=C*(5*M),y=c+=(d+=U*(5*N))>>>13,y+=A*N,y+=S*D,y+=x*k,y+=I*L,c=(y+=R*O)>>>13,y&=8191,y+=T*(5*z),y+=P*(5*j),y+=B*(5*F),y+=C*(5*Y),v=c+=(y+=U*(5*M))>>>13,v+=A*M,v+=S*N,v+=x*D,v+=I*k,c=(v+=R*L)>>>13,v&=8191,v+=T*O,v+=P*(5*z),v+=B*(5*j),v+=C*(5*F),m=c+=(v+=U*(5*Y))>>>13,m+=A*Y,m+=S*M,m+=x*N,m+=I*D,c=(m+=R*k)>>>13,m&=8191,m+=T*L,m+=P*O,m+=B*(5*z),m+=C*(5*j),w=c+=(m+=U*(5*F))>>>13,w+=A*F,w+=S*Y,w+=x*M,w+=I*N,c=(w+=R*D)>>>13,w&=8191,w+=T*k,w+=P*L,w+=B*O,w+=C*(5*z),E=c+=(w+=U*(5*j))>>>13,E+=A*j,E+=S*F,E+=x*Y,E+=I*M,c=(E+=R*N)>>>13,E&=8191,E+=T*D,E+=P*k,E+=B*L,E+=C*O,_=c+=(E+=U*(5*z))>>>13,_+=A*z,_+=S*j,_+=x*F,_+=I*Y,c=(_+=R*M)>>>13,_&=8191,_+=T*N,_+=P*D,_+=B*k,_+=C*L,A=l=8191&(c=(c=((c+=(_+=U*O)>>>13)<<2)+c|0)+(l&=8191)|0),S=p+=c>>>=13,x=g&=8191,I=d&=8191,R=y&=8191,T=v&=8191,P=m&=8191,B=w&=8191,C=E&=8191,U=_&=8191,r+=16,n-=16;this.h[0]=A,this.h[1]=S,this.h[2]=x,this.h[3]=I,this.h[4]=R,this.h[5]=T,this.h[6]=P,this.h[7]=B,this.h[8]=C,this.h[9]=U},x.prototype.finish=function(t,r){var n,e,i,o,s=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(n=this.h[1]>>>13,this.h[1]&=8191,o=2;o<10;o++)this.h[o]+=n,n=this.h[o]>>>13,this.h[o]&=8191;for(this.h[0]+=5*n,n=this.h[0]>>>13,this.h[0]&=8191,this.h[1]+=n,n=this.h[1]>>>13,this.h[1]&=8191,this.h[2]+=n,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,o=1;o<10;o++)s[o]=this.h[o]+n,n=s[o]>>>13,s[o]&=8191;for(s[9]-=8192,e=(1^n)-1,o=0;o<10;o++)s[o]&=e;for(e=~e,o=0;o<10;o++)this.h[o]=this.h[o]&e|s[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;t[r+0]=this.h[0]>>>0&255,t[r+1]=this.h[0]>>>8&255,t[r+2]=this.h[1]>>>0&255,t[r+3]=this.h[1]>>>8&255,t[r+4]=this.h[2]>>>0&255,t[r+5]=this.h[2]>>>8&255,t[r+6]=this.h[3]>>>0&255,t[r+7]=this.h[3]>>>8&255,t[r+8]=this.h[4]>>>0&255,t[r+9]=this.h[4]>>>8&255,t[r+10]=this.h[5]>>>0&255,t[r+11]=this.h[5]>>>8&255,t[r+12]=this.h[6]>>>0&255,t[r+13]=this.h[6]>>>8&255,t[r+14]=this.h[7]>>>0&255,t[r+15]=this.h[7]>>>8&255},x.prototype.update=function(t,r,n){var e,i;if(this.leftover){for((i=16-this.leftover)>n&&(i=n),e=0;e<i;e++)this.buffer[this.leftover+e]=t[r+e];if(n-=i,r+=i,this.leftover+=i,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(i=n-n%16,this.blocks(t,r,i),r+=i,n-=i),n){for(e=0;e<n;e++)this.buffer[this.leftover+e]=t[r+e];this.leftover+=n}};var q=T,X=P;var Z=[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 G(t,r,n,e){for(var i,o,s,u,h,a,f,c,l,p,g,d,y,v,m,w,E,_,b,A,S,x,I,R,T,P,B=new Int32Array(16),C=new Int32Array(16),U=t[0],O=t[1],L=t[2],k=t[3],D=t[4],N=t[5],M=t[6],Y=t[7],F=r[0],j=r[1],z=r[2],V=r[3],K=r[4],H=r[5],q=r[6],X=r[7],G=0;e>=128;){for(b=0;b<16;b++)A=8*b+G,B[b]=n[A+0]<<24|n[A+1]<<16|n[A+2]<<8|n[A+3],C[b]=n[A+4]<<24|n[A+5]<<16|n[A+6]<<8|n[A+7];for(b=0;b<80;b++)if(i=U,o=O,s=L,u=k,h=D,a=N,f=M,Y,l=F,p=j,g=z,d=V,y=K,v=H,m=q,X,I=65535&(x=X),R=x>>>16,T=65535&(S=Y),P=S>>>16,I+=65535&(x=(K>>>14|D<<18)^(K>>>18|D<<14)^(D>>>9|K<<23)),R+=x>>>16,T+=65535&(S=(D>>>14|K<<18)^(D>>>18|K<<14)^(K>>>9|D<<23)),P+=S>>>16,I+=65535&(x=K&H^~K&q),R+=x>>>16,T+=65535&(S=D&N^~D&M),P+=S>>>16,S=Z[2*b],I+=65535&(x=Z[2*b+1]),R+=x>>>16,T+=65535&S,P+=S>>>16,S=B[b%16],R+=(x=C[b%16])>>>16,T+=65535&S,P+=S>>>16,T+=(R+=(I+=65535&x)>>>16)>>>16,I=65535&(x=_=65535&I|R<<16),R=x>>>16,T=65535&(S=E=65535&T|(P+=T>>>16)<<16),P=S>>>16,I+=65535&(x=(F>>>28|U<<4)^(U>>>2|F<<30)^(U>>>7|F<<25)),R+=x>>>16,T+=65535&(S=(U>>>28|F<<4)^(F>>>2|U<<30)^(F>>>7|U<<25)),P+=S>>>16,R+=(x=F&j^F&z^j&z)>>>16,T+=65535&(S=U&O^U&L^O&L),P+=S>>>16,c=65535&(T+=(R+=(I+=65535&x)>>>16)>>>16)|(P+=T>>>16)<<16,w=65535&I|R<<16,I=65535&(x=d),R=x>>>16,T=65535&(S=u),P=S>>>16,R+=(x=_)>>>16,T+=65535&(S=E),P+=S>>>16,O=i,L=o,k=s,D=u=65535&(T+=(R+=(I+=65535&x)>>>16)>>>16)|(P+=T>>>16)<<16,N=h,M=a,Y=f,U=c,j=l,z=p,V=g,K=d=65535&I|R<<16,H=y,q=v,X=m,F=w,b%16==15)for(A=0;A<16;A++)S=B[A],I=65535&(x=C[A]),R=x>>>16,T=65535&S,P=S>>>16,S=B[(A+9)%16],I+=65535&(x=C[(A+9)%16]),R+=x>>>16,T+=65535&S,P+=S>>>16,E=B[(A+1)%16],I+=65535&(x=((_=C[(A+1)%16])>>>1|E<<31)^(_>>>8|E<<24)^(_>>>7|E<<25)),R+=x>>>16,T+=65535&(S=(E>>>1|_<<31)^(E>>>8|_<<24)^E>>>7),P+=S>>>16,E=B[(A+14)%16],R+=(x=((_=C[(A+14)%16])>>>19|E<<13)^(E>>>29|_<<3)^(_>>>6|E<<26))>>>16,T+=65535&(S=(E>>>19|_<<13)^(_>>>29|E<<3)^E>>>6),P+=S>>>16,P+=(T+=(R+=(I+=65535&x)>>>16)>>>16)>>>16,B[A]=65535&T|P<<16,C[A]=65535&I|R<<16;I=65535&(x=F),R=x>>>16,T=65535&(S=U),P=S>>>16,S=t[0],R+=(x=r[0])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(R+=(I+=65535&x)>>>16)>>>16)>>>16,t[0]=U=65535&T|P<<16,r[0]=F=65535&I|R<<16,I=65535&(x=j),R=x>>>16,T=65535&(S=O),P=S>>>16,S=t[1],R+=(x=r[1])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(R+=(I+=65535&x)>>>16)>>>16)>>>16,t[1]=O=65535&T|P<<16,r[1]=j=65535&I|R<<16,I=65535&(x=z),R=x>>>16,T=65535&(S=L),P=S>>>16,S=t[2],R+=(x=r[2])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(R+=(I+=65535&x)>>>16)>>>16)>>>16,t[2]=L=65535&T|P<<16,r[2]=z=65535&I|R<<16,I=65535&(x=V),R=x>>>16,T=65535&(S=k),P=S>>>16,S=t[3],R+=(x=r[3])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(R+=(I+=65535&x)>>>16)>>>16)>>>16,t[3]=k=65535&T|P<<16,r[3]=V=65535&I|R<<16,I=65535&(x=K),R=x>>>16,T=65535&(S=D),P=S>>>16,S=t[4],R+=(x=r[4])>>>16,T+=65535&S,P+=S>>>16,P+=(T+=(R+=(I+=65535