27 lines
104 KiB
JavaScript
27 lines
104 KiB
JavaScript
!function(t,r){"object"==typeof exports&&"object"==typeof module?module.exports=r():"function"==typeof define&&define.amd?define("isoCrypto",[],r):"object"==typeof exports?exports.isoCrypto=r():t.isoCrypto=r()}(this,(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=16)}([function(t,r,n){"use strict";var e=n(2),i=n(28);function o(t,r){return 55296==(64512&t.charCodeAt(r))&&(!(r<0||r+1>=t.length)&&56320==(64512&t.charCodeAt(r+1)))}function u(t){return(t>>>24|t>>>8&65280|t<<8&16711680|(255&t)<<24)>>>0}function s(t){return 1===t.length?"0"+t:t}function f(t){return 7===t.length?"0"+t:6===t.length?"00"+t:5===t.length?"000"+t:4===t.length?"0000"+t:3===t.length?"00000"+t:2===t.length?"000000"+t:1===t.length?"0000000"+t:t}r.inherits=i,r.toArray=function(t,r){if(Array.isArray(t))return t.slice();if(!t)return[];var n=[];if("string"==typeof t)if(r){if("hex"===r)for((t=t.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(t="0"+t),i=0;i<t.length;i+=2)n.push(parseInt(t[i]+t[i+1],16))}else for(var e=0,i=0;i<t.length;i++){var u=t.charCodeAt(i);u<128?n[e++]=u:u<2048?(n[e++]=u>>6|192,n[e++]=63&u|128):o(t,i)?(u=65536+((1023&u)<<10)+(1023&t.charCodeAt(++i)),n[e++]=u>>18|240,n[e++]=u>>12&63|128,n[e++]=u>>6&63|128,n[e++]=63&u|128):(n[e++]=u>>12|224,n[e++]=u>>6&63|128,n[e++]=63&u|128)}else for(i=0;i<t.length;i++)n[i]=0|t[i];return n},r.toHex=function(t){for(var r="",n=0;n<t.length;n++)r+=s(t[n].toString(16));return r},r.htonl=u,r.toHex32=function(t,r){for(var n="",e=0;e<t.length;e++){var i=t[e];"little"===r&&(i=u(i)),n+=f(i.toString(16))}return n},r.zero2=s,r.zero8=f,r.join32=function(t,r,n,i){var o=n-r;e(o%4==0);for(var u=new Array(o/4),s=0,f=r;s<u.length;s++,f+=4){var a;a="big"===i?t[f]<<24|t[f+1]<<16|t[f+2]<<8|t[f+3]:t[f+3]<<24|t[f+2]<<16|t[f+1]<<8|t[f],u[s]=a>>>0}return u},r.split32=function(t,r){for(var n=new Array(4*t.length),e=0,i=0;e<t.length;e++,i+=4){var o=t[e];"big"===r?(n[i]=o>>>24,n[i+1]=o>>>16&255,n[i+2]=o>>>8&255,n[i+3]=255&o):(n[i+3]=o>>>24,n[i+2]=o>>>16&255,n[i+1]=o>>>8&255,n[i]=255&o)}return n},r.rotr32=function(t,r){return t>>>r|t<<32-r},r.rotl32=function(t,r){return t<<r|t>>>32-r},r.sum32=function(t,r){return t+r>>>0},r.sum32_3=function(t,r,n){return t+r+n>>>0},r.sum32_4=function(t,r,n,e){return t+r+n+e>>>0},r.sum32_5=function(t,r,n,e,i){return t+r+n+e+i>>>0},r.sum64=function(t,r,n,e){var i=t[r],o=e+t[r+1]>>>0,u=(o<e?1:0)+n+i;t[r]=u>>>0,t[r+1]=o},r.sum64_hi=function(t,r,n,e){return(r+e>>>0<r?1:0)+t+n>>>0},r.sum64_lo=function(t,r,n,e){return r+e>>>0},r.sum64_4_hi=function(t,r,n,e,i,o,u,s){var f=0,a=r;return f+=(a=a+e>>>0)<r?1:0,f+=(a=a+o>>>0)<o?1:0,t+n+i+u+(f+=(a=a+s>>>0)<s?1:0)>>>0},r.sum64_4_lo=function(t,r,n,e,i,o,u,s){return r+e+o+s>>>0},r.sum64_5_hi=function(t,r,n,e,i,o,u,s,f,a){var h=0,c=r;return h+=(c=c+e>>>0)<r?1:0,h+=(c=c+o>>>0)<o?1:0,h+=(c=c+s>>>0)<s?1:0,t+n+i+u+f+(h+=(c=c+a>>>0)<a?1:0)>>>0},r.sum64_5_lo=function(t,r,n,e,i,o,u,s,f,a){return r+e+o+s+a>>>0},r.rotr64_hi=function(t,r,n){return(r<<32-n|t>>>n)>>>0},r.rotr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0},r.shr64_hi=function(t,r,n){return t>>>n},r.shr64_lo=function(t,r,n){return(t<<32-n|r>>>n)>>>0}},function(t,r,n){"use strict";n.r(r),n.d(r,"__extends",(function(){return i})),n.d(r,"__assign",(function(){return o})),n.d(r,"__rest",(function(){return u})),n.d(r,"__decorate",(function(){return s})),n.d(r,"__param",(function(){return f})),n.d(r,"__metadata",(function(){return a})),n.d(r,"__awaiter",(function(){return h})),n.d(r,"__generator",(function(){return c})),n.d(r,"__createBinding",(function(){return l})),n.d(r,"__exportStar",(function(){return p})),n.d(r,"__values",(function(){return d})),n.d(r,"__read",(function(){return y})),n.d(r,"__spread",(function(){return g})),n.d(r,"__spreadArrays",(function(){return _})),n.d(r,"__await",(function(){return v})),n.d(r,"__asyncGenerator",(function(){return b})),n.d(r,"__asyncDelegator",(function(){return w})),n.d(r,"__asyncValues",(function(){return m})),n.d(r,"__makeTemplateObject",(function(){return E})),n.d(r,"__importStar",(function(){return A})),n.d(r,"__importDefault",(function(){return S})),n.d(r,"__classPrivateFieldGet",(function(){return T})),n.d(r,"__classPrivateFieldSet",(function(){return O}));
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */
|
|
var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,r){t.__proto__=r}||function(t,r){for(var n in r)r.hasOwnProperty(n)&&(t[n]=r[n])})(t,r)};function i(t,r){function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}var o=function(){return(o=Object.assign||function(t){for(var r,n=1,e=arguments.length;n<e;n++)for(var i in r=arguments[n])Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i]);return t}).apply(this,arguments)};function u(t,r){var n={};for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&r.indexOf(e)<0&&(n[e]=t[e]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(e=Object.getOwnPropertySymbols(t);i<e.length;i++)r.indexOf(e[i])<0&&Object.prototype.propertyIsEnumerable.call(t,e[i])&&(n[e[i]]=t[e[i]])}return n}function s(t,r,n,e){var i,o=arguments.length,u=o<3?r:null===e?e=Object.getOwnPropertyDescriptor(r,n):e;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)u=Reflect.decorate(t,r,n,e);else for(var s=t.length-1;s>=0;s--)(i=t[s])&&(u=(o<3?i(u):o>3?i(r,n,u):i(r,n))||u);return o>3&&u&&Object.defineProperty(r,n,u),u}function f(t,r){return function(n,e){r(n,e,t)}}function a(t,r){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,r)}function h(t,r,n,e){return new(n||(n=Promise))((function(i,o){function u(t){try{f(e.next(t))}catch(t){o(t)}}function s(t){try{f(e.throw(t))}catch(t){o(t)}}function f(t){var r;t.done?i(t.value):(r=t.value,r instanceof n?r:new n((function(t){t(r)}))).then(u,s)}f((e=e.apply(t,r||[])).next())}))}function c(t,r){var n,e,i,o,u={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;u;)try{if(n=1,e&&(i=2&o[0]?e.return:o[0]?e.throw||((i=e.return)&&i.call(e),0):e.next)&&!(i=i.call(e,o[1])).done)return i;switch(e=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return u.label++,{value:o[1],done:!1};case 5:u.label++,e=o[1],o=[0];continue;case 7:o=u.ops.pop(),u.trys.pop();continue;default:if(!(i=u.trys,(i=i.length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){u=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){u.label=o[1];break}if(6===o[0]&&u.label<i[1]){u.label=i[1],i=o;break}if(i&&u.label<i[2]){u.label=i[2],u.ops.push(o);break}i[2]&&u.ops.pop(),u.trys.pop();continue}o=r.call(t,u)}catch(t){o=[6,t],e=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}function l(t,r,n,e){void 0===e&&(e=n),t[e]=r[n]}function p(t,r){for(var n in t)"default"===n||r.hasOwnProperty(n)||(r[n]=t[n])}function d(t){var r="function"==typeof Symbol&&Symbol.iterator,n=r&&t[r],e=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&e>=t.length&&(t=void 0),{value:t&&t[e++],done:!t}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")}function y(t,r){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var e,i,o=n.call(t),u=[];try{for(;(void 0===r||r-- >0)&&!(e=o.next()).done;)u.push(e.value)}catch(t){i={error:t}}finally{try{e&&!e.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u}function g(){for(var t=[],r=0;r<arguments.length;r++)t=t.concat(y(arguments[r]));return t}function _(){for(var t=0,r=0,n=arguments.length;r<n;r++)t+=arguments[r].length;var e=Array(t),i=0;for(r=0;r<n;r++)for(var o=arguments[r],u=0,s=o.length;u<s;u++,i++)e[i]=o[u];return e}function v(t){return this instanceof v?(this.v=t,this):new v(t)}function b(t,r,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e,i=n.apply(t,r||[]),o=[];return e={},u("next"),u("throw"),u("return"),e[Symbol.asyncIterator]=function(){return this},e;function u(t){i[t]&&(e[t]=function(r){return new Promise((function(n,e){o.push([t,r,n,e])>1||s(t,r)}))})}function s(t,r){try{(n=i[t](r)).value instanceof v?Promise.resolve(n.value.v).then(f,a):h(o[0][2],n)}catch(t){h(o[0][3],t)}var n}function f(t){s("next",t)}function a(t){s("throw",t)}function h(t,r){t(r),o.shift(),o.length&&s(o[0][0],o[0][1])}}function w(t){var r,n;return r={},e("next"),e("throw",(function(t){throw t})),e("return"),r[Symbol.iterator]=function(){return this},r;function e(e,i){r[e]=t[e]?function(r){return(n=!n)?{value:v(t[e](r)),done:"return"===e}:i?i(r):r}:i}}function m(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,n=t[Symbol.asyncIterator];return n?n.call(t):(t=d(t),r={},e("next"),e("throw"),e("return"),r[Symbol.asyncIterator]=function(){return this},r);function e(n){r[n]=t[n]&&function(r){return new Promise((function(e,i){(function(t,r,n,e){Promise.resolve(e).then((function(r){t({value:r,done:n})}),r)})(e,i,(r=t[n](r)).done,r.value)}))}}}function E(t,r){return Object.defineProperty?Object.defineProperty(t,"raw",{value:r}):t.raw=r,t}function A(t){if(t&&t.__esModule)return t;var r={};if(null!=t)for(var n in t)Object.hasOwnProperty.call(t,n)&&(r[n]=t[n]);return r.default=t,r}function S(t){return t&&t.__esModule?t:{default:t}}function T(t,r){if(!r.has(t))throw new TypeError("attempted to get private field on non-instance");return r.get(t)}function O(t,r,n){if(!r.has(t))throw new TypeError("attempted to set private field on non-instance");return r.set(t,n),n}},function(t,r){function n(t,r){if(!t)throw new Error(r||"Assertion failed")}t.exports=n,n.equal=function(t,r,n){if(t!=r)throw new Error(n||"Assertion failed: "+t+" != "+r)}},function(t,r,n){"use strict";var e=n(0),i=n(2);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}r.BlockHash=o,o.prototype.update=function(t,r){if(t=e.toArray(t,r),this.pending?this.pending=this.pending.concat(t):this.pending=t,this.pendingTotal+=t.length,this.pending.length>=this._delta8){var n=(t=this.pending).length%this._delta8;this.pending=t.slice(t.length-n,t.length),0===this.pending.length&&(this.pending=null),t=e.join32(t,0,t.length-n,this.endian);for(var i=0;i<t.length;i+=this._delta32)this._update(t,i,i+this._delta32)}return this},o.prototype.digest=function(t){return this.update(this._pad()),i(null===this.pending),this._digest(t)},o.prototype._pad=function(){var t=this.pendingTotal,r=this._delta8,n=r-(t+this.padLength)%r,e=new Array(n+this.padLength);e[0]=128;for(var i=1;i<n;i++)e[i]=0;if(t<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)e[i++]=0;e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=t>>>24&255,e[i++]=t>>>16&255,e[i++]=t>>>8&255,e[i++]=255&t}else for(e[i++]=255&t,e[i++]=t>>>8&255,e[i++]=t>>>16&255,e[i++]=t>>>24&255,e[i++]=0,e[i++]=0,e[i++]=0,e[i++]=0,o=8;o<this.padLength;o++)e[i++]=0;return e}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.fallbackRipemd160=r.fallbackSha512=r.fallbackSha256=r.fallbackHmacSha512Sign=r.fallbackHmacSha256Sign=r.fallbackAesDecrypt=r.fallbackAesEncrypt=void 0;const e=n(1),i=e.__importDefault(n(22)),o=n(23),u=e.__importStar(n(27)),s=n(13),f=n(5);r.fallbackAesEncrypt=function(t,r,n){const e=new i.default.ModeOfOperation.cbc(r,t),o=f.pkcs7.pad(n),u=e.encrypt(o);return new Uint8Array(u)},r.fallbackAesDecrypt=function(t,r,n){const e=new i.default.ModeOfOperation.cbc(r,t).decrypt(n),o=new Uint8Array(e);return f.pkcs7.unpad(o)},r.fallbackHmacSha256Sign=function(t,r){const n=u.hmac(u[s.SHA256_NODE_ALGO],t).update(r).digest(s.HEX_ENC);return o.hexToArray(n)},r.fallbackHmacSha512Sign=function(t,r){const n=u.hmac(u[s.SHA512_NODE_ALGO],t).update(r).digest(s.HEX_ENC);return o.hexToArray(n)},r.fallbackSha256=function(t){const r=u.sha256().update(t).digest(s.HEX_ENC);return o.hexToArray(r)},r.fallbackSha512=function(t){const r=u.sha512().update(t).digest(s.HEX_ENC);return o.hexToArray(r)},r.fallbackRipemd160=function(t){const r=u.ripemd160().update(t).digest(s.HEX_ENC);return o.hexToArray(r)}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const e=n(1);e.__exportStar(n(39),r),e.__exportStar(n(40),r),e.__exportStar(n(41),r),e.__exportStar(n(42),r)},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const e=n(1);e.__exportStar(n(18),r),e.__exportStar(n(19),r)},function(t,r){t.exports=i,i.strict=o,i.loose=u;var n=Object.prototype.toString,e={"[object Int8Array]":!0,"[object Int16Array]":!0,"[object Int32Array]":!0,"[object Uint8Array]":!0,"[object Uint8ClampedArray]":!0,"[object Uint16Array]":!0,"[object Uint32Array]":!0,"[object Float32Array]":!0,"[object Float64Array]":!0};function i(t){return o(t)||u(t)}function o(t){return t instanceof Int8Array||t instanceof Int16Array||t instanceof Int32Array||t instanceof Uint8Array||t instanceof Uint8ClampedArray||t instanceof Uint16Array||t instanceof Uint32Array||t instanceof Float32Array||t instanceof Float64Array}function u(t){return e[n.call(t)]}},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){"use strict";(function(t){
|
|
/*!
|
|
* The buffer module from node.js, for the browser.
|
|
*
|
|
* @author Feross Aboukhadijeh <http://feross.org>
|
|
* @license MIT
|
|
*/
|
|
var e=n(24),i=n(25),o=n(26);function u(){return f.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(t,r){if(u()<r)throw new RangeError("Invalid typed array length");return f.TYPED_ARRAY_SUPPORT?(t=new Uint8Array(r)).__proto__=f.prototype:(null===t&&(t=new f(r)),t.length=r),t}function f(t,r,n){if(!(f.TYPED_ARRAY_SUPPORT||this instanceof f))return new f(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);f.TYPED_ARRAY_SUPPORT?(t=r).__proto__=f.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(!f.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var e=0|d(r,n),i=(t=s(t,e)).write(r,n);i!==e&&(t=t.slice(0,i));return t}(t,r,n):function(t,r){if(f.isBuffer(r)){var n=0|p(r.length);return 0===(t=s(t,n)).length||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?s(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 h(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(h(r),t=s(t,r<0?0:0|p(r)),!f.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=s(t,n);for(var e=0;e<n;e+=1)t[e]=255&r[e];return t}function p(t){if(t>=u())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+u().toString(16)+" bytes");return 0|t}function d(t,r){if(f.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 z(t).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return G(t).length;default:if(e)return z(t).length;r=(""+r).toLowerCase(),e=!0}}function y(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 O(this,r,n);case"ascii":return R(this,r,n);case"latin1":case"binary":return x(this,r,n);case"base64":return T(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}}function g(t,r,n){var e=t[r];t[r]=t[n],t[n]=e}function _(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=f.from(r,e)),f.isBuffer(r))return 0===r.length?-1:v(t,r,n,e,i);if("number"==typeof r)return r&=255,f.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,u=1,s=t.length,f=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;u=2,s/=2,f/=2,n/=2}function a(t,r){return 1===u?t[r]:t.readUInt16BE(r*u)}if(i){var h=-1;for(o=n;o<s;o++)if(a(t,o)===a(r,-1===h?0:o-h)){if(-1===h&&(h=o),o-h+1===f)return h*u}else-1!==h&&(o-=o-h),h=-1}else for(n+f>s&&(n=s-f),o=n;o>=0;o--){for(var c=!0,l=0;l<f;l++)if(a(t,o+l)!==a(r,l)){c=!1;break}if(c)return o}return-1}function b(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 u=0;u<e;++u){var s=parseInt(r.substr(2*u,2),16);if(isNaN(s))return u;t[n+u]=s}return u}function w(t,r,n,e){return Y(z(r,t.length-n),t,n,e)}function m(t,r,n,e){return Y(function(t){for(var r=[],n=0;n<t.length;++n)r.push(255&t.charCodeAt(n));return r}(r),t,n,e)}function E(t,r,n,e){return m(t,r,n,e)}function A(t,r,n,e){return Y(G(r),t,n,e)}function S(t,r,n,e){return Y(function(t,r){for(var n,e,i,o=[],u=0;u<t.length&&!((r-=2)<0);++u)n=t.charCodeAt(u),e=n>>8,i=n%256,o.push(i),o.push(e);return o}(r,t.length-n),t,n,e)}function T(t,r,n){return 0===r&&n===t.length?e.fromByteArray(t):e.fromByteArray(t.slice(r,n))}function O(t,r,n){n=Math.min(t.length,n);for(var e=[],i=r;i<n;){var o,u,s,f,a=t[i],h=null,c=a>239?4:a>223?3:a>191?2:1;if(i+c<=n)switch(c){case 1:a<128&&(h=a);break;case 2:128==(192&(o=t[i+1]))&&(f=(31&a)<<6|63&o)>127&&(h=f);break;case 3:o=t[i+1],u=t[i+2],128==(192&o)&&128==(192&u)&&(f=(15&a)<<12|(63&o)<<6|63&u)>2047&&(f<55296||f>57343)&&(h=f);break;case 4:o=t[i+1],u=t[i+2],s=t[i+3],128==(192&o)&&128==(192&u)&&128==(192&s)&&(f=(15&a)<<18|(63&o)<<12|(63&u)<<6|63&s)>65535&&f<1114112&&(h=f)}null===h?(h=65533,c=1):h>65535&&(h-=65536,e.push(h>>>10&1023|55296),h=56320|1023&h),e.push(h),i+=c}return function(t){var r=t.length;if(r<=4096)return String.fromCharCode.apply(String,t);var n="",e=0;for(;e<r;)n+=String.fromCharCode.apply(String,t.slice(e,e+=4096));return n}(e)}r.Buffer=f,r.SlowBuffer=function(t){+t!=t&&(t=0);return f.alloc(+t)},r.INSPECT_MAX_BYTES=50,f.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=u(),f.poolSize=8192,f._augment=function(t){return t.__proto__=f.prototype,t},f.from=function(t,r,n){return a(null,t,r,n)},f.TYPED_ARRAY_SUPPORT&&(f.prototype.__proto__=Uint8Array.prototype,f.__proto__=Uint8Array,"undefined"!=typeof Symbol&&Symbol.species&&f[Symbol.species]===f&&Object.defineProperty(f,Symbol.species,{value:null,configurable:!0})),f.alloc=function(t,r,n){return function(t,r,n,e){return h(r),r<=0?s(t,r):void 0!==n?"string"==typeof e?s(t,r).fill(n,e):s(t,r).fill(n):s(t,r)}(null,t,r,n)},f.allocUnsafe=function(t){return c(null,t)},f.allocUnsafeSlow=function(t){return c(null,t)},f.isBuffer=function(t){return!(null==t||!t._isBuffer)},f.compare=function(t,r){if(!f.isBuffer(t)||!f.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},f.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}},f.concat=function(t,r){if(!o(t))throw new TypeError('"list" argument must be an Array of Buffers');if(0===t.length)return f.alloc(0);var n;if(void 0===r)for(r=0,n=0;n<t.length;++n)r+=t[n].length;var e=f.allocUnsafe(r),i=0;for(n=0;n<t.length;++n){var u=t[n];if(!f.isBuffer(u))throw new TypeError('"list" argument must be an Array of Buffers');u.copy(e,i),i+=u.length}return e},f.byteLength=d,f.prototype._isBuffer=!0,f.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)g(this,r,r+1);return this},f.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)g(this,r,r+3),g(this,r+1,r+2);return this},f.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)g(this,r,r+7),g(this,r+1,r+6),g(this,r+2,r+5),g(this,r+3,r+4);return this},f.prototype.toString=function(){var t=0|this.length;return 0===t?"":0===arguments.length?O(this,0,t):y.apply(this,arguments)},f.prototype.equals=function(t){if(!f.isBuffer(t))throw new TypeError("Argument must be a Buffer");return this===t||0===f.compare(this,t)},f.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+">"},f.prototype.compare=function(t,r,n,e,i){if(!f.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),u=(n>>>=0)-(r>>>=0),s=Math.min(o,u),a=this.slice(e,i),h=t.slice(r,n),c=0;c<s;++c)if(a[c]!==h[c]){o=a[c],u=h[c];break}return o<u?-1:u<o?1:0},f.prototype.includes=function(t,r,n){return-1!==this.indexOf(t,r,n)},f.prototype.indexOf=function(t,r,n){return _(this,t,r,n,!0)},f.prototype.lastIndexOf=function(t,r,n){return _(this,t,r,n,!1)},f.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 b(this,t,r,n);case"utf8":case"utf-8":return w(this,t,r,n);case"ascii":return m(this,t,r,n);case"latin1":case"binary":return E(this,t,r,n);case"base64":return A(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+e);e=(""+e).toLowerCase(),o=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};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 x(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+=j(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 L(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 C(t,r,n,e,i,o){if(!f.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 H(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 k(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 N(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 I(t,r,n,e,o){return o||N(t,0,n,4),i.write(t,r,n,e,23,4),n+4}function U(t,r,n,e,o){return o||N(t,0,n,8),i.write(t,r,n,e,52,8),n+8}f.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),f.TYPED_ARRAY_SUPPORT)(n=this.subarray(t,r)).__proto__=f.prototype;else{var i=r-t;n=new f(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+t]}return n},f.prototype.readUIntLE=function(t,r,n){t|=0,r|=0,n||L(t,r,this.length);for(var e=this[t],i=1,o=0;++o<r&&(i*=256);)e+=this[t+o]*i;return e},f.prototype.readUIntBE=function(t,r,n){t|=0,r|=0,n||L(t,r,this.length);for(var e=this[t+--r],i=1;r>0&&(i*=256);)e+=this[t+--r]*i;return e},f.prototype.readUInt8=function(t,r){return r||L(t,1,this.length),this[t]},f.prototype.readUInt16LE=function(t,r){return r||L(t,2,this.length),this[t]|this[t+1]<<8},f.prototype.readUInt16BE=function(t,r){return r||L(t,2,this.length),this[t]<<8|this[t+1]},f.prototype.readUInt32LE=function(t,r){return r||L(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+16777216*this[t+3]},f.prototype.readUInt32BE=function(t,r){return r||L(t,4,this.length),16777216*this[t]+(this[t+1]<<16|this[t+2]<<8|this[t+3])},f.prototype.readIntLE=function(t,r,n){t|=0,r|=0,n||L(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},f.prototype.readIntBE=function(t,r,n){t|=0,r|=0,n||L(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},f.prototype.readInt8=function(t,r){return r||L(t,1,this.length),128&this[t]?-1*(255-this[t]+1):this[t]},f.prototype.readInt16LE=function(t,r){r||L(t,2,this.length);var n=this[t]|this[t+1]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt16BE=function(t,r){r||L(t,2,this.length);var n=this[t+1]|this[t]<<8;return 32768&n?4294901760|n:n},f.prototype.readInt32LE=function(t,r){return r||L(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24},f.prototype.readInt32BE=function(t,r){return r||L(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]},f.prototype.readFloatLE=function(t,r){return r||L(t,4,this.length),i.read(this,t,!0,23,4)},f.prototype.readFloatBE=function(t,r){return r||L(t,4,this.length),i.read(this,t,!1,23,4)},f.prototype.readDoubleLE=function(t,r){return r||L(t,8,this.length),i.read(this,t,!0,52,8)},f.prototype.readDoubleBE=function(t,r){return r||L(t,8,this.length),i.read(this,t,!1,52,8)},f.prototype.writeUIntLE=function(t,r,n,e){(t=+t,r|=0,n|=0,e)||C(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},f.prototype.writeUIntBE=function(t,r,n,e){(t=+t,r|=0,n|=0,e)||C(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},f.prototype.writeUInt8=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,1,255,0),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),this[r]=255&t,r+1},f.prototype.writeUInt16LE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):H(this,t,r,!0),r+2},f.prototype.writeUInt16BE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,2,65535,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):H(this,t,r,!1),r+2},f.prototype.writeUInt32LE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=255&t):k(this,t,r,!0),r+4},f.prototype.writeUInt32BE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,4,4294967295,0),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},f.prototype.writeIntLE=function(t,r,n,e){if(t=+t,r|=0,!e){var i=Math.pow(2,8*n-1);C(this,t,r,n,i-1,-i)}var o=0,u=1,s=0;for(this[r]=255&t;++o<n&&(u*=256);)t<0&&0===s&&0!==this[r+o-1]&&(s=1),this[r+o]=(t/u>>0)-s&255;return r+n},f.prototype.writeIntBE=function(t,r,n,e){if(t=+t,r|=0,!e){var i=Math.pow(2,8*n-1);C(this,t,r,n,i-1,-i)}var o=n-1,u=1,s=0;for(this[r+o]=255&t;--o>=0&&(u*=256);)t<0&&0===s&&0!==this[r+o+1]&&(s=1),this[r+o]=(t/u>>0)-s&255;return r+n},f.prototype.writeInt8=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,1,127,-128),f.TYPED_ARRAY_SUPPORT||(t=Math.floor(t)),t<0&&(t=255+t+1),this[r]=255&t,r+1},f.prototype.writeInt16LE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8):H(this,t,r,!0),r+2},f.prototype.writeInt16BE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,2,32767,-32768),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>8,this[r+1]=255&t):H(this,t,r,!1),r+2},f.prototype.writeInt32LE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,4,2147483647,-2147483648),f.TYPED_ARRAY_SUPPORT?(this[r]=255&t,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24):k(this,t,r,!0),r+4},f.prototype.writeInt32BE=function(t,r,n){return t=+t,r|=0,n||C(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),f.TYPED_ARRAY_SUPPORT?(this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=255&t):k(this,t,r,!1),r+4},f.prototype.writeFloatLE=function(t,r,n){return I(this,t,r,!0,n)},f.prototype.writeFloatBE=function(t,r,n){return I(this,t,r,!1,n)},f.prototype.writeDoubleLE=function(t,r,n){return U(this,t,r,!0,n)},f.prototype.writeDoubleBE=function(t,r,n){return U(this,t,r,!1,n)},f.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||!f.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},f.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&&!f.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 u=f.isBuffer(t)?t:z(new f(t,e).toString()),s=u.length;for(o=0;o<n-r;++o)this[o+r]=u[o%s]}return this};var M=/[^+\/0-9A-Za-z-_]/g;function j(t){return t<16?"0"+t.toString(16):t.toString(16)}function z(t,r){var n;r=r||1/0;for(var e=t.length,i=null,o=[],u=0;u<e;++u){if((n=t.charCodeAt(u))>55295&&n<57344){if(!i){if(n>56319){(r-=3)>-1&&o.push(239,191,189);continue}if(u+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 G(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 Y(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(8))},function(t,r,n){"use strict";var e=n(0).rotr32;function i(t,r,n){return t&r^~t&n}function o(t,r,n){return t&r^t&n^r&n}function u(t,r,n){return t^r^n}r.ft_1=function(t,r,n,e){return 0===t?i(r,n,e):1===t||3===t?u(r,n,e):2===t?o(r,n,e):void 0},r.ch32=i,r.maj32=o,r.p32=u,r.s0_256=function(t){return e(t,2)^e(t,13)^e(t,22)},r.s1_256=function(t){return e(t,6)^e(t,11)^e(t,25)},r.g0_256=function(t){return e(t,7)^e(t,18)^t>>>3},r.g1_256=function(t){return e(t,17)^e(t,19)^t>>>10}},function(t,r,n){"use strict";var e=n(0),i=n(3),o=n(10),u=n(2),s=e.sum32,f=e.sum32_4,a=e.sum32_5,h=o.ch32,c=o.maj32,l=o.s0_256,p=o.s1_256,d=o.g0_256,y=o.g1_256,g=i.BlockHash,_=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function v(){if(!(this instanceof v))return new v;g.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=_,this.W=new Array(64)}e.inherits(v,g),t.exports=v,v.blockSize=512,v.outSize=256,v.hmacStrength=192,v.padLength=64,v.prototype._update=function(t,r){for(var n=this.W,e=0;e<16;e++)n[e]=t[r+e];for(;e<n.length;e++)n[e]=f(y(n[e-2]),n[e-7],d(n[e-15]),n[e-16]);var i=this.h[0],o=this.h[1],g=this.h[2],_=this.h[3],v=this.h[4],b=this.h[5],w=this.h[6],m=this.h[7];for(u(this.k.length===n.length),e=0;e<n.length;e++){var E=a(m,p(v),h(v,b,w),this.k[e],n[e]),A=s(l(i),c(i,o,g));m=w,w=b,b=v,v=s(_,E),_=g,g=o,o=i,i=s(E,A)}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],g),this.h[3]=s(this.h[3],_),this.h[4]=s(this.h[4],v),this.h[5]=s(this.h[5],b),this.h[6]=s(this.h[6],w),this.h[7]=s(this.h[7],m)},v.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r,n){"use strict";var e=n(0),i=n(3),o=n(2),u=e.rotr64_hi,s=e.rotr64_lo,f=e.shr64_hi,a=e.shr64_lo,h=e.sum64,c=e.sum64_hi,l=e.sum64_lo,p=e.sum64_4_hi,d=e.sum64_4_lo,y=e.sum64_5_hi,g=e.sum64_5_lo,_=i.BlockHash,v=[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 b(){if(!(this instanceof b))return new b;_.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=v,this.W=new Array(160)}function w(t,r,n,e,i){var o=t&n^~t&i;return o<0&&(o+=4294967296),o}function m(t,r,n,e,i,o){var u=r&e^~r&o;return u<0&&(u+=4294967296),u}function E(t,r,n,e,i){var o=t&n^t&i^n&i;return o<0&&(o+=4294967296),o}function A(t,r,n,e,i,o){var u=r&e^r&o^e&o;return u<0&&(u+=4294967296),u}function S(t,r){var n=u(t,r,28)^u(r,t,2)^u(r,t,7);return n<0&&(n+=4294967296),n}function T(t,r){var n=s(t,r,28)^s(r,t,2)^s(r,t,7);return n<0&&(n+=4294967296),n}function O(t,r){var n=u(t,r,14)^u(t,r,18)^u(r,t,9);return n<0&&(n+=4294967296),n}function R(t,r){var n=s(t,r,14)^s(t,r,18)^s(r,t,9);return n<0&&(n+=4294967296),n}function x(t,r){var n=u(t,r,1)^u(t,r,8)^f(t,r,7);return n<0&&(n+=4294967296),n}function P(t,r){var n=s(t,r,1)^s(t,r,8)^a(t,r,7);return n<0&&(n+=4294967296),n}function B(t,r){var n=u(t,r,19)^u(r,t,29)^f(t,r,6);return n<0&&(n+=4294967296),n}function L(t,r){var n=s(t,r,19)^s(r,t,29)^a(t,r,6);return n<0&&(n+=4294967296),n}e.inherits(b,_),t.exports=b,b.blockSize=1024,b.outSize=512,b.hmacStrength=192,b.padLength=128,b.prototype._prepareBlock=function(t,r){for(var n=this.W,e=0;e<32;e++)n[e]=t[r+e];for(;e<n.length;e+=2){var i=B(n[e-4],n[e-3]),o=L(n[e-4],n[e-3]),u=n[e-14],s=n[e-13],f=x(n[e-30],n[e-29]),a=P(n[e-30],n[e-29]),h=n[e-32],c=n[e-31];n[e]=p(i,o,u,s,f,a,h,c),n[e+1]=d(i,o,u,s,f,a,h,c)}},b.prototype._update=function(t,r){this._prepareBlock(t,r);var n=this.W,e=this.h[0],i=this.h[1],u=this.h[2],s=this.h[3],f=this.h[4],a=this.h[5],p=this.h[6],d=this.h[7],_=this.h[8],v=this.h[9],b=this.h[10],x=this.h[11],P=this.h[12],B=this.h[13],L=this.h[14],C=this.h[15];o(this.k.length===n.length);for(var H=0;H<n.length;H+=2){var k=L,N=C,I=O(_,v),U=R(_,v),M=w(_,v,b,x,P),j=m(_,v,b,x,P,B),z=this.k[H],G=this.k[H+1],Y=n[H],D=n[H+1],F=y(k,N,I,U,M,j,z,G,Y,D),K=g(k,N,I,U,M,j,z,G,Y,D);k=S(e,i),N=T(e,i),I=E(e,i,u,s,f),U=A(e,i,u,s,f,a);var W=c(k,N,I,U),V=l(k,N,I,U);L=P,C=B,P=b,B=x,b=_,x=v,_=c(p,d,F,K),v=l(d,d,F,K),p=f,d=a,f=u,a=s,u=e,s=i,e=c(F,K,W,V),i=l(F,K,W,V)}h(this.h,0,e,i),h(this.h,2,u,s),h(this.h,4,f,a),h(this.h,6,p,d),h(this.h,8,_,v),h(this.h,10,b,x),h(this.h,12,P,B),h(this.h,14,L,C)},b.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const e=n(1);e.__exportStar(n(35),r),e.__exportStar(n(36),r),e.__exportStar(n(37),r),e.__exportStar(n(14),r),e.__exportStar(n(38),r)},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.LENGTH_1024=r.LENGTH_512=r.LENGTH_256=r.LENGTH_128=r.LENGTH_64=r.LENGTH_32=r.LENGTH_16=r.LENGTH_1=r.LENGTH_0=void 0,r.LENGTH_0=0,r.LENGTH_1=1,r.LENGTH_16=16,r.LENGTH_32=32,r.LENGTH_64=64,r.LENGTH_128=128,r.LENGTH_256=256,r.LENGTH_512=512,r.LENGTH_1024=1024},function(t,r,n){(function(r){var e=n(7).strict;t.exports=function(t){if(e(t)){var n=r.from(t.buffer);return t.byteLength!==t.buffer.byteLength&&(n=n.slice(t.byteOffset,t.byteOffset+t.byteLength)),n}return r.from(t)}}).call(this,n(9).Buffer)},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});const e=n(1);e.__exportStar(n(17),r),e.__exportStar(n(21),r),e.__exportStar(n(43),r),e.__exportStar(n(44),r),e.__exportStar(n(5),r),e.__exportStar(n(13),r)},function(t,r,n){"use strict";n.r(r),n.d(r,"randomBytes",(function(){return i}));var e=n(6);function i(t){return e.getBrowerCrypto().getRandomValues(new Uint8Array(t))}},function(t,r,n){"use strict";(function(t){function n(){return(null==t?void 0:t.crypto)||(null==t?void 0:t.msCrypto)||{}}function e(){const t=n();return t.subtle||t.webkitSubtle}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowserCryptoAvailable=r.getSubtleCrypto=r.getBrowerCrypto=void 0,r.getBrowerCrypto=n,r.getSubtleCrypto=e,r.isBrowserCryptoAvailable=function(){return!!n()&&!!e()}}).call(this,n(8))},function(t,r,n){"use strict";(function(t){function n(){return"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product}function e(){return void 0!==t&&void 0!==t.versions&&void 0!==t.versions.node}Object.defineProperty(r,"__esModule",{value:!0}),r.isBrowser=r.isNode=r.isReactNative=void 0,r.isReactNative=n,r.isNode=e,r.isBrowser=function(){return!n()&&!e()}}).call(this,n(20))},function(t,r){var n,e,i=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(r){try{return n.call(null,t,0)}catch(r){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:o}catch(t){n=o}try{e="function"==typeof clearTimeout?clearTimeout:u}catch(t){e=u}}();var f,a=[],h=!1,c=-1;function l(){h&&f&&(h=!1,f.length?a=f.concat(a):c=-1,a.length&&p())}function p(){if(!h){var t=s(l);h=!0;for(var r=a.length;r;){for(f=a,a=[];++c<r;)f&&f[c].run();c=-1,r=a.length}f=null,h=!1,function(t){if(e===clearTimeout)return clearTimeout(t);if((e===u||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(t);try{e(t)}catch(r){try{return e.call(null,t)}catch(r){return e.call(this,t)}}}(t)}}function d(t,r){this.fun=t,this.array=r}function y(){}i.nextTick=function(t){var r=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)r[n-1]=arguments[n];a.push(new d(t,r)),1!==a.length||h||s(p)},d.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=y,i.addListener=y,i.once=y,i.off=y,i.removeListener=y,i.removeAllListeners=y,i.emit=y,i.prependListener=y,i.prependOnceListener=y,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.aesCbcDecrypt=r.aesCbcEncrypt=void 0;const e=n(1),i=n(4);r.aesCbcEncrypt=function(t,r,n){return e.__awaiter(this,void 0,void 0,(function*(){return i.fallbackAesEncrypt(t,r,n)}))},r.aesCbcDecrypt=function(t,r,n){return e.__awaiter(this,void 0,void 0,(function*(){return i.fallbackAesDecrypt(t,r,n)}))}},function(t,r,n){
|
|
/*! MIT License. Copyright 2015-2018 Richard Moore <me@ricmoo.com>. See LICENSE.txt. */
|
|
!function(r){"use strict";function n(t){return parseInt(t)===t}function e(t){if(!n(t.length))return!1;for(var r=0;r<t.length;r++)if(!n(t[r])||t[r]<0||t[r]>255)return!1;return!0}function i(t,r){if(t.buffer&&"Uint8Array"===t.name)return r&&(t=t.slice?t.slice():Array.prototype.slice.call(t)),t;if(Array.isArray(t)){if(!e(t))throw new Error("Array contains invalid value: "+t);return new Uint8Array(t)}if(n(t.length)&&e(t))return new Uint8Array(t);throw new Error("unsupported array-like object")}function o(t){return new Uint8Array(t)}function u(t,r,n,e,i){null==e&&null==i||(t=t.slice?t.slice(e,i):Array.prototype.slice.call(t,e,i)),r.set(t,n)}var s,f={toBytes:function(t){var r=[],n=0;for(t=encodeURI(t);n<t.length;){var e=t.charCodeAt(n++);37===e?(r.push(parseInt(t.substr(n,2),16)),n+=2):r.push(e)}return i(r)},fromBytes:function(t){for(var r=[],n=0;n<t.length;){var e=t[n];e<128?(r.push(String.fromCharCode(e)),n++):e>191&&e<224?(r.push(String.fromCharCode((31&e)<<6|63&t[n+1])),n+=2):(r.push(String.fromCharCode((15&e)<<12|(63&t[n+1])<<6|63&t[n+2])),n+=3)}return r.join("")}},a=(s="0123456789abcdef",{toBytes:function(t){for(var r=[],n=0;n<t.length;n+=2)r.push(parseInt(t.substr(n,2),16));return r},fromBytes:function(t){for(var r=[],n=0;n<t.length;n++){var e=t[n];r.push(s[(240&e)>>4]+s[15&e])}return r.join("")}}),h={16:10,24:12,32:14},c=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],l=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],d=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],y=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],_=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],m=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],E=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],A=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],S=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],T=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function O(t){for(var r=[],n=0;n<t.length;n+=4)r.push(t[n]<<24|t[n+1]<<16|t[n+2]<<8|t[n+3]);return r}var R=function(t){if(!(this instanceof R))throw Error("AES must be instanitated with `new`");Object.defineProperty(this,"key",{value:i(t,!0)}),this._prepare()};R.prototype._prepare=function(){var t=h[this.key.length];if(null==t)throw new Error("invalid key size (must be 16, 24 or 32 bytes)");this._Ke=[],this._Kd=[];for(var r=0;r<=t;r++)this._Ke.push([0,0,0,0]),this._Kd.push([0,0,0,0]);var n,e=4*(t+1),i=this.key.length/4,o=O(this.key);for(r=0;r<i;r++)n=r>>2,this._Ke[n][r%4]=o[r],this._Kd[t-n][r%4]=o[r];for(var u,s=0,f=i;f<e;){if(u=o[i-1],o[0]^=l[u>>16&255]<<24^l[u>>8&255]<<16^l[255&u]<<8^l[u>>24&255]^c[s]<<24,s+=1,8!=i)for(r=1;r<i;r++)o[r]^=o[r-1];else{for(r=1;r<i/2;r++)o[r]^=o[r-1];u=o[i/2-1],o[i/2]^=l[255&u]^l[u>>8&255]<<8^l[u>>16&255]<<16^l[u>>24&255]<<24;for(r=i/2+1;r<i;r++)o[r]^=o[r-1]}for(r=0;r<i&&f<e;)a=f>>2,p=f%4,this._Ke[a][p]=o[r],this._Kd[t-a][p]=o[r++],f++}for(var a=1;a<t;a++)for(var p=0;p<4;p++)u=this._Kd[a][p],this._Kd[a][p]=E[u>>24&255]^A[u>>16&255]^S[u>>8&255]^T[255&u]},R.prototype.encrypt=function(t){if(16!=t.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var r=this._Ke.length-1,n=[0,0,0,0],e=O(t),i=0;i<4;i++)e[i]^=this._Ke[0][i];for(var u=1;u<r;u++){for(i=0;i<4;i++)n[i]=d[e[i]>>24&255]^y[e[(i+1)%4]>>16&255]^g[e[(i+2)%4]>>8&255]^_[255&e[(i+3)%4]]^this._Ke[u][i];e=n.slice()}var s,f=o(16);for(i=0;i<4;i++)s=this._Ke[r][i],f[4*i]=255&(l[e[i]>>24&255]^s>>24),f[4*i+1]=255&(l[e[(i+1)%4]>>16&255]^s>>16),f[4*i+2]=255&(l[e[(i+2)%4]>>8&255]^s>>8),f[4*i+3]=255&(l[255&e[(i+3)%4]]^s);return f},R.prototype.decrypt=function(t){if(16!=t.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var r=this._Kd.length-1,n=[0,0,0,0],e=O(t),i=0;i<4;i++)e[i]^=this._Kd[0][i];for(var u=1;u<r;u++){for(i=0;i<4;i++)n[i]=v[e[i]>>24&255]^b[e[(i+3)%4]>>16&255]^w[e[(i+2)%4]>>8&255]^m[255&e[(i+1)%4]]^this._Kd[u][i];e=n.slice()}var s,f=o(16);for(i=0;i<4;i++)s=this._Kd[r][i],f[4*i]=255&(p[e[i]>>24&255]^s>>24),f[4*i+1]=255&(p[e[(i+3)%4]>>16&255]^s>>16),f[4*i+2]=255&(p[e[(i+2)%4]>>8&255]^s>>8),f[4*i+3]=255&(p[255&e[(i+1)%4]]^s);return f};var x=function(t){if(!(this instanceof x))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new R(t)};x.prototype.encrypt=function(t){if((t=i(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var r=o(t.length),n=o(16),e=0;e<t.length;e+=16)u(t,n,0,e,e+16),u(n=this._aes.encrypt(n),r,e);return r},x.prototype.decrypt=function(t){if((t=i(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var r=o(t.length),n=o(16),e=0;e<t.length;e+=16)u(t,n,0,e,e+16),u(n=this._aes.decrypt(n),r,e);return r};var P=function(t,r){if(!(this instanceof P))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Block Chaining",this.name="cbc",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=o(16);this._lastCipherblock=i(r,!0),this._aes=new R(t)};P.prototype.encrypt=function(t){if((t=i(t)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var r=o(t.length),n=o(16),e=0;e<t.length;e+=16){u(t,n,0,e,e+16);for(var s=0;s<16;s++)n[s]^=this._lastCipherblock[s];this._lastCipherblock=this._aes.encrypt(n),u(this._lastCipherblock,r,e)}return r},P.prototype.decrypt=function(t){if((t=i(t)).length%16!=0)throw new Error("invalid ciphertext size (must be multiple of 16 bytes)");for(var r=o(t.length),n=o(16),e=0;e<t.length;e+=16){u(t,n,0,e,e+16),n=this._aes.decrypt(n);for(var s=0;s<16;s++)r[e+s]=n[s]^this._lastCipherblock[s];u(t,this._lastCipherblock,0,e,e+16)}return r};var B=function(t,r,n){if(!(this instanceof B))throw Error("AES must be instanitated with `new`");if(this.description="Cipher Feedback",this.name="cfb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 size)")}else r=o(16);n||(n=1),this.segmentSize=n,this._shiftRegister=i(r,!0),this._aes=new R(t)};B.prototype.encrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid plaintext size (must be segmentSize bytes)");for(var r,n=i(t,!0),e=0;e<n.length;e+=this.segmentSize){r=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)n[e+o]^=r[o];u(this._shiftRegister,this._shiftRegister,0,this.segmentSize),u(n,this._shiftRegister,16-this.segmentSize,e,e+this.segmentSize)}return n},B.prototype.decrypt=function(t){if(t.length%this.segmentSize!=0)throw new Error("invalid ciphertext size (must be segmentSize bytes)");for(var r,n=i(t,!0),e=0;e<n.length;e+=this.segmentSize){r=this._aes.encrypt(this._shiftRegister);for(var o=0;o<this.segmentSize;o++)n[e+o]^=r[o];u(this._shiftRegister,this._shiftRegister,0,this.segmentSize),u(t,this._shiftRegister,16-this.segmentSize,e,e+this.segmentSize)}return n};var L=function(t,r){if(!(this instanceof L))throw Error("AES must be instanitated with `new`");if(this.description="Output Feedback",this.name="ofb",r){if(16!=r.length)throw new Error("invalid initialation vector size (must be 16 bytes)")}else r=o(16);this._lastPrecipher=i(r,!0),this._lastPrecipherIndex=16,this._aes=new R(t)};L.prototype.encrypt=function(t){for(var r=i(t,!0),n=0;n<r.length;n++)16===this._lastPrecipherIndex&&(this._lastPrecipher=this._aes.encrypt(this._lastPrecipher),this._lastPrecipherIndex=0),r[n]^=this._lastPrecipher[this._lastPrecipherIndex++];return r},L.prototype.decrypt=L.prototype.encrypt;var C=function(t){if(!(this instanceof C))throw Error("Counter must be instanitated with `new`");0===t||t||(t=1),"number"==typeof t?(this._counter=o(16),this.setValue(t)):this.setBytes(t)};C.prototype.setValue=function(t){if("number"!=typeof t||parseInt(t)!=t)throw new Error("invalid counter value (must be an integer)");if(t>Number.MAX_SAFE_INTEGER)throw new Error("integer value out of safe range");for(var r=15;r>=0;--r)this._counter[r]=t%256,t=parseInt(t/256)},C.prototype.setBytes=function(t){if(16!=(t=i(t,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=t},C.prototype.increment=function(){for(var t=15;t>=0;t--){if(255!==this._counter[t]){this._counter[t]++;break}this._counter[t]=0}};var H=function(t,r){if(!(this instanceof H))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",r instanceof C||(r=new C(r)),this._counter=r,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new R(t)};H.prototype.encrypt=function(t){for(var r=i(t,!0),n=0;n<r.length;n++)16===this._remainingCounterIndex&&(this._remainingCounter=this._aes.encrypt(this._counter._counter),this._remainingCounterIndex=0,this._counter.increment()),r[n]^=this._remainingCounter[this._remainingCounterIndex++];return r},H.prototype.decrypt=H.prototype.encrypt;var k={AES:R,Counter:C,ModeOfOperation:{ecb:x,cbc:P,cfb:B,ofb:L,ctr:H},utils:{hex:a,utf8:f},padding:{pkcs7:{pad:function(t){var r=16-(t=i(t,!0)).length%16,n=o(t.length+r);u(t,n);for(var e=t.length;e<n.length;e++)n[e]=r;return n},strip:function(t){if((t=i(t,!0)).length<16)throw new Error("PKCS#7 invalid length");var r=t[t.length-1];if(r>16)throw new Error("PKCS#7 padding byte out of range");for(var n=t.length-r,e=0;e<r;e++)if(t[n+e]!==r)throw new Error("PKCS#7 invalid padding byte");var s=o(n);return u(t,s,0,0,n),s}}},_arrayTest:{coerceArray:i,createArray:o,copyArray:u}};t.exports=k}()},function(t,r,n){"use strict";n.r(r),function(t){n.d(r,"bufferToArray",(function(){return s})),n.d(r,"bufferToHex",(function(){return f})),n.d(r,"bufferToUtf8",(function(){return a})),n.d(r,"bufferToNumber",(function(){return h})),n.d(r,"bufferToBinary",(function(){return c})),n.d(r,"arrayToBuffer",(function(){return l})),n.d(r,"arrayToHex",(function(){return p})),n.d(r,"arrayToUtf8",(function(){return d})),n.d(r,"arrayToNumber",(function(){return y})),n.d(r,"arrayToBinary",(function(){return g})),n.d(r,"hexToBuffer",(function(){return _})),n.d(r,"hexToArray",(function(){return v})),n.d(r,"hexToUtf8",(function(){return b})),n.d(r,"hexToNumber",(function(){return w})),n.d(r,"hexToBinary",(function(){return m})),n.d(r,"utf8ToBuffer",(function(){return E})),n.d(r,"utf8ToArray",(function(){return A})),n.d(r,"utf8ToHex",(function(){return S})),n.d(r,"utf8ToNumber",(function(){return T})),n.d(r,"utf8ToBinary",(function(){return O})),n.d(r,"numberToBuffer",(function(){return R})),n.d(r,"numberToArray",(function(){return x})),n.d(r,"numberToHex",(function(){return P})),n.d(r,"numberToUtf8",(function(){return B})),n.d(r,"numberToBinary",(function(){return L})),n.d(r,"binaryToBuffer",(function(){return C})),n.d(r,"binaryToArray",(function(){return H})),n.d(r,"binaryToHex",(function(){return k})),n.d(r,"binaryToUtf8",(function(){return N})),n.d(r,"binaryToNumber",(function(){return I})),n.d(r,"isBinaryString",(function(){return U})),n.d(r,"isHexString",(function(){return M})),n.d(r,"isBuffer",(function(){return j})),n.d(r,"isTypedArray",(function(){return z})),n.d(r,"isArrayBuffer",(function(){return G})),n.d(r,"getType",(function(){return Y})),n.d(r,"getEncoding",(function(){return D})),n.d(r,"concatBuffers",(function(){return F})),n.d(r,"concatArrays",(function(){return K})),n.d(r,"trimLeft",(function(){return W})),n.d(r,"trimRight",(function(){return V})),n.d(r,"calcByteLength",(function(){return X})),n.d(r,"splitBytes",(function(){return $})),n.d(r,"swapBytes",(function(){return q})),n.d(r,"swapHex",(function(){return Z})),n.d(r,"sanitizeBytes",(function(){return J})),n.d(r,"padLeft",(function(){return Q})),n.d(r,"padRight",(function(){return tt})),n.d(r,"removeHexPrefix",(function(){return rt})),n.d(r,"addHexPrefix",(function(){return nt})),n.d(r,"sanitizeHex",(function(){return et})),n.d(r,"removeHexLeadingZeros",(function(){return it}));var e=n(7),i=n.n(e),o=n(15),u=n.n(o);function s(t){return new Uint8Array(t)}function f(t,r=!1){const n=t.toString("hex");return r?nt(n):n}function a(t){return t.toString("utf8")}function h(t){return t.readUIntBE(0,t.length)}function c(t){return g(s(t))}function l(t){return u()(t)}function p(t,r=!1){return f(l(t),r)}function d(t){return a(l(t))}function y(t){return h(l(t))}function g(t){return Array.from(t).map(L).join("")}function _(r){return t.from(rt(r),"hex")}function v(t){return s(_(t))}function b(t){return a(_(t))}function w(t){return y(v(t))}function m(t){return g(v(t))}function E(r){return t.from(r,"utf8")}function A(t){return s(E(t))}function S(t,r=!1){return f(E(t),r)}function T(t){const r=parseInt(t,10);return function(t,r){if(!t)throw new Error(r)}(!function(t){return void 0===t}(r),"Number can only safely store up to 53 bits"),r}function O(t){return g(A(t))}function R(t){return C(L(t))}function x(t){return H(L(t))}function P(t,r){return k(L(t),r)}function B(t){return""+t}function L(t){return J((t>>>0).toString(2))}function C(t){return l(H(t))}function H(t){return new Uint8Array($(t).map(t=>parseInt(t,2)))}function k(t,r){return p(H(t),r)}function N(t){return d(H(t))}function I(t){return y(H(t))}function U(t){return!("string"!=typeof t||!new RegExp(/^[01]+$/).test(t))&&t.length%8==0}function M(t,r){return!("string"!=typeof t||!t.match(/^0x[0-9A-Fa-f]*$/))&&(!r||t.length===2+2*r)}function j(r){return t.isBuffer(r)}function z(t){return i.a.strict(t)&&!j(t)}function G(t){return!z(t)&&!j(t)&&void 0!==t.byteLength}function Y(t){return j(t)?"buffer":z(t)?"typed-array":G(t)?"array-buffer":Array.isArray(t)?"array":typeof t}function D(t){return U(t)?"binary":M(t)?"hex":"utf8"}function F(...r){return t.concat(r)}function K(...t){let r=[];return t.forEach(t=>r=r.concat(Array.from(t))),new Uint8Array([...r])}function W(t,r){const n=t.length-r;return n>0&&(t=t.slice(n)),t}function V(t,r){return t.slice(0,r)}function X(t,r=8){const n=t%r;return n?(t-n)/r*r+r:t}function $(t,r=8){const n=J(t).match(new RegExp(`.{${r}}`,"gi"));return Array.from(n||[])}function q(t){return $(t).map(ot).join("")}function Z(t){return k(q(m(t)))}function J(t,r=8,n="0"){return Q(t,X(t.length,r),n)}function Q(t,r,n="0"){return ut(t,r,!0,n)}function tt(t,r,n="0"){return ut(t,r,!1,n)}function rt(t){return t.replace(/^0x/,"")}function nt(t){return t.startsWith("0x")?t:"0x"+t}function et(t){return(t=J(t=rt(t),2))&&(t=nt(t)),t}function it(t){const r=t.startsWith("0x");return t=(t=rt(t)).startsWith("0")?t.substring(1):t,r?nt(t):t}function ot(t){return t.split("").reverse().join("")}function ut(t,r,n,e="0"){const i=r-t.length;let o=t;if(i>0){const r=e.repeat(i);o=n?r+t:t+r}return o}}.call(this,n(9).Buffer)},function(t,r,n){"use strict";r.byteLength=function(t){var r=a(t),n=r[0],e=r[1];return 3*(n+e)/4-e},r.toByteArray=function(t){var r,n,e=a(t),u=e[0],s=e[1],f=new o(function(t,r,n){return 3*(r+n)/4-n}(0,u,s)),h=0,c=s>0?u-4:u;for(n=0;n<c;n+=4)r=i[t.charCodeAt(n)]<<18|i[t.charCodeAt(n+1)]<<12|i[t.charCodeAt(n+2)]<<6|i[t.charCodeAt(n+3)],f[h++]=r>>16&255,f[h++]=r>>8&255,f[h++]=255&r;2===s&&(r=i[t.charCodeAt(n)]<<2|i[t.charCodeAt(n+1)]>>4,f[h++]=255&r);1===s&&(r=i[t.charCodeAt(n)]<<10|i[t.charCodeAt(n+1)]<<4|i[t.charCodeAt(n+2)]>>2,f[h++]=r>>8&255,f[h++]=255&r);return f},r.fromByteArray=function(t){for(var r,n=t.length,i=n%3,o=[],u=0,s=n-i;u<s;u+=16383)o.push(h(t,u,u+16383>s?s:u+16383));1===i?(r=t[n-1],o.push(e[r>>2]+e[r<<4&63]+"==")):2===i&&(r=(t[n-2]<<8)+t[n-1],o.push(e[r>>10]+e[r>>4&63]+e[r<<2&63]+"="));return o.join("")};for(var e=[],i=[],o="undefined"!=typeof Uint8Array?Uint8Array:Array,u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,f=u.length;s<f;++s)e[s]=u[s],i[u.charCodeAt(s)]=s;function a(t){var r=t.length;if(r%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=t.indexOf("=");return-1===n&&(n=r),[n,n===r?0:4-n%4]}function h(t,r,n){for(var i,o,u=[],s=r;s<n;s+=3)i=(t[s]<<16&16711680)+(t[s+1]<<8&65280)+(255&t[s+2]),u.push(e[(o=i)>>18&63]+e[o>>12&63]+e[o>>6&63]+e[63&o]);return u.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},function(t,r){
|
|
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
|
r.read=function(t,r,n,e,i){var o,u,s=8*i-e-1,f=(1<<s)-1,a=f>>1,h=-7,c=n?i-1:0,l=n?-1:1,p=t[r+c];for(c+=l,o=p&(1<<-h)-1,p>>=-h,h+=s;h>0;o=256*o+t[r+c],c+=l,h-=8);for(u=o&(1<<-h)-1,o>>=-h,h+=e;h>0;u=256*u+t[r+c],c+=l,h-=8);if(0===o)o=1-a;else{if(o===f)return u?NaN:1/0*(p?-1:1);u+=Math.pow(2,e),o-=a}return(p?-1:1)*u*Math.pow(2,o-e)},r.write=function(t,r,n,e,i,o){var u,s,f,a=8*o-i-1,h=(1<<a)-1,c=h>>1,l=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=e?0:o-1,d=e?1:-1,y=r<0||0===r&&1/r<0?1:0;for(r=Math.abs(r),isNaN(r)||r===1/0?(s=isNaN(r)?1:0,u=h):(u=Math.floor(Math.log(r)/Math.LN2),r*(f=Math.pow(2,-u))<1&&(u--,f*=2),(r+=u+c>=1?l/f:l*Math.pow(2,1-c))*f>=2&&(u++,f/=2),u+c>=h?(s=0,u=h):u+c>=1?(s=(r*f-1)*Math.pow(2,i),u+=c):(s=r*Math.pow(2,c-1)*Math.pow(2,i),u=0));i>=8;t[n+p]=255&s,p+=d,s/=256,i-=8);for(u=u<<i|s,a+=i;a>0;t[n+p]=255&u,p+=d,u/=256,a-=8);t[n+p-d]|=128*y}},function(t,r){var n={}.toString;t.exports=Array.isArray||function(t){return"[object Array]"==n.call(t)}},function(t,r,n){var e=r;e.utils=n(0),e.common=n(3),e.sha=n(29),e.ripemd=n(33),e.hmac=n(34),e.sha1=e.sha.sha1,e.sha256=e.sha.sha256,e.sha224=e.sha.sha224,e.sha384=e.sha.sha384,e.sha512=e.sha.sha512,e.ripemd160=e.ripemd.ripemd160},function(t,r){"function"==typeof Object.create?t.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:t.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}},function(t,r,n){"use strict";r.sha1=n(30),r.sha224=n(31),r.sha256=n(11),r.sha384=n(32),r.sha512=n(12)},function(t,r,n){"use strict";var e=n(0),i=n(3),o=n(10),u=e.rotl32,s=e.sum32,f=e.sum32_5,a=o.ft_1,h=i.BlockHash,c=[1518500249,1859775393,2400959708,3395469782];function l(){if(!(this instanceof l))return new l;h.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}e.inherits(l,h),t.exports=l,l.blockSize=512,l.outSize=160,l.hmacStrength=80,l.padLength=64,l.prototype._update=function(t,r){for(var n=this.W,e=0;e<16;e++)n[e]=t[r+e];for(;e<n.length;e++)n[e]=u(n[e-3]^n[e-8]^n[e-14]^n[e-16],1);var i=this.h[0],o=this.h[1],h=this.h[2],l=this.h[3],p=this.h[4];for(e=0;e<n.length;e++){var d=~~(e/20),y=f(u(i,5),a(d,o,h,l),p,n[e],c[d]);p=l,l=h,h=u(o,30),o=i,i=y}this.h[0]=s(this.h[0],i),this.h[1]=s(this.h[1],o),this.h[2]=s(this.h[2],h),this.h[3]=s(this.h[3],l),this.h[4]=s(this.h[4],p)},l.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"big"):e.split32(this.h,"big")}},function(t,r,n){"use strict";var e=n(0),i=n(11);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}e.inherits(o,i),t.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,7),"big"):e.split32(this.h.slice(0,7),"big")}},function(t,r,n){"use strict";var e=n(0),i=n(12);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}e.inherits(o,i),t.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h.slice(0,12),"big"):e.split32(this.h.slice(0,12),"big")}},function(t,r,n){"use strict";var e=n(0),i=n(3),o=e.rotl32,u=e.sum32,s=e.sum32_3,f=e.sum32_4,a=i.BlockHash;function h(){if(!(this instanceof h))return new h;a.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function c(t,r,n,e){return t<=15?r^n^e:t<=31?r&n|~r&e:t<=47?(r|~n)^e:t<=63?r&e|n&~e:r^(n|~e)}function l(t){return t<=15?0:t<=31?1518500249:t<=47?1859775393:t<=63?2400959708:2840853838}function p(t){return t<=15?1352829926:t<=31?1548603684:t<=47?1836072691:t<=63?2053994217:0}e.inherits(h,a),r.ripemd160=h,h.blockSize=512,h.outSize=160,h.hmacStrength=192,h.padLength=64,h.prototype._update=function(t,r){for(var n=this.h[0],e=this.h[1],i=this.h[2],a=this.h[3],h=this.h[4],v=n,b=e,w=i,m=a,E=h,A=0;A<80;A++){var S=u(o(f(n,c(A,e,i,a),t[d[A]+r],l(A)),g[A]),h);n=h,h=a,a=o(i,10),i=e,e=S,S=u(o(f(v,c(79-A,b,w,m),t[y[A]+r],p(A)),_[A]),E),v=E,E=m,m=o(w,10),w=b,b=S}S=s(this.h[1],i,m),this.h[1]=s(this.h[2],a,E),this.h[2]=s(this.h[3],h,v),this.h[3]=s(this.h[4],n,b),this.h[4]=s(this.h[0],e,w),this.h[0]=S},h.prototype._digest=function(t){return"hex"===t?e.toHex32(this.h,"little"):e.split32(this.h,"little")};var d=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],y=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],g=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],_=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},function(t,r,n){"use strict";var e=n(0),i=n(2);function o(t,r,n){if(!(this instanceof o))return new o(t,r,n);this.Hash=t,this.blockSize=t.blockSize/8,this.outSize=t.outSize/8,this.inner=null,this.outer=null,this._init(e.toArray(r,n))}t.exports=o,o.prototype._init=function(t){t.length>this.blockSize&&(t=(new this.Hash).update(t).digest()),i(t.length<=this.blockSize);for(var r=t.length;r<this.blockSize;r++)t.push(0);for(r=0;r<t.length;r++)t[r]^=54;for(this.inner=(new this.Hash).update(t),r=0;r<t.length;r++)t[r]^=106;this.outer=(new this.Hash).update(t)},o.prototype.update=function(t,r){return this.inner.update(t,r),this},o.prototype.digest=function(t){return this.outer.update(this.inner.digest()),this.outer.digest(t)}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.MAC_LENGTH=r.IV_LENGTH=r.KEY_LENGTH=r.PREFIX_LENGTH=r.RIPEMD160_NODE_ALGO=r.SHA512_NODE_ALGO=r.SHA256_NODE_ALGO=r.HMAC_NODE_ALGO=r.AES_NODE_ALGO=r.SHA512_BROWSER_ALGO=r.SHA256_BROWSER_ALGO=r.HMAC_BROWSER=r.HMAC_BROWSER_ALGO=r.AES_BROWSER_ALGO=r.HMAC_LENGTH=r.AES_LENGTH=void 0;const e=n(14);r.AES_LENGTH=e.LENGTH_256,r.HMAC_LENGTH=e.LENGTH_256,r.AES_BROWSER_ALGO="AES-CBC",r.HMAC_BROWSER_ALGO="SHA-"+r.AES_LENGTH,r.HMAC_BROWSER="HMAC",r.SHA256_BROWSER_ALGO="SHA-256",r.SHA512_BROWSER_ALGO="SHA-512",r.AES_NODE_ALGO=`aes-${r.AES_LENGTH}-cbc`,r.HMAC_NODE_ALGO="sha"+r.HMAC_LENGTH,r.SHA256_NODE_ALGO="sha256",r.SHA512_NODE_ALGO="sha512",r.RIPEMD160_NODE_ALGO="ripemd160",r.PREFIX_LENGTH=e.LENGTH_1,r.KEY_LENGTH=e.LENGTH_32,r.IV_LENGTH=e.LENGTH_16,r.MAC_LENGTH=e.LENGTH_32},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.UTF8_ENC=r.HEX_ENC=void 0,r.HEX_ENC="hex",r.UTF8_ENC="utf8"},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ERROR_BAD_MAC=void 0,r.ERROR_BAD_MAC="Bad MAC"},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.VERIFY_OP=r.SIGN_OP=r.DECRYPT_OP=r.ENCRYPT_OP=void 0,r.ENCRYPT_OP="encrypt",r.DECRYPT_OP="decrypt",r.SIGN_OP="sign",r.VERIFY_OP="verify"},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0});n(1).__exportStar(n(6),r)},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.pkcs7=void 0;const e=[[16,16,16,16,16,16,16,16,16,16,16,16,16,16,16,16],[15,15,15,15,15,15,15,15,15,15,15,15,15,15,15],[14,14,14,14,14,14,14,14,14,14,14,14,14,14],[13,13,13,13,13,13,13,13,13,13,13,13,13],[12,12,12,12,12,12,12,12,12,12,12,12],[11,11,11,11,11,11,11,11,11,11,11],[10,10,10,10,10,10,10,10,10,10],[9,9,9,9,9,9,9,9,9],[8,8,8,8,8,8,8,8],[7,7,7,7,7,7,7],[6,6,6,6,6,6],[5,5,5,5,5],[4,4,4,4],[3,3,3],[2,2],[1]];r.pkcs7={pad(t){const r=e[t.byteLength%16||0],n=new Uint8Array(t.byteLength+r.length);return n.set(t),n.set(r,t.byteLength),n},unpad:t=>t.subarray(0,t.byteLength-t[t.byteLength-1])}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0})},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.isConstantTime=r.assert=void 0,r.assert=function(t,r){if(!t)throw new Error(r||"Assertion failed")},r.isConstantTime=function(t,r){if(t.length!==r.length)return!1;let n=0;for(let e=0;e<t.length;e++)n|=t[e]^r[e];return 0===n}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.hmacSha512Verify=r.hmacSha512Sign=r.hmacSha256Verify=r.hmacSha256Sign=void 0;const e=n(1),i=n(5),o=n(4);r.hmacSha256Sign=function(t,r){return e.__awaiter(this,void 0,void 0,(function*(){return o.fallbackHmacSha256Sign(t,r)}))},r.hmacSha256Verify=function(t,r,n){return e.__awaiter(this,void 0,void 0,(function*(){const e=o.fallbackHmacSha256Sign(t,r);return i.isConstantTime(e,n)}))},r.hmacSha512Sign=function(t,r){return e.__awaiter(this,void 0,void 0,(function*(){return o.fallbackHmacSha512Sign(t,r)}))},r.hmacSha512Verify=function(t,r,n){return e.__awaiter(this,void 0,void 0,(function*(){const e=o.fallbackHmacSha512Sign(t,r);return i.isConstantTime(e,n)}))}},function(t,r,n){"use strict";Object.defineProperty(r,"__esModule",{value:!0}),r.ripemd160=r.sha512=r.sha256=void 0;const e=n(1),i=n(4);r.sha256=function(t){return e.__awaiter(this,void 0,void 0,(function*(){return i.fallbackSha256(t)}))},r.sha512=function(t){return e.__awaiter(this,void 0,void 0,(function*(){return i.fallbackSha512(t)}))},r.ripemd160=function(t){return e.__awaiter(this,void 0,void 0,(function*(){return i.fallbackRipemd160(t)}))}}])})); |